]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - 6/usr.bin/top/Makefile
merge fix for boot-time hang on centos' xen
[FreeBSD/FreeBSD.git] / 6 / usr.bin / top / Makefile
1 # $FreeBSD$
2 PROG=   top
3
4 TOPDIR= ${.CURDIR}/../../contrib/top
5 .PATH:  ${TOPDIR}
6
7 CFLAGS+= -DHAVE_GETOPT -DHAVE_STRERROR -I${.CURDIR} -I${TOPDIR} -I. -DORDER
8
9 #
10 # The table size should be a prime number approximately twice as
11 # large as the number of lines in /etc/passwd.  The default number
12 # is 20011, use /etc/make.conf to override this.
13 #
14 .if defined(TOP_TABLE_SIZE)
15 CFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}"
16 .endif
17
18 SRCS=   commands.c display.c machine.c screen.c top.c \
19         username.c utils.c version.c top.local.h
20
21 CLEANFILES+= top.local.h top.x top.1
22 DPADD=  ${LIBTERMCAP} ${LIBM} ${LIBKVM}
23 LDADD=  -ltermcap -lm -lkvm
24
25 top.1:  top.x top.local.1
26         cat ${.ALLSRC} > top.1
27
28 .SUFFIXES: .X .x .H .h
29
30 .X.x .H.h:
31         @${ECHO} Making ${.TARGET} from ${.IMPSRC}
32         @sed -e's,%LoadMax%,5.0,g' \
33         -e's,%TableSize%,20011,g' \
34         -e's,%NominalTopn%,18,g' \
35         -e's,%topn%,-1,g' \
36         -e's,%delay%,2,g' \
37         -e's,%random%,1,g' \
38         ${.IMPSRC} > ${.TARGET}
39
40 .include <bsd.prog.mk>