copy the configure script from the arda server, it is useful

This commit is contained in:
Enno Rehling 2013-02-18 01:29:15 +00:00
parent ccac0f824b
commit b4cea49843
1 changed files with 28 additions and 0 deletions

28
configure vendored Executable file
View File

@ -0,0 +1,28 @@
#!/bin/sh
MACHINE=`uname -m`
BIN_DIR="build-$MACHINE-Debug"
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
[ -z "$JOBS" ] && JOBS=1
DISTCC=`which distcc`
if [ ! -z "$DISTCC" ] ; then
JOBS=`distcc -j`
if [ -z "$JOBS" ] ; then
JOBS=1
elif [ $JOBS -gt 1 ] ; then
CC="distcc $CC"
MAKEOPTS=-j$JOBS
fi
fi
echo "Building with $CC and $JOBS jobs"
mkdir -p $BIN_DIR
cd $BIN_DIR
CC="$CC" cmake .. -DCMAKE_MODULE_PATH=$PWD/../cmake/Modules -DCMAKE_BUILD_TYPE=Debug
make -j$JOBS
make test
cd ../game
ln -sf ../$BIN_DIR/server/server
./server -e run_tests