|
@@ -405,20 +405,49 @@ make HOST_CC="gcc -m32" CROSS=mips-linux-
|
|
|
make HOST_CC="gcc -m32" CROSS=mipsel-linux-
|
|
|
</pre>
|
|
|
<p>
|
|
|
-You can cross-compile for <b id="android">Android (ARM)</b> using the <a href="http://developer.android.com/sdk/ndk/index.html"><span class="ext">»</span> Android NDK</a>.
|
|
|
+You can cross-compile for <b id="android">Android</b> using the <a href="http://developer.android.com/sdk/ndk/index.html"><span class="ext">»</span> Android NDK</a>.
|
|
|
The environment variables need to match the install locations and the
|
|
|
desired target platform. E.g. Android 4.0 corresponds to ABI level 14.
|
|
|
-For details check the files <tt>docs/STANDALONE-TOOLCHAIN.html</tt> and
|
|
|
-<tt>docs/STABLE-APIS.html</tt> in the NDK directory.
|
|
|
+For details check the folder <tt>docs</tt> in the NDK directory.
|
|
|
+</p>
|
|
|
+<p>
|
|
|
+Only a few common variations for the different CPUs, ABIs and platforms
|
|
|
+are listed. Please use your own judgement for which combination you want
|
|
|
+to build/deploy or which lowest common denominator you want to pick:
|
|
|
</p>
|
|
|
<pre class="code">
|
|
|
+# Android/ARM, armeabi (ARMv5TE soft-float), Android 2.2+ (Froyo)
|
|
|
+NDK=/opt/android/ndk
|
|
|
+NDKABI=8
|
|
|
+NDKVER=$NDK/toolchains/arm-linux-androideabi-4.6
|
|
|
+NDKP=$NDKVER/prebuilt/linux-x86/bin/arm-linux-androideabi-
|
|
|
+NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
|
|
|
+make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF"
|
|
|
+
|
|
|
+# Android/ARM, armeabi-v7a (ARMv7 VFP), Android 4.0+ (ICS)
|
|
|
NDK=/opt/android/ndk
|
|
|
NDKABI=14
|
|
|
NDKVER=$NDK/toolchains/arm-linux-androideabi-4.6
|
|
|
NDKP=$NDKVER/prebuilt/linux-x86/bin/arm-linux-androideabi-
|
|
|
-NDKARCH="-march=armv7-a -mfloat-abi=softfp -Wl,--fix-cortex-a8"
|
|
|
NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
|
|
|
+NDKARCH="-march=armv7-a -mfloat-abi=softfp -Wl,--fix-cortex-a8"
|
|
|
make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF $NDKARCH"
|
|
|
+
|
|
|
+# Android/MIPS, mips (MIPS32R1 hard-float), Android 4.0+ (ICS)
|
|
|
+NDK=/opt/android/ndk
|
|
|
+NDKABI=14
|
|
|
+NDKVER=$NDK/toolchains/mipsel-linux-android-4.6
|
|
|
+NDKP=$NDKVER/prebuilt/linux-x86/bin/mipsel-linux-android-
|
|
|
+NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-mips"
|
|
|
+make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF"
|
|
|
+
|
|
|
+# Android/x86, x86 (i686 SSE3), Android 4.0+ (ICS)
|
|
|
+NDK=/opt/android/ndk
|
|
|
+NDKABI=14
|
|
|
+NDKVER=$NDK/toolchains/x86-4.6
|
|
|
+NDKP=$NDKVER/prebuilt/linux-x86/bin/i686-linux-android-
|
|
|
+NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-x86"
|
|
|
+make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF"
|
|
|
</pre>
|
|
|
<p>
|
|
|
You can cross-compile for <b id="ios">iOS 3.0+</b> (iPhone/iPad) using the <a href="http://developer.apple.com/devcenter/ios/index.action"><span class="ext">»</span> iOS SDK</a>.
|