[vlc-commits] contrib: don't hardcode android api

Thomas Guillem git at videolan.org
Thu Oct 9 18:58:21 CEST 2014


vlc | branch: master | Thomas Guillem <tom at gllm.fr> | Thu Oct  9 18:45:19 2014 +0200| [0aeb638b7fcdf9bb06787b2e8771d6bf803cd10f] | committer: Jean-Baptiste Kempf

contrib: don't hardcode android api

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 contrib/bootstrap             |    2 ++
 contrib/src/live555/rules.mak |    2 +-
 contrib/src/main.mak          |    4 ++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/contrib/bootstrap b/contrib/bootstrap
index b77a9d9..d9067da 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -211,6 +211,8 @@ check_android_sdk()
 	add_make "ANDROID_NDK := ${ANDROID_NDK}"
 	[ -z "${ANDROID_ABI}" ] && echo "You must set ANDROID_ABI environment variable" && exit 1
 	add_make "ANDROID_ABI := ${ANDROID_ABI}"
+	[ -z "${ANDROID_API}" ] && echo "You should set ANDROID_API environment variable (using default android-9)" && ANDROID_API := android-9
+	add_make "ANDROID_API := ${ANDROID_API}"
 	[ ${ANDROID_ABI} = "armeabi-v7a" ] && add_make_enabled "HAVE_NEON"
 	[ ${ANDROID_ABI} = "armeabi-v7a" ] && add_make_enabled "HAVE_ARMV7A"
 	[ ${ANDROID_ABI} = "armeabi" -a -z "${NO_ARMV6}" ] && add_make_enabled "HAVE_ARMV6"
diff --git a/contrib/src/live555/rules.mak b/contrib/src/live555/rules.mak
index 6425816..00bb48e 100644
--- a/contrib/src/live555/rules.mak
+++ b/contrib/src/live555/rules.mak
@@ -50,7 +50,7 @@ live555: $(LIVE555_FILE) .sum-live555
 	cd live && sed -e 's%-D_FILE_OFFSET_BITS=64%-D_FILE_OFFSET_BITS=64\ -fPIC\ -DPIC%' -i.orig config.linux
 	cd live && sed -e 's%-DSOLARIS%-DSOLARIS -DXLOCALE_NOT_USED%' -i.orig config.solaris-*bit
 ifdef HAVE_ANDROID
-	cd live && sed -e 's%-DPIC%-DPIC -DNO_SSTREAM=1 -DLOCALE_NOT_USED -I$(ANDROID_NDK)/platforms/android-9/arch-$(PLATFORM_SHORT_ARCH)/usr/include%' -i.orig config.linux
+	cd live && sed -e 's%-DPIC%-DPIC -DNO_SSTREAM=1 -DLOCALE_NOT_USED -I$(ANDROID_NDK)/platforms/$(ANDROID_API)/arch-$(PLATFORM_SHORT_ARCH)/usr/include%' -i.orig config.linux
 endif
 	mv live $@
 	touch $@
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index dd2bd25..97e2b62 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -91,8 +91,8 @@ endif
 endif
 
 ifdef HAVE_ANDROID
-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)
+CC :=  $(HOST)-gcc --sysroot=$(ANDROID_NDK)/platforms/$(ANDROID_API)/arch-$(PLATFORM_SHORT_ARCH)
+CXX := $(HOST)-g++ --sysroot=$(ANDROID_NDK)/platforms/$(ANDROID_API)/arch-$(PLATFORM_SHORT_ARCH)
 endif
 
 ifdef HAVE_MACOSX



More information about the vlc-commits mailing list