-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
38 lines (25 loc) · 756 Bytes
/
makefile
File metadata and controls
38 lines (25 loc) · 756 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
36
37
objfiles = mparser.tab.o lex.yy.o hash.o symtable.o ast.o quads.o
miragecompiler.out: $(objfiles)
gcc -o miragecompiler.out $(objfiles)
genassembly.out: assembly.cpp
g++ assembly.cpp -o genassembly.out
mparser.tab.c: mparser.y
bison -d -v --report=itemset mparser.y
lex.yy.c: mflexer.l
flex mflexer.l
mparser.tab.o: mparser.tab.c
gcc -c mparser.tab.c
lex.yy.o: lex.yy.c
gcc -c lex.yy.c
symtable.o: symtable.c symtable.h
gcc -c symtable.c
ast.o: ast.c ast.h
gcc -c ast.c
hash.o: hash.c hash.h
gcc -c hash.c
quads.o: quads.c quads.h
gcc -c quads.c
clean:
rm a.* mparser.tab.c mparser.tab.h lex.yy.c $(objfiles)
testassembly:
./genassembly.out < simplequads.txt > simpleassembly.s && cat simpleassembly.s && gcc -m32 simpleassembly.s