Rerun backend tests if as or llc is changed
[oota-llvm.git] / test / Makefile
1 LLC  := ../tools/Debug/llc
2 AS   := ../tools/Debug/as
3 LLCOPTS := -dsched t
4
5 TESTS := $(wildcard *.ll)
6
7 LLCTESTS := $(shell /bin/ls *.ll | grep -v testmemory | grep -v testswitch | grep -v sumarray)
8
9
10 test all : testasmdis testopt testcodegen
11         @echo "All tests successfully completed!"
12
13 testasmdis  : $(TESTS:%.ll=%.ll.asmdis)
14         @echo "All assembler/disassembler test succeeded!"
15
16 testopt     : $(TESTS:%.ll=%.ll.opt)
17
18 testselect  : $(LLCTESTS:%.ll=%.mc)
19
20 testsched   : $(LLCTESTS:%.ll=%.mc)
21
22 testcodegen : $(LLCTESTS:%.ll=%.mc)
23
24 clean :
25         rm -f *.[123] *.bc *.mc core
26
27 %.asmdis: %
28         @echo "Running assembler/disassembler test on $<"
29         @./TestAsmDisasm.sh $<
30
31 %.opt: %
32         @echo "Running optimizier test on $<"
33         @./TestOptimizer.sh $<
34
35 %.bc: %.ll
36         $(AS) $< -f
37
38 %.mc: %.ll $(LLC) $(AS)
39         @echo "Generating machine instructions for $<"
40         $(AS) < $< | $(LLC) -dsched=t > $@
41