aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/iptables/Makefile
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-05-26 09:16:50 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-05-26 09:16:50 +0000
commit8182400cd32a4efc140de7559dd834c41410ff36 (patch)
tree27ffee36d84b3ee9859600fac7bc285aa481e4de /package/network/utils/iptables/Makefile
parent0e2a822b3a973a3344d3e496121b3771e0598bea (diff)
downloadmaster-187ad058-8182400cd32a4efc140de7559dd834c41410ff36.tar.gz
master-187ad058-8182400cd32a4efc140de7559dd834c41410ff36.tar.bz2
master-187ad058-8182400cd32a4efc140de7559dd834c41410ff36.zip
iptables: reduce binary size
* drop unused lenient restore patch * instead of statically linking core extensions, build shared libraries for reuse in fw3 * strip outdated match revisions and aliases to trim down library size Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45758 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/utils/iptables/Makefile')
-rw-r--r--package/network/utils/iptables/Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/package/network/utils/iptables/Makefile b/package/network/utils/iptables/Makefile
index df88639816..626b252761 100644
--- a/package/network/utils/iptables/Makefile
+++ b/package/network/utils/iptables/Makefile
@@ -392,7 +392,7 @@ define Package/libiptc
$(call Package/iptables/Default)
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libip4tc +libip6tc
+ DEPENDS:=+libip4tc +libip6tc +libxtables
TITLE:=IPv4/IPv6 firewall - shared libiptc library (compatibility stub)
endef
@@ -401,6 +401,7 @@ $(call Package/iptables/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE:=IPv4 firewall - shared libiptc library
+ DEPENDS:=+libxtables
endef
define Package/libip6tc
@@ -408,6 +409,7 @@ $(call Package/iptables/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE:=IPv6 firewall - shared libiptc library
+ DEPENDS:=+libxtables
endef
define Package/libxtables
@@ -425,7 +427,8 @@ TARGET_CPPFLAGS := \
TARGET_CFLAGS += \
-I$(PKG_BUILD_DIR)/include \
-I$(LINUX_DIR)/user_headers/include \
- -ffunction-sections -fdata-sections
+ -ffunction-sections -fdata-sections \
+ -DNO_LEGACY
TARGET_LDFLAGS += \
-Wl,--gc-sections
@@ -466,8 +469,7 @@ define Build/InstallDev
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libip*tc.pc $(1)/usr/lib/pkgconfig/
# XXX: needed by firewall3
- $(INSTALL_DIR) $(1)/usr/lib/iptables
- $(CP) $(PKG_BUILD_DIR)/extensions/libext*.a $(1)/usr/lib/iptables/
+ $(CP) $(PKG_BUILD_DIR)/extensions/libiptext*.so $(1)/usr/lib/
endef
define Package/iptables/install
@@ -490,16 +492,19 @@ endef
define Package/libip4tc/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libip4tc.so* $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/extensions/libiptext4.so $(1)/usr/lib/
endef
define Package/libip6tc/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libip6tc.so* $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/extensions/libiptext6.so $(1)/usr/lib/
endef
define Package/libxtables/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libxtables.so* $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/extensions/libiptext.so $(1)/usr/lib/
endef
define BuildPlugin