summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordweller <dweller@cabin.digital>2025-03-26 20:11:52 +0200
committerdweller <dweller@cabin.digital>2025-03-26 20:11:52 +0200
commit6f3a1b4fac4091168809b50a6b94142ba2a40a4f (patch)
tree8c4a69974683f15009f570115d14f8e4f8a1200c
parent42e9b31e0d7324106a65ad9ff42ea2377a80fa51 (diff)
fix which and add flags to build/x11
-rwxr-xr-xbuild/x1113
1 files changed, 11 insertions, 2 deletions
diff --git a/build/x11 b/build/x11
index 7489e93..cae1518 100755
--- a/build/x11
+++ b/build/x11
@@ -1,8 +1,16 @@
#!/bin/sh -e
+CC=${CC:-musl-gcc}
+STATIC=${STATIC:-"-static"}
+CFLAGS=" \
+ -std=c89 \
+ -Wall -Wextra -Wno-comment \
+ -ggdb -Og \
+"
+
bench()
{
- if [ x = "x$(which time)" ]; then
+ if [ x = "x$(which time 2>/dev/null)" ]; then
$@
echo "time not installed"
else
@@ -10,5 +18,6 @@ bench()
fi
}
->&2 bench cc -std=c89 -Wall -Wextra -Wno-comment sources/main.c -static -o artifacts/xip-8
+mkdir -p artifacts
+>&2 bench $CC $CFLAGS sources/main.c $STATIC -o artifacts/xip-8
>&2 echo "------------------------------------------------\n"