diff options
author | kartofen <mladenovnasko0@gmail.com> | 2022-08-08 16:16:47 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2022-08-08 16:16:47 +0300 |
commit | f158268a0d59133b7cef538b3fa57ece16f2981d (patch) | |
tree | 846760a497a6c08d61adae96cbce6ffe4e6383c6 /build.sh |
Big Bang
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..39849a5 --- /dev/null +++ b/build.sh @@ -0,0 +1,23 @@ +#!/bin/sh +cd ${0%/*} # go to project root +set -xe + +FLAGS="-Wall -Wextra -g" +SRCD="src" +ODIR="obj" +BIN="bin" + +mkdir -p $ODIR +mkdir -p $BIN + + +gcc -c $SRCD/gen_tiles.c -o $ODIR/gen_tiles.o $FLAGS +gcc -c $SRCD/ppm.c -o $ODIR/ppm.o $FLAGS +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 $FLAGS + +gcc -o $BIN/gen_tiles $ODIR/gen_tiles.o $ODIR/ppm.o $FLAGS + +$BIN/gen_tiles +$BIN/wfc |