diff options
author | EuAndreh <eu@euandre.org> | 2021-02-24 21:43:00 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-02-24 21:43:00 -0300 |
commit | 8046a7014af9d5fee16ea36b7f0881e017f8333c (patch) | |
tree | 674333e4a09e089fc07a9d11da3269d3395d7762 /Makefile | |
parent | aux/ci/ci-build.sh: Don't --delete on trap to avoid deleting pages in case of... (diff) | |
download | remembering-8046a7014af9d5fee16ea36b7f0881e017f8333c.tar.gz remembering-8046a7014af9d5fee16ea36b7f0881e017f8333c.tar.xz |
Makefile: put VERSION and DATE macros in $(DEFS) variable
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 |