summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-06 21:08:10 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-06 21:08:10 +0800
commit26981d47289ab68b7ad5a9724e007224e6a6c6e7 (patch)
treebfce2a5f89fa3e914e90b06b1772c3f001628aa3
parent782b4ebddb8c6ded2fedfbba6b996b5cbf0bbdb6 (diff)
Convenience configure wrapper for Android ARM architectures
-rwxr-xr-xconfigure.aarch64-linux-android.sh15
-rwxr-xr-xconfigure.arm-linux-androideabi.sh16
2 files changed, 31 insertions, 0 deletions
diff --git a/configure.aarch64-linux-android.sh b/configure.aarch64-linux-android.sh
new file mode 100755
index 0000000..1e03869
--- /dev/null
+++ b/configure.aarch64-linux-android.sh
@@ -0,0 +1,15 @@
+export NDK=/opt/android-ndk-r19c
+export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
+export TARGET=aarch64-linux-android
+export API=21
+export CC=$TOOLCHAIN/bin/$TARGET$API-clang
+export AR=$TOOLCHAIN/bin/$TARGET-ar
+export AS=$TOOLCHAIN/bin/$TARGET-as
+export LD=$TOOLCHAIN/bin/$TARGET-ld
+export RANLIB=$TOOLCHAIN/bin/$TARGET-ranlib
+export STRIP=$TOOLCHAIN/bin/$TARGET-strip
+export PREFIX=$TOOLCHAIN/sysroot/usr
+export CPPFLAGS="$CPPFLAGS -DDEBUG -DANDROID"
+export CFLAGS="$CFLAGS -g"
+export LDFLAGS="$LDFLAGS -L$PREFIX/lib/$TARGET/$API"
+./configure --host=$TARGET --prefix=$PREFIX --libdir=$PREFIX/lib/$TARGET/$API --disable-static
diff --git a/configure.arm-linux-androideabi.sh b/configure.arm-linux-androideabi.sh
new file mode 100755
index 0000000..bf083bd
--- /dev/null
+++ b/configure.arm-linux-androideabi.sh
@@ -0,0 +1,16 @@
+export NDK=/opt/android-ndk-r19c
+export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
+export TARGET=armv7a-linux-androideabi
+export API=21
+export CC=$TOOLCHAIN/bin/$TARGET$API-clang
+export TARGET=arm-linux-androideabi
+export AR=$TOOLCHAIN/bin/$TARGET-ar
+export AS=$TOOLCHAIN/bin/$TARGET-as
+export LD=$TOOLCHAIN/bin/$TARGET-ld
+export RANLIB=$TOOLCHAIN/bin/$TARGET-ranlib
+export STRIP=$TOOLCHAIN/bin/$TARGET-strip
+export PREFIX=$TOOLCHAIN/sysroot/usr
+export CPPFLAGS="$CPPFLAGS -DDEBUG -DANDROID"
+export CFLAGS="$CFLAGS -g"
+export LDFLAGS="$LDFLAGS -L$PREFIX/lib/$TARGET/$API"
+./configure --host=$TARGET --prefix=$PREFIX --libdir=$PREFIX/lib/$TARGET/$API --disable-static