From b4b474d84e539109c755fa895cece429bc229cd3 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sun, 4 Jan 2015 16:16:57 +0100 Subject: introduce udev-block-notify.h and config.h --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 811b227..a14daa5 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ CC := gcc MD := markdown INSTALL := install RM := rm +CP := cp CFLAGS += -std=c11 -O2 -Wall -Werror CFLAGS += $(shell pkg-config --cflags --libs libudev) CFLAGS += $(shell pkg-config --cflags --libs libnotify) @@ -13,9 +14,12 @@ VERSION := 0.7.4 all: udev-block-notify README.html -udev-block-notify: udev-block-notify.c version.h +udev-block-notify: udev-block-notify.c config.h version.h $(CC) $(CFLAGS) -o udev-block-notify udev-block-notify.c +config.h: config.def.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})\"" >> $@ @@ -38,6 +42,9 @@ install-doc: README.html clean: $(RM) -f *.o *~ README.html udev-block-notify version.h +distclean: + $(RM) -f *.o *~ README.html udev-block-notify config.h version.h + release: git archive --format=tar.xz --prefix=udev-block-notify-$(VERSION)/ $(VERSION) > udev-block-notify-$(VERSION).tar.xz gpg -ab udev-block-notify-$(VERSION).tar.xz -- cgit v1.2.3-70-g09d2