summaryrefslogtreecommitdiffstats
path: root/build_android.sh
diff options
context:
space:
mode:
authorAnthony Blake <anthonix@me.com>2012-10-18 17:29:29 +1300
committerAnthony Blake <anthonix@me.com>2012-10-18 17:29:29 +1300
commit65e51920aaf66e3ff06d5d227a5a0281531be7ea (patch)
tree322f3bf9e2bd5b54e10ff64f2ec8d29e8bc045b2 /build_android.sh
parent5a7370c8abc112ec3e6ea3664853ff40ccfd5b73 (diff)
downloadffts-65e51920aaf66e3ff06d5d227a5a0281531be7ea.zip
ffts-65e51920aaf66e3ff06d5d227a5a0281531be7ea.tar.gz
Added Android build script
Diffstat (limited to 'build_android.sh')
-rwxr-xr-xbuild_android.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/build_android.sh b/build_android.sh
new file mode 100755
index 0000000..2e237fd
--- /dev/null
+++ b/build_android.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Compiles ffts for Android
+# Make sure you have NDK_ROOT defined in .bashrc or .bash_profile
+# Modify INSTALL_DIR to suit your situation
+
+INSTALL_DIR="`pwd`/jni/ffts"
+
+export PATH="$NDK_ROOT/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/:$PATH"
+export SYS_ROOT="$NDK_ROOT/platforms/android-8/arch-arm/"
+export CC="arm-linux-androideabi-gcc --sysroot=$SYS_ROOT"
+export LD="arm-linux-androideabi-ld"
+export AR="arm-linux-androideabi-ar"
+export RANLIB="arm-linux-androideabi-ranlib"
+export STRIP="arm-linux-androideabi-strip"
+export CFLAGS="-O3"
+
+mkdir -p $INSTALL_DIR
+./configure --enable-neon --build=i386-apple-darwin10.8.0 --host=arm-eabi --prefix=$INSTALL_DIR LIBS="-lc -lgcc"
+
+make clean
+make
+make install
+
+exit 0
OpenPOWER on IntegriCloud