summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
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