aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5fa6221..635bea9 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@ CC := gcc
MD := markdown
CONVERT := convert -define png:compression-level=9 -background transparent
INSTALL := install
+CP := cp
RM := rm
CFLAGS += -O2 -Wall -Werror
CFLAGS += $(shell pkg-config --cflags --libs libnotify)
@@ -13,9 +14,12 @@ VERSION := 0.6.6
all: netlink-notify icons README.html
-netlink-notify: netlink-notify.c version.h
+netlink-notify: netlink-notify.c version.h config.h
$(CC) $(CFLAGS) -o netlink-notify netlink-notify.c
+config.h:
+ $(CP) config.def.h config.h
+
version.h: $(wildcard .git/HEAD .git/index .git/refs/tags/*) Makefile
echo "#ifndef VERSION" > $@
echo "#define VERSION \"$(shell git describe --tags --long 2>/dev/null || echo ${VERSION})\"" >> $@
@@ -62,7 +66,10 @@ install-doc: README.html
$(INSTALL) -D -m0644 screenshot-up.png $(DESTDIR)/usr/share/doc/netlink-notify/screenshot-up.png
clean:
- $(RM) -f *.o *~ netlink-notify-*.png README.html netlink-notify version.h
+ $(RM) -f *.o *~ README.html netlink-notify version.h
+
+distclean:
+ $(RM) -f *.o *~ README.html netlink-notify version.h config.h
release:
git archive --format=tar.xz --prefix=netlink-notify-$(VERSION)/ $(VERSION) > netlink-notify-$(VERSION).tar.xz