[Android] Use sysroot instead of platform_arch_short
Jean-Baptiste Kempf
git at videolan.org
Wed Feb 4 19:29:27 CET 2015
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Feb 4 19:22:58 2015 +0100| [c94746d2293f2b666c90dd9b07a417379a8dfc13] | committer: Jean-Baptiste Kempf
Use sysroot instead of platform_arch_short
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=c94746d2293f2b666c90dd9b07a417379a8dfc13
---
Makefile | 2 +-
compile-libvlc.sh | 6 ------
compile.sh | 7 ++++---
3 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
index 2feae53..c6aa191 100644
--- a/Makefile
+++ b/Makefile
@@ -81,7 +81,7 @@ $(LIBVLCJNI_H):
printf "/* Autogenerated from the list of modules */\n $$DEFINITION\n $$BUILTINS\n" > $@
$(PRIVATE_LIBDIR)/%.so: $(PRIVATE_LIBDIR)/%.c
- $(GEN)$(TARGET_TUPLE)-gcc $< -shared -o $@ --sysroot=$(ANDROID_NDK)/platforms/$(ANDROID_API)/arch-$(PLATFORM_SHORT_ARCH)
+ $(GEN)$(TARGET_TUPLE)-gcc $< -shared -o $@ --sysroot=$(SYSROOT)
$(PRIVATE_LIBDIR)/%.c: $(PRIVATE_LIBDIR)/%.symbols
$(VERBOSE)rm -f $@
diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 8e68c0d..b51a7f4 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -26,27 +26,22 @@ done
if [ ${ANDROID_ABI} = "x86" ] ; then
TARGET_TUPLE="i686-linux-android"
PATH_HOST="x86"
- PLATFORM_SHORT_ARCH="x86"
elif [ ${ANDROID_ABI} = "x86_64" ] ; then
TARGET_TUPLE="x86_64-linux-android"
PATH_HOST="x86_64"
HAVE_64=1
- PLATFORM_SHORT_ARCH="x86_64"
elif [ ${ANDROID_ABI} = "mips" ] ; then
TARGET_TUPLE="mipsel-linux-android"
PATH_HOST=$TARGET_TUPLE
- PLATFORM_SHORT_ARCH="mips"
elif [ ${ANDROID_ABI} = "arm64-v8a" ] ; then
TARGET_TUPLE="aarch64-linux-android"
PATH_HOST=$TARGET_TUPLE
HAVE_ARM=1
HAVE_64=1
- PLATFORM_SHORT_ARCH="arm64"
else
TARGET_TUPLE="arm-linux-androideabi"
PATH_HOST=$TARGET_TUPLE
HAVE_ARM=1
- PLATFORM_SHORT_ARCH="arm"
fi
@@ -138,7 +133,6 @@ fi
CPPFLAGS="-I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${GCCVER}/include -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${GCCVER}/libs/${ANDROID_ABI}/include"
LDFLAGS="$LDFLAGS -L${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${GCCVER}/libs/${ANDROID_ABI}"
-SYSROOT=$ANDROID_NDK/platforms/$ANDROID_API/arch-$PLATFORM_SHORT_ARCH
ANDROID_BIN=`echo $ANDROID_NDK/toolchains/${PATH_HOST}-${GCCVER}/prebuilt/\`uname|tr A-Z a-z\`-*/bin/`
CROSS_COMPILE=${ANDROID_BIN}/${TARGET_TUPLE}-
diff --git a/compile.sh b/compile.sh
index afb6d19..f9b55ec 100755
--- a/compile.sh
+++ b/compile.sh
@@ -103,6 +103,8 @@ esac
export GCCVER
export ANDROID_API
+SYSROOT=$ANDROID_NDK/platforms/$ANDROID_API/arch-$PLATFORM_SHORT_ARCH
+
# XXX : important!
[ ${ANDROID_ABI} = "armeabi" ] && cat << EOF
@@ -118,7 +120,7 @@ export TARGET_TUPLE
export PATH_HOST
export HAVE_ARM
export HAVE_64
-export PLATFORM_SHORT_ARCH
+export SYSROOT
# Add the NDK toolchain to the PATH, needed both for contribs and for building
# stub libraries
@@ -206,7 +208,7 @@ export ANDROID_LIBS=${PWD}/android-libs
export VLC_BUILD_DIR=vlc/build-android-${TARGET_TUPLE}
make $CLEAN
-make -j1 TARGET_TUPLE=$TARGET_TUPLE PLATFORM_SHORT_ARCH=$PLATFORM_SHORT_ARCH GCCVER=$GCCVER RELEASE=$RELEASE $TARGET
+make -j1 TARGET_TUPLE=$TARGET_TUPLE SYSROOT=$SYSROOT GCCVER=$GCCVER RELEASE=$RELEASE $TARGET
#
# Exporting a environment script with all the necessary variables
@@ -244,7 +246,6 @@ export ANDROID_LIBS=$ANDROID_LIBS
export VLC_BUILD_DIR=$VLC_BUILD_DIR
export TARGET_TUPLE=$TARGET_TUPLE
export PATH_HOST=$PATH_HOST
-export PLATFORM_SHORT_ARCH=$PLATFORM_SHORT_ARCH
export RELEASE=$RELEASE
EssentialsA
More information about the Android
mailing list