diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-12-08 15:15:44 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-12-08 15:15:44 -0800 |
| commit | c2c37f3a63d0273fb2634acaa4f23e050684e689 (patch) | |
| tree | 93c91a69644efc64eaa217c6b6332697b8be1a71 /make-linux.mk | |
| parent | 0df33485ca573a33477eb8b076c8ca8c41e6a557 (diff) | |
| parent | b1eb16d5fb785872bfc38121edb78a785b58206f (diff) | |
| download | infinitytier-c2c37f3a63d0273fb2634acaa4f23e050684e689.tar.gz infinitytier-c2c37f3a63d0273fb2634acaa4f23e050684e689.zip | |
Merge with fixes of netcon to edge.
Diffstat (limited to 'make-linux.mk')
| -rw-r--r-- | make-linux.mk | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/make-linux.mk b/make-linux.mk index c4024f83..47a860bc 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -95,14 +95,24 @@ one: $(OBJS) service/OneService.o one.o osdep/LinuxEthernetTap.o ln -sf zerotier-one zerotier-idtool ln -sf zerotier-one zerotier-cli -netcon: one +netcon: $(OBJS) one.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 one.cpp service/OneService.cpp netcon/NetconEthernetTap.cpp $(OBJS) $(LDLIBS) -ldl + $(CXX) $(CXXFLAGS) $(LDFLAGS) -DZT_SERVICE_NETCON -DZT_ONE_NO_ROOT_CHECK -o zerotier-netcon-service $(OBJS) one.o $(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 -g -O2 -Wall -std=c99 -fPIC -DVERBOSE -DDEBUG_RPC -DCHECKS -D_GNU_SOURCE -DNETCON_INTERCEPT -I. -nostdlib -shared -o ../libzerotierintercept.so Intercept.c +install-intercept: + cp libzerotierintercept.so /lib/libzerotierintercept.so + ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept + /usr/bin/install -c netcon/zerotier-intercept /usr/bin + +uninstall-intercept: + rm -r /lib/libzerotierintercept.so + rm -r /lib/libzerotierintercept + rm -r /usr/bin/zerotier-intercept + selftest: $(OBJS) selftest.o $(CXX) $(CXXFLAGS) $(LDFLAGS) -o zerotier-selftest selftest.o $(OBJS) $(LDLIBS) $(STRIP) zerotier-selftest @@ -111,9 +121,9 @@ installer: one FORCE ./ext/installfiles/linux/buildinstaller.sh clean: - rm -rf *.so *.o node/*.o controller/*.o osdep/*.o service/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o $(OBJS) zerotier-one zerotier-idtool zerotier-cli zerotier-selftest zerotier-netcon-service build-* ZeroTierOneInstaller-* *.deb *.rpm - # Remove files from all the funny places we put them for netcon tests - find netcon -type f \( -name '*.o' -o -name '*.so' -o -name '.depend' -o -name '*.1.0' -o -name 'zerotier-one' -o -name 'zerotier-cli' \) -delete + rm -rf *.so *.o node/*.o controller/*.o osdep/*.o service/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o $(OBJS) zerotier-one zerotier-idtool zerotier-cli zerotier-selftest build-* ZeroTierOneInstaller-* *.deb *.rpm + # Remove files from all the funny places we put them for tests + find netcon -type f \( -name '*.o' -o -name '*.so' -o -name '*.1.0' -o -name 'zerotier-one' -o -name 'zerotier-cli' -o -name 'zerotier-netcon-service' \) -delete find netcon/docker-test -name "zerotier-intercept" -type f -delete debug: FORCE |
