diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2016-03-31 22:42:10 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-03-31 22:42:10 +0200 |
commit | 687008ee73e4562dd92e49a806aba9784815b8f1 (patch) | |
tree | cee7ae2fdfb5c0f9bc7e9d76a3cddb60b4d80938 /GNUmakefile | |
parent | d34fadd78b268358c9fb912ab2a2fbc246491e9b (diff) | |
download | fbida-687008ee73e4562dd92e49a806aba9784815b8f1.tar.gz |
build: tweak dep check
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/GNUmakefile b/GNUmakefile index 7b54373..33a376f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -10,6 +10,24 @@ resdir = $(DESTDIR)$(RESDIR) CFLAGS += -DVERSION='"$(VERSION)"' -I$(srcdir) CFLAGS += -Wno-pointer-sign +# hard build deps +PKG_CONFIG = pkg-config +PKGS_FBI := freetype2 fontconfig libdrm +PKGS_FBPDF := libdrm poppler-glib gbm epoxy cairo-gl +HAVE_DEPS := $(shell $(PKG_CONFIG) $(PKGS_FBI) $(PKGS_FBPDF) && echo yes) + +ifeq ($(HAVE_LINUX_FB_H),yes) +ifneq ($(HAVE_DEPS),yes) +.PHONY: deps +deps: + @echo "Build dependencies missing for fbi and/or fbpdf." + @echo " fbi needs: $(PKGS_FBI)" + @echo " fbpdf needs: $(PKGS_FBPDF)" + @echo "Please install." + @false +endif +endif + # default target all: build @@ -68,8 +86,6 @@ ifeq ($(HAVE_LIBCURL),yes) ida fbi : LDFLAGS += -Wl,--wrap=fopen endif -PKG_CONFIG = pkg-config - ######################################################################## # conditional stuff @@ -171,8 +187,6 @@ OBJS_FBI := \ dither.o filter.o op.o OBJS_FBI += $(filter-out wr/%,$(call ac_lib_mkvar,$(fbi_libs),OBJS)) -PKGS_FBI := freetype2 fontconfig libdrm - # font + drm + jpeg/exif libs fbi : CFLAGS += $(shell $(PKG_CONFIG) --cflags $(PKGS_FBI)) fbi : LDLIBS += $(shell $(PKG_CONFIG) --libs $(PKGS_FBI)) @@ -189,21 +203,11 @@ OBJS_FBPDF := \ fbpdf.o vt.o kbd.o fbtools.o drmtools.o drmtools-egl.o \ fbiconfig.o parseconfig.o -PKGS_FBPDF := libdrm poppler-glib gbm epoxy cairo-gl - # font + drm + jpeg/exif libs fbpdf : CFLAGS += $(shell $(PKG_CONFIG) --cflags $(PKGS_FBPDF)) fbpdf : LDLIBS += $(shell $(PKG_CONFIG) --libs $(PKGS_FBPDF)) -ifeq ($(shell $(PKG_CONFIG) $(PKGS_FBPDF) && echo ok),ok) fbpdf: $(OBJS_FBPDF) -else -.PHONY: fbpdf -fbpdf: - @echo "Build dependencies missing for fbpdf" - @echo "needed: $(PKGS_FBPDF)" - false -endif ######################################################################## |