2014-08-19 18:22:57 +02:00
|
|
|
CHECKS_DIR = $(CFG_DIR)/checks
|
|
|
|
|
2014-09-04 00:19:32 +02:00
|
|
|
# Check if we want build X11 support
|
|
|
|
X11 = $(shell if [ -z "$(DISABLE_X11)" ] || [ "$(DISABLE_X11)" = "0" ] ; then echo enabled ; else echo disabled ; fi)
|
|
|
|
ifneq ($(X11), disabled)
|
2015-03-16 13:16:03 +01:00
|
|
|
-include $(CHECKS_DIR)/x11.mk
|
2014-07-30 14:14:13 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Check if we want build audio support
|
2014-07-31 11:54:22 +02:00
|
|
|
AUDIO = $(shell if [ -z "$(DISABLE_AV)" ] || [ "$(DISABLE_AV)" = "0" ] ; then echo enabled ; else echo disabled ; fi)
|
2014-07-30 14:14:13 +02:00
|
|
|
ifneq ($(AUDIO), disabled)
|
2015-08-09 04:21:23 +02:00
|
|
|
-include $(CHECKS_DIR)/audio.mk
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Check if we want build video support
|
2015-11-04 05:04:05 +01:00
|
|
|
VIDEO = $(shell if [ -z "$(DISABLE_AV)" ] || [ "$(DISABLE_AV)" = "0" ] ; then echo enabled ; else echo disabled ; fi)
|
|
|
|
ifneq ($(X11), disabled)
|
2015-08-09 04:21:23 +02:00
|
|
|
ifneq ($(AUDIO), disabled)
|
|
|
|
ifneq ($(VIDEO), disabled)
|
|
|
|
-include $(CHECKS_DIR)/video.mk
|
|
|
|
endif
|
2014-07-30 14:14:13 +02:00
|
|
|
endif
|
2015-11-04 05:04:05 +01:00
|
|
|
endif
|
2014-07-30 14:14:13 +02:00
|
|
|
|
|
|
|
# Check if we want build sound notifications support
|
2014-07-31 11:54:22 +02:00
|
|
|
SND_NOTIFY = $(shell if [ -z "$(DISABLE_SOUND_NOTIFY)" ] || [ "$(DISABLE_SOUND_NOTIFY)" = "0" ] ; then echo enabled ; else echo disabled ; fi)
|
2014-07-30 14:14:13 +02:00
|
|
|
ifneq ($(SND_NOTIFY), disabled)
|
2015-03-16 13:16:03 +01:00
|
|
|
-include $(CHECKS_DIR)/sound_notifications.mk
|
2014-07-30 14:14:13 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Check if we want build desktop notifications support
|
2014-07-31 11:54:22 +02:00
|
|
|
DESK_NOTIFY = $(shell if [ -z "$(DISABLE_DESKTOP_NOTIFY)" ] || [ "$(DISABLE_DESKTOP_NOTIFY)" = "0" ] ; then echo enabled ; else echo disabled ; fi)
|
2014-07-30 14:14:13 +02:00
|
|
|
ifneq ($(DESK_NOTIFY), disabled)
|
2015-03-16 13:16:03 +01:00
|
|
|
-include $(CHECKS_DIR)/desktop_notifications.mk
|
2014-07-30 14:14:13 +02:00
|
|
|
endif
|
|
|
|
|
2016-10-05 11:55:45 +02:00
|
|
|
# Check if we want build QR exported as PNG support
|
|
|
|
QR_PNG = $(shell if [ -z "$(DISABLE_QRPNG)" ] || [ "$(DISABLE_QRPNG)" = "0" ] ; then echo enabled ; else echo disabled ; fi)
|
|
|
|
ifneq ($(QR_PNG), disabled)
|
|
|
|
-include $(CHECKS_DIR)/qr_png.mk
|
|
|
|
endif
|
|
|
|
|
2014-07-30 14:14:13 +02:00
|
|
|
# Check if we can build Toxic
|
2015-07-14 07:27:07 +02:00
|
|
|
CHECK_LIBS = $(shell $(PKG_CONFIG) --exists $(LIBS) || echo -n "error")
|
2014-07-30 14:14:13 +02:00
|
|
|
ifneq ($(CHECK_LIBS), error)
|
2015-07-14 07:27:07 +02:00
|
|
|
CFLAGS += $(shell $(PKG_CONFIG) --cflags $(LIBS))
|
|
|
|
LDFLAGS += $(shell $(PKG_CONFIG) --libs $(LIBS))
|
2015-03-16 13:16:03 +01:00
|
|
|
else ifneq ($(MAKECMDGOALS), clean)
|
2015-07-14 07:27:07 +02:00
|
|
|
MISSING_LIBS = $(shell for lib in $(LIBS) ; do if ! $(PKG_CONFIG) --exists $$lib ; then echo $$lib ; fi ; done)
|
2015-03-16 13:16:03 +01:00
|
|
|
$(warning ERROR -- Cannot compile Toxic)
|
|
|
|
$(warning ERROR -- You need these libraries)
|
|
|
|
$(warning ERROR -- $(MISSING_LIBS))
|
|
|
|
$(error ERROR)
|
2014-07-30 14:14:13 +02:00
|
|
|
endif
|