Commit | Line | Data |
---|---|---|
6e4ebe64 KB |
1 | # |
2 | # Copyright (c) 1987 Regents of the University of California. | |
ea9afd82 | 3 | # All rights reserved. |
6e4ebe64 | 4 | # |
ea9afd82 | 5 | # Redistribution and use in source and binary forms are permitted |
b36fc510 KB |
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. | |
ea9afd82 | 16 | # |
e316d661 | 17 | # @(#)Makefile 5.6 (Berkeley) %G% |
6e4ebe64 KB |
18 | # |
19 | CFLAGS= -O | |
20 | LIBC= /lib/libc.a | |
e316d661 KB |
21 | SRCS= apropos.c whatis.c man.c |
22 | MAN= man.0 apropos.0 whatis.0 | |
6e4ebe64 | 23 | |
e316d661 KB |
24 | all: man apropos whatis |
25 | ||
26 | man: ${LIBC} | |
27 | ${CC} -o $@ ${CFLAGS} $@.c | |
6e4ebe64 | 28 | |
52683ed6 | 29 | apropos: ${LIBC} |
e316d661 | 30 | ${CC} -o $@ ${CFLAGS} $@.c |
6e4ebe64 | 31 | |
e316d661 KB |
32 | whatis: ${LIBC} |
33 | ${CC} -o $@ ${CFLAGS} $@.c | |
34 | ||
35 | clean: | |
36 | rm -f core apropos whatis man | |
6e4ebe64 | 37 | |
e316d661 KB |
38 | cleandir: clean |
39 | rm -f ${MAN} tags .depend | |
6e4ebe64 | 40 | |
e316d661 KB |
41 | depend: |
42 | mkdep -p ${CFLAGS} ${SRCS} | |
6e4ebe64 | 43 | |
e316d661 | 44 | install: ${MAN} |
6e4ebe64 | 45 | install -s -o bin -g bin -m 755 apropos ${DESTDIR}/usr/ucb/apropos |
e316d661 | 46 | install -s -o bin -g bin -m 755 whatis ${DESTDIR}/usr/ucb/whatis |
6e4ebe64 | 47 | install -s -o bin -g bin -m 755 man ${DESTDIR}/usr/ucb/man |
e316d661 | 48 | install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 |
6e4ebe64 | 49 | |
e316d661 KB |
50 | lint: |
51 | lint ${CFLAGS} apropos.c | |
52 | lint ${CFLAGS} whatis.c | |
53 | lint ${CFLAGS} man.c | |
6e4ebe64 | 54 | |
e316d661 KB |
55 | tags: |
56 | ctags apropos.c | |
57 | ctags -a whatis.c | |
58 | ctags -a man.c | |
6e4ebe64 | 59 | sort -o tags tags |