mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
[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++
|
CXX=arm-linux-androideabi-g++
|
||||||
CFLAGS="-I$DESTDIR/usr/include -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16"
|
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"
|
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"
|
./compile_libs.sh arm-v7a $PATH $CC $CXX "$CFLAGS" "$CPPFLAGS" "$LDFLAGS"
|
||||||
|
@ -37,15 +37,15 @@ HOST="--host=$ARCH"
|
|||||||
PREFIX="--prefix=$DESTDIR/$1/usr need_version=no"
|
PREFIX="--prefix=$DESTDIR/$1/usr need_version=no"
|
||||||
|
|
||||||
# Compile OGG
|
# 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*
|
rm $DESTDIR/$1/usr/lib/libogg*.so*
|
||||||
|
|
||||||
# Compile FLAC
|
# 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*
|
rm $DESTDIR/$1/usr/lib/libFLAC*.so*
|
||||||
|
|
||||||
# Compile VORBIS
|
# 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*
|
rm $DESTDIR/$1/usr/lib/libvorbis*.so*
|
||||||
|
|
||||||
# Compile libsndfile (important: --disable-sqlite)
|
# Compile libsndfile (important: --disable-sqlite)
|
||||||
|
@ -2,19 +2,21 @@
|
|||||||
|
|
||||||
create_toolchain () {
|
create_toolchain () {
|
||||||
|
|
||||||
export SYSROOT=$NDK/platforms/android-$1/arch-$2/
|
# abort if already created
|
||||||
|
|
||||||
MAKE=$NDK/build/tools/make-standalone-toolchain.sh
|
|
||||||
|
|
||||||
PLATFORM=--platform=android-$1
|
|
||||||
DIR=--install-dir=toolchains/$2
|
|
||||||
|
|
||||||
# Abort if already created
|
|
||||||
if [ -d "$PWD/toolchains/$2" ]
|
if [ -d "$PWD/toolchains/$2" ]
|
||||||
then
|
then
|
||||||
return
|
return
|
||||||
fi
|
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" ]
|
if [ "$2" = "arm" ]
|
||||||
then
|
then
|
||||||
TOOLCHAIN=--toolchain=arm-linux-androideabi-4.8
|
TOOLCHAIN=--toolchain=arm-linux-androideabi-4.8
|
||||||
@ -29,7 +31,11 @@ create_toolchain () {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
# 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
|
mv $PWD/toolchains/$2/sysroot/usr/include/linux/soundcard.h $PWD/toolchains/$2/sysroot/usr/include/sys
|
||||||
|
@ -17,7 +17,6 @@ JPEG=jpeg-$JPEG_VERSION
|
|||||||
FREETYPE_VERSION=2.4.0
|
FREETYPE_VERSION=2.4.0
|
||||||
FREETYPE=freetype-$FREETYPE_VERSION
|
FREETYPE=freetype-$FREETYPE_VERSION
|
||||||
|
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
|
|
||||||
wget -nc -P src http://downloads.xiph.org/releases/flac/$FLAC.tar.gz
|
wget -nc -P src http://downloads.xiph.org/releases/flac/$FLAC.tar.gz
|
||||||
|
Loading…
Reference in New Issue
Block a user