all: sim
sim: test.ghw

sim_sources = cpu_test.vhdl
sources = cpu.vhdl alu.vhdl reg.vhdl
test_entity = cpu_test


test.ghw: work-obj93.cf
	ghdl -r $(test_entity) --wave=$@


work-obj93.cf: $(sim_sources) $(sources)
	ghdl -a $^

PHONY: sim

.PRECIOUS: test.ghw