From 011989fbb773a1568be6d8609fb821ea8e62fb0f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 23 Jun 2015 12:22:53 +0200 Subject: introduce config.h --- Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index df16ebc..75c71ab 100644 --- a/Makefile +++ b/Makefile @@ -14,14 +14,17 @@ VERSION := 0.0.8 all: journal-notify README.html +journal-notify: journal-notify.c journal-notify.h config.h version.h + $(CC) $(CFLAGS) -o journal-notify journal-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})\"" >> $@ echo "#endif" >> $@ -journal-notify: journal-notify.c journal-notify.h version.h - $(CC) $(CFLAGS) -o journal-notify journal-notify.c - README.html: README.md $(MD) README.md > README.html @@ -42,7 +45,10 @@ install-doc: README.html $(INSTALL) -D -m0644 screenshot.png $(DESTDIR)/usr/share/doc/journal-notify/screenshot.png clean: - rm -f *.o *~ README.html journal-notify + $(RM) -f *.o *~ README.html journal-notify version.h + +distclean: + $(RM) -f *.o *~ README.html journal-notify version.h config.h release: git archive --format=tar.xz --prefix=journal-notify-$(VERSION)/ $(VERSION) > journal-notify-$(VERSION).tar.xz -- cgit v1.2.3-54-g00ecf