#!/bin/sh
set -eu
A97_ROOT=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
for test_name in timing_probe sweep test_discrete_residual; do
 cc -std=c11 -O1 -g -Wall -Wextra -Werror -pedantic -fsanitize=address,undefined "$A97_ROOT/drill_smo.c" "$A97_ROOT/$test_name.c" -lm -o "$A97_ROOT/$test_name"
 "$A97_ROOT/$test_name" > "$A97_ROOT/$test_name.log"
done
arm-none-eabi-gcc -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb -mfloat-abi=hard -std=c11 -Os -g -ffreestanding -fno-builtin -fno-common -Wall -Wextra -Werror -c "$A97_ROOT/drill_smo.c" -o "$A97_ROOT/drill_smo_m4f.o"
arm-none-eabi-size "$A97_ROOT/drill_smo_m4f.o" > "$A97_ROOT/arm-size.log"
