1 LLC := ../tools/Debug/llc
2 AS := ../tools/Debug/as
4 ARCHFLAGS = ## -xarch=v9
6 CC = /opt/SUNWspro/bin/cc
7 CCFLAGS = -g $(ARCHFLAGS)
9 ## CCFLAGS = -g $(ARCHFLAGS) ## -mcpu=v9
11 TESTS := $(wildcard *.ll)
13 LLCTESTS := $(shell /bin/ls *.ll | grep -v testswitch | grep -v opttest | grep -v xx | grep -v calltest )
16 test all : testasmdis testopt testcodegen
17 @echo "All tests successfully completed!"
19 testasmdis : $(TESTS:%.ll=%.ll.asmdis)
20 @echo "All assembler/disassembler test succeeded!"
22 testopt : $(TESTS:%.ll=%.ll.opt)
24 testselect : $(LLCTESTS:%.ll=%.mc)
26 testsched : $(LLCTESTS:%.ll=%.mc)
28 testcodegen : $(LLCTESTS:%.ll=%.mc)
30 testsparc : $(LLCTESTS:%.ll=%.s)
33 rm -f *.[123] *.bc *.mc *.s core
36 @echo "Running assembler/disassembler test on $<"
37 @./TestAsmDisasm.sh $<
40 @echo "Running optimizier test on $<"
41 @./TestOptimizer.sh $<
46 %.mc: %.bc $(LLC) $(AS)
47 @echo "Generating machine instructions for $<"
48 $(LLC) $(LLCOPTS) $< > $@
50 %.s: %.ll $(LLC) $(AS)
51 $(AS) < $< | $(LLC) > $@
54 ## /usr/ccs/bin/as $(ARCHFLAGS) $<
58 $(CC) -c $(CCFLAGS) $< -xarch=v9
61 $(CC) -o $@ $< -xarch=v9