aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 6 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index f604121..cff81f7 100644
--- a/Makefile
+++ b/Makefile
@@ -9,10 +9,7 @@ RM := rm
# flags
CFLAGS_EXTRA += -std=c11 -O2 -fPIC -Wall -Werror
-ifneq ($(wildcard /usr/include/iniparser),)
-CFLAGS_EXTRA += -I/usr/include/iniparser
-endif
-CFLAGS_EXTRA += -liniparser
+CFLAGS_EXTRA += $(shell pkg-config --cflags --libs iniparser)
CFLAGS_SYSTEMD := $(shell pkg-config --cflags --libs libsystemd 2>/dev/null)
ifneq ($(CFLAGS_SYSTEMD),)
CFLAGS_EXTRA += -DHAVE_SYSTEMD $(CFLAGS_SYSTEMD)
@@ -28,7 +25,8 @@ LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie
# this is just a fallback in case you do not use git but downloaded
# a release tarball...
-VERSION := 0.8.7
+DISTVER := 0.9.2
+VERSION ?= $(shell git describe --long 2>/dev/null || echo $(DISTVER))
all: mpd-notification README.html
@@ -65,6 +63,6 @@ distclean:
$(RM) -f *.o *~ README.html mpd-notification version.h config.h
release:
- git archive --format=tar.xz --prefix=mpd-notification-$(VERSION)/ $(VERSION) > mpd-notification-$(VERSION).tar.xz
- gpg --armor --detach-sign --comment mpd-notification-$(VERSION).tar.xz mpd-notification-$(VERSION).tar.xz
- git notes --ref=refs/notes/signatures/tar add -C $$(git archive --format=tar --prefix=mpd-notification-$(VERSION)/ $(VERSION) | gpg --armor --detach-sign --comment mpd-notification-$(VERSION).tar | git hash-object -w --stdin) $(VERSION)
+ git archive --format=tar.xz --prefix=mpd-notification-$(DISTVER)/ $(DISTVER) > mpd-notification-$(DISTVER).tar.xz
+ gpg --armor --detach-sign --comment mpd-notification-$(DISTVER).tar.xz mpd-notification-$(DISTVER).tar.xz
+ git notes --ref=refs/notes/signatures/tar add -C $$(git archive --format=tar --prefix=mpd-notification-$(DISTVER)/ $(DISTVER) | gpg --armor --detach-sign --comment mpd-notification-$(DISTVER).tar | git hash-object -w --stdin) $(DISTVER)