Move some stuff around for cleanliness

This commit is contained in:
2026-01-21 09:33:35 +00:00
parent bb55895e94
commit 2ec1dfa083
9 changed files with 16 additions and 14 deletions

View File

@@ -3,13 +3,15 @@
set -xe
CFLAGS="-Wall -Wextra -std=c11 -ggdb -fsanitize=address -fsanitize=undefined -Wswitch -Wswitch-enum"
LINK="-I."
LIB=$(find "./" -name "*.c" -not -name "main.c" -not -name "test.c")
OUT="alisp.out"
LDFLAGS="-lc"
LIB=$(find "./runtime" -type 'f')
OUT="build/alisp.out"
build() {
cc $LINK $CFLAGS -o $OUT $LIB main.c;
cc $LINK $CFLAGS -o test.out $LIB test.c;
mkdir -p build;
cc $CFLAGS -o $OUT $LIB main.c $LDFLAGS;
cc $CFLAGS -o build/test.out $LIB test/test.c $LDFLAGS;
}
clean() {
@@ -21,7 +23,7 @@ run() {
}
test() {
./test.out
./build/test.out
}
build