-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
25 lines (19 loc) · 909 Bytes
/
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
# default action is to compiler the tokeniser and parser
all: JackTokeniser JackParser
# add the names of other .h files used by JackTokeniser to TOKENH
TOKENH=myxml.h JackTokeniser.h
# add the names of other .cpp files used by JackTokeniser to TOKENCPP
TOKENCPP=jackmain.cpp myxml.cpp JackTokeniser.cpp
# recompile the tokeniser if any of its .h or .cpp files have changed
JackTokeniser: ${TOKENCPP} ${TOKENH}
g++ -o JackTokeniser ${TOKENCPP}
# add the names of other .h files used by JackParser to PARSERH
PARSERH=myxml.h CompilationEngine.h JackTokeniser.h
# add the names of other .cpp files used by JackParser to PARSERCPP
PARSERCPP=parsermain.cpp myxml.cpp CompilationEngine.cpp JackTokeniser.cpp
# recompile the parser if any of its .h or .cpp files have changed
JackParser: ${PARSERCPP} ${PARSERH}
g++ -o JackParser ${PARSERCPP}
# delete the executables
clean:
rm -f JackTokeniser JackParser