#!/bin/sh
mkdir work && cd work
git clone https://github.com/redcode/Zeta.git
git clone https://github.com/redcode/Z80.git
cd Z80
mkdir build && cd build
cmake \
	-DCMAKE_BUILD_TYPE=Release \
	-DZ80_FETCH_TEST_FILES=YES \
	-DZ80_WITH_TESTS=YES \
	-DZ80_WITH_EXECUTE=YES \
	-DZ80_WITH_FULL_IM0=YES \
	-DZ80_WITH_IM0_RETX_NOTIFICATIONS=YES \
	-DZ80_WITH_Q=YES \
	-DZ80_WITH_ZILOG_NMOS_LD_A_IR_BUG=YES \
	..
cmake --build . --config Release
ctest --verbose --build-config Release
