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