[vlc-commits] contrib: Support other Android architectures than ARM

Edward Wang git at videolan.org
Wed Jul 25 10:01:39 CEST 2012


vlc | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Tue Jul 24 22:51:40 2012 -0400| [1c5164353e2d21a5d052b0de3082197fdf049097] | committer: Rafaël Carré

contrib: Support other Android architectures than ARM

Signed-off-by: Rafaël Carré <funman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1c5164353e2d21a5d052b0de3082197fdf049097
---

 contrib/bootstrap    |   17 +++++++++++++++--
 contrib/src/main.mak |    4 ++--
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/contrib/bootstrap b/contrib/bootstrap
index 35866aa..4eb558f 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -216,10 +216,23 @@ case "${OS}" in
 	*bsd*)
 		add_make_enabled "HAVE_BSD"
 		;;
-	linux-androideabi)
+	*android*)
 		check_android_sdk
 		add_make_enabled "HAVE_LINUX" "HAVE_ANDROID"
-		add_make "PATH = ${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:${PATH}"
+		case "${HOST}" in
+			*arm*)
+			add_make "PATH = ${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:${PATH}"
+			add_make "PLATFORM_SHORT_ARCH := arm"
+			;;
+			*i686*)
+			add_make "PATH = ${ANDROID_NDK}/toolchains/x86-4.4.3/prebuilt/linux-x86/bin/:${PATH}"
+			add_make "PLATFORM_SHORT_ARCH := x86"
+			;;
+			*mipsel*)
+			add_make "PATH = ${ANDROID_NDK}/toolchains/mipsel-linux-android-4.4.3/prebuilt/linux-x86/bin/:${PATH}"
+			add_make "PLATFORM_SHORT_ARCH := mips"
+			;;
+		esac
 		;;
 	*linux*)
 		add_make_enabled "HAVE_LINUX"
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 4c4d974..f750970 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -100,8 +100,8 @@ endif
 endif
 
 ifdef HAVE_ANDROID
-CC :=  $(HOST)-gcc --sysroot=$(ANDROID_NDK)/platforms/android-9/arch-arm
-CXX := $(HOST)-g++ --sysroot=$(ANDROID_NDK)/platforms/android-9/arch-arm
+CC :=  $(HOST)-gcc --sysroot=$(ANDROID_NDK)/platforms/android-9/arch-$(PLATFORM_SHORT_ARCH)
+CXX := $(HOST)-g++ --sysroot=$(ANDROID_NDK)/platforms/android-9/arch-$(PLATFORM_SHORT_ARCH)
 EXTRA_CFLAGS += -I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/include
 EXTRA_CFLAGS += -I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/libs/$(ANDROID_ABI)/include
 endif



More information about the vlc-commits mailing list