2001-09-07 21:24:25 +00:00
|
|
|
LLVM := ..
|
2001-08-28 23:26:44 +00:00
|
|
|
LLC := $(LLVM)/tools/llc/llc
|
|
|
|
AS := $(LLVM)/tools/as/as
|
|
|
|
LLCOPTS := -dsched t
|
|
|
|
|
2001-06-06 20:29:01 +00:00
|
|
|
TESTS := $(wildcard *.ll)
|
|
|
|
|
2001-08-28 23:26:44 +00:00
|
|
|
LLCTESTS := $(shell /bin/ls *.ll | grep -v testmemory | grep -v testswitch | grep -v sumarray)
|
|
|
|
|
2001-07-31 21:45:56 +00:00
|
|
|
|
2001-08-28 23:26:44 +00:00
|
|
|
test all : testasmdis testopt testcodegen
|
2001-06-06 20:29:01 +00:00
|
|
|
@echo "All tests successfully completed!"
|
|
|
|
|
2001-08-28 23:26:44 +00:00
|
|
|
testasmdis : $(TESTS:%.ll=%.ll.asmdis)
|
2001-06-06 20:29:01 +00:00
|
|
|
@echo "All assembler/disassembler test succeeded!"
|
|
|
|
|
2001-08-28 23:26:44 +00:00
|
|
|
testopt : $(TESTS:%.ll=%.ll.opt)
|
|
|
|
|
|
|
|
testselect : $(LLCTESTS:%.ll=%.mc)
|
|
|
|
|
|
|
|
testsched : $(LLCTESTS:%.ll=%.mc)
|
2001-06-06 20:29:01 +00:00
|
|
|
|
2001-08-28 23:26:44 +00:00
|
|
|
testcodegen : $(LLCTESTS:%.ll=%.mc)
|
2001-07-31 21:45:56 +00:00
|
|
|
|
2001-06-06 20:29:01 +00:00
|
|
|
clean :
|
2001-07-31 21:45:56 +00:00
|
|
|
rm -f *.[123] *.bc *.mc core
|
2001-06-06 20:29:01 +00:00
|
|
|
|
|
|
|
%.asmdis: %
|
|
|
|
@echo "Running assembler/disassembler test on $<"
|
|
|
|
@./TestAsmDisasm.sh $<
|
|
|
|
|
|
|
|
%.opt: %
|
|
|
|
@echo "Running optimizier test on $<"
|
|
|
|
@./TestOptimizer.sh $<
|
2001-07-31 21:45:56 +00:00
|
|
|
|
2001-09-07 22:13:44 +00:00
|
|
|
%.bc: %.ll
|
|
|
|
$(AS) $< -f
|
2001-07-31 21:45:56 +00:00
|
|
|
|
2001-09-07 22:13:44 +00:00
|
|
|
%.mc: %.ll
|
2001-07-31 21:45:56 +00:00
|
|
|
@echo "Generating machine instructions for $<"
|
2001-09-07 22:13:44 +00:00
|
|
|
$(AS) < $< | $(LLC) -dsched=t > $@
|
|
|
|
|