Honour CPPFLAGS

Preprocessor flags are passed in CPPFLAGS.
Debian uses it to pass hardening options (-D_FORTIFY_SOURCE)
to the compiler.
This commit is contained in:
Reiner Herrmann 2018-10-19 18:24:09 +02:00
parent f70698f6c7
commit eccc69beeb

View file

@ -26,10 +26,10 @@ all: $(BIN) $(PLAYER)
$(SRC): nnn.h $(SRC): nnn.h
$(BIN): $(SRC) $(BIN): $(SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
debug: $(SRC) debug: $(SRC)
$(CC) -DDEBUGMODE -g $(CFLAGS) $(LDFLAGS) -o $(BIN) $^ $(LDLIBS) $(CC) -DDEBUGMODE -g $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(BIN) $^ $(LDLIBS)
install: all install: all
$(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin