1# 2# @(#)Makefile 4.3 (Berkeley) 82/11/06 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# 11SRCS = \ 12 abbrev.c conp.h dict.c dict.d \ 13 diction.c diction.sh edict.c ehash.c \ 14 explain.d \ 15 end.l getopt.c names.h nhash.c \ 16 nwords.l outp.c part.l pscan.c \ 17 style.h style.sh explain.sh ydict.c \ 18 README 19 20BIN = ${DESTDIR}/usr/lib 21DICT= -DDICT=\"/usr/lib/dict.d\" 22 23all: diction style 24 25style: style1 style2 style3 26 27install: style diction style.sh diction.sh explain.sh dict.d explain.d 28 install -s style1 ${DESTDIR}/usr/lib 29 install -s style2 ${DESTDIR}/usr/lib 30 install -s style3 ${DESTDIR}/usr/lib 31 install -s dprog ${DESTDIR}/usr/lib 32 install -c style.sh ${DESTDIR}/usr/bin/style 33 install -c diction.sh ${DESTDIR}/usr/bin/diction 34 install -c explain.sh ${DESTDIR}/usr/bin/explain 35 install -c dict.d ${DESTDIR}/usr/lib 36 install -c explain.d ${DESTDIR}/usr/lib 37# ln ${DESTDIR}/usr/bin/explain ${DESTDIR}/usr/bin/suggest 38 39clean: 40 rm -f prtlex.c wdslex.c endlex.c 41 rm -f *.o style1 style2 style3 dprog 42 43style3: prtlex.o pscan.o outp.o 44 cc prtlex.o pscan.o outp.o -ll -o style3 45prtlex.c: part.l 46 lex part.l 47 mv lex.yy.c prtlex.c 48prtlex.o: names.h prtlex.c 49 cc -c -O prtlex.c 50pscan.o: names.h conp.h pscan.c 51 cc -c -O pscan.c 52outp.o: names.h conp.h style.h outp.c 53 cc -c -O outp.c 54 55style1: wdslex.o 56 cc wdslex.o -ll -o style1 57wdslex.o: wdslex.c nhash.c dict.c ydict.c names.h abbrev.c 58 cc -c wdslex.c 59wdslex.c: nwords.l 60 lex nwords.l 61 mv lex.yy.c wdslex.c 62 63style2: endlex.o 64 cc endlex.o -ll -o style2 65endlex.o: names.h endlex.c ehash.c edict.c 66 cc -c endlex.c 67endlex.c: end.l 68 lex end.l 69 mv lex.yy.c endlex.c 70 71diction: dprog 72dprog: diction.c 73 cc -O $(DICT) diction.c -i -o dprog 74 75srcs: sources 76 77sources: $(SRCS) 78 79$(SRCS): 80 sccs get $@ 81 82