2016-06-29 12:07:28 -07:00
|
|
|
#
|
|
|
|
|
# Makefile for ZeroTier SDK on OSX
|
|
|
|
|
#
|
|
|
|
|
# Targets
|
|
|
|
|
# all: build every target possible on host system, plus tests
|
|
|
|
|
# check: reports OK/FAIL of built targets
|
|
|
|
|
# tests: build only test applications for host system
|
|
|
|
|
# clean: removes all built files, objects, other trash
|
|
|
|
|
|
2016-09-13 14:13:03 -07:00
|
|
|
# Target output filenames
|
|
|
|
|
SHARED_LIB_NAME = libztosx.so
|
|
|
|
|
INTERCEPT_NAME = libztintercept.so
|
|
|
|
|
SDK_SERVICE_NAME = zerotier-sdk-service
|
|
|
|
|
ONE_SERVICE_NAME = zerotier-one
|
|
|
|
|
ONE_CLI_NAME = zerotier-cli
|
|
|
|
|
ONE_ID_TOOL_NAME = zerotier-idtool
|
|
|
|
|
LWIP_LIB_NAME = liblwip.so
|
|
|
|
|
#
|
|
|
|
|
SHARED_LIB = $(BUILD)/$(SHARED_LIB_NAME)
|
|
|
|
|
INTERCEPT = $(BUILD)/$(INTERCEPT_NAME)
|
|
|
|
|
SDK_SERVICE = $(BUILD)/$(SDK_SERVICE_NAME)
|
|
|
|
|
ONE_SERVICE = $(BUILD)/$(ONE_SERVICE_NAME)
|
|
|
|
|
ONE_CLI = $(BUILD)/$(ONE_CLI_NAME)
|
|
|
|
|
ONE_IDTOOL = $(BUILD)/$(ONE_IDTOOL_NAME)
|
|
|
|
|
LWIP_LIB = $(BUILD)/$(LWIP_LIB_NAME)
|
|
|
|
|
#
|
|
|
|
|
LWIP_BASE_DIR = ext/lwip
|
|
|
|
|
|
|
|
|
|
# Automagically pick clang or gcc, with preference for clang
|
|
|
|
|
# This is only done if we have not overridden these with an environment or CLI variable
|
2016-06-14 16:01:19 -07:00
|
|
|
ifeq ($(origin CC),default)
|
|
|
|
|
CC=$(shell if [ -e /usr/bin/clang ]; then echo clang; else echo gcc; fi)
|
|
|
|
|
endif
|
|
|
|
|
ifeq ($(origin CXX),default)
|
|
|
|
|
CXX=$(shell if [ -e /usr/bin/clang++ ]; then echo clang++; else echo g++; fi)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
INCLUDES=
|
|
|
|
|
DEFS=
|
|
|
|
|
LIBS=
|
|
|
|
|
ARCH_FLAGS=-arch x86_64
|
2016-08-31 15:54:56 -07:00
|
|
|
CFLAGS=
|
2016-06-14 16:01:19 -07:00
|
|
|
|
|
|
|
|
include objects.mk
|
|
|
|
|
|
|
|
|
|
# Disable codesign since open source users will not have ZeroTier's certs
|
|
|
|
|
CODESIGN=echo
|
|
|
|
|
PRODUCTSIGN=echo
|
|
|
|
|
CODESIGN_APP_CERT=
|
|
|
|
|
CODESIGN_INSTALLER_CERT=
|
|
|
|
|
|
2016-06-29 12:07:28 -07:00
|
|
|
# Debug output for ZeroTier service
|
2016-06-14 16:01:19 -07:00
|
|
|
ifeq ($(ZT_DEBUG),1)
|
|
|
|
|
DEFS+=-DZT_TRACE
|
|
|
|
|
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.
|
2016-06-22 14:07:28 -07:00
|
|
|
#ext/lz4/lz4.o node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CFLAGS = -Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
|
2016-06-14 16:01:19 -07:00
|
|
|
else
|
|
|
|
|
CFLAGS?=-Ofast -fstack-protector
|
|
|
|
|
CFLAGS+=$(ARCH_FLAGS) -Wall -flto -fPIE -pthread -mmacosx-version-min=10.7 -DNDEBUG -Wno-unused-private-field $(INCLUDES) $(DEFS)
|
|
|
|
|
STRIP=strip
|
|
|
|
|
endif
|
|
|
|
|
|
2016-06-29 12:07:28 -07:00
|
|
|
# Debug output for the SDK
|
|
|
|
|
# Specific levels can be controlled in src/SDK_Debug.h
|
2016-06-16 11:47:08 -07:00
|
|
|
ifeq ($(SDK_DEBUG),1)
|
2016-06-29 11:57:05 -07:00
|
|
|
DEFS+=-DSDK_DEBUG -g
|
2016-06-14 16:01:19 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
CXXFLAGS=$(CFLAGS) -fno-rtti
|
|
|
|
|
|
2016-09-13 14:13:03 -07:00
|
|
|
INCLUDES+= -Iext \
|
|
|
|
|
-I$(ZT1)/osdep \
|
|
|
|
|
-I$(ZT1)/node \
|
|
|
|
|
-I$(ZT1)/service \
|
|
|
|
|
-I../$(ZT1)/osdep \
|
|
|
|
|
-I../$(ZT1)/node \
|
|
|
|
|
-I../$(ZT1)/service \
|
|
|
|
|
-I. \
|
|
|
|
|
-Isrc
|
2016-08-30 16:54:06 -07:00
|
|
|
|
2016-09-13 14:13:03 -07:00
|
|
|
|
|
|
|
|
# lwIP
|
|
|
|
|
ifeq ($(SDK_LWIP_DEBUG),1)
|
|
|
|
|
LWIP_FLAGS+=SDK_LWIP_DEBUG=1
|
|
|
|
|
endif
|
|
|
|
|
ifeq ($(LWIP_VERSION_2),1)
|
|
|
|
|
CXXFLAGS+=-DLWIP_VERSION_2
|
|
|
|
|
INCLUDES+=-I$(LWIP_2_DIR)/src/include
|
|
|
|
|
INCLUDES+=-I$(LWIP_2_DIR)/src/include/ipv4
|
|
|
|
|
INCLUDES+=-I$(LWIP_2_DIR)/src/include/ipv6
|
|
|
|
|
else
|
|
|
|
|
CXXFLAGS+=-DLWIP_VERSION_1
|
|
|
|
|
INCLUDES+=-I$(LWIP_1_DIR)/src/include
|
|
|
|
|
INCLUDES+=-I$(LWIP_1_DIR)/src/include/ipv4
|
|
|
|
|
INCLUDES+=-I$(LWIP_1_DIR)/src/include/ipv6
|
|
|
|
|
endif
|
2016-08-30 16:54:06 -07:00
|
|
|
|
|
|
|
|
|
2016-09-13 14:13:03 -07:00
|
|
|
# ------ MISC TARGETS ------
|
2016-07-07 14:50:47 -05:00
|
|
|
# Build everything
|
2016-08-30 16:54:06 -07:00
|
|
|
all: one osx ios android lwip check
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# --- EXTERNAL LIBRARIES ---
|
2016-08-29 14:47:28 -07:00
|
|
|
lwip:
|
2016-10-21 15:46:22 -07:00
|
|
|
-make -f make-liblwip.mk $(LWIP_FLAGS)
|
2016-07-07 14:50:47 -05:00
|
|
|
|
2016-10-21 15:46:22 -07:00
|
|
|
pico:
|
|
|
|
|
mkdir -p build
|
|
|
|
|
cd ext/picotcp; make lib ARCH=shared IPV4=1 IPV6=1
|
|
|
|
|
$(CC) -g -nostartfiles -shared -o ext/picotcp/build/lib/libpicotcp.so ext/picotcp/build/lib/*.o ext/picotcp/build/modules/*.o
|
|
|
|
|
cp ext/picotcp/build/lib/libpicotcp.so build/libpicotcp.so
|
2016-08-30 16:54:06 -07:00
|
|
|
|
2016-10-21 15:46:22 -07:00
|
|
|
jip:
|
|
|
|
|
-make -f make-jip.mk $(JIP_FLAGS)
|
2016-08-30 16:54:06 -07:00
|
|
|
|
|
|
|
|
# ------- IOS / OSX --------
|
2016-07-14 08:40:40 -07:00
|
|
|
# Build all Apple targets
|
2016-08-30 16:54:06 -07:00
|
|
|
apple: one osx ios
|
|
|
|
|
|
|
|
|
|
# Build vanilla ZeroTier One binary
|
|
|
|
|
one: $(OBJS) $(ZT1)/service/OneService.o $(ZT1)/one.o $(ZT1)/osdep/OSXEthernetTap.o
|
|
|
|
|
mkdir -p $(BUILD)
|
|
|
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(BUILD)/zerotier-one $(OBJS) $(ZT1)/service/OneService.o $(ZT1)/one.o $(ZT1)/osdep/OSXEthernetTap.o $(LDLIBS)
|
|
|
|
|
$(STRIP) $(ONE_SERVICE)
|
|
|
|
|
cp $(ONE_SERVICE) $(INT)/docker/docker_demo/$(ONE_SERVICE_NAME)
|
2016-07-14 08:40:40 -07:00
|
|
|
|
2016-07-07 14:50:47 -05:00
|
|
|
# Build all iOS targets
|
|
|
|
|
ios: ios_app_framework ios_unity3d_bundle
|
|
|
|
|
|
|
|
|
|
# Build all OSX targets
|
2016-08-31 17:39:32 -07:00
|
|
|
osx: osx_app_framework osx_unity3d_bundle osx_shared_lib osx_sdk_service osx_intercept
|
2016-07-07 14:50:47 -05:00
|
|
|
|
2016-06-21 16:26:38 -07:00
|
|
|
# TODO: CHECK if XCODE TOOLS are installed
|
2016-06-21 13:31:50 -07:00
|
|
|
# Build frameworks for application development
|
2016-06-22 16:01:03 -07:00
|
|
|
osx_app_framework:
|
2016-08-25 17:08:48 -07:00
|
|
|
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Release -scheme ZeroTierSDK_OSX build SYMROOT="../../../$(BUILD)/osx_app_framework"
|
|
|
|
|
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Debug -scheme ZeroTierSDK_OSX build SYMROOT="../../../$(BUILD)/osx_app_framework"
|
2016-07-07 03:00:11 -05:00
|
|
|
cp docs/osx_zt_sdk.md $(BUILD)/osx_app_framework/README.md
|
2016-06-22 16:01:03 -07:00
|
|
|
ios_app_framework:
|
2016-08-25 17:08:48 -07:00
|
|
|
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Release -scheme ZeroTierSDK_iOS build SYMROOT="../../../$(BUILD)/ios_app_framework"
|
|
|
|
|
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Debug -scheme ZeroTierSDK_iOS build SYMROOT="../../../$(BUILD)/ios_app_framework"
|
2016-07-07 03:00:11 -05:00
|
|
|
cp docs/ios_zt_sdk.md $(BUILD)/ios_app_framework/README.md
|
2016-07-17 16:00:24 -07:00
|
|
|
|
2016-06-21 13:31:50 -07:00
|
|
|
# Build bundles for Unity integrations
|
2016-06-22 13:19:01 -07:00
|
|
|
osx_unity3d_bundle:
|
2016-08-25 17:08:48 -07:00
|
|
|
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Release -scheme ZeroTierSDK_Unity3D_OSX build SYMROOT="../../../$(BUILD)/osx_unity3d_bundle"
|
|
|
|
|
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Debug -scheme ZeroTierSDK_Unity3D_OSX build SYMROOT="../../../$(BUILD)/osx_unity3d_bundle"
|
2016-07-07 03:00:11 -05:00
|
|
|
cp docs/osx_unity3d_zt_sdk.md $(BUILD)/osx_unity3d_bundle/README.md
|
2016-07-18 11:35:40 -07:00
|
|
|
chmod 755 $(BUILD)/osx_unity3d_bundle/Debug/ZeroTierSDK_Unity3D_OSX.bundle
|
|
|
|
|
cp -p -R $(BUILD)/osx_unity3d_bundle/Debug/ZeroTierSDK_Unity3D_OSX.bundle $(INT)/Unity3D/Assets/Plugins
|
|
|
|
|
|
2016-06-22 13:19:01 -07:00
|
|
|
ios_unity3d_bundle:
|
2016-08-25 17:08:48 -07:00
|
|
|
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Release -scheme ZeroTierSDK_Unity3D_iOS build SYMROOT="../../../$(BUILD)/ios_unity3d_bundle"
|
|
|
|
|
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Debug -scheme ZeroTierSDK_Unity3D_iOS build SYMROOT="../../../$(BUILD)/ios_unity3d_bundle"
|
2016-07-07 03:00:11 -05:00
|
|
|
cp docs/ios_unity3d_zt_sdk.md $(BUILD)/ios_unity3d_bundle/README.md
|
2016-08-30 16:54:06 -07:00
|
|
|
#
|
|
|
|
|
simple_app: tests osx_service_and_intercept
|
|
|
|
|
mkdir -p build/simple_app
|
|
|
|
|
mkdir -p build/tests/zerotier
|
|
|
|
|
$(CXX) -Isrc $(SHARED_LIB) integrations/simple_app/app.cpp -o $(BUILD)/simple_app/app
|
|
|
|
|
cp $(LWIP_LIB) $(BUILD)/tests/zerotier/$(LWIP_LIB_NAME)
|
|
|
|
|
|
|
|
|
|
remove_only_intermediates:
|
|
|
|
|
-find . -type f \( -name '*.o' -o -name '*.so' \) -delete
|
|
|
|
|
|
|
|
|
|
# Builds a single shared library which contains everything
|
2016-08-31 17:39:32 -07:00
|
|
|
osx_shared_lib: $(OBJS)
|
2016-09-13 14:13:03 -07:00
|
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) -DSDK -DZT_ONE_NO_ROOT_CHECK $(INCLUDES) -shared -o $(SHARED_LIB) $(OBJS) zerotierone/service/OneService.cpp src/SDK_Service.cpp src/SDK_EthernetTap.cpp src/SDK_Proxy.cpp zerotierone/one.cpp -x c src/SDK_Sockets.c src/SDK_Intercept.c src/SDK_RPC.c $(LDLIBS) -ldl
|
2016-08-30 16:54:06 -07:00
|
|
|
|
|
|
|
|
osx_intercept:
|
|
|
|
|
# Use gcc not clang to build standalone intercept library since gcc is typically used for libc and we want to ensure maximal ABI compatibility
|
2016-09-13 14:13:03 -07:00
|
|
|
cd src ; gcc $(DEFS) $(INCLUDES) -g -O2 -Wall -std=c99 -fPIC -DVERBOSE -D_GNU_SOURCE -DSDK_INTERCEPT -nostdlib -nostdlib -shared -o ../$(INTERCEPT) SDK_Sockets.c SDK_Intercept.c SDK_RPC.c -ldl
|
2016-08-30 16:54:06 -07:00
|
|
|
|
|
|
|
|
# Build only the SDK service
|
|
|
|
|
osx_sdk_service: lwip $(OBJS)
|
2016-09-13 14:13:03 -07:00
|
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(DEFS) $(INCLUDES) -DSDK -DZT_ONE_NO_ROOT_CHECK -o $(SDK_SERVICE) $(OBJS) $(ZT1)/service/OneService.cpp src/SDK_EthernetTap.cpp src/SDK_Proxy.cpp $(ZT1)/one.cpp -x c src/SDK_RPC.c $(LDLIBS) -ldl
|
2016-08-30 16:54:06 -07:00
|
|
|
ln -sf $(SDK_SERVICE_NAME) zerotier-cli
|
|
|
|
|
ln -sf $(SDK_SERVICE_NAME) zerotier-idtool
|
|
|
|
|
|
|
|
|
|
# Build both intercept library and SDK service (separate)
|
2016-09-06 15:03:58 -07:00
|
|
|
osx_service_and_intercept: osx_intercept osx_sdk_service
|
2016-08-30 16:54:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# -------- ANDROID ---------
|
2016-08-31 15:54:56 -07:00
|
|
|
# Build all Android targets
|
2016-08-30 16:54:06 -07:00
|
|
|
# Chip architectures can be specified in integrations/android/android_jni_lib/java/jni/Application.mk
|
|
|
|
|
android: android_jni_lib
|
2016-07-17 16:00:24 -07:00
|
|
|
|
2016-06-21 16:26:38 -07:00
|
|
|
# TODO: CHECK if ANDROID/GRADLE TOOLS are installed
|
2016-06-22 14:24:30 -07:00
|
|
|
# Build library for Android Unity integrations
|
2016-06-21 16:26:38 -07:00
|
|
|
# Build JNI library for Android app integration
|
2016-06-22 16:01:03 -07:00
|
|
|
android_jni_lib:
|
2016-08-25 11:38:30 -07:00
|
|
|
./increment.sh
|
2016-07-07 03:00:11 -05:00
|
|
|
cd $(INT)/android/android_jni_lib/proj; ./gradlew assembleDebug
|
2016-07-17 16:00:24 -07:00
|
|
|
mkdir -p $(BUILD)/android_jni_lib
|
|
|
|
|
cp docs/android_zt_sdk.md $(BUILD)/android_jni_lib/README.md
|
|
|
|
|
mv -f $(INT)/android/android_jni_lib/java/libs/* $(BUILD)/android_jni_lib
|
|
|
|
|
cp -R $(BUILD)/android_jni_lib/* $(INT)/android/example_app/app/src/main/jniLibs
|
2016-06-21 13:31:50 -07:00
|
|
|
|
2016-06-29 01:35:58 -07:00
|
|
|
|
2016-08-03 15:22:51 -07:00
|
|
|
|
2016-06-24 11:07:57 -07:00
|
|
|
|
2016-08-30 16:54:06 -07:00
|
|
|
# -------- TESTING ---------
|
2016-06-28 15:20:30 -07:00
|
|
|
# Check for the presence of built frameworks/bundles/libaries
|
2016-06-23 12:07:51 -07:00
|
|
|
check:
|
2016-08-30 16:54:06 -07:00
|
|
|
./check.sh $(LWIP_LIB)
|
|
|
|
|
./check.sh $(INTERCEPT)
|
|
|
|
|
./check.sh $(ONE_SERVICE)
|
|
|
|
|
./check.sh $(SDK_SERVICE)
|
|
|
|
|
./check.sh $(SHARED_LIB)
|
2016-07-07 03:00:11 -05:00
|
|
|
./check.sh $(BUILD)/osx_unity3d_bundle/Debug/ZeroTierSDK_Unity3D_OSX.bundle
|
|
|
|
|
./check.sh $(BUILD)/osx_app_framework/Debug/ZeroTierSDK_OSX.framework
|
|
|
|
|
./check.sh $(BUILD)/ios_app_framework/Debug-iphoneos/ZeroTierSDK_iOS.framework
|
|
|
|
|
./check.sh $(BUILD)/ios_unity3d_bundle/Debug-iphoneos/ZeroTierSDK_Unity3D_iOS.bundle
|
2016-08-04 13:10:12 -07:00
|
|
|
./check.sh $(BUILD)/android_jni_lib/arm64-v8a/libZeroTierOneJNI.so
|
|
|
|
|
./check.sh $(BUILD)/android_jni_lib/armeabi/libZeroTierOneJNI.so
|
|
|
|
|
./check.sh $(BUILD)/android_jni_lib/armeabi-v7a/libZeroTierOneJNI.so
|
|
|
|
|
./check.sh $(BUILD)/android_jni_lib/mips/libZeroTierOneJNI.so
|
|
|
|
|
./check.sh $(BUILD)/android_jni_lib/mips64/libZeroTierOneJNI.so
|
|
|
|
|
./check.sh $(BUILD)/android_jni_lib/x86/libZeroTierOneJNI.so
|
|
|
|
|
./check.sh $(BUILD)/android_jni_lib/x86_64/libZeroTierOneJNI.so
|
2016-06-23 12:07:51 -07:00
|
|
|
|
2016-06-28 15:20:30 -07:00
|
|
|
# Tests
|
2016-09-12 13:16:50 -07:00
|
|
|
OSTYPE=$(shell uname -s | tr '[A-Z]' '[a-z]')
|
2016-07-07 03:00:11 -05:00
|
|
|
TEST_OBJDIR := $(BUILD)/tests
|
2016-08-29 14:47:28 -07:00
|
|
|
TEST_SOURCES := $(wildcard tests/api_test/*.c)
|
2016-07-07 03:00:11 -05:00
|
|
|
TEST_TARGETS := $(addprefix $(BUILD)/tests/$(OSTYPE).,$(notdir $(TEST_SOURCES:.c=.out)))
|
2016-06-28 15:20:30 -07:00
|
|
|
|
2016-08-29 14:47:28 -07:00
|
|
|
$(BUILD)/tests/$(OSTYPE).%.out: tests/api_test/%.c
|
2016-06-28 19:53:09 -07:00
|
|
|
-$(CC) $(CC_FLAGS) -o $@ $<
|
2016-06-28 15:20:30 -07:00
|
|
|
|
|
|
|
|
$(TEST_OBJDIR):
|
|
|
|
|
mkdir -p $(TEST_OBJDIR)
|
2016-06-27 11:43:56 -07:00
|
|
|
|
2016-09-13 14:13:03 -07:00
|
|
|
tests: $(TEST_OBJDIR) $(TEST_TARGETS)
|
2016-07-07 03:00:11 -05:00
|
|
|
mkdir -p $(BUILD)/tests;
|
2016-08-29 14:47:28 -07:00
|
|
|
mkdir -p build/tests/zerotier
|
2016-09-13 14:13:03 -07:00
|
|
|
|
|
|
|
|
test_suite: tests lwip osx_service_and_intercept
|
2016-08-29 14:47:28 -07:00
|
|
|
cp tests/api_test/test.sh $(BUILD)/tests/test.sh
|
|
|
|
|
cp tests/api_test/servers.sh $(BUILD)/tests/servers.sh
|
|
|
|
|
cp tests/api_test/clients.sh $(BUILD)/tests/clients.sh
|
|
|
|
|
cp tests/cleanup.sh $(BUILD)/tests/cleanup.sh
|
2016-08-30 16:54:06 -07:00
|
|
|
cp $(LWIP_LIB) $(BUILD)/tests/zerotier/$(LWIP_LIB_NAME)
|
|
|
|
|
|
2016-06-24 11:07:57 -07:00
|
|
|
|
2016-08-30 16:54:06 -07:00
|
|
|
# ----- ADMINISTRATIVE -----
|
2016-07-17 16:00:24 -07:00
|
|
|
JAVAC := $(shell which javac)
|
|
|
|
|
|
2016-08-25 17:08:48 -07:00
|
|
|
clean_unity:
|
|
|
|
|
|
2016-08-25 13:46:01 -07:00
|
|
|
clean_android:
|
2016-06-23 11:36:08 -07:00
|
|
|
# android JNI lib project
|
2016-08-30 16:54:06 -07:00
|
|
|
-test -s /usr/bin/javac || { echo "Javac not found"; exit 1; }
|
2016-07-07 03:00:11 -05:00
|
|
|
-cd $(INT)/android/android_jni_lib/proj; ./gradlew clean
|
|
|
|
|
-rm -rf $(INT)/android/android_jni_lib/proj/build
|
2016-06-23 11:36:08 -07:00
|
|
|
# example android app project
|
2016-07-07 03:00:11 -05:00
|
|
|
-cd $(INT)/android/example_app; ./gradlew clean
|
2016-07-18 16:38:18 -07:00
|
|
|
|
2016-08-25 13:46:01 -07:00
|
|
|
clean_basic:
|
2016-09-14 16:48:02 -07:00
|
|
|
#-rm -rf .depend
|
2016-08-25 13:46:01 -07:00
|
|
|
-rm -rf $(BUILD)/*
|
|
|
|
|
-rm -rf $(INT)/Unity3D/Assets/Plugins/*
|
|
|
|
|
-rm -rf zerotier-cli zerotier-idtool
|
2016-08-30 16:54:06 -07:00
|
|
|
-find . -type f \( -name $(ONE_SERVICE_NAME) -o -name $(SDK_SERVICE_NAME) \) -delete
|
2016-08-25 13:46:01 -07:00
|
|
|
-find . -type f \( -name '*.o' -o -name '*.so' -o -name '*.o.d' -o -name '*.out' -o -name '*.log' -o -name '*.dSYM' \) -delete
|
|
|
|
|
|
|
|
|
|
clean: clean_basic clean_android
|
|
|
|
|
|
2016-07-20 14:20:45 -07:00
|
|
|
clean_for_production:
|
|
|
|
|
-find . -type f \( -name '*.identity'\) -delete
|
|
|
|
|
|
2016-08-30 16:54:06 -07:00
|
|
|
prep:
|
|
|
|
|
cp $(INT)/android/android_jni_lib/java/libs/* build
|
2016-08-25 17:08:48 -07:00
|
|
|
|
|
|
|
|
# Copy and rename source files into example projects to follow local ordinances
|
|
|
|
|
update_examples:
|
|
|
|
|
cp src/SDK_DotNetWrapper.cs integrations/Unity3D/Assets/ZTSDK.cs
|
|
|
|
|
cp src/SDK_JavaWrapper.java integrations/android/example_app/app/src/main/java/ZeroTier/ZTSDK.java
|
2016-07-18 16:38:18 -07:00
|
|
|
|
|
|
|
|
# For authors
|
|
|
|
|
# Copies documentation to all of the relevant directories to make viewing in the repo a little easier
|
|
|
|
|
update_docs:
|
|
|
|
|
cp docs/android_zt_sdk.md integrations/android/README.md
|
|
|
|
|
cp docs/ios_zt_sdk.md integrations/apple/example_app/iOS/README.md
|
|
|
|
|
cp docs/osx_zt_sdk.md integrations/apple/example_app/OSX/README.md
|
|
|
|
|
cp docs/integrations.md integrations/README.md
|
2016-07-18 17:37:49 -07:00
|
|
|
cp docs/zt_sdk_intro.md README.md
|
2016-07-18 18:00:04 -07:00
|
|
|
cp docs/docker_linux_zt_sdk.md integrations/docker/README.md
|
2016-08-25 11:38:30 -07:00
|
|
|
cp docs/osx_unity3d_zt_sdk.md integrations/Unity3D/README.md
|