]> git.stg.codes - stg.git/blobdiff - projects/sgconv/build
Patch from SpiderX <spiderx@spiderx.dp.ua> - build in debug mode.
[stg.git] / projects / sgconv / build
index 601c01617e09463e17a952dc6567faa38738d5f7..5084bd0dfb6f393efe5a81957dd0410c996f05c6 100755 (executable)
@@ -16,11 +16,20 @@ DATA_MODE=0644
 DIR_MODE=0755
 OWNER=root
 VAR_DIR="./inst/var/stargazer"
-DEFS="-DDEBUG"
-MAKEOPTS="-j1"
+
+if [ "$1" = "debug" ]
+then
+   DEFS="$DEFS -DDEBUG"
+   MAKEOPTS="$MAKEOPTS -j1"
+   CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra"
+   DEBUG="yes"
+else
+   DEFS="$DEFS -DNDEBUG"
+   DEBUG="no"
+fi
+
 CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -I/usr/local/include"
 LDFLAGS="$LDFLAGS -L/usr/local/lib"
-DEBUG="yes"
 
 if [ "$sys" = "Linux" ]
 then