#!/bin/sh
mkdir work && cd work
git clone https://github.com/redcode/Zeta.git
git clone https://github.com/redcode/Z80.git
cd Zeta
mkdir build && cd build
cmake \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=$HOME/ejemplo \
	-DZeta_WITH_CMAKE_SUPPORT=YES \
	-DZeta_WITH_PKGCONFIG_SUPPORT=YES \
	..
cmake --install . --config Release
cd ../../Z80
mkdir build && cd build
cmake \
	-DBUILD_SHARED_LIBS=YES \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=$HOME/ejemplo \
	-DZ80_WITH_CMAKE_SUPPORT=YES \
	-DZ80_WITH_PKGCONFIG_SUPPORT=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
cmake --install . --config Release --strip 
