top - Import 3.8beta1 sources into new vendor/TOP branch.
[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 $
c03f08f3 2# $DragonFly: src/usr.bin/top/Makefile,v 1.8 2007/08/27 16:50:59 pavalos Exp $
984263bc
MD
3PROG= top
4
5TOPDIR= ${.CURDIR}/../../contrib/top
6.PATH: ${TOPDIR}
7
3a1cfe54
HP
8CFLAGS+= -DHAVE_GETOPT -DHAVE_STRERROR -I${.CURDIR} -I${.OBJDIR} \
9 -I${TOPDIR} -I. -DORDER
984263bc
MD
10
11#
12# The table size should be a prime number approximately twice as
13# large as the number of lines in /etc/passwd. The default number
14# is 20011, use /etc/make.conf to override this.
15#
16.if defined(TOP_TABLE_SIZE)
17CFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}"
18.endif
19
d695c7d2 20SRCS= commands.c display.c machine.c screen.c top.c \
984263bc
MD
21 username.c utils.c version.c top.local.h
22
23CLEANFILES+= top.local.h top.x top.1
9169bd75
JS
24DPADD= ${LIBTERMCAP} ${LIBM} ${LIBKVM} ${LIBKINFO}
25LDADD= -ltermcap -lm -lkvm -lkinfo
984263bc
MD
26BINGRP= kmem
27BINMODE=2555
28
29top.1: top.x top.local.1
30 cat ${.ALLSRC} > top.1
31
32.SUFFIXES: .X .x .H .h
33
34.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' \
39 -e's,%topn%,-1,g' \
40 -e's,%delay%,2,g' \
41 -e's,%random%,1,g' \
42 ${.IMPSRC} > ${.TARGET}
43
44.include <bsd.prog.mk>