summaryrefslogtreecommitdiff
path: root/scripts/portable_build.sh
blob: 89fc5a8d88988c252d0d17bfcc51979d56c9ee16 (plain)
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
#!/bin/sh
VERSION=`cat PORTABLE_VERSION | perl -ne 'chomp and print'`
ORIGIN=`pwd | perl -ne 'chomp and print'`
export APBUILD_STATIC_LIBGCC=1

#./autogen.sh
CC=$ORIGIN/tools/apbuild/apgcc
CXX=$ORIGIN/tools/apbuild/apgcc

./configure --enable-staticlink --enable-portable --disable-nls --disable-artwork-imlib2
sed -i 's/-lstdc++ -lm -lgcc_s -lc -lgcc_s/-lm -lc/g' libtool
#make clean
#make -j9

ZLIB_LIBS=$ORIGIN/lib-x86-32/libz.a
CFLAGS=-I $ORIGIN/lib-x86-32/include

for i in dumb shn ao ; do
    cd $ORIGIN/plugins/$i
    make clean
    make -j8 ZLIB_LIBS=$ZLIB_LIBS STATIC_CFLAGS=$CFLAGS CC=$CC CXX=$CXX
done

cd $ORIGIN

echo "building pluginfo tool..."
cd tools/pluginfo
make
cd ../../

./scripts/portable_postbuild.sh