Browse Source

Merge pull request #67 from JohannesDeml/ios-build-script

Add build script for iOS
Stanislav Denisov 5 years ago
parent
commit
a220c26cd8
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