#!/bin/sh
# DF-0965 build: function-level harness, no kernel needed
set -e
cd "$(dirname "$0")"
# Bring the real kernel source + header into the build dir for #include
cp /usr/src/sys/crypto/twofish/twofish.c ./twofish_src.c
mkdir -p crypto/twofish
cp /usr/src/sys/crypto/twofish/twofish.h crypto/twofish/
# twofish.c uses <sys/endian.h> and htole32 - available in world headers
cc -I. -I/usr/src/sys -Wall -O2 -o trigger trigger.c
echo "BUILD_EXIT=$?"
ls -l trigger
