summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorJasper2025-09-10 12:36:30 +0200
committerJasper2025-09-10 12:36:30 +0200
commit6876fa51662f57dd99762154ce9e37df804bf9d3 (patch)
tree5a3e4708c1a2a4f5e422555c326da4abb93a4a0c /build.sh
parent368f17a4142221a851784b9da37a985c806f5fcc (diff)
Building with tcc (for fun)
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 82d4c4c..007bddd 100755
--- a/build.sh
+++ b/build.sh
@@ -2,4 +2,10 @@ if [ ! -d "bin" ]; then
mkdir bin
fi
-gcc -Wall -Wextra -pedantic -lm -o bin/linalg_debug debug.c tests.c utils.c matrix.c vector.c
+CC="gcc"
+
+if [ ! -z "tcc -v" ]; then
+ CC="tcc"
+fi
+
+$CC -Wall -Wextra -pedantic -lm -o bin/linalg_debug debug.c tests.c utils.c matrix.c vector.c