properly set CXXFLAGS and LDFLAGS

This commit is contained in:
Gunter Labes 2009-06-16 00:56:24 +00:00
parent 3ab8062436
commit fee0c34b87

View File

@ -21,6 +21,8 @@ SOURCE="$HOME/source"
[ -d "$SOURCE" ] || die "Source dir '$SOURCE' not found!"
SCONS=yes
CXXFLAGS="$CXXFLAGS"
LDFLAGS="$LDFLAGS"
case "$VERSION" in
1.2) CXXFLAGS="$CXXFLAGS -ggdb3"
SCONS=no
@ -58,7 +60,6 @@ BUILD_DIR="$HOME/$BUILD"
set -x
mkdir -p "$BUILD_DIR"
export CXXFLAG LDFLAGS
if [ $SCONS = yes ]; then
if [ $TYPE = wesnothd ]; then
BUILD_FLAGS="fifodir=$BUILD_DIR/var/run raw_sockets=1 forum_user_handler=1"
@ -69,7 +70,7 @@ if [ $SCONS = yes ]; then
fi
mkdir -p "$BUILD_DIR"/var/run
# need to remove .scons-option-cache when parameters get removed!
scons install-$TYPE prefix="$BUILD_DIR" program_suffix=-"$VERSION" $BUILD_FLAGS profile=0 fribidi=0 python=0 localedir= prefsdir= > "$BUILD_DIR"/scons.log
CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" scons install-$TYPE prefix="$BUILD_DIR" program_suffix=-"$VERSION" $BUILD_FLAGS profile=0 fribidi=0 python=0 localedir= prefsdir= > "$BUILD_DIR"/scons.log
else
if [ $TYPE = wesnothd ]; then
BUILD_FLAGS="--enable-server --enable-raw-sockets --with-fifodir=$BUILD_DIR/var/run --with-boost=$HOME/tools"
@ -78,7 +79,7 @@ else
fi
#echo 'autogen.sh and configure...'
./autogen.sh > "$BUILD_DIR"/autogen.log
./configure --prefix="$BUILD_DIR" --program-suffix=-"$VERSION" $BUILD_FLAGS --disable-game --disable-nls --enable-lite > "$BUILD_DIR"/configure.log
CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" ./configure --prefix="$BUILD_DIR" --program-suffix=-"$VERSION" $BUILD_FLAGS --disable-game --disable-nls --enable-lite > "$BUILD_DIR"/configure.log
make clean > /dev/null
#echo 'make...'
make > "$BUILD_DIR"/make.log