
GHDL_ARGS = --std=93c
TESTS = tb_register_file tb_alu tb_jump_logic tb_operand_selection

tests: $(TESTS)
	for tb in $(TESTS); \
	do ./$$tb --wave=$$tb.ghw; \
	done

tb_%: work-obj93.cf %.vhdl tb_%.vhdl
	ghdl -e $(GHDL_ARGS) $@

work-obj93.cf: *.vhdl
	ghdl -a microrisc_pkg.vhdl
	ghdl -a $(GHDL_ARGS) `ls *.vhdl | grep -v microrisc_pkg.vhdl`

clean:
	rm -f *.o *.cf tb_*.ghw
