Example code for LLVM tutorial at HaL-9, 2014-06-20

root / Makefile

1
2
3
4
5
6
7
8
9
10
11
12
13
14
%.s:	%.bc
	llc $<

%.o:	%.bc
	llc -filetype obj $<

%-dis.ll:	%.bc
	llvm-dis -o $@ $<

%.bc:	%.ll
	llvm-as $<

%-opt.bc:	%.bc
	opt -O3 < $< > $@