diff --git a/build.sh b/build.sh index c4f2226..03ca4f3 100755 --- a/build.sh +++ b/build.sh @@ -2,6 +2,15 @@ USING_VALGRIND=0 FLAGS="-L3p/libs/ -I3p/include/ -Wall -Wextra -g -DUSING_VALGRIND=$USING_VALGRIND" +# pass `--debug` to this script to enable debugging messages +while test $# != 0 +do + case "$1" in + --debug) FLAGS="$FLAGS -DDEBUG" ;; + esac + shift +done + mkdir temp mkdir temp/utils @@ -101,4 +110,4 @@ gcc src/main.c \ temp/common/executable.o \ -o build/noja $FLAGS -Lbuild/ -lnoja-compile -lnoja-objects -lxjson -lm -rm -rf temp \ No newline at end of file +rm -rf temp