aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authornic-gaffney <gaffney_nic@protonmail.com>2023-06-27 01:59:59 -0500
committernic-gaffney <gaffney_nic@protonmail.com>2023-06-27 01:59:59 -0500
commit29bdd10ee3621ed875bfa34a0faa42c35a1e39ed (patch)
tree97f7605b53fc77277d98d5ea8127391edefc4ab5 /build.sh
parent9c2d8f5a10b8affd604cec6e394d43514ef93ca1 (diff)
downloadsloth-29bdd10ee3621ed875bfa34a0faa42c35a1e39ed.tar.gz
Standard library methinks
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh13
1 files changed, 2 insertions, 11 deletions
diff --git a/build.sh b/build.sh
index d4d648d..b8a9b9c 100755
--- a/build.sh
+++ b/build.sh
@@ -2,16 +2,7 @@
cargo build
# Compile standard library
-./target/debug/sloth std/stdio.sloth
-mv output.o stdio.o
-./target/debug/sloth std/stdlib.sloth
-mv output.o stdlib.o
-./target/debug/sloth std/stdmath.sloth
-mv output.o stdmath.o
-
-# Compile user program
-./target/debug/sloth "$1"
-mv output.o main.o
+./target/debug/sloth std/stdio.sloth std/stdlib.sloth std/stdmath.sloth "$1"
# Generate binary
-clang stdio.o std/stdio.c stdlib.o std/stdlib.c stdmath.o std/stdmath.c main.o -o program
+clang output.o std/stdio.c std/stdlib.c std/stdmath.c -o program