aboutsummaryrefslogtreecommitdiffstats
path: root/test/Makefile
blob: 4934e414e3b51ef7fa9c894858e7d1226adf9204 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
TESTS := $(wildcard *.ll)

SELECTTESTS := $(shell /bin/ls *.ll | grep -v testmemory | grep -v testswitch")

test all : testasmdis testopt
	@echo "All tests successfully completed!"

testasmdis : $(TESTS:%.ll=%.ll.asmdis)
	@echo "All assembler/disassembler test succeeded!"

testopt : $(TESTS:%.ll=%.ll.opt)

testselect : $(SELECTTESTS:%.ll=%.mc)

clean :
	rm -f *.[123] *.bc *.mc core

%.asmdis: %
	@echo "Running assembler/disassembler test on $<"
	@./TestAsmDisasm.sh $<

%.opt: %
	@echo "Running optimizier test on $<"
	@./TestOptimizer.sh $<

%.bc: %.ll
	rm -f $@
	as $<

%.mc: %.bc
	@echo "Generating machine instructions for $<"
	@llc -dselect y $< > $@