]> git.stg.codes - stg.git/blobdiff - projects/rlm_stg/build
Patch from SpiderX <spiderx@spiderx.dp.ua> - build in debug mode.
[stg.git] / projects / rlm_stg / build
index 0145d0388fd79e7e45326ce4375d597edaa9e711..e427b32ef384fe88b6bf17cd9cd04141b64e3696 100755 (executable)
@@ -16,18 +16,15 @@ DATA_MODE=0644
 DIR_MODE=0755
 OWNER=root
 
 DIR_MODE=0755
 OWNER=root
 
-if [ -z $1 ]
-then
-    MAKEOPTS="-j1"
+if [ "$1" = "debug" ]
+thenÑ
+   DEFS="$DEFS -DDEBUG"
+   MAKEOPTS="$MAKEOPTS -j1"
+   CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra"
+   DEBUG="yes"
 else
 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"
 fi
 
 CXXFLAGS="$CXXFLAGS -I/usr/local/include"
@@ -144,6 +141,7 @@ rm -f fake
 
 echo "OS=$OS" > $CONFFILE
 echo "STG_TIME=yes" >> $CONFFILE
 
 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
 echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
 echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
 echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE