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