fix pci initialization and add oleg et driver.
[openwrt.git] / package / iptables / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4 include kernelconfig.mk
5
6 PKG_NAME:=iptables
7 PKG_VERSION:=1.3.1
8 PKG_RELEASE:=1
9 PKG_MD5SUM:=c3358a3bd0d7755df0b64a5063db296b
10
11 PKG_SOURCE_URL:=http://www.netfilter.org/files
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
13 PKG_CAT:=bzcat
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
17
18 include $(TOPDIR)/package/rules.mk
19
20 $(eval $(call PKG_template,IPTABLES,iptables,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
21 $(eval $(call PKG_template,IPTABLES_EXTRA,iptables-extra,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22 $(eval $(call PKG_template,IPTABLES_UTILS,iptables-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
23 $(eval $(call PKG_template,IP6TABLES,ip6tables,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
24
25 $(PKG_BUILD_DIR)/.configured:
26 touch $@
27
28 $(PKG_BUILD_DIR)/.built:
29 chmod a+x $(PKG_BUILD_DIR)/extensions/.*-test
30 mkdir -p $(PKG_INSTALL_DIR)
31 $(MAKE) -C $(PKG_BUILD_DIR) \
32 $(TARGET_CONFIGURE_OPTS) \
33 CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \
34 KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \
35 DESTDIR="$(PKG_INSTALL_DIR)" \
36 all install install-devel
37 touch $@
38
39 $(IPKG_IPTABLES):
40 install -d -m0755 $(IDIR_IPTABLES)/usr/sbin
41 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/iptables $(IDIR_IPTABLES)/usr/sbin/
42 install -d -m0755 $(IDIR_IPTABLES)/usr/lib/iptables
43 (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \
44 cp -fpR $(patsubst %,libipt_%.so,$(ext-y)) $(IDIR_IPTABLES)/usr/lib/iptables \
45 )
46 $(RSTRIP) $(IDIR_IPTABLES)
47 $(IPKG_BUILD) $(IDIR_IPTABLES) $(PACKAGE_DIR)
48
49 $(IPKG_IPTABLES_EXTRA):
50 install -d -m0755 $(IDIR_IPTABLES_EXTRA)/usr/lib/iptables
51 (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \
52 cp -fpR $(patsubst %,libipt_%.so,$(ext-m)) $(IDIR_IPTABLES_EXTRA)/usr/lib/iptables \
53 )
54 $(RSTRIP) $(IDIR_IPTABLES_EXTRA)
55 $(IPKG_BUILD) $(IDIR_IPTABLES_EXTRA) $(PACKAGE_DIR)
56
57 $(IPKG_IPTABLES_UTILS):
58 install -d -m0755 $(IDIR_IPTABLES_UTILS)/usr/sbin
59 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/iptables-{save,restore} $(IDIR_IPTABLES_UTILS)/usr/sbin
60 $(RSTRIP) $(IDIR_IPTABLES_UTILS)
61 $(IPKG_BUILD) $(IDIR_IPTABLES_UTILS) $(PACKAGE_DIR)
62
63 $(IPKG_IP6TABLES):
64 install -d -m0755 $(IDIR_IP6TABLES)/usr/sbin
65 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/ip6tables $(IDIR_IP6TABLES)/usr/sbin/
66 install -d -m0755 $(IDIR_IP6TABLES)/usr/lib/iptables
67 (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \
68 cp -fpR libip6t_*.so $(IDIR_IP6TABLES)/usr/lib/iptables \
69 )
70 $(RSTRIP) $(IDIR_IP6TABLES)
71 $(IPKG_BUILD) $(IDIR_IP6TABLES) $(PACKAGE_DIR)
72
73 $(STAGING_DIR)/usr/lib/libipq.a: $(PKG_BUILD_DIR)/.built
74 mkdir -p $(STAGING_DIR)/usr/include/ $(STAGING_DIR)/usr/lib/
75 cp -fpR $(PKG_INSTALL_DIR)/usr/include/libipq.h $(STAGING_DIR)/usr/include/
76 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libipq.a $(STAGING_DIR)/usr/lib/
77
78 install-dev: $(STAGING_DIR)/usr/lib/libipq.a
79
80 uninstall-dev:
81 rm -rf $(STAGING_DIR)/usr/include/libipq.h
82 rm -rf $(STAGING_DIR)/usr/lib/libipq.a
83
84 compile: install-dev
85 clean: uninstall-dev
This page took 0.048677 seconds and 5 git commands to generate.