Simple hand-coded tests to aid in early development of backends, along with a
Makefile to run ad-hoc tests easily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15664 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/Generic/Makefile b/test/CodeGen/Generic/Makefile
new file mode 100644
index 0000000..d228f69
--- /dev/null
+++ b/test/CodeGen/Generic/Makefile
@@ -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,$@)