summaryrefslogtreecommitdiff
path: root/build/x11
blob: cae1518c02760e8b709b8e22af1c160e8ec7211c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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 2>/dev/null)" ]; then
        $@
        echo "time not installed"
    else
        time $@
    fi
}

mkdir -p artifacts
>&2 bench $CC $CFLAGS sources/main.c $STATIC -o artifacts/xip-8
>&2 echo "------------------------------------------------\n"