Commit 450f8feb authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Cosmetics and simplifications

parent dcf34c17
#!/bin/sh #!/bin/sh
RELEASE=0
#############
# ARGUMENTS #
#############
if [ -z "$ANDROID_NDK" ]; then if [ -z "$ANDROID_NDK" ]; then
echo "Please set the ANDROID_NDK environment variable with its path." echo "Please set the ANDROID_NDK environment variable with its path."
...@@ -21,7 +24,7 @@ if [ -z "$SYSROOT" ]; then ...@@ -21,7 +24,7 @@ if [ -z "$SYSROOT" ]; then
exit 1 exit 1
fi fi
RELEASE=0
for i in ${@}; do for i in ${@}; do
case "$i" in case "$i" in
release|--release) release|--release)
...@@ -33,6 +36,10 @@ for i in ${@}; do ...@@ -33,6 +36,10 @@ for i in ${@}; do
done done
#########
# FLAGS #
#########
# ARMv5 and ARMv6-nofpu are not really ABIs
if [ ${ANDROID_ABI} == "armeabi-nofpu" ];then if [ ${ANDROID_ABI} == "armeabi-nofpu" ];then
NO_FPU=0 NO_FPU=0
ANDROID_ABI="armeabi" ANDROID_ABI="armeabi"
...@@ -49,7 +56,6 @@ For an ARMv5 device: ...@@ -49,7 +56,6 @@ For an ARMv5 device:
$ export ANDROID_ABI="armeabi-v5" $ export ANDROID_ABI="armeabi-v5"
EOF EOF
# Set up ABI variables # Set up ABI variables
if [ ${ANDROID_ABI} = "x86" ] ; then if [ ${ANDROID_ABI} = "x86" ] ; then
TARGET_TUPLE="i686-linux-android" TARGET_TUPLE="i686-linux-android"
...@@ -76,9 +82,9 @@ else ...@@ -76,9 +82,9 @@ else
HAVE_ARM=1 HAVE_ARM=1
fi fi
###### ###############
# DISPLAY # DISPLAY ABI #
###### ###############
echo "ABI: $ANDROID_ABI" echo "ABI: $ANDROID_ABI"
if [ ! -z "$NO_FPU" ]; then if [ ! -z "$NO_FPU" ]; then
...@@ -118,14 +124,15 @@ if [ -z "$MAKEFLAGS" ]; then ...@@ -118,14 +124,15 @@ if [ -z "$MAKEFLAGS" ]; then
fi fi
fi fi
VLC_SOURCEDIR=.. ##########
# CFLAGS #
##########
CFLAGS="-g -O2 -fstrict-aliasing -funsafe-math-optimizations" CFLAGS="-g -O2 -fstrict-aliasing -funsafe-math-optimizations"
if [ -n "$HAVE_ARM" -a ! -n "$HAVE_64" ]; then if [ -n "$HAVE_ARM" -a ! -n "$HAVE_64" ]; then
CFLAGS="${CFLAGS} -mlong-calls" CFLAGS="${CFLAGS} -mlong-calls"
fi fi
# Setup CFLAGS # Setup CFLAGS per ABI
if [ ${ANDROID_ABI} = "armeabi-v7a" ] ; then if [ ${ANDROID_ABI} = "armeabi-v7a" ] ; then
EXTRA_CFLAGS="-mfpu=vfpv3-d16 -mcpu=cortex-a8" EXTRA_CFLAGS="-mfpu=vfpv3-d16 -mcpu=cortex-a8"
EXTRA_CFLAGS="${EXTRA_CFLAGS} -mthumb -mfloat-abi=softfp" EXTRA_CFLAGS="${EXTRA_CFLAGS} -mthumb -mfloat-abi=softfp"
...@@ -298,8 +305,8 @@ NM="${CROSS_COMPILE}nm" \ ...@@ -298,8 +305,8 @@ NM="${CROSS_COMPILE}nm" \
STRIP="${CROSS_COMPILE}strip" \ STRIP="${CROSS_COMPILE}strip" \
RANLIB="${CROSS_COMPILE}ranlib" \ RANLIB="${CROSS_COMPILE}ranlib" \
AR="${CROSS_COMPILE}ar" \ AR="${CROSS_COMPILE}ar" \
PKG_CONFIG_LIBDIR=$VLC_SOURCEDIR/contrib/$TARGET_TUPLE/lib/pkgconfig \ PKG_CONFIG_LIBDIR=../contrib/$TARGET_TUPLE/lib/pkgconfig \
sh $VLC_SOURCEDIR/configure --host=$TARGET_TUPLE --build=x86_64-unknown-linux $EXTRA_PARAMS \ sh ../configure --host=$TARGET_TUPLE --build=x86_64-unknown-linux $EXTRA_PARAMS \
--disable-nls \ --disable-nls \
--enable-live555 --enable-realrtsp \ --enable-live555 --enable-realrtsp \
--enable-avformat \ --enable-avformat \
......
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