#!/bin/sh

set -e

self_="$(readlink -f "$0")"
cd -- "${self_%/*/*}"
mkdir -p tmp
for example_ in examples/*.c
do
  name_="${example_##*/}"
  name_="${name_%.c}"
  echo "[$name_]"
#   OPTIONS_='-DRBT_DEBUG=1'
  gcc  $OPTIONS_ "$@" -O3 -g -DRBT_NO_CMAKE=1 -DRBT_USE_COLOR=1 -I include/ -o tmp/"$name_" "$example_"
  echo "[/$name_]"
done
