head	1.8;
access;
symbols
	netbsd-11-0-RC3:1.8
	netbsd-11-0-RC2:1.8
	netbsd-11-0-RC1:1.8
	perseant-exfatfs-base-20250801:1.8
	netbsd-11:1.8.0.8
	netbsd-11-base:1.8
	netbsd-10-1-RELEASE:1.6
	perseant-exfatfs-base-20240630:1.8
	perseant-exfatfs:1.8.0.6
	perseant-exfatfs-base:1.8
	netbsd-8-3-RELEASE:1.2
	netbsd-9-4-RELEASE:1.3
	netbsd-10-0-RELEASE:1.6
	netbsd-10-0-RC6:1.6
	netbsd-10-0-RC5:1.6
	netbsd-10-0-RC4:1.6
	netbsd-10-0-RC3:1.6
	netbsd-10-0-RC2:1.6
	thorpej-ifq:1.8.0.4
	thorpej-ifq-base:1.8
	thorpej-altq-separation:1.8.0.2
	thorpej-altq-separation-base:1.8
	netbsd-10-0-RC1:1.6
	netbsd-10:1.6.0.20
	netbsd-10-base:1.6
	bouyer-sunxi-drm:1.6.0.18
	bouyer-sunxi-drm-base:1.6
	netbsd-9-3-RELEASE:1.3
	thorpej-i2c-spi-conf2:1.6.0.16
	thorpej-i2c-spi-conf2-base:1.6
	thorpej-futex2:1.6.0.14
	thorpej-futex2-base:1.6
	thorpej-cfargs2:1.6.0.12
	thorpej-cfargs2-base:1.6
	cjep_sun2x-base1:1.6
	cjep_sun2x:1.6.0.10
	cjep_sun2x-base:1.6
	cjep_staticlib_x-base1:1.6
	netbsd-9-2-RELEASE:1.3
	cjep_staticlib_x:1.6.0.8
	cjep_staticlib_x-base:1.6
	thorpej-i2c-spi-conf:1.6.0.6
	thorpej-i2c-spi-conf-base:1.6
	thorpej-cfargs:1.6.0.4
	thorpej-cfargs-base:1.6
	thorpej-futex:1.6.0.2
	thorpej-futex-base:1.6
	netbsd-9-1-RELEASE:1.3
	bouyer-xenpvh-base2:1.3
	phil-wifi-20200421:1.3
	bouyer-xenpvh-base1:1.3
	phil-wifi-20200411:1.3
	bouyer-xenpvh:1.3.0.10
	bouyer-xenpvh-base:1.3
	is-mlppp:1.3.0.8
	is-mlppp-base:1.3
	phil-wifi-20200406:1.3
	netbsd-8-2-RELEASE:1.2
	ad-namecache-base3:1.3
	netbsd-9-0-RELEASE:1.3
	netbsd-9-0-RC2:1.3
	ad-namecache-base2:1.3
	ad-namecache-base1:1.3
	ad-namecache:1.3.0.6
	ad-namecache-base:1.3
	netbsd-9-0-RC1:1.3
	phil-wifi-20191119:1.3
	netbsd-9:1.3.0.4
	netbsd-9-base:1.3
	phil-wifi-20190609:1.3
	netbsd-8-1-RELEASE:1.2
	netbsd-8-1-RC1:1.2
	isaki-audio2:1.3.0.2
	isaki-audio2-base:1.3
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	pgoyette-compat-0728:1.2
	netbsd-8-0-RELEASE:1.2
	phil-wifi:1.2.0.22
	phil-wifi-base:1.2
	pgoyette-compat-0625:1.2
	netbsd-8-0-RC2:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	netbsd-8-0-RC1:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	pgoyette-compat:1.2.0.20
	pgoyette-compat-base:1.2
	tls-maxphys:1.2.0.18
	tls-maxphys-base-20171202:1.2
	matt-nb8-mediatek:1.2.0.16
	matt-nb8-mediatek-base:1.2
	nick-nhusb-base-20170825:1.2
	perseant-stdc-iso10646:1.2.0.14
	perseant-stdc-iso10646-base:1.2
	netbsd-8:1.2.0.12
	netbsd-8-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.10
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	jdolecek-ncq:1.2.0.8
	jdolecek-ncq-base:1.2
	pgoyette-localcount-20170320:1.2
	nick-nhusb-base-20170204:1.2
	bouyer-socketcan:1.2.0.6
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	nick-nhusb-base-20161204:1.2
	pgoyette-localcount-20161104:1.2
	nick-nhusb-base-20161004:1.2
	localcount-20160914:1.2
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.4
	pgoyette-localcount-base:1.2
	nick-nhusb:1.2.0.2
	nick-nhusb-base-20160907:1.2;
