#!/usr/bin/env bash

# If `CC` isn't set, pick a default compiler
if hash clang 2>/dev/null; then
  : ${CC:=clang}
else
  : ${CC:=gcc}
fi

${CC}                   \
  -c                    \
  -O3                   \
  -std=c99              \
  -I src                \
  -I include            \
  -I externals/utf8proc \
  src/runtime/runtime.c \
  -o runtime.o

ar rcs libruntime.a runtime.o
rm runtime.o
