Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / usr.bin / top / Makefile
1 # $FreeBSD: src/usr.bin/top/Makefile,v 1.5.6.2 2002/08/11 17:09:54 dwmalone Exp $
2 # $DragonFly: src/usr.bin/top/Makefile,v 1.2 2003/06/17 04:29:33 dillon Exp $
3 PROG=   top
4
5 TOPDIR= ${.CURDIR}/../../contrib/top
6 .PATH:  ${TOPDIR}
7
8 CFLAGS+= -DHAVE_GETOPT -DHAVE_STRERROR -I${.CURDIR} -I${TOPDIR} -I. -DORDER
9
10 #
11 # The table size should be a prime number approximately twice as
12 # large as the number of lines in /etc/passwd.  The default number
13 # is 20011, use /etc/make.conf to override this.
14 #
15 .if defined(TOP_TABLE_SIZE)
16 CFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}"
17 .endif
18
19 SRCS=   commands.c display.c machine.c screen.c top.c \
20         username.c utils.c version.c top.local.h
21
22 CLEANFILES+= top.local.h top.x top.1
23 DPADD=  ${LIBTERMCAP} ${LIBM} ${LIBKVM}
24 LDADD=  -ltermcap -lm -lkvm
25 BINGRP= kmem
26 BINMODE=2555
27
28 top.1:  top.x top.local.1
29         cat ${.ALLSRC} > top.1
30
31 .SUFFIXES: .X .x .H .h
32
33 .X.x .H.h:
34         @${ECHO} Making ${.TARGET} from ${.IMPSRC}
35         @sed -e's,%LoadMax%,5.0,g' \
36         -e's,%TableSize%,20011,g' \
37         -e's,%NominalTopn%,18,g' \
38         -e's,%topn%,-1,g' \
39         -e's,%delay%,2,g' \
40         -e's,%random%,1,g' \
41         ${.IMPSRC} > ${.TARGET}
42
43 .include <bsd.prog.mk>