locks; strict;
comment	@# @;


1.8
date	2023.06.03.08.52.58;	author lukem;	state Exp;
branches;
next	1.7;
commitid	JFrjk5m11qFkNtrE;

1.7
date	2023.05.29.20.31.10;	author lukem;	state Exp;
branches;
next	1.6;
commitid	7eoavsrzwYTQNTqE;

1.6
date	2020.10.18.19.56.42;	author christos;	state Exp;
branches;
next	1.5;
commitid	GCwWkaUGU2G7gqsC;

1.5
date	2020.10.18.15.02.12;	author christos;	state Exp;
branches;
next	1.4;
commitid	mpq4hNChxjd9DosC;

1.4
date	2020.10.18.14.33.40;	author christos;	state Exp;
branches;
next	1.3;
commitid	y7h4QnaA219rtosC;

1.3
date	2019.02.17.04.05.53;	author rin;	state Exp;
branches;
next	1.2;
commitid	viEUadQYccaOx4cB;

1.2
date	2016.06.13.20.03.07;	author ryoon;	state Exp;
branches
	1.2.2.1
	1.2.18.1
	1.2.22.1;
next	1.1;
commitid	wuOeLeSJQvkZklaz;

1.1
date	2016.06.09.04.44.19;	author pgoyette;	state Exp;
branches;
next	;
commitid	TJJuV2OchHNRnK9z;

1.2.2.1
date	2016.06.13.20.03.07;	author skrll;	state dead;
branches;
next	1.2.2.2;
commitid	6Uo6zNa4c5W4AGdz;

1.2.2.2
date	2016.07.09.20.25.21;	author skrll;	state Exp;
branches;
next	;
commitid	6Uo6zNa4c5W4AGdz;

1.2.18.1
date	2016.06.13.20.03.07;	author jdolecek;	state dead;
branches;
next	1.2.18.2;
commitid	XcIYRZTAh1LmerhA;

1.2.18.2
date	2017.12.03.11.38.56;	author jdolecek;	state Exp;
branches;
next	;
commitid	XcIYRZTAh1LmerhA;

1.2.22.1
date	2019.06.10.22.09.30;	author christos;	state Exp;
branches;
next	;
commitid	jtc8rnCzWiEEHGqB;


desc
@@


1.8
log
@bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER

Provide a single variable
	CC_WNO_ADDRESS_OF_PACKED_MEMBER
with options for both clang and gcc, to replace
	CLANG_NO_ADDR_OF_PACKED_MEMBER
	CC_NO_ADDR_OF_PACKED_MEMBER
	GCC_NO_ADDR_OF_PACKED_MEMBER

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
@
text
@#	$NetBSD: Makefile,v 1.7 2023/05/29 20:31:10 lukem Exp $
#

.include "../Makefile.inc"

.PATH:	${S}/external/bsd/ipf/netinet

KMOD=	ipl	# Use "formal" name of ipfilter device to enable autoload

# Options for opt_ipfilter.h

CPPFLAGS+=	-DIPFILTER_LOG		# logging of ip packets
#CPPFLAGS+=	-DIPFILTER_DEFAULT_BLOCK
#CPPFLAGS+=	-DIPFILTER_BPF		# BPF opcodes in rules
#CPPFLAGS+=	-DIPFILTER_CKSUM	# check layer 4 checksums
#CPPFLAGS+=	-DIPFILTER_COMPILED	# support for compiled IPF rules
CPPFLAGS+=	-DIPFILTER_LOOKUP	# support for ippool(8)
#CPPFLAGS+=	-DIPFILTER_SCAN		# scanning of packet contents
#CPPFLAGS+=	-DIPFILTER_SYNC		# synchronisation of state 
CPPFLAGS+=	-DIPFILTER_COMPAT	# IPFilter version compat.

