aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-02-24 21:43:00 -0300
committerEuAndreh <eu@euandre.org>2021-02-24 21:43:00 -0300
commit8046a7014af9d5fee16ea36b7f0881e017f8333c (patch)
tree674333e4a09e089fc07a9d11da3269d3395d7762
parentaux/ci/ci-build.sh: Don't --delete on trap to avoid deleting pages in case of... (diff)
downloadremembering-8046a7014af9d5fee16ea36b7f0881e017f8333c.tar.gz
remembering-8046a7014af9d5fee16ea36b7f0881e017f8333c.tar.xz
Makefile: put VERSION and DATE macros in $(DEFS) variable
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 2bd73d5..3a60de0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,13 @@
.POSIX:
CC = c99
-CFLAGS = -std=c99 -Wall -Wextra -Wpedantic -fPIC -g -DVERSION='"$(VERSION)"' -DDATE='"$(DATE)"'
+CFLAGS = -std=c99 -Wall -Wextra -Wpedantic -fPIC -g
LDFLAGS =
LDLIBS =
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
VERSION = 0.2.1
DATE = 2021-02-23
+DEFS = -DVERSION='"$(VERSION)"' -DDATE='"$(DATE)"'
sources = src/remembering.c
@@ -22,13 +23,13 @@ remembering: src/remembering.in
mv $@-t $@
remembering-c: $(sources)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(sources) $(LDLIBS)
+ $(CC) $(CFLAGS) $(DEFS) $(LDFLAGS) -o $@ $(sources) $(LDLIBS)
run-tests: $(sources)
- $(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ $(sources) $(LDLIBS)
+ $(CC) $(CFLAGS) $(DEFS) $(LDFLAGS) -DTEST -o $@ $(sources) $(LDLIBS)
fallible-tests: $(sources)
- $(CC) $(CFLAGS) $(LDFLAGS) -DTEST -DFALLIBLE -o $@ $(sources) $(LDLIBS)
+ $(CC) $(CFLAGS) $(DEFS) $(LDFLAGS) -DTEST -DFALLIBLE -o $@ $(sources) $(LDLIBS)
check: all
./run-tests