diff options
author | kartofen <mladenovnasko0@gmail.com> | 2022-08-09 00:35:47 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2022-08-09 00:35:47 +0300 |
commit | a68cc52b5c5d1c104de8d675b90816aaa39f4ace (patch) | |
tree | d4d7d095b812349c1d8c90e20e91d18d25a88374 /build.sh | |
parent | c6862f7f703bcff364573e95f180f05ce8e45040 (diff) |
nearly works
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -1,22 +1,28 @@ #!/bin/sh + cd ${0%/*} # go to project root set -xe -FLAGS="-Wall -Wextra -g" +FLAGS="-Wall -Wextra -g -pedantic" SRCD="src" ODIR="obj" BIN="bin" +VALGRND="" + +function leak { + VALGRND="valgrind --leak-check=full" +} function clean { rm -rf $BIN rm -rf $ODIR rm -rf files + kill $( ps -q $$ -o pgid= ) } if ! { [[ $# -eq 0 ]]; } 2> /dev/null then - ($1) - exit 0; + $1 fi mkdir -p $ODIR @@ -31,5 +37,5 @@ gcc -o $BIN/wfc $ODIR/main.o $ODIR/ppm.o $ODIR/tiles.o $FLAGS gcc -o $BIN/gen_tiles $ODIR/gen_tiles.o $ODIR/ppm.o $FLAGS -$BIN/gen_tiles -$BIN/wfc +$VALGRND $BIN/gen_tiles +$VALGRND $BIN/wfc |