-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 949 Bytes
/
Makefile
File metadata and controls
37 lines (29 loc) · 949 Bytes
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
33
34
35
all:test1 test2 test3
test1:
java -cp antlr-3.5.2-complete.jar org.antlr.Tool myCompiler.g
javac -cp antlr-3.5.2-complete.jar:. myCompiler_test.java
java -cp antlr-3.5.2-complete.jar:. myCompiler_test test1.c > test1.j
java -jar jasmin.jar test1.j
java myResult
rm myResult.class
test2:
java -cp antlr-3.5.2-complete.jar org.antlr.Tool myCompiler.g
javac -cp antlr-3.5.2-complete.jar:. myCompiler_test.java
java -cp antlr-3.5.2-complete.jar:. myCompiler_test test2.c > test2.j
java -jar jasmin.jar test2.j
java myResult
rm myResult.class
test3:
java -cp antlr-3.5.2-complete.jar org.antlr.Tool myCompiler.g
javac -cp antlr-3.5.2-complete.jar:. myCompiler_test.java
java -cp antlr-3.5.2-complete.jar:. myCompiler_test test3.c > test3.j
java -jar jasmin.jar test3.j
java myResult
rm myResult.class
clean:
rm myCompilerLexer.java
rm myCompiler.tokens
rm *.class
rm myCompilerParser.java
bytecode:
rm test*.j