-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
53 lines (37 loc) · 2.17 KB
/
makefile
File metadata and controls
53 lines (37 loc) · 2.17 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
all: debug
debug:clean
gcc -Wall -fno-stack-protector src/lexer.c -g -c -o out/lexer.o
gcc -Wall -fno-stack-protector src/symbolDef.c -g -c -o out/symbolDef.o
gcc -Wall -fno-stack-protector src/firstAndFollow.c -c -o out/firstAndFollow.o
gcc -Wall -fno-stack-protector src/parserDef.c -g -c -o out/parserDef.o
gcc -Wall -fno-stack-protector src/symbolStack.c -g -c -o out/symbolStack.o
gcc -Wall -fno-stack-protector src/parser.c -g -c -o out/parser.o
gcc -Wall -fno-stack-protector src/ast.c -g -c -o out/ast.o
gcc -Wall -fno-stack-protector src/symbolTable.c -g -c -o out/symbolTable.o
gcc -Wall -fno-stack-protector src/driver.c -g -c -o out/driver.o
gcc -Wall -fno-stack-protector -g -o build/pcc out/driver.o out/lexer.o out/symbolDef.o out/firstAndFollow.o out/parser.o out/parserDef.o out/symbolStack.o out/ast.o out/symbolTable.o
firstfollow:clean
gcc -Wall -fno-stack-protector src/symbolDef.c -c -o out/symbolDef.o
gcc -Wall -fno-stack-protector src/firstAndFollow.c -c -o out/firstAndFollow.o
gcc -Wall -fno-stack-protector -o build/firstAndFollow out/symbolDef.o out/firstAndFollow.o
run_firstfollow:
./build/firstAndFollow language/hr.txt language/hr_first.txt language/hr_follow.txt
parser: clean
gcc -Wall -fno-stack-protector src/symbolDef.c -g -c -o out/symbolDef.o
gcc -Wall -fno-stack-protector src/parserDef.c -g -c -o out/parserDef.o
gcc -Wall -fno-stack-protector src/parser.c -g -c -o out/parser.o
gcc -Wall -fno-stack-protector src/symbolStack.c -g -c -o out/symbolStack.o
gcc -Wall -fno-stack-protector src/lexer.c -g -c -o out/lexer.o
gcc -Wall -fno-stack-protector -g -o build/parser out/parser.o out/symbolDef.o out/parserDef.o out/symbolStack.o out/lexer.o
run_parser:
./build/parser language/grammar.txt language/first.txt language/follow.txt language/parseTable.csv testcases/testcase3.txt language/parseTree.txt
gdb_run_parser:
gdb --args ./build/parser language/grammar.txt language/first.txt language/follow.txt language/parseTable.csv testcases/testcase3.txt language/parseTree.txt
run:
./build/pcc testcases/test1.txt
gdb_run:
gdb --args ./build/pcc testcases/test0.txt
release:
cp src/* 2015A7PS0088P/
clean:
rm -f build/* out/*