forked from NesManrique/LenguajesII
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (50 loc) · 1.33 KB
/
Makefile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
GCC=g++
LEX=flex
BISON=bison
CFLAGS=-std=c++0x -O3
CFLAGS+=$(CFLAGSADD)
FILES = blahsymtable\
typechk\
printast\
blahlog\
printsymtable\
genTAC\
blahblock\
blahinstruction\
constantFold\
tac\
spim\
tactospim
blahc: blahc.cpp blahparser.cpp blahlexer.cpp ${FILES:%=%.o}
g++ $^ -o $@ ${CFLAGS}
dbg:
make clean
make CFLAGSADD=-ggdb
blahparser.cpp: blahparser.y
${BISON} -dy -o $@ $^
blahlexer.cpp: blahlexer.l
${LEX} -o $@ $^
%.o: %.cpp %.h
g++ $< -c ${CFLAGS}
printast.o: printast.cpp blahast.h
g++ $< -c ${CFLAGS}
genTAC.o: genTAC.cpp blahast.h blahlog.o
g++ $< -c ${CFLAGS}
typechk.o: typechk.cpp blahast.h
g++ $< -c ${CFLAGS}
blahblock.o: blahblock.cpp blahblock.h blahinstruction.o
g++ $< -c ${CFLAGS}
printsymtable.o:printsymtable.cpp blahsymtable.h
g++ $< -c ${CFLAGS}
blahinstruction.o: blahinstruction.cpp blahinstruction.h blahsymtable.o regdescriptor.h
g++ $< -c ${CFLAGS}
constantFold.o:constantFold.cpp blahast.h
g++ $< -c ${CFLAGS}
tac.o: tac.cpp tac.h blahlog.o blahinstruction.o blahblock.o blahsymtable.o blahast.h
g++ $< -c ${CFLAGS}
spim.o: spim.cpp tac.o blahlog.o blahinstruction.o blahblock.o blahsymtable.o blahast.h
g++ $< -c ${CFLAGS}
tactospim.o: tactospim.cpp spim.o tac.o regdescriptor.h
g++ $< -c ${CFLAGS}
clean:
rm -f blahparser.hpp blahlexer.cpp blahparser.cpp *.o blahc