1 From 014a8e04a0fa775b2ade78e5f7655a1453375884 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Wed, 10 Feb 2016 23:31:12 +0100
4 Subject: [PATCH] Makefile: allow passing custom CFLAGS/CPPFLAGS
6 vpnc's Makefile specifies some CFLAGS and CPPFLAGS value, but it may
7 be needed to pass additional custom flags on the make command line. To
8 make this possible, we switch from a plain += operator to the
9 "override ... +=" operator.
11 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
15 1 file changed, 4 insertions(+), 4 deletions(-)
17 diff --git a/Makefile b/Makefile
18 index e80ef17..7ac225a 100644
21 @@ -62,9 +62,9 @@ RELEASE_VERSION := $(shell cat VERSION)
25 -CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
26 -CFLAGS += $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS)
27 -CPPFLAGS += -DVERSION=\"$(VERSION)\"
28 +override CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
29 +override CFLAGS += $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS)
30 +override CPPFLAGS += -DVERSION=\"$(VERSION)\"
32 LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD)
34 @@ -73,7 +73,7 @@ LIBS += -lnsl -lresolv -lsocket
36 ifneq (,$(findstring Apple,$(shell $(CC) --version)))
37 # enabled in FSF GCC, disabled by default in Apple GCC
38 -CFLAGS += -fstrict-aliasing -freorder-blocks -fsched-interblock
39 +override CFLAGS += -fstrict-aliasing -freorder-blocks -fsched-interblock