diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2017-01-07 17:55:47 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2017-01-07 17:55:47 +0100 |
commit | ab7cd2fc90434a899cdf2d4fc9bfa0dd7c71cca0 (patch) | |
tree | 77445e6f2f0444b6c453e5baf31de8a46522517d /Makefile | |
parent | e3d021b3b193ea4f659d25a8ad6cb27b486f8894 (diff) |
Currently Makefile ignores CPPFLAGS and so any defines passed via
environment/command line ignored. E.g. running
make CPPFLAGS="-D_FORTIFY_SOURCE=2"
does not compile llmnrd with buffer overflow checks.
Fix it by considering CPPFLAGS in the Makefile and appending them to
CFLAGS.
Closes #17
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,6 +1,6 @@ # Makefile for llmnrd # -# Copyright (C) 2014-2016 Tobias Klauser <tklauser@distanz.ch> +# Copyright (C) 2014-2017 Tobias Klauser <tklauser@distanz.ch> VERSION = 0.2.1 @@ -17,7 +17,8 @@ Q_LIBS = CC = $(CROSS_COMPILE)gcc INSTALL = install -CFLAGS ?= -W -Wall -O2 +CPPFLAGS ?= +CFLAGS ?= -W -Wall -O2 $(CPPFLAGS) LDFLAGS ?= ifeq ($(shell git rev-parse > /dev/null 2>&1; echo $$?), 0) |