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