head	1.14;
access;
symbols
	netbsd-11-0-RC4:1.13
	netbsd-11-0-RC3:1.13
	netbsd-11-0-RC2:1.13
	netbsd-11-0-RC1:1.13
	perseant-exfatfs-base-20250801:1.13
	netbsd-11:1.13.0.4
	netbsd-11-base:1.13
	netbsd-10-1-RELEASE:1.12
	perseant-exfatfs-base-20240630:1.13
	perseant-exfatfs:1.13.0.2
	perseant-exfatfs-base:1.13
	netbsd-8-3-RELEASE:1.10
	netbsd-9-4-RELEASE:1.10
	netbsd-10-0-RELEASE:1.12
	netbsd-10-0-RC6:1.12
	netbsd-10-0-RC5:1.12
	netbsd-10-0-RC4:1.12
	netbsd-10-0-RC3:1.12
	netbsd-10-0-RC2:1.12
	netbsd-10-0-RC1:1.12
	netbsd-10:1.12.0.6
	netbsd-10-base:1.12
	netbsd-9-3-RELEASE:1.10
	cjep_sun2x-base1:1.12
	cjep_sun2x:1.12.0.4
	cjep_sun2x-base:1.12
	cjep_staticlib_x-base1:1.12
	netbsd-9-2-RELEASE:1.10
	cjep_staticlib_x:1.12.0.2
	cjep_staticlib_x-base:1.12
	netbsd-9-1-RELEASE:1.10
	phil-wifi-20200421:1.11
	phil-wifi-20200411:1.11
	is-mlppp:1.11.0.2
	is-mlppp-base:1.11
	phil-wifi-20200406:1.11
	netbsd-8-2-RELEASE:1.10
	netbsd-9-0-RELEASE:1.10
	netbsd-9-0-RC2:1.10
	netbsd-9-0-RC1:1.10
	phil-wifi-20191119:1.11
	netbsd-9:1.10.0.18
	netbsd-9-base:1.10
	phil-wifi-20190609:1.10
	netbsd-8-1-RELEASE:1.10
	netbsd-8-1-RC1:1.10
	pgoyette-compat-merge-20190127:1.10
	pgoyette-compat-20190127:1.10
	pgoyette-compat-20190118:1.10
	pgoyette-compat-1226:1.10
	pgoyette-compat-1126:1.10
	pgoyette-compat-1020:1.10
	pgoyette-compat-0930:1.10
	pgoyette-compat-0906:1.10
	netbsd-7-2-RELEASE:1.9
	pgoyette-compat-0728:1.10
	netbsd-8-0-RELEASE:1.10
	phil-wifi:1.10.0.16
	phil-wifi-base:1.10
	pgoyette-compat-0625:1.10
	netbsd-8-0-RC2:1.10
	pgoyette-compat-0521:1.10
	pgoyette-compat-0502:1.10
	pgoyette-compat-0422:1.10
	netbsd-8-0-RC1:1.10
	pgoyette-compat-0415:1.10
	pgoyette-compat-0407:1.10
	pgoyette-compat-0330:1.10
	pgoyette-compat-0322:1.10
	pgoyette-compat-0315:1.10
	netbsd-7-1-2-RELEASE:1.9
	pgoyette-compat:1.10.0.14
	pgoyette-compat-base:1.10
	netbsd-7-1-1-RELEASE:1.9
	matt-nb8-mediatek:1.10.0.12
	matt-nb8-mediatek-base:1.10
	perseant-stdc-iso10646:1.10.0.10
	perseant-stdc-iso10646-base:1.10
	netbsd-8:1.10.0.8
	netbsd-8-base:1.10
	prg-localcount2-base3:1.10
	prg-localcount2-base2:1.10
	prg-localcount2-base1:1.10
	prg-localcount2:1.10.0.6
	prg-localcount2-base:1.10
	pgoyette-localcount-20170426:1.10
	bouyer-socketcan-base1:1.10
	pgoyette-localcount-20170320:1.10
	netbsd-7-1:1.9.0.14
	netbsd-7-1-RELEASE:1.9
	netbsd-7-1-RC2:1.9
	netbsd-7-nhusb-base-20170116:1.9
	bouyer-socketcan:1.10.0.4
	bouyer-socketcan-base:1.10
	pgoyette-localcount-20170107:1.10
	netbsd-7-1-RC1:1.9
	pgoyette-localcount-20161104:1.10
	netbsd-7-0-2-RELEASE:1.9
	localcount-20160914:1.10
	netbsd-7-nhusb:1.9.0.12
	netbsd-7-nhusb-base:1.9
	pgoyette-localcount-20160806:1.10
	pgoyette-localcount-20160726:1.10
	pgoyette-localcount:1.10.0.2
	pgoyette-localcount-base:1.10
	netbsd-7-0-1-RELEASE:1.9
	netbsd-7-0:1.9.0.10
	netbsd-7-0-RELEASE:1.9
	netbsd-7-0-RC3:1.9
	netbsd-7-0-RC2:1.9
	netbsd-7-0-RC1:1.9
	netbsd-5-2-3-RELEASE:1.2
	netbsd-5-1-5-RELEASE:1.2
	netbsd-6-0-6-RELEASE:1.7
	netbsd-6-1-5-RELEASE:1.7
	netbsd-7:1.9.0.8
	netbsd-7-base:1.9
	yamt-pagecache-base9:1.9
	yamt-pagecache-tag8:1.7
	netbsd-6-1-4-RELEASE:1.7
	netbsd-6-0-5-RELEASE:1.7
	tls-earlyentropy:1.9.0.6
	tls-earlyentropy-base:1.9
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.9
	riastradh-drm2-base3:1.9
	netbsd-6-1-3-RELEASE:1.7
	netbsd-6-0-4-RELEASE:1.7
	netbsd-5-2-2-RELEASE:1.2
	netbsd-5-1-4-RELEASE:1.2
	netbsd-6-1-2-RELEASE:1.7
	netbsd-6-0-3-RELEASE:1.7
	netbsd-5-2-1-RELEASE:1.2
	netbsd-5-1-3-RELEASE:1.2
	netbsd-6-1-1-RELEASE:1.7
	riastradh-drm2-base2:1.9
	riastradh-drm2-base1:1.9
	riastradh-drm2:1.9.0.4
	riastradh-drm2-base:1.9
	netbsd-6-1:1.7.0.14
	netbsd-6-0-2-RELEASE:1.7
	netbsd-6-1-RELEASE:1.7
	netbsd-6-1-RC4:1.7
	netbsd-6-1-RC3:1.7
	agc-symver:1.9.0.2
	agc-symver-base:1.9
	netbsd-6-1-RC2:1.7
	netbsd-6-1-RC1:1.7
	yamt-pagecache-base8:1.7
	netbsd-5-2:1.2.0.14
	netbsd-6-0-1-RELEASE:1.7
	yamt-pagecache-base7:1.7
	netbsd-5-2-RELEASE:1.2
	netbsd-5-2-RC1:1.2
	matt-nb6-plus-nbase:1.7
	yamt-pagecache-base6:1.7
	netbsd-6-0:1.7.0.10
	netbsd-6-0-RELEASE:1.7
	netbsd-6-0-RC2:1.7
	tls-maxphys:1.7.0.8
	tls-maxphys-base:1.9
	matt-nb6-plus:1.7.0.6
	matt-nb6-plus-base:1.7
	netbsd-6-0-RC1:1.7
	yamt-pagecache-base5:1.7
	yamt-pagecache-base4:1.7
	netbsd-6:1.7.0.4
	netbsd-6-base:1.7
	netbsd-5-1-2-RELEASE:1.2
	netbsd-5-1-1-RELEASE:1.2
	yamt-pagecache-base3:1.7
	yamt-pagecache-base2:1.7
	yamt-pagecache:1.7.0.2
	yamt-pagecache-base:1.7
	cherry-xenmp:1.5.0.4
	cherry-xenmp-base:1.5
	bouyer-quota2-nbase:1.5
	bouyer-quota2:1.5.0.2
	bouyer-quota2-base:1.5
	matt-mips64-premerge-20101231:1.5
	matt-nb5-mips64-premerge-20101231:1.2
	matt-nb5-pq3:1.2.0.12
	matt-nb5-pq3-base:1.2
	netbsd-5-1:1.2.0.10
	netbsd-5-1-RELEASE:1.2
	netbsd-5-1-RC4:1.2
	matt-nb5-mips64-k15:1.2
	netbsd-5-1-RC3:1.2
	netbsd-5-1-RC2:1.2
	netbsd-5-1-RC1:1.2
	netbsd-5-0-2-RELEASE:1.2
	matt-nb5-mips64-premerge-20091211:1.2
	matt-premerge-20091211:1.4
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.2
	matt-nb4-mips64-k7-u2a-k9b:1.2
	matt-nb5-mips64-u1-k1-k5:1.2
	matt-nb5-mips64:1.2.0.8
	netbsd-5-0-1-RELEASE:1.2
	jym-xensuspend-nbase:1.4
	netbsd-5-0:1.2.0.6
	netbsd-5-0-RELEASE:1.2
	netbsd-5-0-RC4:1.2
	netbsd-5-0-RC3:1.2
	netbsd-5-0-RC2:1.2
	jym-xensuspend:1.3.0.2
	jym-xensuspend-base:1.4
	netbsd-5-0-RC1:1.2
	haad-dm-base:1.2
	haad-dm-base2:1.2
	haad-nbase2:1.2
	netbsd-5:1.2.0.4
	netbsd-5-base:1.2
	matt-mips64-base2:1.2
	haad-dm:1.2.0.2
	haad-dm-base1:1.1
	wrstuden-revivesa-base-3:1.1
	wrstuden-revivesa:1.1.0.2
	wrstuden-revivesa-base-2:1.1;
