Add path to as so it doesn't find llvm as if that path is set.
[oota-llvm.git] / test / Makefile
1 LLC  := ../tools/Debug/llc
2 AS   := ../tools/Debug/as
3 LLCOPTS := -dsched y
4
5 TESTS := $(wildcard *.ll)
6
7 LLCTESTS := $(shell /bin/ls *.ll | grep -v testmemory | grep -v testswitch | grep -v sumarray | grep -v opttest | grep -v xx.ll | grep -v select.ll )
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) $(LLCOPTS) > $@
41
42 %.s: %.ll $(LLC) $(AS)
43         $(AS) < $<  | $(LLC) > $@
44
45 %.o: %.s %.ll
46         /usr/ccs/bin/as -xarch=v9 $<
47