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