Browse Source

Add build script for iOS

Johannes Deml 5 years ago
parent
commit
b48d381ead
1 changed files with 10 additions and 0 deletions
  1. 10 0
      Source/Native/build-ios.sh

+ 10 - 0
Source/Native/build-ios.sh

@@ -0,0 +1,10 @@
+# Point sysdir to iOS SDK
+export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
+
+# Create object files with iOS architecture
+gcc -c enet.c -fembed-bitcode -target arm64-apple-ios
+
+# Create static library
+libtool -static enet.o -o libenet.a
+
+rm enet.o