# IPFILTER_LOGSIZE	# size of logging buffer
# IPSTATE_MAX		# maximum number of references to state table entry
# IPSTATE_SIZE		# size of state hash table
# NAT_TABLE_MAX		# maximum number of NAT state entries
# NAT_TABLE_SZ		# size of NAT state hash table
# NAT_SIZE		# size of nat rules hash table
# RDR_SIZE		# size of rdr rules hash table
# HOSTMAP_SIZE		# size of hostmap hash table

CPPFLAGS+=	-I$S/external/bsd/ipf

# Other options:

CPPFLAGS+=	-DINET			# opt_inet.h
CPPFLAGS+=	-DINET6			# opt_inet.h
CPPFLAGS+=	-DIPSEC			# opt_ipsec.h

SRCS+=	fil.c
SRCS+=	ip_auth.c
SRCS+=	ip_dstlist.c
SRCS+=	ip_fil_netbsd.c
SRCS+=	ip_frag.c
SRCS+=	ip_htable.c
SRCS+=	ip_log.c
SRCS+=	ip_lookup.c
SRCS+=	ip_nat.c
SRCS+=	ip_nat6.c
SRCS+=	ip_pool.c
SRCS+=	ip_proxy.c
SRCS+=	ip_scan.c
SRCS+=	ip_state.c
SRCS+=	ip_sync.c
SRCS+=	ip_fil_compat.c
SRCS+=	radix_ipf.c

WARNS=	3

