diff --git a/configure b/configure new file mode 100755 index 000000000..8bebf3813 --- /dev/null +++ b/configure @@ -0,0 +1,32 @@ +#!/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 .. +for GAME in game* ; do + cd $GAME + ln -sf ../$BIN_DIR/server/server + ./server -e run_tests + cd .. +done diff --git a/quicklist b/quicklist index 23d8a36de..1164cda67 160000 --- a/quicklist +++ b/quicklist @@ -1 +1 @@ -Subproject commit 23d8a36de9cd909aee2aac11c18f9f1311a30b40 +Subproject commit 1164cda6777c69981d456b69019575f868aeb536 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 782fa8b3c..52eeee45c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -23,6 +23,7 @@ include_directories (${LUA_INCLUDE_DIR}) include_directories (${LIBXML2_INCLUDE_DIR}) include_directories (${BSON_INCLUDE_DIR}) include_directories (${INIPARSER_INCLUDE_DIR}) +include_directories (${CURSES_INCLUDE_DIR}) set (SERVER_SRC races/races.c @@ -49,4 +50,5 @@ target_link_libraries(server ${TOLUA_LIBRARIES} ${LUA_LIBRARIES} ${SQLITE3_LIBRARIES} + ${CURSES_LIBRARIES} )