Add the ability to run the executable after building it in build.sh

This commit is contained in:
2025-08-21 21:54:27 +01:00
parent 0da524f5a8
commit 89c77a796d

View File

@@ -1,9 +1,22 @@
#!/usr/bin/env sh
set -xe
CFLAGS="-Wall -Wextra -std=c11 -ggdb -fsanitize=address -fsanitize=undefined"
SRC="vec.c symtable.c tag.c constructor.c sys.c main.c"
OUT="alisp.out"
set -xe
build() {
cc $CFLAGS -o $OUT $SRC;
}
cc $CFLAGS -o $OUT $SRC;
run() {
./$OUT;
}
build
if [ "$1" = "run" ]
then
run
fi