#!/bin/sh
# build.sh — DF-0743 PoC build.
# Builds the deterministic harness (proves the overlay misparse by
# replicating the exact kernel struct-overlay derefs) and the live
# discriminator trigger.
#
# The harness is the PRIMARY proof (pure userspace, no privilege, no
# kernel setup). The live trigger needs root + a configured gre tunnel
# (see live_run.sh).
set -e
cd "$(dirname "$0")"

echo "[build] harness.c"
cc -O2 -Wall -o harness harness.c

echo "[build] live_trigger.c  (root-only runtime)"
cc -O2 -Wall -o live_trigger live_trigger.c

echo "BUILD_OK"
ls -l harness live_trigger
