aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index 0656dfa..a675b7f 100755
--- a/build.sh
+++ b/build.sh
@@ -6,6 +6,7 @@ FLAGS="-Wall -Wextra -g -pedantic"
SRCD="src"
ODIR="obj"
BIN="bin"
+FILES="files"
VALGRND=""
RUN=0
@@ -21,8 +22,7 @@ function __leak__ {
function __clean__ {
rm -rf $BIN
rm -rf $ODIR
- rm -rf files/tiles
- rm -f files/file*
+ rm -rf $FILES
kill $( ps -q $$ -o pgid= ) # exit
}
@@ -33,8 +33,9 @@ then
__$1__
fi
-mkdir -p $ODIR
mkdir -p $BIN
+mkdir -p $ODIR
+mkdir -p $FILES
gcc -c $SRCD/gen_tiles.c -o $ODIR/gen_tiles.o $FLAGS
gcc -c $SRCD/ppm.c -o $ODIR/ppm.o $FLAGS
@@ -43,7 +44,7 @@ gcc -c $SRCD/tiles.c -o $ODIR/tiles.o $FLAGS
gcc -c $SRCD/main.c -o $ODIR/main.o $FLAGS
gcc -o $BIN/wfc $ODIR/main.o $ODIR/ppm.o $ODIR/tiles.o $ODIR/tilemap.o $FLAGS
-gcc -o $BIN/gen_tiles $ODIR/gen_tiles.o $ODIR/ppm.o $FLAGS
+gcc -o $BIN/gen_tiles $ODIR/gen_tiles.o $FLAGS
if ! { [[ $RUN -eq 0 ]]; } 2> /dev/null
then