start some tests
[ia32rtools.git] / tests / Makefile
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644 (file)
index 0000000..607ebe3
--- /dev/null
@@ -0,0 +1,20 @@
+
+TESTS = reg_call1 reg_call2 reg_call3 reg_call_tail reg_save
+
+all: $(addsuffix .ok,$(TESTS))
+
+%.ok: %.expect.c %.out.c
+       diff -u $^
+       touch $@
+
+%.out.h: %.asm %.seed.h ../stdc.list
+       ../tools/translate -hdr $@ $^
+
+%.out.c: %.asm %.out.h ../stdc.list
+       ../tools/translate $@ $^
+
+clean:
+       $(RM) *.ok *.out.c *.out.h
+
+.PHONY: all clean
+.PRECIOUS: %.out.c