-
Notifications
You must be signed in to change notification settings - Fork 0
/
p02make
53 lines (53 loc) · 2.28 KB
/
p02make
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
#------------------------------------------------------------------
# File p02make contains instructions for creating file p02,
#------------------------------------------------------------------
#Author 1: Steven Chambers
#Student ID: *20342421
#E-Mail: [email protected]
#Author 2: Melicent King
#Student ID: *20355157
#E-mail: [email protected]
#Course: CMSC 4023 - Programming Languages
#CRN: 12105
#Project: p02
#Due: November 5, 2014
#Account: tt060
#------------------------------------------------------------------
# Object files
#------------------------------------------------------------------
obj = p02par.o p02lex.o p02.o
#------------------------------------------------------------------
# Bind the Subset Pascal Scanner
#------------------------------------------------------------------
p02: ${obj}
g++ -o p02 ${obj} -lm -ll
#------------------------------------------------------------------
# File p02.cpp processes command line arguments
#------------------------------------------------------------------
p02.o: p02.cpp p02lex.h
g++ -c -g p02.cpp
#------------------------------------------------------------------
# File p02lex.l is the lexical analyzer
#------------------------------------------------------------------
p02lex.cpp: p02lex.l p02lex.h
lex p02lex.l
mv lex.yy.c p02lex.cpp
#------------------------------------------------------------------
# File p02lex.cpp is created by lex in the previous step
#------------------------------------------------------------------
p02lex.o: p02lex.cpp p02lex.h
g++ -c -g p02lex.cpp
#------------------------------------------------------------------
# File p02par.y contains the specification of the Subset Pascal
# Parser in a format acceptable to yacc
#------------------------------------------------------------------
p02tkn.h \
p02par.cpp: p02par.y
yacc -d -v p02par.y
mv y.tab.c p02par.cpp
mv y.tab.h p02tkn.h
#------------------------------------------------------------------
# File p02par.cpp is the C++ parser created by yacc
#------------------------------------------------------------------
p02par.o: p02par.cpp p02par.h
g++ -c -g p02par.cpp