886e54213d56eb1b054a2f73c15f7353872e4987
[openwrt.git] / obsolete-buildroot / make / iptables.mk
1 #############################################################
2 #
3 # iptables
4 #
5 #############################################################
6 IPTABLES_SOURCE_URL=http://www.netfilter.org/files
7 IPTABLES_SOURCE=iptables-1.2.9.tar.bz2
8 IPTABLES_BUILD_DIR=$(BUILD_DIR)/iptables-1.2.9
9
10 $(DL_DIR)/$(IPTABLES_SOURCE):
11 $(WGET) -P $(DL_DIR) $(IPTABLES_SOURCE_URL)/$(IPTABLES_SOURCE)
12
13 $(IPTABLES_BUILD_DIR)/.unpacked: $(DL_DIR)/$(IPTABLES_SOURCE)
14 bzcat $(DL_DIR)/$(IPTABLES_SOURCE) | tar -C $(BUILD_DIR) -xvf -
15 touch $(IPTABLES_BUILD_DIR)/.unpacked
16
17 $(IPTABLES_BUILD_DIR)/.configured: $(IPTABLES_BUILD_DIR)/.unpacked
18 # Allow patches. Needed for openwrt for instance.
19 $(SOURCE_DIR)/patch-kernel.sh $(IPTABLES_BUILD_DIR) $(SOURCE_DIR) iptables-*.patch
20 #
21 $(SED) "s;\[ -f /usr/include/netinet/ip6.h \];grep -q '__UCLIBC_HAS_IPV6__ 1' \
22 $(BUILD_DIR)/uClibc/include/bits/uClibc_config.h;" $(IPTABLES_BUILD_DIR)/Makefile
23 touch $(IPTABLES_BUILD_DIR)/.configured
24
25 $(IPTABLES_BUILD_DIR)/iptables: $(IPTABLES_BUILD_DIR)/.configured
26 $(TARGET_CONFIGURE_OPTS) \
27 $(MAKE) -C $(IPTABLES_BUILD_DIR) \
28 KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \
29 CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)"
30
31 $(TARGET_DIR)/sbin/iptables: $(IPTABLES_BUILD_DIR)/iptables
32 $(TARGET_CONFIGURE_OPTS) \
33 $(MAKE) -C $(IPTABLES_BUILD_DIR) \
34 KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \
35 CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \
36 DESTDIR=$(TARGET_DIR) install
37 $(STRIP) $(TARGET_DIR)/usr/sbin/iptables*
38 $(STRIP) $(TARGET_DIR)/usr/lib/iptables/*.so
39 rm -rf $(TARGET_DIR)/usr/man
40
41 iptables: $(TARGET_DIR)/sbin/iptables
42
43 iptables-source: $(DL_DIR)/$(IPTABLES_SOURCE)
44
45 iptables-clean:
46 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(IPTABLES_BUILD_DIR) uninstall
47 -$(MAKE) -C $(IPTABLES_BUILD_DIR) clean
48
49 iptables-dirclean:
50 rm -rf $(IPTABLES_BUILD_DIR)
51
This page took 0.040787 seconds and 3 git commands to generate.