diff --git a/build.sh b/build.sh index 878c28c..7301bc4 100644 --- a/build.sh +++ b/build.sh @@ -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