locks; strict;
comment	@# @;


1.14
date	2025.09.18.03.36.00;	author mrg;	state Exp;
branches;
next	1.13;
commitid	RQc1sc69acbZ59bG;

1.13
date	2023.06.03.09.09.05;	author lukem;	state Exp;
branches;
next	1.12;
commitid	aBaIRnuykonRStrE;

1.12
date	2021.04.13.01.11.05;	author mrg;	state Exp;
branches;
next	1.11;
commitid	ef9WrF92iagjl4PC;

1.11
date	2019.10.13.07.28.07;	author mrg;	state Exp;
branches;
next	1.10;
commitid	vRNwN94v7NgB2GGB;

1.10
date	2016.01.23.21.22.45;	author christos;	state Exp;
branches
	1.10.16.1;
next	1.9;
commitid	0voYFcZKKnOpl6Sy;

1.9
date	2013.03.21.21.43.22;	author christos;	state Exp;
branches;
next	1.8;

1.8
date	2013.03.21.02.04.05;	author christos;	state Exp;
branches;
next	1.7;

1.7
date	2011.09.16.16.41.21;	author joerg;	state Exp;
branches;
next	1.6;

1.6
date	2011.08.14.12.48.02;	author christos;	state Exp;
branches;
next	1.5;

1.5
date	2010.02.03.15.34.38;	author roy;	state Exp;
branches;
next	1.4;

