diff options
author | EuAndreh <eu@euandre.org> | 2021-08-17 17:09:24 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-08-17 17:09:27 -0300 |
commit | 024a359a747515eda2f3fb6e6eb1e7b8fe29b1c1 (patch) | |
tree | 645f85487f3aafcb4ad0bd6f5267149630b78f99 | |
parent | Makefile: Fix $(MANPREFIX) path (diff) | |
download | gistatic-024a359a747515eda2f3fb6e6eb1e7b8fe29b1c1.tar.gz gistatic-024a359a747515eda2f3fb6e6eb1e7b8fe29b1c1.tar.xz |
Makefile: Use CFLAGS_FINAL and LDLIBS_FINAL
This allows the caller to not only provide $(CFLAGS), but also override
$(FINAL_CFLAGS).
This accomplishes a similar behaviour to "CFLAGS += ...", but now
allowing the caller to discard the appended flags too.
-rw-r--r-- | Makefile | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -7,8 +7,8 @@ NAME = gistatic MAILING_LIST = public-inbox TRANSLATIONS = pt fr eo CONTRIBLANGS = -LOCALLDLIBS = -lgit2 -DEFS = \ +LDLIBS_FINAL = $(LDLIBS) -lgit2 +CFLAGS_FINAL = $(CFLAGS) \ -D_POSIX_C_SOURCE=200809L \ -DVERSION='"$(VERSION)"' \ -DDATE='"$(DATE)"' @@ -19,12 +19,10 @@ DEFS = \ sed -e 's:@VERSION@:$(VERSION):g' -e 's:@DATE@:$(DATE):g' < $< > $@ .c: - $(CC) $(CFLAGS) $(DEFS) $(LDFLAGS) -o $@ $< $(LOCALLDLIBS) \ - $(LDLIBS) + $(CC) $(CFLAGS_FINAL) $(LDFLAGS) -o $@ $< $(LDLIBS_FINAL) .c.t: - $(CC) $(CFLAGS) $(DEFS) $(LDFLAGS) -DTEST -o $@ $< $(LOCALLDLIBS) \ - $(LDLIBS) + $(CC) $(CFLAGS_FINAL) $(LDFLAGS) -DTEST -o $@ $< $(LDLIBS_FINAL) manpages.en.in = \ doc/gistatic.en.1.in |