new ip statistics
[unix-history] / usr / src / usr.bin / diction / Makefile
CommitLineData
2958d0fe 1#
e12de368 2# @(#)Makefile 4.4 (Berkeley) 83/02/11
2958d0fe
RH
3#
4# make file for STYLE and DICTION
5#
6# BIN is the directory for storing the object code
7# for the 3 programs that make up style
8# DICT is the full pathname of the file dict.d, the
9# dictionary file used by DICTION
10#
e12de368 11DESTDIR=
6320ec27
RH
12SRCS = \
13 abbrev.c conp.h dict.c dict.d \
14 diction.c diction.sh edict.c ehash.c \
15 explain.d \
16 end.l getopt.c names.h nhash.c \
17 nwords.l outp.c part.l pscan.c \
18 style.h style.sh explain.sh ydict.c \
19 README
20
2958d0fe
RH
21BIN = ${DESTDIR}/usr/lib
22DICT= -DDICT=\"/usr/lib/dict.d\"
23
6320ec27
RH
24all: diction style
25
2958d0fe
RH
26style: style1 style2 style3
27
6320ec27 28install: style diction style.sh diction.sh explain.sh dict.d explain.d
2958d0fe
RH
29 install -s style1 ${DESTDIR}/usr/lib
30 install -s style2 ${DESTDIR}/usr/lib
31 install -s style3 ${DESTDIR}/usr/lib
32 install -s dprog ${DESTDIR}/usr/lib
6320ec27
RH
33 install -c style.sh ${DESTDIR}/usr/bin/style
34 install -c diction.sh ${DESTDIR}/usr/bin/diction
35 install -c explain.sh ${DESTDIR}/usr/bin/explain
2958d0fe
RH
36 install -c dict.d ${DESTDIR}/usr/lib
37 install -c explain.d ${DESTDIR}/usr/lib
280efb10 38# ln ${DESTDIR}/usr/bin/explain ${DESTDIR}/usr/bin/suggest
2958d0fe
RH
39
40clean:
41 rm -f prtlex.c wdslex.c endlex.c
42 rm -f *.o style1 style2 style3 dprog
43
44style3: prtlex.o pscan.o outp.o
45 cc prtlex.o pscan.o outp.o -ll -o style3
46prtlex.c: part.l
47 lex part.l
48 mv lex.yy.c prtlex.c
e12de368 49prtlex.o: names.h prtlex.c conp.h style.h names.h
2958d0fe 50 cc -c -O prtlex.c
6320ec27 51pscan.o: names.h conp.h pscan.c
2958d0fe 52 cc -c -O pscan.c
6320ec27 53outp.o: names.h conp.h style.h outp.c
2958d0fe
RH
54 cc -c -O outp.c
55
56style1: wdslex.o
57 cc wdslex.o -ll -o style1
280efb10 58wdslex.o: wdslex.c nhash.c dict.c ydict.c names.h abbrev.c
2958d0fe
RH
59 cc -c wdslex.c
60wdslex.c: nwords.l
61 lex nwords.l
62 mv lex.yy.c wdslex.c
63
64style2: endlex.o
65 cc endlex.o -ll -o style2
66endlex.o: names.h endlex.c ehash.c edict.c
67 cc -c endlex.c
68endlex.c: end.l
69 lex end.l
70 mv lex.yy.c endlex.c
71
72diction: dprog
73dprog: diction.c
74 cc -O $(DICT) diction.c -i -o dprog
75
6320ec27
RH
76srcs: sources
77
78sources: $(SRCS)
79
80$(SRCS):
81 sccs get $@
82