-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·54 lines (40 loc) · 1.4 KB
/
Makefile
File metadata and controls
executable file
·54 lines (40 loc) · 1.4 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CCC = g++
LEX = flex
YACC = bison
CFLAGS = -w -Wall -std=c++11
LEXFLAGS = -Wno-unused -Wno-sign-compare
#LEXDEBUG = -d
LEXDEBUG =
YACCDEBUG = -vtd
OBJS = main.o parse.tab.o lex.yy.o ast.o symbolTable.o symbolTableManager.o poolOfNodes.o poolOfIndices.o
python27: $(OBJS)
$(CCC) $(CFLAGS) -o python27 $(OBJS)
main.o: main.cpp includes/parse.y includes/scan.l parse.tab.c lex.yy.c
$(CCC) $(CFLAGS) -c main.cpp
parse.tab.c: includes/parse.y
$(YACC) $(YACCDEBUG) includes/parse.y
parse.tab.o: parse.tab.c
$(CCC) $(CFLAGS) -c parse.tab.c
lex.yy.c: includes/scan.l parse.tab.o
$(LEX) $(LEXDEBUG) includes/scan.l
lex.yy.o: lex.yy.c
$(CCC) $(CFLAGS) $(LEXFLAGS) -c lex.yy.c
ast.o: includes/ast.cpp includes/ast.h includes/literal.cpp
$(CCC) $(CFLAGS) -c includes/ast.cpp
symbolTable.o: includes/symbolTable.cpp includes/symbolTable.h
$(CCC) $(CFLAGS) -c includes/symbolTable.cpp
symbolTableManager.o: includes/symbolTableManager.cpp includes/symbolTableManager.h
$(CCC) $(CFLAGS) -c includes/symbolTableManager.cpp
poolOfNodes.o: includes/poolOfNodes.cpp includes/poolOfNodes.h \
includes/node.h
$(CCC) $(CFLAGS) -c includes/poolOfNodes.cpp
poolOfIndices.o: includes/poolOfIndices.cpp includes/poolOfIndices.h \
includes/literal.cpp
$(CCC) $(CFLAGS) -c includes/poolOfIndices.cpp
clean:
rm -f python27 *.o parse.tab.c lex.yy.c
rm -f parse.tab.h
rm -f parse.output
rm -f *~
rm -f includes/*~
rm -f cases/*~