Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Adam Strzelecki <ono-VmbhqvGFtmE <at> public.gmane.org>
Subject: [PATCH] lib/libluajit-ios.a universal binary build script
Newsgroups: gmane.comp.lang.lua.luajit
Date: Tuesday 30th October 2012 14:29:51 UTC (over 4 years ago)
Builds universal binary for iOS6 SDK and Simulator for latest Xcode.app.
Does not need Command Line Tools installed, just Xcode.app from MAS at
default location /Applications.
Outputs lib/libluajit-ios.a that can be dragged into Xcode project for
linking.

To build either launch lib/build-ios double clicking from Finder, or run it
from terminal.
---
 lib/build-ios |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100755 lib/build-ios

diff --git a/lib/build-ios b/lib/build-ios
new file mode 100755
index 0000000..c87ad8d
--- /dev/null
+++ b/lib/build-ios
@@ -0,0 +1,26 @@
+#!/bin/bash
+DEVROOT=/Applications/Xcode.app/Contents/Developer
+MAC_VER=MacOSX10.8.sdk
+IOS_VER=iPhoneOS6.0.sdk
+SIM_VER=iPhoneSimulator6.0.sdk
+
+CROSS=$DEVROOT/Toolchains/XcodeDefault.xctoolchain/usr/bin/
+MAKE=$DEVROOT/usr/bin/make
+MAC_SDKROOT=$DEVROOT/Platforms/MacOSX.platform/Developer
+IOS_SDKROOT=$DEVROOT/Platforms/iPhoneOS.platform/Developer
+SIM_SDKROOT=$DEVROOT/Platforms/iPhoneSimulator.platform/Developer
+HOST_CC="${CROSS}cc -arch i386 -isysroot $MAC_SDKROOT/SDKs/$MAC_VER"
+
+cd $(dirname "$0")/.. &&
+$MAKE clean && $MAKE CC=cc CROSS=$CROSS HOST_CC="$HOST_CC" TARGET_SYS=iOS
\
+	TARGET_FLAGS="-arch armv7  -isysroot $IOS_SDKROOT/SDKs/$IOS_VER" && \
+	cp -p src/libluajit.a lib/libluajit-armv7.a && \
+$MAKE clean && $MAKE CC=cc CROSS=$CROSS HOST_CC="$HOST_CC" TARGET_SYS=iOS
\
+	TARGET_FLAGS="-arch armv7s -isysroot $IOS_SDKROOT/SDKs/$IOS_VER" && \
+	cp -p src/libluajit.a lib/libluajit-armv7s.a && \
+$MAKE clean && $MAKE CC=cc CROSS=$CROSS HOST_CC="$HOST_CC" TARGET_SYS=iOS
\
+	TARGET_FLAGS="-arch i386   -isysroot $SIM_SDKROOT/SDKs/$SIM_VER" \
+	&& cp -p src/libluajit.a lib/libluajit-i386.a && \
+lipo -create -output lib/libluajit-ios.a \
+	lib/libluajit-arm*.a lib/libluajit-i386.a && \
+rm lib/libluajit-arm*.a lib/libluajit-i386.a
-- 
1.7.10.2 (Apple Git-33)
 
CD: 2ms