1# Makefile for running ad-hoc custom LLVM tests
2#
3%.bc: %.ll
4	llvm-as $< 
5	
6%.llc.s: %.bc
7	llc $< -o $@ 
8
9%.gcc.s: %.c
10	gcc -O0 -S $< -o $@
11
12%.nat: %.s
13	gcc -O0 -lm $< -o $@
14
15%.cbe.out: %.cbe.nat
16	./$< > $@
17
18%.out: %.nat
19	./$< > $@
20
21%.clean:
22	rm -f $(patsubst %.clean,%.bc,$@) $(patsubst %.clean,%.*.s,$@) \
23	      $(patsubst %.clean,%.*.nat,$@) $(patsubst %.clean,%.*.out,$@) 
24