diff options
author | kdx <kikoodx@paranoici.org> | 2023-06-12 12:12:58 +0200 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-06-12 12:12:58 +0200 |
commit | acb633cc836a3068b597c89d4f160c5ab6e22fa7 (patch) | |
tree | 4a7048ae886e69c47cfc48a7fbc31fa61b41b906 | |
parent | 07fe6662c369f85c4fa8c0d4a002bd42258851f0 (diff) | |
download | golem-acb633cc836a3068b597c89d4f160c5ab6e22fa7.tar.gz |
build.sh alternative to tup
-rwxr-xr-x | build.sh | 8 | ||||
-rwxr-xr-x | run.sh | 2 | ||||
-rwxr-xr-x | testing.sh | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..5e195b4 --- /dev/null +++ b/build.sh @@ -0,0 +1,8 @@ +#!/bin/sh +CC=gcc +CFLAGS='-s -O3 -std=c99 -Wall -Wextra' +LIBS= +NAME=build/golemc +mkdir -p build +$CC $CFLAGS -o "$NAME" src/main.c $LIBS +printf '%s\n' "$NAME" @@ -1,5 +1,5 @@ #!/bin/sh -tup -q || exit 1 +tup -q || ./build.sh || exit 1 ./build/golemc "$1" >build/tmp.orgaasm || exit 1 orgaasm build/tmp.orgaasm build/tmp.rom || exit 1 orgaemu build/tmp.rom @@ -12,7 +12,7 @@ function test() { [ "$QUIET" != "-q" ] && echo "" } -tup -q || exit 1 +tup -q || ./build.sh || exit 1 test "$1" "main(){5 + 2; return 4;}" test "$1" "main(){6 + 3;}" test "$1" "main(){'a' - 'b';}" |