[Android] Updated scripts to use libc++ when building extlibs
This commit is contained in:
parent
595df2a1a9
commit
050dd6f5dc
@ -7,6 +7,6 @@ CC=arm-linux-androideabi-gcc
|
||||
CXX=arm-linux-androideabi-g++
|
||||
CFLAGS="-I$DESTDIR/usr/include -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16"
|
||||
CPPFLAGS="-I$DESTDIR/usr/include -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16"
|
||||
LDFLAGS="-L$DESTDIR/usr/lib -march=armv7-a -Wl,--fix-cortex-a8 -lstlport_shared"
|
||||
LDFLAGS="-L$DESTDIR/usr/lib -march=armv7-a -Wl,--fix-cortex-a8"
|
||||
|
||||
./compile_libs.sh arm-v7a $PATH $CC $CXX "$CFLAGS" "$CPPFLAGS" "$LDFLAGS"
|
||||
|
@ -15,37 +15,37 @@ export LDFLAGS=$7
|
||||
if [ "$1" = "arm" ]
|
||||
then
|
||||
ARCH=arm-linux
|
||||
ANDROID_ABI=armeabi
|
||||
ANDROID_ABI=armeabi
|
||||
|
||||
elif [ "$1" = "arm-v7a" ]
|
||||
then
|
||||
ARCH=arm-linux
|
||||
ANDROID_ABI=armeabi-v7a
|
||||
ANDROID_ABI=armeabi-v7a
|
||||
|
||||
elif [ "$1" = "x86" ]
|
||||
then
|
||||
ARCH=i686-linux
|
||||
ANDROID_ABI=x86
|
||||
ANDROID_ABI=x86
|
||||
|
||||
elif [ "$1" = "mips" ]
|
||||
then
|
||||
ARCH=mips-linux
|
||||
ANDROID_ABI=mips
|
||||
ANDROID_ABI=mips
|
||||
fi
|
||||
|
||||
HOST="--host=$ARCH"
|
||||
PREFIX="--prefix=$DESTDIR/$1/usr need_version=no"
|
||||
|
||||
# Compile OGG
|
||||
cd $LOCALDIR/build/libogg-* && sed -i 's/-version-info/-avoid-version/g' src/Makefile.in src/Makefile.am && ./configure $HOST $PREFIX && make && make install
|
||||
cd $LOCALDIR/build/libogg-* && sed -i 's/-version-info/-avoid-version/g' src/Makefile.in src/Makefile.am && ./configure $HOST $PREFIX --enable-shared=no && make && make install
|
||||
rm $DESTDIR/$1/usr/lib/libogg*.so*
|
||||
|
||||
# Compile FLAC
|
||||
cd $LOCALDIR/build/flac-* && sed -i 's/-version-info/-avoid-version/g' src/libFLAC/Makefile.in src/libFLAC/Makefile.am && ./configure $HOST $PREFIX && make && make install
|
||||
cd $LOCALDIR/build/flac-* && sed -i 's/-version-info/-avoid-version/g' src/libFLAC/Makefile.in src/libFLAC/Makefile.am && ./configure $HOST $PREFIX --enable-shared=no && make && make install
|
||||
rm $DESTDIR/$1/usr/lib/libFLAC*.so*
|
||||
|
||||
# Compile VORBIS
|
||||
cd $LOCALDIR/build/libvorbis-* && sed -i 's/-version-info/-avoid-version/g' lib/Makefile.in lib/Makefile.am && ./configure $HOST $PREFIX && make && make install
|
||||
cd $LOCALDIR/build/libvorbis-* && sed -i 's/-version-info/-avoid-version/g' lib/Makefile.in lib/Makefile.am && ./configure $HOST $PREFIX --enable-shared=no && make && make install
|
||||
rm $DESTDIR/$1/usr/lib/libvorbis*.so*
|
||||
|
||||
# Compile libsndfile (important: --disable-sqlite)
|
||||
|
@ -2,37 +2,43 @@
|
||||
|
||||
create_toolchain () {
|
||||
|
||||
export SYSROOT=$NDK/platforms/android-$1/arch-$2/
|
||||
|
||||
MAKE=$NDK/build/tools/make-standalone-toolchain.sh
|
||||
|
||||
PLATFORM=--platform=android-$1
|
||||
DIR=--install-dir=toolchains/$2
|
||||
|
||||
# Abort if already created
|
||||
# abort if already created
|
||||
if [ -d "$PWD/toolchains/$2" ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
# save the working directory and move to the NDK directory
|
||||
WORKING_DIRECTORY=$PWD
|
||||
cd $NDK
|
||||
|
||||
if [ "$2" = "arm" ]
|
||||
then
|
||||
TOOLCHAIN=--toolchain=arm-linux-androideabi-4.8
|
||||
elif [ "$2" = "x86" ]
|
||||
then
|
||||
TOOLCHAIN=--toolchain=x86-4.8
|
||||
elif [ "$2" = "mips" ]
|
||||
then
|
||||
TOOLCHAIN=--toolchain=mipsel-linux-android-4.8
|
||||
else
|
||||
echo "Abort."
|
||||
exit 1
|
||||
fi
|
||||
# prepare the command according to chosen options
|
||||
PLATFORM=--platform=android-$1
|
||||
DIR=--install-dir=$WORKING_DIRECTORY/toolchains/$2
|
||||
MAKE=$NDK/build/tools/make-standalone-toolchain.sh
|
||||
|
||||
$MAKE $PLATFORM $TOOLCHAIN $DIR --stl=stlport
|
||||
if [ "$2" = "arm" ]
|
||||
then
|
||||
TOOLCHAIN=--toolchain=arm-linux-androideabi-4.8
|
||||
elif [ "$2" = "x86" ]
|
||||
then
|
||||
TOOLCHAIN=--toolchain=x86-4.8
|
||||
elif [ "$2" = "mips" ]
|
||||
then
|
||||
TOOLCHAIN=--toolchain=mipsel-linux-android-4.8
|
||||
else
|
||||
echo "Abort."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# move linux/soundcard.h to sys/soundcard.h
|
||||
mv $PWD/toolchains/$2/sysroot/usr/include/linux/soundcard.h $PWD/toolchains/$2/sysroot/usr/include/sys
|
||||
# create the standalone toolchain
|
||||
$MAKE $PLATFORM $TOOLCHAIN $DIR --stl=libc++
|
||||
|
||||
# go back to our working directory
|
||||
cd $WORKING_DIRECTORY
|
||||
|
||||
# move linux/soundcard.h to sys/soundcard.h
|
||||
mv $PWD/toolchains/$2/sysroot/usr/include/linux/soundcard.h $PWD/toolchains/$2/sysroot/usr/include/sys
|
||||
}
|
||||
|
||||
create_toolchain 9 arm
|
||||
|
@ -17,7 +17,6 @@ JPEG=jpeg-$JPEG_VERSION
|
||||
FREETYPE_VERSION=2.4.0
|
||||
FREETYPE=freetype-$FREETYPE_VERSION
|
||||
|
||||
|
||||
mkdir build
|
||||
|
||||
wget -nc -P src http://downloads.xiph.org/releases/flac/$FLAC.tar.gz
|
||||
|
Loading…
Reference in New Issue
Block a user