diff options
author | Jasper | 2025-09-10 12:36:30 +0200 |
---|---|---|
committer | Jasper | 2025-09-10 12:36:30 +0200 |
commit | 6876fa51662f57dd99762154ce9e37df804bf9d3 (patch) | |
tree | 5a3e4708c1a2a4f5e422555c326da4abb93a4a0c | |
parent | 368f17a4142221a851784b9da37a985c806f5fcc (diff) |
Building with tcc (for fun)
-rwxr-xr-x | build.sh | 8 | ||||
-rw-r--r-- | matrix.h | 1 | ||||
-rw-r--r-- | vector.c | 1 | ||||
-rw-r--r-- | vector.h | 1 |
4 files changed, 9 insertions, 2 deletions
@@ -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 @@ -2,6 +2,7 @@ #define MATRIX_H #include <stddef.h> +#include <stdbool.h> #define matrix_at(mat, i, j) ((mat)->xs[(i) * (mat)->n + (j)]) @@ -4,7 +4,6 @@ #include "utils.h" #include <math.h> -#include <stddef.h> #include <assert.h> #include <stdlib.h> #include <stdio.h> @@ -2,6 +2,7 @@ #define VECTOR_H #include <stddef.h> +#include <stdbool.h> #define vector_at(v, i) ((v)->xs[(i)]) |