]> git.stg.codes - stg.git/blobdiff - projects/sgconf/build
Patch from SpiderX <spiderx@spiderx.dp.ua> - build in debug mode.
[stg.git] / projects / sgconf / build
index da81773a11913cbb9a0ae0b06415142541c12e45..a8a675bebf5cdb1d7418f9e21b05ddf56a4e4ca5 100755 (executable)
@@ -16,21 +16,15 @@ DATA_MODE=0644
 DIR_MODE=0755
 OWNER=root
 
-if [ -z $1 ]
+if [ "$1" = "debug" ]
 then
-    MAKEOPTS="-j1"
-    DEBUG="no"
+   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"
-        DEBUG="yes"
-    else
-        MAKEOPTS="-j1"
-        DEBUG="no"
-    fi
+   DEFS="$DEFS -DNDEBUG"
+   DEBUG="no"
 fi
 
 CXXFLAGS="$CXXFLAGS -I/usr/local/include"