summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh8
-rw-r--r--matrix.h1
-rw-r--r--vector.c1
-rw-r--r--vector.h1
4 files changed, 9 insertions, 2 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
diff --git a/matrix.h b/matrix.h
index 5c58d72..ac95570 100644
--- a/matrix.h
+++ b/matrix.h
@@ -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)])
diff --git a/vector.c b/vector.c
index dda9621..2f180c7 100644
--- a/vector.c
+++ b/vector.c
@@ -4,7 +4,6 @@
#include "utils.h"
#include <math.h>
-#include <stddef.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/vector.h b/vector.h
index 0d00d4f..6756fa1 100644
--- a/vector.h
+++ b/vector.h
@@ -2,6 +2,7 @@
#define VECTOR_H
#include <stddef.h>
+#include <stdbool.h>
#define vector_at(v, i) ((v)->xs[(i)])