1CHECKS_DIR = $(CFG_DIR)/checks 2 3# Check if we want build X11 support 4X11 := $(shell if [ -z "$(DISABLE_X11)" ] || [ "$(DISABLE_X11)" = "0" ] ; then echo enabled ; else echo disabled ; fi) 5ifneq ($(X11), disabled) 6 -include $(CHECKS_DIR)/x11.mk 7endif 8 9# Check if we want build audio support 10AUDIO := $(shell if [ -z "$(DISABLE_AV)" ] || [ "$(DISABLE_AV)" = "0" ] ; then echo enabled ; else echo disabled ; fi) 11ifneq ($(AUDIO), disabled) 12 -include $(CHECKS_DIR)/audio.mk 13endif 14 15# Check if we want build video support 16VIDEO := $(shell if [ -z "$(DISABLE_VI)" ] || [ "$(DISABLE_VI)" = "0" ] ; then echo enabled ; else echo disabled ; fi) 17ifneq ($(X11), disabled) 18ifneq ($(AUDIO), disabled) 19ifneq ($(VIDEO), disabled) 20 -include $(CHECKS_DIR)/video.mk 21endif 22endif 23endif 24 25#check if we want to build with game support 26GAMES := $(shell if [ -z "$(DISABLE_GAMES)" ] || [ "$(DISABLE_GAMES)" = "0" ] ; then echo enabled ; else echo disabled ; fi) 27ifneq ($(GAMES), disabled) 28 -include $(CHECKS_DIR)/games.mk 29endif 30 31# Check if we want build sound notifications support 32SND_NOTIFY := $(shell if [ -z "$(DISABLE_SOUND_NOTIFY)" ] || [ "$(DISABLE_SOUND_NOTIFY)" = "0" ] ; then echo enabled ; else echo disabled ; fi) 33ifneq ($(SND_NOTIFY), disabled) 34 -include $(CHECKS_DIR)/sound_notifications.mk 35endif 36 37# Check if we want build desktop notifications support 38DESK_NOTIFY := $(shell if [ -z "$(DISABLE_DESKTOP_NOTIFY)" ] || [ "$(DISABLE_DESKTOP_NOTIFY)" = "0" ] ; then echo enabled ; else echo disabled ; fi) 39ifneq ($(DESK_NOTIFY), disabled) 40 -include $(CHECKS_DIR)/desktop_notifications.mk 41endif 42 43# Check if we want build QR export support 44QR_CODE := $(shell if [ -z "$(DISABLE_QRCODE)" ] || [ "$(DISABLE_QRCODE)" = "0" ] ; then echo enabled ; else echo disabled ; fi) 45ifneq ($(QR_CODE), disabled) 46 -include $(CHECKS_DIR)/qr.mk 47endif 48 49# Check if we want build QR exported as PNG support 50QR_PNG := $(shell if [ -z "$(DISABLE_QRPNG)" ] || [ "$(DISABLE_QRPNG)" = "0" ] ; then echo enabled ; else echo disabled ; fi) 51ifneq ($(QR_PNG), disabled) 52 -include $(CHECKS_DIR)/qr_png.mk 53endif 54 55# Check if we want build Python scripting support 56PYTHON := $(shell if [ -z "$(ENABLE_PYTHON)" ] || [ "$(ENABLE_PYTHON)" = "0" ] ; then echo disabled ; else echo enabled ; fi) 57ifneq ($(PYTHON), disabled) 58 -include $(CHECKS_DIR)/python.mk 59endif 60 61# Check if we can build Toxic 62CHECK_LIBS := $(shell $(PKG_CONFIG) --exists $(LIBS) || echo -n "error") 63ifneq ($(CHECK_LIBS), error) 64 CFLAGS += $(shell $(PKG_CONFIG) --cflags $(LIBS)) 65 LDFLAGS += $(shell $(PKG_CONFIG) --libs $(LIBS)) 66else ifneq ($(MAKECMDGOALS), clean) 67 MISSING_LIBS := $(shell for lib in $(LIBS) ; do if ! $(PKG_CONFIG) --exists $$lib ; then echo $$lib ; fi ; done) 68 $(warning ERROR -- Cannot compile Toxic) 69 $(warning ERROR -- You need these libraries) 70 $(warning ERROR -- $(MISSING_LIBS)) 71 $(error ERROR) 72endif 73