2001-02-23 18:55:43 +00:00
|
|
|
# $FreeBSD$
|
1997-03-23 18:55:20 +00:00
|
|
|
|
|
|
|
TOPDIR= ${.CURDIR}/../../contrib/top
|
2006-12-01 07:01:19 +00:00
|
|
|
.PATH: ${TOPDIR}
|
1997-03-23 18:55:20 +00:00
|
|
|
|
2006-12-01 07:01:19 +00:00
|
|
|
PROG= top
|
|
|
|
SRCS= commands.c display.c machine.c screen.c top.c \
|
|
|
|
username.c utils.c version.c
|
|
|
|
SRCS+= sigdesc.h top.local.h
|
|
|
|
CFLAGS+= -DHAVE_GETOPT -DHAVE_STRERROR -DORDER
|
|
|
|
CFLAGS+= -I${.CURDIR} -I${TOPDIR} -I.
|
1997-03-23 18:55:20 +00:00
|
|
|
|
2010-01-02 10:27:05 +00:00
|
|
|
WARNS?= 0
|
|
|
|
|
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
|
2006-12-01 07:01:19 +00:00
|
|
|
# is 20011; use /etc/make.conf to override this.
|
1997-03-23 18:55:20 +00:00
|
|
|
#
|
|
|
|
.if defined(TOP_TABLE_SIZE)
|
|
|
|
CFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}"
|
|
|
|
.endif
|
|
|
|
|
2014-11-25 14:29:10 +00:00
|
|
|
LIBADD= ncursesw m kvm jail
|
1997-03-23 18:55:20 +00:00
|
|
|
|
2006-12-01 07:01:19 +00:00
|
|
|
CLEANFILES= sigdesc.h
|
|
|
|
SIGCONV_AWK= ${.CURDIR}/../../contrib/top/sigconv.awk
|
2013-02-20 00:13:26 +00:00
|
|
|
STAGED_INCLUDE_DIR?= ${DESTDIR}/usr/include
|
|
|
|
SIGNAL_H= ${STAGED_INCLUDE_DIR}/sys/signal.h
|
2006-12-01 07:01:19 +00:00
|
|
|
sigdesc.h: ${SIGCONV_AWK} ${SIGNAL_H}
|
|
|
|
awk -f ${SIGCONV_AWK} < ${SIGNAL_H} > ${.TARGET}
|
1997-04-05 22:05:46 +00:00
|
|
|
|
2006-12-01 07:01:19 +00:00
|
|
|
CLEANFILES+= top.local.h top.x
|
2015-06-08 19:45:24 +00:00
|
|
|
.SUFFIXES: .xs .x .hs .h
|
|
|
|
.xs.x .hs.h:
|
2001-07-12 15:07:30 +00:00
|
|
|
@${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}
|
|
|
|
|
2006-12-01 07:01:19 +00:00
|
|
|
CLEANFILES+= top.1
|
|
|
|
top.1: top.x top.local.1
|
|
|
|
cat ${.ALLSRC} > ${.TARGET}
|
|
|
|
|
1997-03-23 18:55:20 +00:00
|
|
|
.include <bsd.prog.mk>
|