diff options
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 29 |
1 files changed, 28 insertions, 1 deletions
@@ -4,7 +4,7 @@ cc="gcc" ld="gcc" ar="ar" -cflags="-std=c99 -fPIC -Wall -Wextra -g -Wno-error -pedantic -lm -ffast-math" +cflags="-std=c99 -fPIC -Wall -Wno-unused-function -Wextra -g -Wno-error -pedantic -lm -ffast-math" proc=$(nproc) @@ -38,11 +38,23 @@ if [[ $? -ne 0 ]]; then exit fi +echo "[BUILD] cynic.c" + +$cc $cflags -Isrc/ \ + -c -o obj/disgrace.o \ + -g src/disgrace.c + +if [[ $? -ne 0 ]]; then + exit +fi + $ar rcs lib/libungrateful.a obj/ungrateful.o $ar rcs lib/libcynic.a obj/cynic.o +$ar rcs lib/libdisgrace.a obj/disgrace.o cp src/ungrateful.h include/ungrateful.h cp src/cynic.h include/cynic.h +cp src/disgrace.h include/disgrace.h # ------------ Tests from here # @@ -82,6 +94,21 @@ for test in tests/cyn/*.c; do fi done +echo "---- Disgrace tests ----" + +for test in tests/d/*.c; do + fname=$(basename -- "$test") + fname="${fname%.*}" + + echo "[BUILD] $test" + + $cc $cflags -o bin/$fname $test -Llib/ -Iinclude/ -lungrateful -lcynic -ldisgrace & + + if [[ $(jobs -r -p | wc -l) -ge $proc ]]; then + wait + fi +done + wait echo "---- Compiled ----" |