Makefile 647 Bytes
Newer Older
1
all: work
Clifford Wolf committed
2 3
	touch .stamp

4 5 6
clean::
	rm -f .stamp

Clifford Wolf committed
7
define template
8
work:: $(addprefix $(1)/.stamp_,sim falsify $(2))
Clifford Wolf committed
9 10 11 12 13

$(1)/.stamp_sim:
	bash run.sh $(1) sim
	touch $$@

14 15 16 17
$(1)/.stamp_falsify: $(1)/.stamp_sim
	bash run.sh $(1) falsify
	touch $$@

18 19
$(1)/.stamp_%: $(1)/.stamp_sim
	bash run.sh $(1) $$*
Clifford Wolf committed
20 21 22 23
	touch $$@

clean::
	rm -rf $(1)/.stamp_* $(1)/work_*
24
	rm -f $(1)_{cmos,ice40,falsify,ecp5,xilinx}{,_abc9}.status
Clifford Wolf committed
25 26
endef

27
$(eval $(call template,navre,cmos ice40 ice40_abc9 ecp5 ecp5_abc9 xilinx xilinx_abc9))
28
ifeq ($(ENABLE_HEAVY_TESTS),1)
29
$(eval $(call template,picorv32,cmos ice40 ice40_abc9 ecp5 ecp5_abc9 xilinx xilinx_abc9))
30
endif
Clifford Wolf committed
31
.PHONY: all clean