warzone2100/win32/__BUILD_SCRIPT

44 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
source __BUILD_CONFIG
DEBUGFLAG="--disable-debug"
SPECIALFLAGS=""
for i in $@; do
if [[ "x$i" = "xdebug" ]] ; then
DEBUGFLAG="--enable-debug"
elif [[ "x$i" = "xdebug-relaxed" ]] ; then
DEBUGFLAG="--enable-debug=relaxed"
elif [[ "x$i" = "xinstaller" ]] ; then
SPECIALFLAGS="${SPECIALFLAGS}
--enable-data --enable-installer --with-installer-extdir=\"${PREFIX}\"
--with-installer-version=${INSTALLER_VERSION}"
elif [[ "x$i" = "x-j3" ]] ; then
MAKE_FLAGS="-j3"
else
CONF_EXTRA_FLAGS="${CONF_EXTRA_FLAGS}
${i}"
fi
done
CONF_EXTRA_FLAGS="${DEBUGFLAG}
${SPECIALFLAGS}
${CONF_EXTRA_FLAGS}"
# Move to the root directory
cd ..
./autogen.sh || exit 1
./configure --target=${CROSSCOMPILETARGET} --host=${CROSSCOMPILETARGET} --enable-static --disable-shared \
--prefix="${PREFIX}" \
${CONF_EXTRA_FLAGS} \
CFLAGS="${CFLAGS}" \
CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}" \
CC_FOR_BUILD="gcc" \
CXX_FOR_BUILD="g++" \
CPPFLAGS_FOR_BUILD=" " \
PKGCONFIG_PREFIX="${PREFIX}" || exit 1
make ${MAKE_FLAGS} || exit 1