3 LLC := ../tools/Debug/llc
4 AS := ../tools/Debug/as
7 TESTS := $(wildcard *.ll)
9 LLCTESTS := $(shell /bin/ls *.ll | grep -v testmemory | grep -v testswitch | grep -v sumarray )
12 test all : testasmdis testopt testcodegen
13 @echo "All tests successfully completed!"
15 testasmdis : $(TESTS:%.ll=%.ll.asmdis)
16 @echo "All assembler/disassembler test succeeded!"
18 testopt : $(TESTS:%.ll=%.ll.opt)
20 testselect : $(LLCTESTS:%.ll=%.mc)
22 testsched : $(LLCTESTS:%.ll=%.mc)
24 testcodegen : $(LLCTESTS:%.ll=%.mc)
27 rm -f *.[123] *.bc *.mc core
30 @echo "Running assembler/disassembler test on $<"
31 @./TestAsmDisasm.sh $<
34 @echo "Running optimizier test on $<"
35 @./TestOptimizer.sh $<
40 %.mc: %.ll $(LLC) $(AS)
41 @echo "Generating machine instructions for $<"
42 $(AS) < $< | $(LLC) $(LLCOPTS) > $@