workaround a problem with the harmattan gcc
[drnoksnes] / configure
1 #!/bin/bash
2
3 if [ -r /etc/maemo_version ]; then
4         #We are on Maemo
5         fakeroot debian/rules clean > /dev/null
6         debian/rules configure > /dev/null
7         echo "Configured for Maemo build. You can dpkg-buildpackage now."
8         exit 0
9 fi
10
11 ARCH=$(dpkg-architecture -qDEB_BUILD_ARCH)
12 GAME_VERSION=$(head -n 1 debian/changelog | sed 's/[^0-9.-]//g')
13
14 echo ARCH="${ARCH}" > config.mk
15 echo CONF_GUI=0 >> config.mk
16 echo CONF_XSP=0 >> config.mk
17 echo ASFLAGS="" >> config.mk
18 echo CFLAGS="-Wall -g -O2 -ffast-math" >> config.mk
19 echo CXXFLAGS="-Wall -g -O2 -ffast-math -fno-exceptions -fno-rtti" >> config.mk
20 echo LDFLAGS="-Wl,-z,defs" >> config.mk
21
22 make clean > /dev/null
23
24 echo "Configured for non-Maemo $ARCH build. You can make now."
25
26 exit 0
27