aboutsummaryrefslogtreecommitdiff
path: root/build.sh
blob: 1322453e56ff0140f910c521713312911af57778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

DEBUG=""
LIB="-I libs/tinyosc"
[ -z "$CC" ] && CC="clang"

mkdir -p bin

while getopts "d" opt; do
    case "$opt" in
        d) DEBUG="-Wall -fsanitize=address -g"
            ;;
    esac
done

shift $((OPTIND-1))
[ "${1:-}" = "--" ] && shift

printf "\n\nmaking project\n"
[ ! -e "src/config.c" ] && cp src/config.def.c src/config.c;
$CC -o bin/chat-loop src/main.c $LIB -lm $DEBUG
$CC -o bin/type src/type.c $LIB -lm $DEBUG