Makefile revision 164784
172952Srwatson# $FreeBSD: head/usr.bin/top/Makefile 164784 2006-12-01 07:01:19Z keramida $
224143Sjoerg
324143SjoergTOPDIR=	${.CURDIR}/../../contrib/top
4164784Skeramida.PATH: ${TOPDIR}
524143Sjoerg
6164784SkeramidaPROG=	top
7164784SkeramidaSRCS=	commands.c display.c machine.c screen.c top.c \
8164784Skeramida	username.c utils.c version.c
9164784SkeramidaSRCS+=	sigdesc.h top.local.h
10164784SkeramidaCFLAGS+= -DHAVE_GETOPT -DHAVE_STRERROR -DORDER
11164784SkeramidaCFLAGS+= -I${.CURDIR} -I${TOPDIR} -I.
1224143Sjoerg
1324143Sjoerg#
1424143Sjoerg# The table size should be a prime number approximately twice as
1524143Sjoerg# large as the number of lines in /etc/passwd.  The default number
16164784Skeramida# is 20011; use /etc/make.conf to override this.
1724143Sjoerg#
1824143Sjoerg.if defined(TOP_TABLE_SIZE)
1924143SjoergCFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}"
2024143Sjoerg.endif
2124143Sjoerg
22164784SkeramidaDPADD=	${LIBTERMCAP} ${LIBM} ${LIBKVM}
23164784SkeramidaLDADD=	-ltermcap -lm -lkvm
2424143Sjoerg
25164784SkeramidaCLEANFILES= sigdesc.h
26164784SkeramidaSIGCONV_AWK= ${.CURDIR}/../../contrib/top/sigconv.awk
27164784SkeramidaSIGNAL_H= ${DESTDIR}/usr/include/sys/signal.h
28164784Skeramidasigdesc.h: ${SIGCONV_AWK} ${SIGNAL_H}
29164784Skeramida	awk -f ${SIGCONV_AWK} < ${SIGNAL_H} > ${.TARGET}
3024143Sjoerg
31164784SkeramidaCLEANFILES+= top.local.h top.x
3279636Sru.SUFFIXES: .X .x .H .h
3379636Sru.X.x .H.h:
3479636Sru	@${ECHO} Making ${.TARGET} from ${.IMPSRC}
3579636Sru	@sed -e's,%LoadMax%,5.0,g' \
3679636Sru	-e's,%TableSize%,20011,g' \
3779636Sru	-e's,%NominalTopn%,18,g' \
3879636Sru	-e's,%topn%,-1,g' \
3979636Sru	-e's,%delay%,2,g' \
4079636Sru	-e's,%random%,1,g' \
4179636Sru	${.IMPSRC} > ${.TARGET}
4279636Sru
43164784SkeramidaCLEANFILES+= top.1
44164784Skeramidatop.1: top.x top.local.1
45164784Skeramida	cat ${.ALLSRC} > ${.TARGET}
46164784Skeramida
4724143Sjoerg.include <bsd.prog.mk>
48