First pass at updating top(1):
[dragonfly.git] / usr.bin / top / Makefile
CommitLineData
984263bc 1# $FreeBSD: src/usr.bin/top/Makefile,v 1.5.6.2 2002/08/11 17:09:54 dwmalone Exp $
95578ad0 2# $DragonFly: src/usr.bin/top/Makefile,v 1.3 2004/05/29 05:11:15 hmp Exp $
984263bc
MD
3PROG= top
4
5TOPDIR= ${.CURDIR}/../../contrib/top
6.PATH: ${TOPDIR}
7
8CFLAGS+= -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)
16CFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}"
17.endif
18
95578ad0
HP
19CONTRIBDIR= ${TOPDIR}
20PATCHES!= echo ${TOPDIR}/patches/*.patch
21
22SRCS= ${PATCHES} commands.c display.c machine.c screen.c top.c \
984263bc
MD
23 username.c utils.c version.c top.local.h
24
25CLEANFILES+= top.local.h top.x top.1
26DPADD= ${LIBTERMCAP} ${LIBM} ${LIBKVM}
27LDADD= -ltermcap -lm -lkvm
28BINGRP= kmem
29BINMODE=2555
30
31top.1: top.x top.local.1
32 cat ${.ALLSRC} > top.1
33
34.SUFFIXES: .X .x .H .h
35
36.X.x .H.h:
37 @${ECHO} Making ${.TARGET} from ${.IMPSRC}
38 @sed -e's,%LoadMax%,5.0,g' \
39 -e's,%TableSize%,20011,g' \
40 -e's,%NominalTopn%,18,g' \
41 -e's,%topn%,-1,g' \
42 -e's,%delay%,2,g' \
43 -e's,%random%,1,g' \
44 ${.IMPSRC} > ${.TARGET}
45
46.include <bsd.prog.mk>