OSDN Git Service

Initial Update.
[bcpl-language/BCPL.git] / compiler / Makefile
1 #
2 #
3 #
4
5
6 CFLAGS=
7
8 all: bcplc
9
10 bcplc: main.o lexical.o parser.tab.o makecode.o misc.o debug.o
11         cc -o bcplc main.o lexical.o parser.tab.o makecode.o misc.o debug.o -lfl
12
13
14 main.o: main.c bcpl.h
15         cc $(CFLAGS) -c main.c
16
17 misc.o: misc.c parser.tab.c bcpl.h
18         cc $(CFLAGS) -c misc.c
19
20 debug.o: debug.c parser.tab.c bcpl.h
21         cc $(CFLAGS) -c debug.c
22
23 lexical.o: lexical.c parser.tab.c bcpl.h
24         cc $(CFLAGS) -c lexical.c
25
26
27 lexical.c: lexical.l bcpl.h
28         flex -olexical.c lexical.l
29
30 parser.tab.o: parser.tab.c bcpl.h
31         cc $(CFLAGS) -c parser.tab.c
32
33 parser.tab.c: parser.y bcpl.h
34         bison -v -t -d parser.y
35
36
37
38 clean:
39         rm -f bcplc *.o parser.tab.c parser.tab.h *~ core lexical.c parser.output
40