xref: /OK3568_Linux_fs/buildroot/package/nftables/nftables.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# nftables
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunNFTABLES_VERSION = 1.0.0
8*4882a593SmuzhiyunNFTABLES_SOURCE = nftables-$(NFTABLES_VERSION).tar.bz2
9*4882a593SmuzhiyunNFTABLES_SITE = https://www.netfilter.org/projects/nftables/files
10*4882a593SmuzhiyunNFTABLES_DEPENDENCIES = libmnl libnftnl host-pkgconf $(TARGET_NLS_DEPENDENCIES)
11*4882a593SmuzhiyunNFTABLES_LICENSE = GPL-2.0
12*4882a593SmuzhiyunNFTABLES_LICENSE_FILES = COPYING
13*4882a593SmuzhiyunNFTABLES_CONF_OPTS = --disable-debug --disable-man-doc --disable-pdf-doc
14*4882a593SmuzhiyunNFTABLES_SELINUX_MODULES = iptables
15*4882a593Smuzhiyun
16*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GMP),y)
17*4882a593SmuzhiyunNFTABLES_DEPENDENCIES += gmp
18*4882a593SmuzhiyunNFTABLES_CONF_OPTS += --without-mini-gmp
19*4882a593Smuzhiyunelse
20*4882a593SmuzhiyunNFTABLES_CONF_OPTS += --with-mini-gmp
21*4882a593Smuzhiyunendif
22*4882a593Smuzhiyun
23*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_READLINE),y)
24*4882a593SmuzhiyunNFTABLES_DEPENDENCIES += readline
25*4882a593SmuzhiyunNFTABLES_LIBS += -lncurses
26*4882a593Smuzhiyunelse
27*4882a593SmuzhiyunNFTABLES_CONF_OPTS += --without-cli
28*4882a593Smuzhiyunendif
29*4882a593Smuzhiyun
30*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_JANSSON),y)
31*4882a593SmuzhiyunNFTABLES_DEPENDENCIES += jansson
32*4882a593SmuzhiyunNFTABLES_CONF_OPTS += --with-json
33*4882a593Smuzhiyunelse
34*4882a593SmuzhiyunNFTABLES_CONF_OPTS += --without-json
35*4882a593Smuzhiyunendif
36*4882a593Smuzhiyun
37*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)
38*4882a593SmuzhiyunNFTABLES_CONF_OPTS += --enable-python
39*4882a593SmuzhiyunNFTABLES_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,python3)
40*4882a593Smuzhiyunelse
41*4882a593SmuzhiyunNFTABLES_CONF_OPTS += --disable-python
42*4882a593Smuzhiyunendif
43*4882a593Smuzhiyun
44*4882a593Smuzhiyunifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_LIBNFTNL_JSON),yy)
45*4882a593SmuzhiyunNFTABLES_LIBS += -ljansson -lm
46*4882a593Smuzhiyunendif
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunNFTABLES_CONF_ENV = LIBS="$(NFTABLES_LIBS)"
49*4882a593Smuzhiyun
50*4882a593Smuzhiyundefine NFTABLES_LINUX_CONFIG_FIXUPS
51*4882a593Smuzhiyun	$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER)
52*4882a593Smuzhiyun	$(call KCONFIG_ENABLE_OPT,CONFIG_NF_TABLES)
53*4882a593Smuzhiyun	$(call KCONFIG_ENABLE_OPT,CONFIG_NF_TABLES_INET)
54*4882a593Smuzhiyunendef
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun$(eval $(autotools-package))
57