Makefile revision 79636
172952Srwatson# $FreeBSD: head/usr.bin/top/Makefile 79636 2001-07-12 15:07:30Z ru $
224143SjoergPROG=	top
324143Sjoerg
424143SjoergTOPDIR=	${.CURDIR}/../../contrib/top
524143Sjoerg.PATH:	${TOPDIR}
624143Sjoerg
779636SruCFLAGS+= -DHAVE_GETOPT -I${.CURDIR} -I${TOPDIR} -I. -DORDER
824143Sjoerg
924143Sjoerg#
1024143Sjoerg# The table size should be a prime number approximately twice as
1124143Sjoerg# large as the number of lines in /etc/passwd.  The default number
1224143Sjoerg# is 20011, use /etc/make.conf to override this.
1324143Sjoerg#
1424143Sjoerg.if defined(TOP_TABLE_SIZE)
1524143SjoergCFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}"
1624143Sjoerg.endif
1724143Sjoerg
1824143SjoergSRCS=	commands.c display.c machine.c screen.c top.c \
1979636Sru	username.c utils.c version.c top.local.h
2024143Sjoerg
2179636SruCLEANFILES+= top.local.h top.x top.1
2224211SacheDPADD=  ${LIBTERMCAP} ${LIBM} ${LIBKVM}
2324211SacheLDADD=  -ltermcap -lm -lkvm
2424143Sjoerg
2579636Srutop.1:	top.x top.local.1
2624664Speter	cat ${.ALLSRC} > top.1
2724664Speter
2879636Sru.SUFFIXES: .X .x .H .h
2979636Sru
3079636Sru.X.x .H.h:
3179636Sru	@${ECHO} Making ${.TARGET} from ${.IMPSRC}
3279636Sru	@sed -e's,%LoadMax%,5.0,g' \
3379636Sru	-e's,%TableSize%,20011,g' \
3479636Sru	-e's,%NominalTopn%,18,g' \
3579636Sru	-e's,%topn%,-1,g' \
3679636Sru	-e's,%delay%,2,g' \
3779636Sru	-e's,%random%,1,g' \
3879636Sru	${.IMPSRC} > ${.TARGET}
3979636Sru
4024143Sjoerg.include <bsd.prog.mk>
41