X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/555324cdb34701b2e0fd1d681218de85e5cc7f6d..a729c9ba2df66e31beb52e4bbbe638d3cd3445ad:/projects/rlm_stg/build diff --git a/projects/rlm_stg/build b/projects/rlm_stg/build index dbff7910..91fe7d9d 100755 --- a/projects/rlm_stg/build +++ b/projects/rlm_stg/build @@ -16,18 +16,15 @@ DATA_MODE=0644 DIR_MODE=0755 OWNER=root -if [ -z $1 ] +if [ "$1" = "debug" ] then - MAKEOPTS="-j1" + DEFS="$DEFS -DDEBUG" + MAKEOPTS="$MAKEOPTS -j1" + CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra" + DEBUG="yes" else - if [ "$1" = "debug" ] - then - DEFS="-DDEBUG" - MAKEOPTS="-j1" - CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall" - else - MAKEOPTS="-j1" - fi + DEFS="$DEFS -DNDEBUG" + DEBUG="no" fi CXXFLAGS="$CXXFLAGS -I/usr/local/include" @@ -48,6 +45,7 @@ then 6) OS=bsd5;; 7) OS=bsd7;; 8) OS=bsd7;; + 9) OS=bsd7;; *) OS=unknown;; esac MAKE="gmake" @@ -71,7 +69,6 @@ if [ "$OS" = "linux" ] then DEFS="$DEFS -DLINUX" LIB_THREAD=-lpthread - SHELL="/bin/bash" else if [ "$OS" = "bsd" ] then @@ -85,7 +82,6 @@ else LIB_THREAD=-lc_r fi fi - SHELL="/usr/local/bin/bash" CXXFLAGS="$CXXFLAGS -DHAVE_CLOSEFROM" fi @@ -145,6 +141,7 @@ rm -f fake echo "OS=$OS" > $CONFFILE echo "STG_TIME=yes" >> $CONFFILE +echo "DEBUG=$DEBUG" >> $CONFFILE echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE @@ -166,6 +163,5 @@ echo "BIN_MODE=$BIN_MODE" >> $CONFFILE echo "DATA_MODE=$DATA_MODE" >> $CONFFILE echo "DIR_MODE=$DIR_MODE" >> $CONFFILE echo "OWNER=$OWNER" >> $CONFFILE -echo "SHELL=$SHELL" >> $CONFFILE $MAKE $MAKEOPTS