aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-27 10:58:44 -0300
committerEuAndreh <eu@euandre.org>2021-06-27 10:58:44 -0300
commitefe35e99b870dee4dcbc1a738f7d173822fb5460 (patch)
treea2c549351941e322e802c691b86a603a3600b54d
parent757c8963101a0bce5dbb5ad389acdcf7ceb2ecc4 (diff)
downloadremembering-efe35e99b870dee4dcbc1a738f7d173822fb5460.tar.gz
Makefile: Use DEFS over CFLAGS for defines
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5362ff6..47a1db2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,11 @@
.POSIX:
+DEFS = -DVERSION='"$(VERSION)"' -DDATE='"$(DATE)"'
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
VERSION = 0.2.1
DATE = 2021-02-23
NAME = remembering
MAILING_LIST = public-inbox
-CFLAGS = -DVERSION='"$(VERSION)"' -DDATE='"$(DATE)"'
TRANSLATIONS = pt fr eo
.SUFFIXES: .in
@@ -13,6 +13,9 @@ TRANSLATIONS = pt fr eo
.in:
sed -e 's:@VERSION@:$(VERSION):g' -e 's:@DATE@:$(DATE):g' < $< > $@
+.c:
+ $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -o $@ $< $(LDLIBS)
+
manpages.en.in = \
doc/remembering.en.1.in \
doc/remembering.en.5.in
@@ -31,7 +34,7 @@ all: src/remembering src/remembering-c $(manpages)
chmod +x src/remembering
run-tests: src/remembering-c.c
- $(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ $?
+ $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -DTEST -o $@ $? $(LDLIBS)
check: all run-tests
./run-tests