From 3ad95773ae4f963435003c260278177f1e22577e Mon Sep 17 00:00:00 2001 From: bonmas14 Date: Thu, 25 Sep 2025 12:06:11 +0000 Subject: Working on linux --- build.sh | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 82eb864..e67c3ab 100755 --- a/build.sh +++ b/build.sh @@ -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 ----" -- cgit v1.2.3-70-g09d2