Commit 1c516435 authored by Edward Wang's avatar Edward Wang Committed by Rafaël Carré

contrib: Support other Android architectures than ARM

Signed-off-by: Rafaël Carré's avatarRafaël Carré <funman@videolan.org>
parent 2b1c1392
......@@ -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"
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment