#!/bin/sh # SPDX-License-Identifier: MIT # Build lle2612_ref, the harness around YM2608-LLE's YM2612 build (fmopna_2612.c). # The YM2608-LLE step of megadrive-python's old validation/build_referees.sh (MIT, alewman; # ../../notices/MIT-emulator-family.txt), moved here on 2026-11-24 with the harness: the # compile command is the same, only the paths are this folder's. # # YM2608_LLE_SRC=DIR sh build_lle2612_ref.sh [OUT_DIR] # # YM2608_LLE_SRC names a checkout of YM2608-LLE at 7a2aca7 (never committed here). The # binary lands in OUT_DIR, by default build/ beside this script (git-ignored). Linked with # YM2608-LLE, the binary is GPL-2.0-only; it is built locally and run as a referee. set -e here=$(cd "$(dirname "$0")" && pwd) src=${YM2608_LLE_SRC:?set YM2608_LLE_SRC to a YM2608-LLE checkout at 7a2aca7} out=${1:-$here/build} mkdir -p "$out" CC=${CC:-gcc} CFLAGS=${CFLAGS:--O2 -w} echo "lle2612_ref (YM2608-LLE @ 7a2aca7, fmopna_2612.c)" $CC $CFLAGS -I "$src" -o "$out/lle2612_ref" \ "$here/lle2612_ref.c" "$src/fmopna_2612.c" echo "built in $out"