typcast dirtyfix
[calu.git] / 3a_asm / Makefile
index 1aa7edd96a4c7c90bf1188bb440a2dd1d3efe9a2..89ef6467590f506a252eef0ce14ca5d483f78923 100644 (file)
@@ -1,12 +1,17 @@
 SHELL := zsh
-GHCOPT = -XMultiParamTypeClasses -XFunctionalDependencies -XTypeSynonymInstances -XFlexibleInstances
 
 all:
-       @ghc --make Main.hs $(GHCOPT) -o dtas
+       @ghc --make Main.hs -o dtas
 
 .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 ../3_test/*.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 < $<