diff options
-rw-r--r-- | make/iptables.mk | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/make/iptables.mk b/make/iptables.mk index 56bbf1b27..886e54213 100644 --- a/make/iptables.mk +++ b/make/iptables.mk @@ -4,8 +4,8 @@ # ############################################################# IPTABLES_SOURCE_URL=http://www.netfilter.org/files -IPTABLES_SOURCE=iptables-1.2.8.tar.bz2 -IPTABLES_BUILD_DIR=$(BUILD_DIR)/iptables-1.2.8 +IPTABLES_SOURCE=iptables-1.2.9.tar.bz2 +IPTABLES_BUILD_DIR=$(BUILD_DIR)/iptables-1.2.9 $(DL_DIR)/$(IPTABLES_SOURCE): $(WGET) -P $(DL_DIR) $(IPTABLES_SOURCE_URL)/$(IPTABLES_SOURCE) @@ -15,21 +15,28 @@ $(IPTABLES_BUILD_DIR)/.unpacked: $(DL_DIR)/$(IPTABLES_SOURCE) touch $(IPTABLES_BUILD_DIR)/.unpacked $(IPTABLES_BUILD_DIR)/.configured: $(IPTABLES_BUILD_DIR)/.unpacked + # Allow patches. Needed for openwrt for instance. + $(SOURCE_DIR)/patch-kernel.sh $(IPTABLES_BUILD_DIR) $(SOURCE_DIR) iptables-*.patch + # $(SED) "s;\[ -f /usr/include/netinet/ip6.h \];grep -q '__UCLIBC_HAS_IPV6__ 1' \ $(BUILD_DIR)/uClibc/include/bits/uClibc_config.h;" $(IPTABLES_BUILD_DIR)/Makefile touch $(IPTABLES_BUILD_DIR)/.configured $(IPTABLES_BUILD_DIR)/iptables: $(IPTABLES_BUILD_DIR)/.configured $(TARGET_CONFIGURE_OPTS) \ - $(MAKE) -C $(IPTABLES_BUILD_DIR) KERNEL_DIR=$(BUILD_DIR)/linux CC=$(TARGET_CC) + $(MAKE) -C $(IPTABLES_BUILD_DIR) \ + KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \ + CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" $(TARGET_DIR)/sbin/iptables: $(IPTABLES_BUILD_DIR)/iptables - # Copy iptables - cp -af $(IPTABLES_BUILD_DIR)/iptables $(TARGET_DIR)/sbin/ - cp -af $(IPTABLES_BUILD_DIR)/iptables-save $(TARGET_DIR)/sbin/ - cp -af $(IPTABLES_BUILD_DIR)/iptables-restore $(TARGET_DIR)/sbin/ - -mkdir -p $(TARGET_DIR)/usr/local/lib/iptables - cp -af $(IPTABLES_BUILD_DIR)/extensions/*.so $(TARGET_DIR)/usr/local/lib/iptables/ + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(IPTABLES_BUILD_DIR) \ + KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \ + CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \ + DESTDIR=$(TARGET_DIR) install + $(STRIP) $(TARGET_DIR)/usr/sbin/iptables* + $(STRIP) $(TARGET_DIR)/usr/lib/iptables/*.so + rm -rf $(TARGET_DIR)/usr/man iptables: $(TARGET_DIR)/sbin/iptables |