summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoubango Telecom <github@doubango.org>2016-08-02 16:30:34 +0200
committerDoubango Telecom <github@doubango.org>2016-08-02 16:30:34 +0200
commit4c28e58c527f3b76f08178b12fcd2e306cee307d (patch)
treef9f76c87a297833d84f7903dc2ec5c62c1a5ccd0
parent1292f762bc688eff7cf80ac28902f8e3dada467a (diff)
downloaddoubango-4c28e58c527f3b76f08178b12fcd2e306cee307d.zip
doubango-4c28e58c527f3b76f08178b12fcd2e306cee307d.tar.gz
Add "--arch" to Android toolchain generation command
-rwxr-xr-xconfigure.ac6
-rwxr-xr-xthirdparties/android/android.sh29
2 files changed, 22 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index e50b397..0ab0b0e 100755
--- a/configure.ac
+++ b/configure.ac
@@ -54,7 +54,7 @@ if test "$target_os" = "android"; then
export ANDROID_PREFIX=arm-linux-androideabi
export SYSROOT=$NDK/platforms/android-3/arch-arm
export ANDROID_TOOLCHAIN=$(pwd)/my-android-toolchain-android-armv7-a
- $NDK/build/tools/make-standalone-toolchain.sh --platform=android-3 --install-dir=$ANDROID_TOOLCHAIN
+ $NDK/build/tools/make-standalone-toolchain.sh --platform=android-3 --arch=arm --install-dir=$ANDROID_TOOLCHAIN
export CFLAGS='-march=armv7-a -mfloat-abi=softfp'
export LDFLAGS='-Wl,--fix-cortex-a8'
AC_SUBST(TARGET_ARCH, "arm")
@@ -63,7 +63,7 @@ if test "$target_os" = "android"; then
export ANDROID_PREFIX=arm-linux-androideabi
export SYSROOT=$NDK/platforms/android-3/arch-arm
export ANDROID_TOOLCHAIN=$(pwd)/my-android-toolchain-android-armv7-a-neon
- $NDK/build/tools/make-standalone-toolchain.sh --platform=android-3 --install-dir=$ANDROID_TOOLCHAIN
+ $NDK/build/tools/make-standalone-toolchain.sh --platform=android-3 --arch=arm --install-dir=$ANDROID_TOOLCHAIN
export CFLAGS='-march=armv7-a -mfloat-abi=softfp -mfpu=neon'
export LDFLAGS='-Wl,--fix-cortex-a8'
AC_SUBST(TARGET_ARCH, "arm")
@@ -72,7 +72,7 @@ if test "$target_os" = "android"; then
export ANDROID_PREFIX=arm-linux-androideabi
export SYSROOT=$NDK/platforms/android-3/arch-arm
export ANDROID_TOOLCHAIN=$(pwd)/my-android-toolchain-armv5te
- $NDK/build/tools/make-standalone-toolchain.sh --platform=android-3 --install-dir=$ANDROID_TOOLCHAIN
+ $NDK/build/tools/make-standalone-toolchain.sh --platform=android-3 --arch=arm --install-dir=$ANDROID_TOOLCHAIN
AC_SUBST(TARGET_ARCH, "arm")
;;
esac
diff --git a/thirdparties/android/android.sh b/thirdparties/android/android.sh
index 2f5b4e1..d44629d 100755
--- a/thirdparties/android/android.sh
+++ b/thirdparties/android/android.sh
@@ -1,9 +1,11 @@
-export NDK=/tmp/android-ndk-r9c
-export PREFIX_BASE=/tmp/android
+#!/bin/bash
+
+export NDK=/home/android-ndk-r10e
+export PREFIX_BASE=/home/openssl-1.0.1t/android
export HOST=arm-linux-androideabi
export CPU=ARM
-if [ $1 = "x86" ]
+if [ w$1 = "wx86" ]
then
echo "************************"
echo " X86 "
@@ -12,10 +14,11 @@ then
export CPU=x86
export SYSROOT=$NDK/platforms/android-9/arch-x86
export ANDROID_TOOLCHAIN=$(pwd)/my-android-toolchain-android-x86
- $NDK/build/tools/make-standalone-toolchain.sh --platform=android-9 --arch=x86 --install-dir=$ANDROID_TOOLCHAIN
+ $NDK/build/tools/make-standalone-toolchain.sh --arch=x86 --platform=android-9 --arch=x86 --install-dir=$ANDROID_TOOLCHAIN
export CFLAGS='-fPIC' # For FFmpeg: '-fno-PIC'
export LDFLAGS=''
-elif [ $1 = "armv7a" ]
+ export OS=android-x86
+elif [ w$1 = "warmv7a" ]
then
echo "************************"
echo " ARMv7-a "
@@ -24,10 +27,11 @@ then
export CPU=armv7-a
export SYSROOT=$NDK/platforms/android-3/arch-arm
export ANDROID_TOOLCHAIN=$(pwd)/my-android-toolchain-android-armv7-a
- $NDK/build/tools/make-standalone-toolchain.sh --platform=android-3 --install-dir=$ANDROID_TOOLCHAIN
+ $NDK/build/tools/make-standalone-toolchain.sh --arch=arm --platform=android-3 --install-dir=$ANDROID_TOOLCHAIN
export CFLAGS='-march=armv7-a -mfloat-abi=softfp -fPIC'
export LDFLAGS='-Wl,--fix-cortex-a8'
-elif [ $1 = "neon" ]
+ export OS=android-armv7
+elif [ w$1 = "wneon" ]
then
echo "************************"
echo " NEON "
@@ -36,9 +40,10 @@ then
export CPU=armv7-a-neon
export SYSROOT=$NDK/platforms/android-3/arch-arm
export ANDROID_TOOLCHAIN=$(pwd)/my-android-toolchain-android-armv7-a-neon
- $NDK/build/tools/make-standalone-toolchain.sh --platform=android-3 --install-dir=$ANDROID_TOOLCHAIN
+ $NDK/build/tools/make-standalone-toolchain.sh --arch=arm --platform=android-3 --install-dir=$ANDROID_TOOLCHAIN
export CFLAGS='-march=armv7-a -mfloat-abi=softfp -mfpu=neon -fPIC'
export LDFLAGS='-Wl,--fix-cortex-a8'
+ export OS=android-armv7
else
echo "************************"
echo " ARMv5TE "
@@ -47,9 +52,10 @@ else
export CPU=armv5te
export SYSROOT=$NDK/platforms/android-3/arch-arm
export ANDROID_TOOLCHAIN=$(pwd)/my-android-toolchain-armv5te
- $NDK/build/tools/make-standalone-toolchain.sh --platform=android-3 --install-dir=$ANDROID_TOOLCHAIN
+ $NDK/build/tools/make-standalone-toolchain.sh --arch=arm --platform=android-3 --install-dir=$ANDROID_TOOLCHAIN
export CFLAGS='-fPIC'
export LDFLAGS=''
+ export OS=android
fi
@@ -62,4 +68,7 @@ export CXX=$ANDROID_TOOLCHAIN/bin/$HOST-g++
export AS=$ANDROID_TOOLCHAIN/bin/$HOST-gcc
export RANLIB=$ANDROID_TOOLCHAIN/bin/$HOST-ranlib
-./configure --prefix=$PREFIX_BASE/$CPU --host=$HOST --enable-pic --disable-oggtest --without-libogg --enable-static && make clean && make && make install
+./Configure --prefix=$PREFIX_BASE/$CPU --openssldir=$PREFIX_BASE/$CPU/openssl $OS
+make clean
+make
+
OpenPOWER on IntegriCloud