[Android] Updated scripts to use libc++ when building extlibs

This commit is contained in:
Jonathan De Wachter 2014-03-11 16:03:04 +01:00
parent 595df2a1a9
commit 050dd6f5dc
4 changed files with 38 additions and 33 deletions

View File

@ -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"

View File

@ -37,15 +37,15 @@ 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)

View File

@ -2,19 +2,21 @@
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
# 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
if [ "$2" = "arm" ]
then
TOOLCHAIN=--toolchain=arm-linux-androideabi-4.8
@ -29,7 +31,11 @@ create_toolchain () {
exit 1
fi
$MAKE $PLATFORM $TOOLCHAIN $DIR --stl=stlport
# 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

View File

@ -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