1.4
date	2009.05.05.18.49.49;	author christos;	state Exp;
branches;
next	1.3;

1.3
date	2008.12.13.12.21.50;	author chris;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2008.10.19.22.05.20;	author apb;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	2008.07.17.10.46.56;	author lukem;	state Exp;
branches
	1.1.2.1;
next	;

1.10.16.1
date	2020.04.13.07.56.33;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;

1.3.2.1
date	2009.05.13.18.52.38;	author jym;	state Exp;
branches;
next	;

1.2.2.1
date	2008.10.19.22.05.20;	author haad;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	2008.10.19.22.40.52;	author haad;	state Exp;
branches;
next	;

1.1.2.1
date	2008.07.17.10.46.56;	author wrstuden;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2008.09.18.05.15.50;	author wrstuden;	state Exp;
branches;
next	;


desc
@@


1.14
log
@introduce a couple of new turn-off-gcc-warning variables and use them.

GCC 14 has a new annoying calloc() checker that we turn off in a bunch
of places, and there are a few more dangling-pointer issuse that come up,
but seem bogus.
@
text
@#	$NetBSD: Makefile,v 1.13 2023/06/03 09:09:05 lukem Exp $

.include <bsd.own.mk>

PROG=	top
BINDIR=	/usr/bin

TOPDIR=${.CURDIR}/../dist
.PATH:	${TOPDIR} ${TOPDIR}/machine

WARNS=	4
CWARNFLAGS+=	-Wno-missing-noreturn

CPPFLAGS+=-I${.CURDIR} -I${TOPDIR} -I. -D_KERNTYPES
SRCS=	color.c commands.c display.c hash.c screen.c \
	top.c username.c utils.c version.c m_netbsd.c
