mainSuffix := pkun
TestMask := %02d

AdditionalStdoutGens := negate noise reflect border

FileIOSol :=

#END OF CONFIGURABLE PART

include makefile.main

$(binDir)/Visualizer.jar : src/Visualizer.java

.PHONY : viewTests
.SILENT : viewTests
viewTests : all Visualizer.java | $(binDir)/Visualizer.jar
	for i in $(Tests) ; do \
		java -jar -Dresult $(binDir)/Visualizer.jar tests/$$i tests/$$i.a; \
	done

define ViewTestRule
.PHONY : view$(1)
.SILENT : view$(1)
view$(1) : $(1) $(1).a Visualizer.java | $(binDir)/Visualizer.jar
	java -jar -Dresult $(binDir)/Visualizer.jar tests/$(1) tests/$(1).a; 

.PHONY : vis$(1)
.SILENT : vis$(1)
vis$(1) : $(1) $(1).a Visualizer.java | $(binDir)/Visualizer.jar
	java -jar $(binDir)/Visualizer.jar tests/$(1) tests/$(1).a; 

endef

$(foreach test,$(Tests), $(eval $(call ViewTestRule,$(test))))
