.PHONY: clean test
clean:
- rm -Rf **/**.o **/**.hi dtas
+ -rm -Rf **/**.o **/**.hi dtas
-test: all
- cat ../2_isa/src/sum.s && echo '==== here comes the DT ASM output ====' && cat ../2_isa/src/sum.s | ./dtas
+TESTFILES := $(shell ls tst/*.s) $(shell ls ../2_isa/src/*.s)
+test: all $(TESTFILES:.s=.out)
+
+%.out: %.s
+ @echo "=== testing file $<"
+ @cat $<
+ @echo "=== here comes the DT ASM output ==="
+ @./dtas < $<