DPSRCS+=sigdesc.h config.h

LDADD+=	-lterminfo -lm -lkvm -lutil
DPADD+=	${LIBTERMINFO} ${LIBM} ${LIBKVM} ${LIBUTIL}

sigdesc.h: ${TOPDIR}/sigconv.awk ${DESTDIR}/usr/include/sys/signal.h
	${_MKTARGET_CREATE}
	${TOOL_AWK} -f ${TOPDIR}/sigconv.awk \
	    ${DESTDIR}/usr/include/sys/signal.h > ${.TARGET}
CLEANFILES+= sigdesc.h top.1 config.h

top.1: top.1.in
	${TOOL_SED} -e s/@@DEFAULT_TOPN@@/-1/ \
		-e s/@@DEFAULT_DELAY@@/5/ \
		-e s/@@HAVE_GETOPT_LONG@@/1/ \
		-e s/@@ENABLE_KILL@@/1/ \
		-e s/@@MAN_SUPPLEMENT@@// < $? > $@@

commands.c: sigdesc.h

config.h: config.h.in
	${TOOL_SED} -e s/@@MACHINE@@/${MACHINE}/ < $? > $@@

COPTS.display.c = -Wno-format-nonliteral

COPTS.commands.c+=	${CC_WNO_CAST_FUNCTION_TYPE}
COPTS.m_netbsd.c+=	${CC_WNO_CALLOC_TRANSPOSED_ARGS}

COPTS+=		-fcommon

.include <bsd.prog.mk>
@


1.13
log
@bsd.own.mk: rename GCC_NO_* to CC_WNO_*

Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.12 2021/04/13 01:11:05 mrg Exp $
d43 1
@


1.12
log
@apply -fcommon to sources that still rely upon it.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.11 2019/10/13 07:28:07 mrg Exp $
d42 1
a42 1
COPTS.commands.c+=	${GCC_NO_CAST_FUNCTION_TYPE}
@


1.11
log
@introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.10 2016/01/23 21:22:45 christos Exp $
d44 2
@


1.10
log
@Define _KERNTYPES for things that need it.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2013/03/21 21:43:22 christos Exp $
d41 3
@


1.10.16.1
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d1 1
a1 1
#	$NetBSD$
a40 3

COPTS.commands.c+=	${GCC_NO_CAST_FUNCTION_TYPE}

@


1.9
log
@mandoc can now print numbered registers.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2013/03/21 02:04:05 christos Exp $
d14 1
a14 1
CPPFLAGS+=-I${.CURDIR} -I${TOPDIR} -I.
@


1.8
log
@The man page has numbered registers and conditionals and cannot be handled
by mandoc, so make it use groff. Unfortunately since we don't install cat
pages, this does not work. At least it works for html!
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2011/09/16 16:41:21 joerg Exp $
a6 1
NOMANDOC=	yes
@


1.7
log
@Disable noreturn checks for remaining external code
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2011/08/14 12:48:02 christos Exp $
d7 1
@


1.6
log
@document that display.c uses non-literal format strings
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2010/02/03 15:34:38 roy Exp $
d12 1
@


1.5
log
@Userland now builds and uses terminfo instead of termcap.

OK: core@@, jdc@@
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2009/05/05 18:49:49 christos Exp $
d39 1
@


1.4
log
@WARNS=4
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2008/12/13 12:21:50 chris Exp $
d18 2
a19 2
LDADD+=	-ltermcap -lm -lkvm -lutil
DPADD+=	${LIBTERMCAP} ${LIBM} ${LIBKVM} ${LIBUTIL}
@


1.3
log
@Add -lutil to allow linking to find the e-functions.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2008/10/19 22:05:20 apb Exp $
d11 1
a11 1
WARNS=	0
@


1.3.2.1
log
@Sync with HEAD.

Second commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2009/05/05 18:49:49 christos Exp $
d11 1
a11 1
WARNS=	4
@


1.2
log
@Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2008/07/17 10:46:56 lukem Exp $
d18 2
a19 2
LDADD+=	-ltermcap -lm -lkvm
DPADD+=	${LIBTERMCAP} ${LIBM} ${LIBKVM}
@


