summaryrefslogtreecommitdiff
path: root/make-mac.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-mac.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-mac.mk')
-rw-r--r--make-mac.mk9
1 files changed, 5 insertions, 4 deletions
diff --git a/make-mac.mk b/make-mac.mk
index 09fd1e36..1bc842ce 100644
--- a/make-mac.mk
+++ b/make-mac.mk
@@ -1,5 +1,5 @@
-CC=clang
-CXX=clang++
+CC?=clang
+CXX?=clang++
INCLUDES=-I/usr/local/include
DEFS=
@@ -38,13 +38,14 @@ endif
# Debug mode -- dump trace output, build binary with -g
ifeq ($(ZT_DEBUG),1)
DEFS+=-DZT_TRACE
- CFLAGS=-Wall -g -pthread $(INCLUDES) $(DEFS)
+ CFLAGS+=-Wall -g -pthread $(INCLUDES) $(DEFS)
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=$(ARCH_FLAGS) -Wall -O3 -flto -fPIE -fvectorize -fstack-protector -pthread -mmacosx-version-min=10.7 -DNDEBUG -Wno-unused-private-field $(INCLUDES) $(DEFS)
+ CFLAGS?=-O3 -fstack-protector
+ CFLAGS+=$(ARCH_FLAGS) -Wall -flto -fPIE -fvectorize -pthread -mmacosx-version-min=10.7 -DNDEBUG -Wno-unused-private-field $(INCLUDES) $(DEFS)
STRIP=strip
endif