############################################################# # # iptables # ############################################################# # Copyright (C) 2001, 2002 by Erik Andersen # Copyright (C) 2002 by Tim Riker # Copyright (c) 2002, by Devin Carraway # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA iptables_DIR:=$(BUILD_DIR)/iptables-1.2.6a iptables_SOURCE:=iptables-1.2.6a.tar.bz2 iptables_PATCH:=$(SOURCE_DIR)/iptables-1.2.6a-no_ipv6.patch iptables_SITE:=http://www.netfilter.org/files iptables_BIN:=iptables iptables-save iptables-restore iptables_LIBS_L:=ah dscp esp icmp length limit mac mark multiport owner \ standard state tcp tcpmss tos ttl udp unclean DNAT DSCP ECN LOG \ MARK MASQUERADE MIRROR REDIRECT REJECT SAME SNAT TCPMSS TOS ULOG \ TTL iplimit iptables_LIBS:=$(foreach mod, $(iptables_LIBS_L), libipt_$(mod).so) iptables_BUILD:=$(foreach bin, $(iptables_BIN), $(iptables_DIR)/$(bin)) \ $(foreach lib, $(iptables_LIBS), $(iptables_DIR)/extensions/$(lib)) iptables_TARGET:=$(foreach bin, $(iptables_BIN), $(TARGET_DIR)/sbin/$(bin)) \ $(foreach lib, $(iptables_LIBS), $(TARGET_DIR)/lib/iptables/$(lib)) $(DL_DIR)/$(iptables_SOURCE): wget -P $(DL_DIR) --passive-ftp $(iptables_SITE)/$(iptables_SOURCE) iptables-source: $(DL_DIR)/$(iptables_SOURCE) $(iptables_DIR)/Makefile: $(DL_DIR)/$(iptables_SOURCE) bzcat $(DL_DIR)/$(iptables_SOURCE) | tar -C $(BUILD_DIR) -xvf - patch -d $(iptables_DIR) -p1 < $(iptables_PATCH) $(iptables_BUILD): $(iptables_DIR)/Makefile make PREFIX=/ COPT_FLAGS=-Os LD=$(TARGET_CROSS)ld AS=$(TARGET_CROSS)as CC="$(TARGET_CC1)" -C $(iptables_DIR) $(STRIP) $(iptables_BUILD) $(STAGING_DIR)/sbin/iptables: $(iptables_DIR)/iptables make COPT_FLAGS=-Os LD=$(TARGET_CROSS)ld AS=$(TARGET_CROSS)as CC="$(TARGET_CC1)" PREFIX="$(STAGING_DIR)" -C $(iptables_DIR) install $(iptables_TARGET): $(STAGING_DIR)/sbin/iptables cp -fa $(STAGING_DIR)/sbin/iptables{,-save,-restore} $(TARGET_DIR)/sbin/ rm -rf $(TARGET_DIR)/lib/iptables cp -fa $(STAGING_DIR)/lib/iptables $(TARGET_DIR)/lib/ iptables: uclibc $(TARGET_DIR)/sbin/iptables iptables-clean: rm -f $(TARGET_DIR)/bin/iptables{,-save,-restore} rm -rf $(TARGET_DIR)/lib/iptables -make -C $(iptables_DIR) clean iptables-dirclean: rm -rf $(iptables_DIR)