From ab7cd2fc90434a899cdf2d4fc9bfa0dd7c71cca0 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sat, 7 Jan 2017 17:55:47 +0100 Subject: make: Support CPPFLAGS in Makefile 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 --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b09c75d..f0a974a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Makefile for llmnrd # -# Copyright (C) 2014-2016 Tobias Klauser +# Copyright (C) 2014-2017 Tobias Klauser 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) -- cgit v1.2.3-54-g00ecf