mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-14 18:48:36 -07:00
Mac OSX Port - Lightly tested
This commit is contained in:
parent
935f00ad4c
commit
95d28494f6
6 changed files with 101 additions and 19 deletions
14
make-mac.mk
14
make-mac.mk
|
@ -79,6 +79,18 @@ one: $(OBJS) service/OneService.o one.o
|
|||
$(CODESIGN) -f -s $(CODESIGN_APP_CERT) zerotier-one
|
||||
$(CODESIGN) -vvv zerotier-one
|
||||
|
||||
netcon: $(OBJS)
|
||||
rm -f *.o
|
||||
# Need to selectively rebuild one.cpp and OneService.cpp with ZT_SERVICE_NETCON and ZT_ONE_NO_ROOT_CHECK defined, and also NetconEthernetTap
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -DZT_SERVICE_NETCON -DZT_ONE_NO_ROOT_CHECK -Iext/lwip/src/include -Iext/lwip/src/include/ipv4 -Iext/lwip/src/include/ipv6 -o zerotier-netcon-service $(OBJS) service/OneService.cpp netcon/NetconEthernetTap.cpp one.cpp -x c netcon/RPC.c $(LDLIBS) -ldl
|
||||
# Build netcon/liblwip.so which must be placed in ZT home for zerotier-netcon-service to work
|
||||
cd netcon ; make -f make-liblwip.mk
|
||||
# Use gcc not clang to build standalone intercept library since gcc is typically used for libc and we want to ensure maximal ABI compatibility
|
||||
cd netcon ; gcc -O2 -Wall -std=c99 -fPIC -fno-common -dynamiclib -flat_namespace -DVERBOSE -D_GNU_SOURCE -DNETCON_INTERCEPT -I. -nostdlib -shared -o libzerotierintercept.so Intercept.c RPC.c -ldl
|
||||
cp netcon/libzerotierintercept.so libzerotierintercept.so
|
||||
ln -sf zerotier-netcon-service zerotier-cli
|
||||
ln -sf zerotier-netcon-service zerotier-idtool
|
||||
|
||||
selftest: $(OBJS) selftest.o
|
||||
$(CXX) $(CXXFLAGS) -o zerotier-selftest selftest.o $(OBJS) $(LIBS)
|
||||
$(STRIP) zerotier-selftest
|
||||
|
@ -97,7 +109,7 @@ official: FORCE
|
|||
make ZT_OFFICIAL_RELEASE=1 mac-dist-pkg
|
||||
|
||||
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 $(OBJS) zerotier-one zerotier-idtool zerotier-selftest zerotier-cli ZeroTierOneInstaller-* mkworld
|
||||
rm -rf netcon/*.so *.dSYM build-* *.pkg *.dmg *.o node/*.o controller/*.o service/*.o osdep/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o $(OBJS) zerotier-one zerotier-idtool zerotier-selftest zerotier-cli ZeroTierOneInstaller-* mkworld
|
||||
|
||||
# For those building from source -- installs signed binary tap driver in system ZT home
|
||||
install-mac-tap: FORCE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue