3 TOPDIR= ${.CURDIR}/../../contrib/top
7 SRCS= commands.c display.c machine.c screen.c top.c \
8 username.c utils.c version.c
9 SRCS+= sigdesc.h top.local.h
10 CFLAGS+= -DHAVE_GETOPT -DHAVE_STRERROR -DORDER
11 CFLAGS+= -I${.CURDIR} -I${TOPDIR} -I.
16 # The table size should be a prime number approximately twice as
17 # large as the number of lines in /etc/passwd. The default number
18 # is 20011; use /etc/make.conf to override this.
20 .if defined(TOP_TABLE_SIZE)
21 CFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}"
24 LIBADD= ncursesw m kvm jail
27 SIGCONV_AWK= ${.CURDIR}/../../contrib/top/sigconv.awk
28 SIGNAL_H= ${DESTDIR}/usr/include/sys/signal.h
29 sigdesc.h: ${SIGCONV_AWK} ${SIGNAL_H}
30 awk -f ${SIGCONV_AWK} < ${SIGNAL_H} > ${.TARGET}
32 CLEANFILES+= top.local.h top.x
33 .SUFFIXES: .X .x .H .h
35 @${ECHO} Making ${.TARGET} from ${.IMPSRC}
36 @sed -e's,%LoadMax%,5.0,g' \
37 -e's,%TableSize%,20011,g' \
38 -e's,%NominalTopn%,18,g' \
42 ${.IMPSRC} > ${.TARGET}
45 top.1: top.x top.local.1
46 cat ${.ALLSRC} > ${.TARGET}
48 .include <bsd.prog.mk>