new template
[unix-history] / usr / src / usr.bin / diction / Makefile
CommitLineData
2958d0fe 1#
a8629c9c 2# @(#)Makefile 4.6 (Berkeley) 87/05/31
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
a8629c9c
KB
44depend:
45
2958d0fe
RH
46style3: prtlex.o pscan.o outp.o
47 cc prtlex.o pscan.o outp.o -ll -o style3
48prtlex.c: part.l
49 lex part.l
50 mv lex.yy.c prtlex.c
e12de368 51prtlex.o: names.h prtlex.c conp.h style.h names.h
2958d0fe 52 cc -c -O prtlex.c
6320ec27 53pscan.o: names.h conp.h pscan.c
2958d0fe 54 cc -c -O pscan.c
6320ec27 55outp.o: names.h conp.h style.h outp.c
2958d0fe
RH
56 cc -c -O outp.c
57
58style1: wdslex.o
59 cc wdslex.o -ll -o style1
280efb10 60wdslex.o: wdslex.c nhash.c dict.c ydict.c names.h abbrev.c
2958d0fe
RH
61 cc -c wdslex.c
62wdslex.c: nwords.l
63 lex nwords.l
64 mv lex.yy.c wdslex.c
65
66style2: endlex.o
67 cc endlex.o -ll -o style2
68endlex.o: names.h endlex.c ehash.c edict.c
69 cc -c endlex.c
70endlex.c: end.l
71 lex end.l
72 mv lex.yy.c endlex.c
73
74diction: dprog
75dprog: diction.c
6258b052 76 cc -O $(DICT) diction.c -o dprog
2958d0fe 77
6320ec27
RH
78srcs: sources
79
80sources: $(SRCS)
81
82$(SRCS):
83 sccs get $@
84