diff options
author | dweller <dweller@cabin.digital> | 2025-03-26 20:11:52 +0200 |
---|---|---|
committer | dweller <dweller@cabin.digital> | 2025-03-26 20:11:52 +0200 |
commit | 6f3a1b4fac4091168809b50a6b94142ba2a40a4f (patch) | |
tree | 8c4a69974683f15009f570115d14f8e4f8a1200c | |
parent | 42e9b31e0d7324106a65ad9ff42ea2377a80fa51 (diff) |
fix which and add flags to build/x11
-rwxr-xr-x | build/x11 | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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" |