-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.inc
121 lines (103 loc) · 3.54 KB
/
Makefile.inc
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
###########
# Options #
###########
# Compiler
CXX = g++
CXXFLAGS = -g -Wno-write-strings
# Linker
LD = g++
LDFLAGS = -g
# Bison
YACC = bison
YFLAGS = -d
# Flex
LEX = flex
LFLAGS = -+
# Makedepend
DEP = makedepend
DEPFLAGS = -m -Y
# Date
DATE = `date +%h%d_%H.%M.%S`
# For tarball creation
TARNAME = cclc_$(DATE).tar
# Location of the dropbox folder
DROPBOX = ~/Dropbox/CCL
# List of object files for linking
OBJS = Source/main.o \
Source/bison/parser.o \
Source/flex/flexScanner.o \
Source/error/error.o \
Source/strconv/strconv.o \
Source/scanner/scanner.o \
Source/symbolTable/symbolTable.o \
Source/symbolTable/symbolTableDeclaration.o \
Source/programTree/programTree.o \
Source/programTree/abstractProgramTreeVisitors.o \
Source/programTree/programTreeVisitors.o \
Source/typeTree/typeTree.o \
Source/typeTree/abstractTypeTreeVisitors.o \
Source/typeTree/typeTreeVisitors.o \
Source/options/options.o \
Source/codeGenerator/codeGenerator.o \
Source/programTree/syntaxTree.o \
Source/stringFormat/stringFormat.o \
Source/commandParser/commandParser.o
# List of Source Files for the dependency generator
SRCS = Source/codeGenerator/codeGenerator.h \
Source/codeGenerator/codeGenerator.cpp \
Source/options/options.h \
Source/options/options.cpp \
Source/scanner/scanner.h \
Source/scanner/scanner.cpp \
Source/programTree/abstractProgramTreeVisitors.h \
Source/programTree/abstractProgramTreeVisitors.cpp \
Source/programTree/syntaxTree.h \
Source/programTree/programTree.h \
Source/programTree/programTreeForwards.h \
Source/programTree/programTree.cpp \
Source/programTree/programTreeVisitorsForwards.h \
Source/programTree/programTreeVisitors.cpp \
Source/programTree/programTreeVisitors.h \
Source/programTree/syntaxTree.cpp \
Source/strconv/strconv.cpp \
Source/strconv/strconv.h \
Source/typeTree/typeTree.h \
Source/typeTree/typeTreeForwards.h \
Source/typeTree/abstractTypeTreeVisitors.h \
Source/typeTree/typeTreeVisitors.cpp \
Source/typeTree/typeTree.cpp \
Source/typeTree/typeTreeVisitorsForwards.h \
Source/typeTree/abstractTypeTreeVisitors.cpp \
Source/typeTree/typeTreeVisitors.h \
Source/main.cpp \
Source/symbolTable/symbolTableDeclaration.h \
Source/symbolTable/symbolTableDeclaration.cpp \
Source/symbolTable/symbolTable.h \
Source/symbolTable/symbolTable.cpp \
Source/error/error.h \
Source/error/error.cpp \
Source/stringFormat/stringFormat.h \
Source/stringFormat/stringFormat.cpp \
Source/commandParser/commandParser.h \
Source/commandParser/commandParser.cpp \
Source/codeGenerator/vecFunc.h
# List of all source files
# Mainly so that I can do linecounts and searches easily
ALL = $(SRCS) Makefile.real Makefile.inc Makefile Source/bison/parser.yy Source/flex/flexScanner.ll
# makedepend can't handle flex or bison files,
# so we need to explictly say how to build these
# bison the parser file
Source/bison/parser.hpp Source/bison/parser.cpp: Source/bison/parser.yy
$(YACC) $(YFLAGS) -o Source/bison/parser.cpp Source/bison/parser.yy
bisonfix Source/bison/parser.cpp Source/bison/parser.hpp
# Empty rule for the actual parser source file
Source/bison/parser.yy:
# compile the parser object file
Source/bison/parser.o: Source/bison/parser.hpp Source/bison/parser.cpp
# flex the scanner file
Source/flex/flexScanner.cpp:
$(LEX) $(LFLAGS) -o Source/flex/flexScanner.cpp Source/flex/flexScanner.ll
# empty rule for the actual scanner source file
Source/flex/flexScanner.ll:
# compile the scanner object file
Source/flex/flexScanner.o: Source/flex/flexScanner.cpp