summaryrefslogtreecommitdiffstats
path: root/tools/ios_osxcross.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ios_osxcross.py')
-rw-r--r--tools/ios_osxcross.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/ios_osxcross.py b/tools/ios_osxcross.py
new file mode 100644
index 0000000..aa8dd46
--- /dev/null
+++ b/tools/ios_osxcross.py
@@ -0,0 +1,26 @@
+import os
+
+
+def options(opts):
+ opts.Add("ios_triple", "Triple for ios toolchain", "")
+
+
+def exists(env):
+ return "OSXCROSS_IOS" in os.environ
+
+
+def generate(env):
+ compiler_path = "$IPHONEPATH/usr/bin/${ios_triple}"
+ env["CC"] = compiler_path + "clang"
+ env["CXX"] = compiler_path + "clang++"
+ env["AR"] = compiler_path + "ar"
+ env["RANLIB"] = compiler_path + "ranlib"
+ env["SHLIBSUFFIX"] = ".dylib"
+
+ env.Prepend(
+ CPPPATH=[
+ "$IPHONESDK/usr/include",
+ "$IPHONESDK/System/Library/Frameworks/AudioUnit.framework/Headers",
+ ]
+ )
+ env.Append(CCFLAGS=["-stdlib=libc++"])