aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-09-30 00:41:51 +0200
committerGravatar Christian Hesse <mail@eworm.de>2014-09-30 00:41:51 +0200
commit1f6eabf364e17b0556994c5011622d0a8015bac0 (patch)
tree13ef0b750a3c89c0f16afbe52de02dae53a9c8d1 /Makefile
parentc7691a1a46450d13e31b2494bad906bbaefa5f6d (diff)
downloadnetlink-notify-1f6eabf364e17b0556994c5011622d0a8015bac0.tar.gz
netlink-notify-1f6eabf364e17b0556994c5011622d0a8015bac0.tar.zst
rework big parts of the code
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