CWARNFLAGS.clang+=	-Wno-self-assign
COPTS.fil.c+=		${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
COPTS.ip_fil_netbsd.c+=	${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
COPTS.ip_htable.c+=	${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
COPTS.ip_nat.c+=	${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
COPTS.ip_nat6.c+=	${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
COPTS.ip_proxy.c+=	${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
COPTS.ip_state.c+=	${CC_WNO_ADDRESS_OF_PACKED_MEMBER}

.include <bsd.kmodule.mk>
@


1.7
log
@bsd.own.mk: rename NO_ADDR_OF_PACKED_MEMBER to CC_NO_ADDR_OF_PACKED_MEMBER

Add "CC_" prefix to NO_ADDR_OF_PACKED_MEMBER.

We now have the following convention:
GCC_NO_*: Disable specific warnings from GCC.
CLANG_NO_*: Disable specific warnings from Clang.
CC_NO_*: Disable specific warnings from both Clang and GCC.

This reserves "NO_*" Makefile variables to disable other features.

Some space->tab fixes.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2020/10/18 19:56:42 christos Exp $
d60 7
a66 7
COPTS.fil.c+=		${CC_NO_ADDR_OF_PACKED_MEMBER}
COPTS.ip_fil_netbsd.c+=	${CC_NO_ADDR_OF_PACKED_MEMBER}
COPTS.ip_htable.c+=	${CC_NO_ADDR_OF_PACKED_MEMBER}
COPTS.ip_nat.c+=	${CC_NO_ADDR_OF_PACKED_MEMBER}
COPTS.ip_nat6.c+=	${CC_NO_ADDR_OF_PACKED_MEMBER}
COPTS.ip_proxy.c+=	${CC_NO_ADDR_OF_PACKED_MEMBER}
COPTS.ip_state.c+=	${CC_NO_ADDR_OF_PACKED_MEMBER}
@


1.6
log
@Provide a global no-packed-address for both gcc and clang
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2020/10/18 15:02:12 christos Exp $
d60 7
a66 7
COPTS.fil.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
COPTS.ip_fil_netbsd.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
COPTS.ip_htable.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
COPTS.ip_nat.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
COPTS.ip_nat6.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
COPTS.ip_proxy.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
COPTS.ip_state.c+=   ${NO_ADDR_OF_PACKED_MEMBER}
@


1.5
log
@use the GCC_ warning variable
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2020/10/18 14:33:40 christos Exp $
d60 7
a66 7
CWARNFLAGS.fil.c+=   ${GCC_NO_ADDR_OF_PACKED_MEMBER}
CWARNFLAGS.ip_fil_netbsd.c+=   ${GCC_NO_ADDR_OF_PACKED_MEMBER}
CWARNFLAGS.ip_htable.c+=   ${GCC_NO_ADDR_OF_PACKED_MEMBER}
CWARNFLAGS.ip_nat.c+=   ${GCC_NO_ADDR_OF_PACKED_MEMBER}
CWARNFLAGS.ip_nat6.c+=   ${GCC_NO_ADDR_OF_PACKED_MEMBER}
CWARNFLAGS.ip_proxy.c+=   ${GCC_NO_ADDR_OF_PACKED_MEMBER}
CWARNFLAGS.ip_state.c+=   ${GCC_NO_ADDR_OF_PACKED_MEMBER}
@


1.4
log
@Avoid alignment of packed member
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2019/02/17 04:05:53 rin Exp $
d60 7
a66 7
COPTS.fil.c += -Wno-error=address-of-packed-member
COPTS.ip_fil_netbsd.c += -Wno-error=address-of-packed-member
COPTS.ip_htable.c += -Wno-error=address-of-packed-member
COPTS.ip_nat.c += -Wno-error=address-of-packed-member
COPTS.ip_nat6.c += -Wno-error=address-of-packed-member
COPTS.ip_proxy.c += -Wno-error=address-of-packed-member
COPTS.ip_state.c += -Wno-error=address-of-packed-member
@


1.3
log
@Bump default value of WARNS for modules from 3 to 5, and
explicitly set WARNS for modules that fail with WARNS=5.

Also, turn on -Wno-missing-noreturn for clang for some files.

At the moment, among ~ 360 modules,
- 2 (lua and zfs) need WARNS=0
- 1 (solaris) needs WARNS=1
- 136 need WARNS=3 (mostly due to sign-compare)
- 4 need WARNS=4
- others can be compiled with WARNS=5

Discussed on tech-kern.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2016/06/13 20:03:07 ryoon Exp $
d60 7
@


1.2
log
@Fix buld with clang, add warning option exceptions
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2016/06/09 04:44:19 pgoyette Exp $
d57 2
@


1.2.22.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2019/02/17 04:05:53 rin Exp $
a56 2
WARNS=	3

@


1.2.18.1
log
@file Makefile was added on branch tls-maxphys on 2017-12-03 11:38:56 +0000
@
text
@d1 59
@


1.2.18.2
log
@update from HEAD
@
text
@a0 59
#	$NetBSD$
#

.include "../Makefile.inc"

.PATH:	${S}/external/bsd/ipf/netinet

KMOD=	ipl	# Use "formal" name of ipfilter device to enable autoload

# Options for opt_ipfilter.h

CPPFLAGS+=	-DIPFILTER_LOG		# logging of ip packets
#CPPFLAGS+=	-DIPFILTER_DEFAULT_BLOCK
#CPPFLAGS+=	-DIPFILTER_BPF		# BPF opcodes in rules
#CPPFLAGS+=	-DIPFILTER_CKSUM	# check layer 4 checksums
#CPPFLAGS+=	-DIPFILTER_COMPILED	# support for compiled IPF rules
CPPFLAGS+=	-DIPFILTER_LOOKUP	# support for ippool(8)
#CPPFLAGS+=	-DIPFILTER_SCAN		# scanning of packet contents
#CPPFLAGS+=	-DIPFILTER_SYNC		# synchronisation of state 
CPPFLAGS+=	-DIPFILTER_COMPAT	# IPFilter version compat.

# IPFILTER_LOGSIZE	# size of logging buffer
# IPSTATE_MAX		# maximum number of references to state table entry
# IPSTATE_SIZE		# size of state hash table
# NAT_TABLE_MAX		# maximum number of NAT state entries
# NAT_TABLE_SZ		# size of NAT state hash table
# NAT_SIZE		# size of nat rules hash table
# RDR_SIZE		# size of rdr rules hash table
# HOSTMAP_SIZE		# size of hostmap hash table

CPPFLAGS+=	-I$S/external/bsd/ipf

# Other options:

CPPFLAGS+=	-DINET			# opt_inet.h
CPPFLAGS+=	-DINET6			# opt_inet.h
CPPFLAGS+=	-DIPSEC			# opt_ipsec.h

SRCS+=	fil.c
SRCS+=	ip_auth.c
SRCS+=	ip_dstlist.c
SRCS+=	ip_fil_netbsd.c
SRCS+=	ip_frag.c
SRCS+=	ip_htable.c
SRCS+=	ip_log.c
SRCS+=	ip_lookup.c
SRCS+=	ip_nat.c
SRCS+=	ip_nat6.c
SRCS+=	ip_pool.c
SRCS+=	ip_proxy.c
SRCS+=	ip_scan.c
SRCS+=	ip_state.c
SRCS+=	ip_sync.c
SRCS+=	ip_fil_compat.c
SRCS+=	radix_ipf.c

CWARNFLAGS.clang+=	-Wno-self-assign

.include <bsd.kmodule.mk>
@


1.2.2.1
log
@file Makefile was added on branch nick-nhusb on 2016-07-09 20:25:21 +0000
@
text
@d1 59
@


1.2.2.2
log
@Sync with HEAD
@
text
@a0 59
#	$NetBSD: Makefile,v 1.2 2016/06/13 20:03:07 ryoon Exp $
#

.include "../Makefile.inc"

.PATH:	${S}/external/bsd/ipf/netinet

KMOD=	ipl	# Use "formal" name of ipfilter device to enable autoload

# Options for opt_ipfilter.h

CPPFLAGS+=	-DIPFILTER_LOG		# logging of ip packets
#CPPFLAGS+=	-DIPFILTER_DEFAULT_BLOCK
#CPPFLAGS+=	-DIPFILTER_BPF		# BPF opcodes in rules
#CPPFLAGS+=	-DIPFILTER_CKSUM	# check layer 4 checksums
#CPPFLAGS+=	-DIPFILTER_COMPILED	# support for compiled IPF rules
CPPFLAGS+=	-DIPFILTER_LOOKUP	# support for ippool(8)
#CPPFLAGS+=	-DIPFILTER_SCAN		# scanning of packet contents
#CPPFLAGS+=	-DIPFILTER_SYNC		# synchronisation of state 
CPPFLAGS+=	-DIPFILTER_COMPAT	# IPFilter version compat.

# IPFILTER_LOGSIZE	# size of logging buffer
# IPSTATE_MAX		# maximum number of references to state table entry
# IPSTATE_SIZE		# size of state hash table
# NAT_TABLE_MAX		# maximum number of NAT state entries
# NAT_TABLE_SZ		# size of NAT state hash table
# NAT_SIZE		# size of nat rules hash table
# RDR_SIZE		# size of rdr rules hash table
# HOSTMAP_SIZE		# size of hostmap hash table

CPPFLAGS+=	-I$S/external/bsd/ipf

# Other options:

CPPFLAGS+=	-DINET			# opt_inet.h
CPPFLAGS+=	-DINET6			# opt_inet.h
CPPFLAGS+=	-DIPSEC			# opt_ipsec.h

SRCS+=	fil.c
SRCS+=	ip_auth.c
SRCS+=	ip_dstlist.c
SRCS+=	ip_fil_netbsd.c
SRCS+=	ip_frag.c
SRCS+=	ip_htable.c
SRCS+=	ip_log.c
SRCS+=	ip_lookup.c
SRCS+=	ip_nat.c
SRCS+=	ip_nat6.c
SRCS+=	ip_pool.c
SRCS+=	ip_proxy.c
SRCS+=	ip_scan.c
SRCS+=	ip_state.c
SRCS+=	ip_sync.c
SRCS+=	ip_fil_compat.c
SRCS+=	radix_ipf.c

CWARNFLAGS.clang+=	-Wno-self-assign

.include <bsd.kmodule.mk>
@


1.1
log
@New module for ipl (aka ipfilter).
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2016/06/07 01:06:27 pgoyette Exp $
d57 2
@

