3a_asm: more .fill power and better 'make test' target
[calu.git] / 3a_asm / Makefile
index c38230d22d8586cb7f3e842c89537955d6700afe..4b3da7ef10095bd5532c2bacf9bce841c05663bf 100644 (file)
@@ -5,7 +5,13 @@ all:
 
 .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 < $<