1# $NetBSD: Makefile,v 1.8 2023/06/03 08:52:58 lukem Exp $ 2# 3 4.include "../Makefile.inc" 5 6.PATH: ${S}/external/bsd/ipf/netinet 7 8KMOD= ipl # Use "formal" name of ipfilter device to enable autoload 9 10# Options for opt_ipfilter.h 11 12CPPFLAGS+= -DIPFILTER_LOG # logging of ip packets 13#CPPFLAGS+= -DIPFILTER_DEFAULT_BLOCK 14#CPPFLAGS+= -DIPFILTER_BPF # BPF opcodes in rules 15#CPPFLAGS+= -DIPFILTER_CKSUM # check layer 4 checksums 16#CPPFLAGS+= -DIPFILTER_COMPILED # support for compiled IPF rules 17CPPFLAGS+= -DIPFILTER_LOOKUP # support for ippool(8) 18#CPPFLAGS+= -DIPFILTER_SCAN # scanning of packet contents 19#CPPFLAGS+= -DIPFILTER_SYNC # synchronisation of state 20CPPFLAGS+= -DIPFILTER_COMPAT # IPFilter version compat. 21 22# IPFILTER_LOGSIZE # size of logging buffer 23# IPSTATE_MAX # maximum number of references to state table entry 24# IPSTATE_SIZE # size of state hash table 25# NAT_TABLE_MAX # maximum number of NAT state entries 26# NAT_TABLE_SZ # size of NAT state hash table 27# NAT_SIZE # size of nat rules hash table 28# RDR_SIZE # size of rdr rules hash table 29# HOSTMAP_SIZE # size of hostmap hash table 30 31CPPFLAGS+= -I$S/external/bsd/ipf 32 33# Other options: 34 35CPPFLAGS+= -DINET # opt_inet.h 36CPPFLAGS+= -DINET6 # opt_inet.h 37CPPFLAGS+= -DIPSEC # opt_ipsec.h 38 39SRCS+= fil.c 40SRCS+= ip_auth.c 41SRCS+= ip_dstlist.c 42SRCS+= ip_fil_netbsd.c 43SRCS+= ip_frag.c 44SRCS+= ip_htable.c 45SRCS+= ip_log.c 46SRCS+= ip_lookup.c 47SRCS+= ip_nat.c 48SRCS+= ip_nat6.c 49SRCS+= ip_pool.c 50SRCS+= ip_proxy.c 51SRCS+= ip_scan.c 52SRCS+= ip_state.c 53SRCS+= ip_sync.c 54SRCS+= ip_fil_compat.c 55SRCS+= radix_ipf.c 56 57WARNS= 3 58 59CWARNFLAGS.clang+= -Wno-self-assign 60COPTS.fil.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 61COPTS.ip_fil_netbsd.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 62COPTS.ip_htable.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 63COPTS.ip_nat.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 64COPTS.ip_nat6.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 65COPTS.ip_proxy.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 66COPTS.ip_state.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 67 68.include <bsd.kmodule.mk> 69