1*4882a593SmuzhiyunFrom 014a8e04a0fa775b2ade78e5f7655a1453375884 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3*4882a593SmuzhiyunDate: Wed, 10 Feb 2016 23:31:12 +0100
4*4882a593SmuzhiyunSubject: [PATCH] Makefile: allow passing custom CFLAGS/CPPFLAGS
5*4882a593Smuzhiyun
6*4882a593Smuzhiyunvpnc's Makefile specifies some CFLAGS and CPPFLAGS value, but it may
7*4882a593Smuzhiyunbe needed to pass additional custom flags on the make command line. To
8*4882a593Smuzhiyunmake this possible, we switch from a plain += operator to the
9*4882a593Smuzhiyun"override ... +=" operator.
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
12*4882a593Smuzhiyun---
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun Makefile | 8 ++++----
15*4882a593Smuzhiyun 1 file changed, 4 insertions(+), 4 deletions(-)
16*4882a593Smuzhiyun
17*4882a593Smuzhiyundiff --git a/Makefile b/Makefile
18*4882a593Smuzhiyunindex e80ef17..7ac225a 100644
19*4882a593Smuzhiyun--- a/Makefile
20*4882a593Smuzhiyun+++ b/Makefile
21*4882a593Smuzhiyun@@ -62,9 +62,9 @@ RELEASE_VERSION := $(shell cat VERSION)
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun CC ?= gcc
24*4882a593Smuzhiyun CFLAGS ?= -O3 -g
25*4882a593Smuzhiyun-CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
26*4882a593Smuzhiyun-CFLAGS +=  $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS)
27*4882a593Smuzhiyun-CPPFLAGS += -DVERSION=\"$(VERSION)\"
28*4882a593Smuzhiyun+override CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
29*4882a593Smuzhiyun+override CFLAGS +=  $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS)
30*4882a593Smuzhiyun+override CPPFLAGS += -DVERSION=\"$(VERSION)\"
31*4882a593Smuzhiyun LDFLAGS ?= -g
32*4882a593Smuzhiyun LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD)
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun@@ -73,7 +73,7 @@ LIBS += -lnsl -lresolv -lsocket
35*4882a593Smuzhiyun endif
36*4882a593Smuzhiyun ifneq (,$(findstring Apple,$(shell $(CC) --version)))
37*4882a593Smuzhiyun # enabled in FSF GCC, disabled by default in Apple GCC
38*4882a593Smuzhiyun-CFLAGS += -fstrict-aliasing -freorder-blocks -fsched-interblock
39*4882a593Smuzhiyun+override CFLAGS += -fstrict-aliasing -freorder-blocks -fsched-interblock
40*4882a593Smuzhiyun endif
41*4882a593Smuzhiyun
42*4882a593Smuzhiyun all : $(BINS) vpnc.8
43*4882a593Smuzhiyun--
44*4882a593Smuzhiyun2.6.4
45*4882a593Smuzhiyun
46