Simple hand-coded tests to aid in early development of backends, along with a
[oota-llvm.git] / test / CodeGen / Generic / Makefile
diff --git a/test/CodeGen/Generic/Makefile b/test/CodeGen/Generic/Makefile
new file mode 100644 (file)
index 0000000..d228f69
--- /dev/null
@@ -0,0 +1,23 @@
+# Makefile for running ad-hoc custom LLVM tests
+#
+%.bc: %.ll
+       llvm-as -f $< 
+       
+%.llc.s: %.bc
+       llc -f $< -o $@ 
+
+%.gcc.s: %.c
+       gcc -O0 -S $< -o $@
+
+%.nat: %.s
+       gcc -O0 -lm $< -o $@
+
+%.cbe.out: %.cbe.nat
+       ./$< > $@
+
+%.out: %.nat
+       ./$< > $@
+
+%.clean:
+       rm -f $(patsubst %.clean,%.bc,$@) $(patsubst %.clean,%.*.s,$@) \
+             $(patsubst %.clean,%.*.nat,$@) $(patsubst %.clean,%.*.out,$@)