summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-01-07 17:55:47 +0100
committerTobias Klauser <tklauser@distanz.ch>2017-01-07 17:55:47 +0100
commitab7cd2fc90434a899cdf2d4fc9bfa0dd7c71cca0 (patch)
tree77445e6f2f0444b6c453e5baf31de8a46522517d /Makefile
parente3d021b3b193ea4f659d25a8ad6cb27b486f8894 (diff)
make: Support CPPFLAGS in MakefileHEADmaster
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--Makefile5
1 files 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 <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)