File: compile_libs.sh

package info (click to toggle)
libsfml 2.5.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,772 kB
  • sloc: cpp: 31,651; ansic: 6,399; objc: 653; sh: 199; xml: 30; makefile: 14
file content (57 lines) | stat: -rwxr-xr-x 1,706 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env bash

DESTDIR=$PWD/tmp
LOCALDIR=$PWD

OPATH=$PATH

export PATH=$2
export CC=$3
export CXX=$4
export CFLAGS=$5
export CPPFLAGS=$6
export LDFLAGS=$7

if [ "$1" = "arm" ]
then
    ARCH=arm-linux
    ANDROID_ABI=armeabi

elif [ "$1" = "arm-v7a" ]
then
    ARCH=arm-linux
    ANDROID_ABI=armeabi-v7a

elif [ "$1" = "x86" ]
then
    ARCH=i686-linux
    ANDROID_ABI=x86

elif [ "$1" = "mips" ]
then
    ARCH=mips-linux
    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 --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 --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 --enable-shared=no && make && make install
rm $DESTDIR/$1/usr/lib/libvorbis*.so*

# Compile freetype
cd  $LOCALDIR/build/freetype-* && sed -i 's/-version-info/-avoid-version/g' builds/unix/unix-cc.in && ./configure $HOST $PREFIX && make && make install

# Compile OpenAL-Soft
cd  $LOCALDIR/build/openal-soft-android-master && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_CMAKE_TOOLCHAIN -DANDROID_ABI=$ANDROID_ABI -DANDROID_NATIVE_API_LEVEL=android-9 -DANDROID_USE_STLPORT=1 .. && make openal && mv libopenal.so $DESTDIR/$1/usr/lib

export PATH=$OPATH