Commit c94746d2 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Use sysroot instead of platform_arch_short

parent 3d47689f
......@@ -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 $@
......
......@@ -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}-
......
......@@ -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
......
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