aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-11-10 00:36:14 +0100
committerMattias Andrée <maandree@operamail.com>2015-11-10 00:41:14 +0100
commit22a8f1164897132f22644864d179313f4e353502 (patch)
treed7301dd03fa248e7161938769412c2c9d3723e0e /Makefile
parentadd man page (diff)
downloadsleep-until-22a8f1164897132f22644864d179313f4e353502.tar.gz
sleep-until-22a8f1164897132f22644864d179313f4e353502.tar.bz2
sleep-until-22a8f1164897132f22644864d179313f4e353502.tar.xz
add ability to select clock
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d1ac213..1accbd7 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,10 @@ PKGNAME = sleep-until
COMMAND = sleep-until
+# The https://github.com/maandree/gpp command.
+GPP = gpp
+
+
WARN = -Wall -Wextra -pedantic -Wdouble-promotion -Wformat=2 -Winit-self -Wmissing-include-dirs \
-Wtrampolines -Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
-Wno-variadic-macros -Wsync-nand -Wunsafe-loop-optimizations -Wcast-align \
@@ -62,10 +66,13 @@ bin/sleep-until: obj/sleep-until.o
@mkdir -p bin
$(CC) $(FLAGS) -o $@ $^ $(LDFLAGS)
-obj/sleep-until.o: src/sleep-until.c
- @mkdir -p obj
+obj/sleep-until.o: obj/sleep-until.c
$(CC) $(FLAGS) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
+obj/sleep-until.c: src/sleep-until.c
+ @mkdir -p obj
+ gpp -s '$$' -i $< -o $@
+
# Build rules for documentation.
.PHONY: doc