-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (32 loc) · 947 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
CC = g++
CCFLAGS = -g -W -Wall
FLEX = flex
FLEX_OPTS = -Pzp
BISON = bison
BISON_OPTS = -t -pzp
OBJS = Absyn.o Lexer.o Parser.o Printer.o
.PHONY: clean distclean
all: Testzp
clean:
rm -f *.o Testzp zp.aux zp.log zp.pdf zp.dvi zp.ps zp
distclean: clean
rm -f Absyn.C Absyn.H Test.C Parser.C Parser.H Lexer.C Skeleton.C Skeleton.H Printer.C Printer.H Makefile zp.l zp.y zp.tex
Testzp: ${OBJS} Test.o
@echo "Linking Testzp..."
${CC} ${CCFLAGS} ${OBJS} Test.o -o Testzp
Absyn.o: Absyn.C Absyn.H
${CC} ${CCFLAGS} -c Absyn.C
Lexer.C: zp.l
${FLEX} -oLexer.C zp.l
Parser.C: zp.y
${BISON} zp.y -o Parser.C
Lexer.o: Lexer.C Parser.H
${CC} ${CCFLAGS} -c Lexer.C
Parser.o: Parser.C Absyn.H
${CC} ${CCFLAGS} -c Parser.C
Printer.o: Printer.C Printer.H Absyn.H
${CC} ${CCFLAGS} -c Printer.C
Skeleton.o: Skeleton.C Skeleton.H Absyn.H
${CC} ${CCFLAGS} -c Skeleton.C
Test.o: Test.C Parser.H Printer.H Absyn.H
${CC} ${CCFLAGS} -c Test.C