Commit | Line | Data |
---|---|---|
2958d0fe | 1 | # |
846c83ad KB |
2 | # Copyright (c) 1987 The Regents of the University of California. |
3 | # All rights reserved. | |
2958d0fe | 4 | # |
846c83ad KB |
5 | # Redistribution and use in source and binary forms are permitted |
6 | # provided that the above copyright notice and this paragraph are | |
7 | # duplicated in all such forms and that any documentation, | |
8 | # advertising materials, and other materials related to such | |
9 | # distribution and use acknowledge that the software was developed | |
10 | # by the University of California, Berkeley. The name of the | |
11 | # University may not be used to endorse or promote products derived | |
12 | # from this software without specific prior written permission. | |
13 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
14 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
15 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
16 | # | |
17 | # @(#)Makefile 4.8 (Berkeley) %G% | |
2958d0fe | 18 | # |
eaa52f3c KB |
19 | CFLAGS= -O |
20 | LIBC= /lib/libc.a | |
21 | SRCS= diction.c nwords.c end.c part.c pscan.c outp.c | |
22 | OBJS= nwords.o end.o part.o pscan.o outp.o | |
846c83ad | 23 | MAN= diction.0 style.0 |
6320ec27 | 24 | |
eaa52f3c | 25 | all: dprog style1 style2 style3 |
2958d0fe | 26 | |
eaa52f3c KB |
27 | dprog: diction.c ${LIBC} |
28 | ${CC} ${CFLAGS} -DDICT=\"/usr/lib/dict.d\" diction.c -o $@ | |
6320ec27 | 29 | |
eaa52f3c KB |
30 | style1: nwords.o ${LIBC} |
31 | ${CC} nwords.o -o $@ -ll | |
2958d0fe | 32 | |
eaa52f3c KB |
33 | style2: end.o ${LIBC} |
34 | ${CC} end.o -o $@ -ll | |
2958d0fe | 35 | |
eaa52f3c KB |
36 | style3: part.o pscan.o outp.o ${LIBC} |
37 | ${CC} part.o pscan.o outp.o -o $@ -ll | |
2958d0fe | 38 | |
846c83ad | 39 | clean: |
eaa52f3c | 40 | rm -f ${OBJS} part.c nwords.c end.c style1 style2 style3 dprog |
a8629c9c | 41 | |
846c83ad KB |
42 | cleandir: clean |
43 | rm -f ${MAN} tags .depend | |
44 | ||
eaa52f3c KB |
45 | depend: ${SRCS} FRC |
46 | mkdep ${CFLAGS} ${SRCS} | |
2958d0fe | 47 | |
846c83ad | 48 | install: ${MAN} |
eaa52f3c KB |
49 | install -s -o bin -g bin -m 755 style1 ${DESTDIR}/usr/lib |
50 | install -s -o bin -g bin -m 755 style2 ${DESTDIR}/usr/lib | |
51 | install -s -o bin -g bin -m 755 style3 ${DESTDIR}/usr/lib | |
52 | install -s -o bin -g bin -m 755 dprog ${DESTDIR}/usr/lib | |
53 | install -c -o bin -g bin -m 755 style.sh ${DESTDIR}/usr/bin/style | |
54 | install -c -o bin -g bin -m 755 diction.sh ${DESTDIR}/usr/bin/diction | |
55 | install -c -o bin -g bin -m 755 explain.sh ${DESTDIR}/usr/bin/explain | |
56 | install -c -o bin -g bin -m 755 dict.d ${DESTDIR}/usr/lib | |
57 | install -c -o bin -g bin -m 755 explain.d ${DESTDIR}/usr/lib | |
846c83ad KB |
58 | install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 |
59 | rm -f ${DESTDIR}/usr/man/cat1/explain.0 | |
60 | ln ${DESTDIR}/usr/man/cat1/diction.0 ${DESTDIR}/usr/man/cat1/explain.0 | |
eaa52f3c | 61 | # ln ${DESTDIR}/usr/bin/explain ${DESTDIR}/usr/bin/suggest |
2958d0fe | 62 | |
846c83ad | 63 | lint: ${SRCS} |
eaa52f3c KB |
64 | lint ${CFLAGS} nwords.c |
65 | lint ${CFLAGS} end.c | |
66 | lint ${CFLAGS} part.c pscan.c outp.c | |
2958d0fe | 67 | |
846c83ad | 68 | tags: ${SRCS} |
eaa52f3c KB |
69 | ctags nwords.c |
70 | ctags -a end.c | |
71 | ctags -a part.c pscan.c outp.c | |
72 | sort -o tags tags |