172952Srwatson# $FreeBSD: releng/11.0/usr.bin/top/Makefile 284345 2015-06-13 19:20:56Z sjg $ 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 13201386SedWARNS?= 0 14201386Sed 1524143Sjoerg# 1624143Sjoerg# The table size should be a prime number approximately twice as 1724143Sjoerg# large as the number of lines in /etc/passwd. The default number 18164784Skeramida# is 20011; use /etc/make.conf to override this. 1924143Sjoerg# 2024143Sjoerg.if defined(TOP_TABLE_SIZE) 2124143SjoergCFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}" 2224143Sjoerg.endif 2324143Sjoerg 24275042SbaptLIBADD= ncursesw m kvm jail 2524143Sjoerg 26164784SkeramidaCLEANFILES= sigdesc.h 27164784SkeramidaSIGCONV_AWK= ${.CURDIR}/../../contrib/top/sigconv.awk 28284345SsjgSTAGED_INCLUDE_DIR?= ${DESTDIR}/usr/include 29284345SsjgSIGNAL_H= ${STAGED_INCLUDE_DIR}/sys/signal.h 30164784Skeramidasigdesc.h: ${SIGCONV_AWK} ${SIGNAL_H} 31164784Skeramida awk -f ${SIGCONV_AWK} < ${SIGNAL_H} > ${.TARGET} 3224143Sjoerg 33164784SkeramidaCLEANFILES+= top.local.h top.x 34284165Smarcel.SUFFIXES: .xs .x .hs .h 35284165Smarcel.xs.x .hs.h: 3679636Sru @${ECHO} Making ${.TARGET} from ${.IMPSRC} 3779636Sru @sed -e's,%LoadMax%,5.0,g' \ 3879636Sru -e's,%TableSize%,20011,g' \ 3979636Sru -e's,%NominalTopn%,18,g' \ 4079636Sru -e's,%topn%,-1,g' \ 4179636Sru -e's,%delay%,2,g' \ 4279636Sru -e's,%random%,1,g' \ 4379636Sru ${.IMPSRC} > ${.TARGET} 4479636Sru 45164784SkeramidaCLEANFILES+= top.1 46164784Skeramidatop.1: top.x top.local.1 47164784Skeramida cat ${.ALLSRC} > ${.TARGET} 48164784Skeramida 4924143Sjoerg.include <bsd.prog.mk> 50