xref: /original-bsd/usr.bin/man/Makefile (revision 183db9ee)
1#
2# Copyright (c) 1987 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	5.6 (Berkeley) 09/18/88
18#
19CFLAGS=	-O
20LIBC=	/lib/libc.a
21SRCS=	apropos.c whatis.c man.c
22MAN=	man.0 apropos.0 whatis.0
23
24all: man apropos whatis
25
26man: ${LIBC}
27	${CC} -o $@ ${CFLAGS} $@.c
28
29apropos: ${LIBC}
30	${CC} -o $@ ${CFLAGS} $@.c
31
32whatis: ${LIBC}
33	${CC} -o $@ ${CFLAGS} $@.c
34
35clean:
36	rm -f core apropos whatis man
37
38cleandir: clean
39	rm -f ${MAN} tags .depend
40
41depend:
42	mkdep -p ${CFLAGS} ${SRCS}
43
44install: ${MAN}
45	install -s -o bin -g bin -m 755 apropos ${DESTDIR}/usr/ucb/apropos
46	install -s -o bin -g bin -m 755 whatis ${DESTDIR}/usr/ucb/whatis
47	install -s -o bin -g bin -m 755 man ${DESTDIR}/usr/ucb/man
48	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
49
50lint:
51	lint ${CFLAGS} apropos.c
52	lint ${CFLAGS} whatis.c
53	lint ${CFLAGS} man.c
54
55tags:
56	ctags apropos.c
57	ctags -a whatis.c
58	ctags -a man.c
59	sort -o tags tags
60