1 LLC := ../tools/Debug/llc
2 LAS := ../tools/Debug/as
3 LDIS := ../tools/Debug/dis
4 LINK := ../tools/Debug/link
12 CC = /opt/SUNWspro/bin/cc
13 AS = /opt/SUNWspro/bin/cc
14 DIS = /usr/ccs/bin/dis
18 ASFLAGS = -c $(CFLAGS)
21 TESTS := $(wildcard *.ll)
23 LLCTESTS := $(shell /bin/ls *.ll | grep -v testswitch | grep -v opttest | grep -v xx | grep -v calltest | grep -v alloca | grep -v memory )
26 test all : testasmdis testopt testcodegen
27 @echo "All tests successfully completed!"
29 testasmdis : $(TESTS:%.ll=%.ll.asmdis)
30 @echo "All assembler/disassembler test succeeded!"
32 testopt : $(TESTS:%.ll=%.ll.opt)
34 testselect : $(LLCTESTS:%.ll=%.mc)
36 testsched : $(LLCTESTS:%.ll=%.mc)
38 testcodegen : $(LLCTESTS:%.ll=%.mc)
40 testsparc : $(LLCTESTS:%.ll=%.s)
43 rm -f *.[123] *.bc *.mc *.s *.o a.out core
46 @echo "Running assembler/disassembler test on $<"
47 @./TestAsmDisasm.sh $<
50 @echo "Running optimizier test on $<"
51 @./TestOptimizer.sh $<
56 %.mc: %.bc $(LLC) $(AS)
57 @echo "Generating machine instructions for $<"
58 $(LLC) -dsched y $(LLCOPTS) $< > $@
60 %.trace.bc: %.bc $(LLC)
61 $(LLC) -f -trace $(LLCOPTS) $<
64 $(LLC) -f $(LLCOPTS) $<
67 $(CC) -o $@ $(LDFLAGS) $< $(LLCLIBS)
70 ## Cancel built-in implicit rule that overrides the above rule
73 ## The next two rules are for disassembling an executable or an object file