1 # This Makefile is to be included by Makefile of each test
9 include $(PROJ_DIR)/Makefile.util
11 IVFLAGS += -DSIMULATION
12 # The macroassembly header file is somewhat different thing, but I don't know
13 # what place would be more suitable for it than include/ dir
14 MACROASM_FLAGS += -I$(PROJ_DIR)/include/ -E
20 DBG&SAVE = cat > "$(1)" # putting cat through pipe - what an animal cruelty!
34 test : VGAdump.ppm VGAdump_expected.ppm
39 diff VGAdump.ppm VGAdump_expected.ppm
44 $(IV) $(MACROASM_FLAGS) $^ -o $@
46 %.vvp : %.v $(DEPENDS)
47 $(IV) $(IVFLAGS) -s $(TOP) $(filter %.v,$^) -o $@
49 report.log : $(DEPENDS)
51 report.log VGAdump.mem : $(PROJ_DIR)/design/font.mem
53 report.log VGAdump.mem : test.vvp
54 $(VVP) $< | $(call DBG&SAVE,report.log)
57 find . -name "*.vvp" -delete
58 rm $(call FIND_GENERATED_FILES,.) report.log VGAdump.mem \
59 VGAdump.ppm 2>/dev/null || true
61 .PHONY : test def clean $(TOOLS_TARGETS)
63 .SECONDARY : $(TOOLS_TARGETS)