summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2017-01-05 16:30:50 +0100
committerGravatar Christian Hesse <mail@eworm.de>2017-01-05 16:30:50 +0100
commitf58f74d21a0555574158ab5ee8b331a4a38d36d5 (patch)
tree6b8030da0d47d782e1740f72cdae8b93209f394a /Makefile
parentd5d5a4424fb0682ccf4ba4d0463755470dde6224 (diff)
downloadmpd-notification-f58f74d21a0555574158ab5ee8b331a4a38d36d5.tar.gz
mpd-notification-f58f74d21a0555574158ab5ee8b331a4a38d36d5.tar.zst
make systemd optional
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a557919..7e4492d 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,10 @@ RM := rm
# flags
CFLAGS += -std=c11 -O2 -fPIC -Wall -Werror
CFLAGS += -liniparser
-CFLAGS += $(shell pkg-config --cflags --libs libsystemd)
+CFLAGS_SYSTEMD := $(shell pkg-config --cflags --libs libsystemd 2>/dev/null)
+ifneq ($(CFLAGS_SYSTEMD),)
+CFLAGS += -DHAVE_SYSTEMD $(CFLAGS_SYSTEMD)
+endif
CFLAGS += $(shell pkg-config --cflags --libs libmpdclient)
CFLAGS += $(shell pkg-config --cflags --libs libnotify)
CFLAGS_LIBAV := $(shell pkg-config --cflags --libs libavformat libavutil 2>/dev/null)