-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
100 lines (68 loc) · 1.95 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#
# Makefile for BtYacc.
#
VERSION = 3-0
DEST = .
HDRS = defs.h mstring.h
CFLAGS = -g -Wall -Wstrict-prototypes -Wmissing-prototypes
LDFLAGS = -static
LIBS =
CC = gcc
LINKER = gcc
# LINKER = cl
# CC = cl
MAKEFILE = Makefile
OBJS = closure.o error.o lalr.o lr0.o main.o mkpar.o output.o \
mstring.o reader.o readskel.o skeleton.o symtab.o verbose.o warshall.o
PRINT = pr -f -l88
PROGRAM = btyacc
SRCS = closure.c error.c lalr.c lr0.c main.c mkpar.c output.c \
mstring.c reader.c readskel.c skeleton.c symtab.c verbose.c warshall.c
OTHERS = README README.BYACC \
Makefile btyaccpa.ske push.skel empty.y skel2c manpage makefile.dos \
skeleton.c
all: $(PROGRAM)
$(PROGRAM): $(OBJS) $(LIBS)
$(LINKER) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
clean:; rm -f $(OBJS)
clobber:; rm -f $(OBJS) $(PROGRAM)
distclean:; rm -f $(OBJS) $(PROGRAM) skeleton.c *.zip *.gz
depend:; mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DEST=$(DEST)
index:; ctags -wx $(HDRS) $(SRCS)
install: $(PROGRAM)
cp $(PROGRAM).exe /bin
oldinstall: $(PROGRAM)
@echo Installing $(PROGRAM) in $(DEST)
install -s $(PROGRAM) $(DEST)
listing:; $(PRINT) Makefile $(HDRS) $(SRCS) | lpr
lint:; lint $(SRCS)
program: $(PROGRAM)
tags: $(HDRS) $(SRCS)
ctags $(HDRS) $(SRCS)
dist: tar zip
tar:
rm -f btyacc.tar btyacc.tar.gz
tar cvf btyacc.tar $(OTHERS) $(SRCS) $(HDRS) test/*.y
gzip -9 btyacc.tar
mv btyacc.tar.gz btyacc-$(VERSION).tar.gz
zip:
zip btyacc.zip $(OTHERS) $(SRCS) $(HDRS) test/*.y
mv btyacc.zip btyacc-$(VERSION).zip
skeleton.c: btyaccpa.ske skel2c
awk -f skel2c btyaccpa.ske >skeleton.c
etags TAGS:
etags *.c *.h
###
closure.o: defs.h
error.o: defs.h
lalr.o: defs.h
lr0.o: defs.h
main.o: defs.h
mkpar.o: defs.h
mstring.o: mstring.h
output.o: defs.h
reader.o: defs.h mstring.h
skeleton.o: defs.h
symtab.o: defs.h
verbose.o: defs.h
warshall.o: defs.h