summaryrefslogtreecommitdiff
path: root/make-freebsd.mk
diff options
context:
space:
mode:
authorMoritz Warning <moritzwarning@web.de>2015-07-03 20:18:19 +0200
committerMoritz Warning <moritzwarning@web.de>2015-07-03 23:21:23 +0200
commit235d4aba9ab4f461eebfba66e659212d034bab48 (patch)
treed49b8fac13ff1cd19ffca6d82a0fe824cd76da4a /make-freebsd.mk
parentcfdf4e3a4928952124118be13f00af2528ab8b04 (diff)
downloadinfinitytier-235d4aba9ab4f461eebfba66e659212d034bab48.tar.gz
infinitytier-235d4aba9ab4f461eebfba66e659212d034bab48.zip
allow environment variables to set/extend CC, CXX, CFLAGS and LDFLAGS
Diffstat (limited to 'make-freebsd.mk')
-rw-r--r--make-freebsd.mk15
1 files changed, 8 insertions, 7 deletions
diff --git a/make-freebsd.mk b/make-freebsd.mk
index 90665e0e..cc428ccb 100644
--- a/make-freebsd.mk
+++ b/make-freebsd.mk
@@ -1,5 +1,5 @@
-CC=cc
-CXX=c++
+CC?=cc
+CXX?=c++
INCLUDES=
DEFS=
@@ -16,19 +16,20 @@ endif
# "make debug" is a shortcut for this
ifeq ($(ZT_DEBUG),1)
DEFS+=-DZT_TRACE
- CFLAGS=-Wall -g -pthread $(INCLUDES) $(DEFS)
- LDFLAGS=
+ CFLAGS+=-Wall -g -pthread $(INCLUDES) $(DEFS)
+ LDFLAGS+=
STRIP=echo
# The following line enables optimization for the crypto code, since
# C25519 in particular is almost UNUSABLE in heavy testing without it.
ext/lz4/lz4.o node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CFLAGS = -Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
else
- CFLAGS=-Wall -O3 -fPIE -fvisibility=hidden -fstack-protector -pthread $(INCLUDES) -DNDEBUG $(DEFS)
- LDFLAGS=-pie -Wl,-z,relro,-z,now
+ CFLAGS?=-O3 -fstack-protector
+ CFLAGS+=-Wall -fPIE -fvisibility=hidden -fstack-protector -pthread $(INCLUDES) -DNDEBUG $(DEFS)
+ LDFLAGS+=-pie -Wl,-z,relro,-z,now
STRIP=strip --strip-all
endif
-CXXFLAGS=$(CFLAGS) -fno-rtti
+CXXFLAGS+=$(CFLAGS) -fno-rtti
all: one