X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/2390d2729b5230dc87c948907f54293a2df760c5..73ff333eec2793138265afd36f716a23e0f8bff6:/projects/sgauth/build diff --git a/projects/sgauth/build b/projects/sgauth/build index ec747e2a..8b79bc52 100755 --- a/projects/sgauth/build +++ b/projects/sgauth/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" @@ -148,6 +145,7 @@ rm -f build_check.c 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