1.2.2.1
log
@file Makefile was added on branch haad-dm on 2008-10-19 22:40:52 +0000
@
text
@d1 39
@


1.2.2.2
log
@Sync with HEAD.
@
text
@a0 39
#	$NetBSD: Makefile,v 1.1 2008/07/17 10:46:56 lukem Exp $

.include <bsd.own.mk>

PROG=	top
BINDIR=	/usr/bin

TOPDIR=${.CURDIR}/../dist
.PATH:	${TOPDIR} ${TOPDIR}/machine

WARNS=	0

CPPFLAGS+=-I${.CURDIR} -I${TOPDIR} -I.
SRCS=	color.c commands.c display.c hash.c screen.c \
	top.c username.c utils.c version.c m_netbsd.c
DPSRCS+=sigdesc.h config.h

LDADD+=	-ltermcap -lm -lkvm
DPADD+=	${LIBTERMCAP} ${LIBM} ${LIBKVM}

sigdesc.h: ${TOPDIR}/sigconv.awk ${DESTDIR}/usr/include/sys/signal.h
	${_MKTARGET_CREATE}
	awk -f ${TOPDIR}/sigconv.awk ${DESTDIR}/usr/include/sys/signal.h > \
	    ${.TARGET}
CLEANFILES+= sigdesc.h top.1 config.h

top.1: top.1.in
	${TOOL_SED} -e s/@@DEFAULT_TOPN@@/-1/ \
		-e s/@@DEFAULT_DELAY@@/5/ \
		-e s/@@HAVE_GETOPT_LONG@@/1/ \
		-e s/@@ENABLE_KILL@@/1/ \
		-e s/@@MAN_SUPPLEMENT@@// < $? > $@@

commands.c: sigdesc.h

config.h: config.h.in
	${TOOL_SED} -e s/@@MACHINE@@/${MACHINE}/ < $? > $@@

.include <bsd.prog.mk>
@


1.1
log
@Move usr.bin/top/Makefile -> bin/Makefile, and tweak accordingly:
- bin (instead of usr.bin) follows ../README
- no point having a sub-subdir for a single reachover (bin vs bin/top),
  although we could debate the pros & cons of that endlessly.
@
text
@d1 1
a1 1
#	$NetBSD$
d23 2
a24 2
	awk -f ${TOPDIR}/sigconv.awk ${DESTDIR}/usr/include/sys/signal.h > \
	    ${.TARGET}
@


1.1.2.1
log
@file Makefile was added on branch wrstuden-revivesa on 2008-09-18 05:15:50 +0000
@
text
@d1 39
@


1.1.2.2
log
@Sync with wrstuden-revivesa-base-2.
@
text
@a0 39
#	$NetBSD: Makefile,v 1.1 2008/07/17 10:46:56 lukem Exp $

.include <bsd.own.mk>

PROG=	top
BINDIR=	/usr/bin

TOPDIR=${.CURDIR}/../dist
.PATH:	${TOPDIR} ${TOPDIR}/machine

WARNS=	0

CPPFLAGS+=-I${.CURDIR} -I${TOPDIR} -I.
SRCS=	color.c commands.c display.c hash.c screen.c \
	top.c username.c utils.c version.c m_netbsd.c
DPSRCS+=sigdesc.h config.h

LDADD+=	-ltermcap -lm -lkvm
DPADD+=	${LIBTERMCAP} ${LIBM} ${LIBKVM}

sigdesc.h: ${TOPDIR}/sigconv.awk ${DESTDIR}/usr/include/sys/signal.h
	${_MKTARGET_CREATE}
	awk -f ${TOPDIR}/sigconv.awk ${DESTDIR}/usr/include/sys/signal.h > \
	    ${.TARGET}
CLEANFILES+= sigdesc.h top.1 config.h

top.1: top.1.in
	${TOOL_SED} -e s/@@DEFAULT_TOPN@@/-1/ \
		-e s/@@DEFAULT_DELAY@@/5/ \
		-e s/@@HAVE_GETOPT_LONG@@/1/ \
		-e s/@@ENABLE_KILL@@/1/ \
		-e s/@@MAN_SUPPLEMENT@@// < $? > $@@

commands.c: sigdesc.h

config.h: config.h.in
	${TOOL_SED} -e s/@@MACHINE@@/${MACHINE}/ < $? > $@@

.include <bsd.prog.mk>
@
