Updated Android integration, added build instructions to make-mac

This commit is contained in:
Joseph Henry
2016-06-21 16:26:38 -07:00
parent bc14b532ed
commit ae7eb359a0
13 changed files with 192 additions and 82 deletions
+29 -16
View File
@@ -67,21 +67,36 @@ else
STRIP=strip
endif
# Debug output for Network Containers
# Specific levels can be controlled in netcon/common.inc.c
# Debug output for SDK
# Specific levels can be controlled in src/debug.h
ifeq ($(SDK_DEBUG),1)
DEFS+=-DSDK_DEBUG
endif
CXXFLAGS=$(CFLAGS) -fno-rtti
all:
# TODO: CHECK if XCODE TOOLS are installed
# Build frameworks for application development
OSX_app_framework:
cd integrations/Apple/ZeroTierSDK_Apple; xcodebuild -scheme ZeroTierSDK_OSX build SYMROOT="../../../build/OSX_app_framework"
iOS_app_framework:
cd integrations/Apple/ZeroTierSDK_Apple; xcodebuild -scheme ZeroTierSDK_iOS build SYMROOT="../../../build/iOS_app_framework"
# Build bundles for Unity integrations
all:
cd integrations/Apple/ZeroTierSDK_Apple; xcodebuild -scheme ZeroTierSDK_OSX build SYMROOT="../../../build/OSX_Framework"
cd integrations/Apple/ZeroTierSDK_Apple; xcodebuild -scheme ZeroTierSDK_iOS build SYMROOT="../../../build/iOS_Framework"
cd integrations/Apple/ZeroTierSDK_Apple; xcodebuild -scheme ZeroTierSDK_Unity3D_OSX build SYMROOT="../../../build/OSX_Unity_Bundle"
cd integrations/Apple/ZeroTierSDK_Apple; xcodebuild -scheme ZeroTierSDK_Unity3D_iOS build SYMROOT="../../../build/iOS_Unity_Bundle"
OSX_unity3d_bundle:
cd integrations/Apple/ZeroTierSDK_Apple; xcodebuild -scheme ZeroTierSDK_Unity3D_OSX build SYMROOT="../../../build/OSX_unity3d_bundle"
iOS_unity3d_bundle:
cd integrations/Apple/ZeroTierSDK_Apple; xcodebuild -scheme ZeroTierSDK_Unity3D_iOS build SYMROOT="../../../build/iOS_unity3d_bundle"
# TODO: CHECK if ANDROID/GRADLE TOOLS are installed
# Build JNI library for Android app integration
Android_JNI_library:
cd integrations/Android/proj; ./gradlew assembleDebug
# Build library for Android Unity integrations
sdk: $(OBJS)
rm -f *.o
@@ -99,15 +114,13 @@ sdk: $(OBJS)
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
clean:
rm -rf build
rm -rf build/*
find . -type f -name '*.o' -delete
find . -type f -name '*.so' -delete
find . -type f -name '*.o.d' -delete
# Remove junk generated by Android builds
rm -rf netcon/Android/*.o.d
rm -rf netcon/Netcon-Android/proj/app/build/intermediates
rm -rf netcon/*.o 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) netcon/zerotier-intercept zerotier-netcon-service ztproxy libztapi.so libztkq.so libztintercept.so zerotier-one zerotier-idtool zerotier-selftest zerotier-cli ZeroTierOneInstaller-* mkworld
cd integrations/Android/proj; ./gradlew clean
rm -rf integrations/Android/proj/.gradle
rm -rf integrations/Android/proj/.idea
FORCE: