diff options
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -9,6 +9,12 @@ ODIR="obj" BIN="bin" VALGRND="" +RUN=0 + +function run { + RUN=1 +} + function leak { VALGRND="valgrind --leak-check=full" } @@ -37,5 +43,8 @@ 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 -$VALGRND $BIN/gen_tiles -$VALGRND $BIN/wfc +if ! { [[ $RUN -eq 0 ]]; } 2> /dev/null +then + $VALGRND $BIN/gen_tiles + $VALGRND $BIN/wfc +fi |