xref: /original-bsd/usr.bin/diction/Makefile (revision 33586e34)
1#
2# Copyright (c) 1987 The Regents of the University of California.
3# All rights reserved.
4#
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.9 (Berkeley) 05/11/89
18#
19CFLAGS=	-O
20LIBC=	/lib/libc.a
21SRCS=	diction.c nwords.c end.c part.c pscan.c outp.c
22OBJS=	nwords.o end.o part.o pscan.o outp.o
23MAN=	diction.0 style.0
24
25all: dprog style1 style2 style3
26
27dprog: diction.c ${LIBC}
28	${CC} ${CFLAGS} diction.c -o $@
29
30style1: nwords.o ${LIBC}
31	${CC} nwords.o -o $@ -ll
32
33style2: end.o ${LIBC}
34	${CC} end.o -o $@ -ll
35
36style3: part.o pscan.o outp.o ${LIBC}
37	${CC} part.o pscan.o outp.o -o $@ -ll
38
39clean:
40	rm -f ${OBJS} part.c nwords.c end.c style1 style2 style3 dprog
41
42cleandir: clean
43	rm -f ${MAN} tags .depend
44
45depend: ${SRCS}
46	mkdep ${CFLAGS} ${SRCS}
47
48install: ${MAN}
49	install -s -o bin -g bin -m 755 dprog style1 style2 style3 \
50	    ${DESTDIR}/usr/libexec
51	install -c -o bin -g bin -m 755 dict.d explain.d \
52	    ${DESTDIR}/usr/share/dict
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 444 ${MAN} ${DESTDIR}/usr/man/cat1
57	rm -f ${DESTDIR}/usr/man/cat1/explain.0
58	ln ${DESTDIR}/usr/man/cat1/diction.0 ${DESTDIR}/usr/man/cat1/explain.0
59
60lint: ${SRCS}
61	lint ${CFLAGS} nwords.c
62	lint ${CFLAGS} end.c
63	lint ${CFLAGS} part.c pscan.c outp.c
64
65tags: ${SRCS}
66	ctags nwords.c
67	ctags -a end.c
68	ctags -a part.c pscan.c outp.c
69	sort -o tags tags
70