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
|
#!/bin/bash
set -e
tucnak() {
export CFLAGS="-I$BASE/include"
export LDFLAGS="-L$BASE/lib"
./configure --host=$HOST --prefix=$BASE --without-gpm --without-alsa --with-portaudio -with-pkg=nsis
#--without-sdl --without-png --without-sndfile --without-fftw3
make clean
rm -f src/tucnak src/tucnak.exe
touch data/svnversion.exe
./svnver.sh
make -C src -j$CPUS tucnak.exe V=1
if [ -f src/tucnak ]; then mv src/tucnak src/tucnak.exe; fi
(PATH=$OLDPATH; unset CC; unset CFLAGS; unset LDFLAGS; unset HOST; unset BASE; unset CPUS; which gcc; set > _SET; echo && cd src && gcc map2d.c -o map2d)
make tucnak.d
make install
cp win32/tucnak-mingw.nsi $BASE/bin
cp win32/tucnak.ico $BASE/bin
cp win32/inpout32.dll $BASE/bin
cp /usr/lib/gcc/i686-w64-mingw32/4.9-win32/libgcc_s_sjlj-1.dll
echo
}
HOST=i586-mingw32msvc
BASE=$HOME/cross/$HOST
CPUS=`grep ^processor /proc/cpuinfo | wc -l`
mkdir -p $BASE/build
export OLDPATH=$PATH
export PATH=/usr/$HOST/bin:$BASE/bin:$PATH
export CC=$HOST-gcc
export PKG_CONFIG=$BASE/bin/pkg-config
tucnak
|