vidarh / writing-a-compiler-in-ruby

Code from my series on writing a Ruby compiler in Ruby

This URL has Read+Write access

writing-a-compiler-in-ruby / Makefile
100644 32 lines (19 sloc) 0.544 kb
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
 
 
all: compiler testargs testarray
 
clean:
@rm -f *~ *.o *.s testarray testargs
@rm -rf doc/
 
doc:
rdoc --all *.rb
 
compiler.s: *.rb
ruby compiler.rb <compiler.rb >compiler.s
 
compiler: compiler.s runtime.o
gcc -o compiler compiler.s runtime.o
 
testarray.s: testarray.l
ruby compiler.rb <testarray.l >testarray.s
 
testarray.o: testarray.s
 
testarray: testarray.o runtime.o
gcc -o testarray testarray.o runtime.o
 
testargs.s: testargs.rb
ruby compiler.rb <testargs.rb >testargs.s
 
testargs.o: testargs.s
 
testargs: testargs.o runtime.o