diff options
Diffstat (limited to 'make-mac.mk')
| -rw-r--r-- | make-mac.mk | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/make-mac.mk b/make-mac.mk index 6ea23859..d30fc5bd 100644 --- a/make-mac.mk +++ b/make-mac.mk @@ -13,15 +13,15 @@ ARCH_FLAGS=-arch x86_64 include objects.mk OBJS+=osdep/OSXEthernetTap.o -# Comment out to disable building against shipped libminiupnpc binary for Mac -ZT_USE_MINIUPNPC?=1 - # Disable codesign since open source users will not have ZeroTier's certs CODESIGN=echo PRODUCTSIGN=echo CODESIGN_APP_CERT= CODESIGN_INSTALLER_CERT= +# Build with libminiupnpc by default for Mac +ZT_USE_MINIUPNPC?=1 + # For internal use only -- signs everything with ZeroTier's developer cert ifeq ($(ZT_OFFICIAL_RELEASE),1) DEFS+=-DZT_OFFICIAL_RELEASE -DZT_AUTO_UPDATE @@ -34,7 +34,7 @@ endif # Build with ZT_ENABLE_CLUSTER=1 to build with cluster support ifeq ($(ZT_ENABLE_CLUSTER),1) - DEFS+=-DZT_ENABLE_CLUSTER + DEFS+=-DZT_ENABLE_CLUSTER endif ifeq ($(ZT_AUTO_UPDATE),1) @@ -43,7 +43,7 @@ endif ifeq ($(ZT_USE_MINIUPNPC),1) DEFS+=-DZT_USE_MINIUPNPC - LIBS+=ext/bin/miniupnpc/mac-x64/libminiupnpc.a + LIBS+=ext/miniupnpc/libminiupnpc.a OBJS+=osdep/UPNPClient.o endif @@ -73,6 +73,9 @@ CXXFLAGS=$(CFLAGS) -fno-rtti all: one one: $(OBJS) one.o +ifeq ($(ZT_USE_MINIUPNPC),1) + cd ext/miniupnpc ; make clean ; make 'CFLAGS=-D_DARWIN_C_SOURCE -O2 -fstack-protector -fPIE -flto -pthread -mmacosx-version-min=10.7 -fno-common -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE' -j 2 libminiupnpc.a +endif $(CXX) $(CXXFLAGS) -o zerotier-one $(OBJS) one.o $(LIBS) $(STRIP) zerotier-one ln -sf zerotier-one zerotier-idtool @@ -99,6 +102,7 @@ official: FORCE clean: rm -rf *.dSYM build-* *.pkg *.dmg *.o node/*.o controller/*.o service/*.o osdep/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o zerotier-one zerotier-idtool zerotier-selftest zerotier-cli ZeroTierOneInstaller-* mkworld + cd ext/miniupnpc ; make clean # For those building from source -- installs signed binary tap driver in system ZT home install-mac-tap: FORCE |
