-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
60 lines (46 loc) · 1.54 KB
/
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
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
# *****************************************************************************
# *****************************************************************************
# makefile
# *****************************************************************************
# Charles Santos
# 931-928-349
# CS480 W15
# *****************************************************************************
# *****************************************************************************
CCC = g++
CCFLAGS = -fmax-errors=10 -Wall -std=gnu++11
OBJS = comString.o token.o state.o lexer.o grammar.o parser.o global.o tu.o translator.o
SOURCE = lexer.cpp state.cpp comString.cpp token.cpp grammar.cpp parser.cpp global.cpp tu.cpp translator.cpp
RUNFLAGS =
$(OBJS): $(SOURCE)
$(CCC) $(CCFLAGS) -c $(SOURCE)
compiler: $(OBJS)
$(CCC) $(CCFLAGS) -o compiler $(OBJS)
clean:
rm -f *.o core *.exe *.out *.stackdump *.gen generated.ibtl test.ibtl translated.forth
ls
stutest.out: compiler
cat stutest1.in
-rm -f tree.out
-./compiler $(RUNFLAGS) -b mod.grammar stutest1.in > stutest1.out 2>&1
cat stutest1.out
-cat tree.out >> stutest1.out
fsa: compiler
./compiler -f
cat fsa.out
grammar: compiler
./compiler -g
builder: compiler
./compiler -g -b mod.grammar
gtest: compiler test.ibtl
./compiler -b mod.grammar test.ibtl
generate: compiler mod.grammar
./compiler -t -b mod.grammar
echo "" >> test.ibtl
cat generated.ibtl >> test.ibtl
dtest: compiler stutest2.in
./compiler -b mod.grammar stutest2.in
proftest.out: compiler
cat $(PROFTEST)
compiler $(PROFTEST) > proftest.out
cat proftest.out