2001-02-23 18:55:43 +00:00
|
|
|
# $FreeBSD$
|
1997-03-23 18:55:20 +00:00
|
|
|
PROG= top
|
|
|
|
|
|
|
|
TOPDIR= ${.CURDIR}/../../contrib/top
|
|
|
|
.PATH: ${TOPDIR}
|
|
|
|
|
2001-07-12 15:07:30 +00:00
|
|
|
CFLAGS+= -DHAVE_GETOPT -I${.CURDIR} -I${TOPDIR} -I. -DORDER
|
1997-03-23 18:55:20 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# The table size should be a prime number approximately twice as
|
|
|
|
# large as the number of lines in /etc/passwd. The default number
|
|
|
|
# is 20011, use /etc/make.conf to override this.
|
|
|
|
#
|
|
|
|
.if defined(TOP_TABLE_SIZE)
|
|
|
|
CFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
SRCS= commands.c display.c machine.c screen.c top.c \
|
2001-07-12 15:07:30 +00:00
|
|
|
username.c utils.c version.c top.local.h
|
1997-03-23 18:55:20 +00:00
|
|
|
|
2001-07-12 15:07:30 +00:00
|
|
|
CLEANFILES+= top.local.h top.x top.1
|
1997-03-24 14:29:46 +00:00
|
|
|
DPADD= ${LIBTERMCAP} ${LIBM} ${LIBKVM}
|
|
|
|
LDADD= -ltermcap -lm -lkvm
|
1997-03-23 18:55:20 +00:00
|
|
|
|
2001-07-12 15:07:30 +00:00
|
|
|
top.1: top.x top.local.1
|
1997-04-05 22:05:46 +00:00
|
|
|
cat ${.ALLSRC} > top.1
|
|
|
|
|
2001-07-12 15:07:30 +00:00
|
|
|
.SUFFIXES: .X .x .H .h
|
|
|
|
|
|
|
|
.X.x .H.h:
|
|
|
|
@${ECHO} Making ${.TARGET} from ${.IMPSRC}
|
|
|
|
@sed -e's,%LoadMax%,5.0,g' \
|
|
|
|
-e's,%TableSize%,20011,g' \
|
|
|
|
-e's,%NominalTopn%,18,g' \
|
|
|
|
-e's,%topn%,-1,g' \
|
|
|
|
-e's,%delay%,2,g' \
|
|
|
|
-e's,%random%,1,g' \
|
|
|
|
${.IMPSRC} > ${.TARGET}
|
|
|
|
|
1997-03-23 18:55:20 +00:00
|
|
|
.include <bsd.prog.mk>
|