1 # $FreeBSD: src/usr.bin/top/Makefile,v 1.5.6.2 2002/08/11 17:09:54 dwmalone Exp $
4 TOPDIR= ${.CURDIR}/../../contrib/top
7 CFLAGS+= -DHAVE_GETOPT -DHAVE_STRERROR -I${.CURDIR} -I${TOPDIR} -I. -DORDER
10 # The table size should be a prime number approximately twice as
11 # large as the number of lines in /etc/passwd. The default number
12 # is 20011, use /etc/make.conf to override this.
14 .if defined(TOP_TABLE_SIZE)
15 CFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}"
18 SRCS= commands.c display.c machine.c screen.c top.c \
19 username.c utils.c version.c top.local.h
21 CLEANFILES+= top.local.h top.x top.1
22 DPADD= ${LIBTERMCAP} ${LIBM} ${LIBKVM}
23 LDADD= -ltermcap -lm -lkvm
27 top.1: top.x top.local.1
28 cat ${.ALLSRC} > top.1
30 .SUFFIXES: .X .x .H .h
33 @${ECHO} Making ${.TARGET} from ${.IMPSRC}
34 @sed -e's,%LoadMax%,5.0,g' \
35 -e's,%TableSize%,20011,g' \
36 -e's,%NominalTopn%,18,g' \
40 ${.IMPSRC} > ${.TARGET}
42 .include <bsd.prog.mk>