1 #############################################################
5 #############################################################
8 EBTABLES_VERSION=v2.0.6
9 EBTABLES_SOURCE=$(EBTABLES_NAME)-$(EBTABLES_VERSION).tar.gz
10 #EBTABLES_SOURCE_URL=http://unc.dl.sourceforge.net/sourceforge/$(EBTABLES_NAME)/
11 EBTABLES_SOURCE_URL=http://aleron.dl.sourceforge.net/sourceforge/$(EBTABLES_NAME)/
12 EBTABLES_BUILD_DIR=$(BUILD_DIR)/$(EBTABLES_NAME)-$(EBTABLES_VERSION)
14 $(DL_DIR)/$(EBTABLES_SOURCE):
15 $(WGET) -P $(DL_DIR) $(EBTABLES_SOURCE_URL)/$(EBTABLES_SOURCE)
17 $(EBTABLES_BUILD_DIR)/.unpacked: $(DL_DIR)/$(EBTABLES_SOURCE)
18 zcat $(DL_DIR)/$(EBTABLES_SOURCE) | tar -C $(BUILD_DIR) -xvf -
19 touch $(EBTABLES_BUILD_DIR)/.unpacked
21 $(EBTABLES_BUILD_DIR)/.configured: $(EBTABLES_BUILD_DIR)/.unpacked
22 # Allow patches. Needed for openwrt for instance.
23 $(SOURCE_DIR)/patch-kernel.sh $(EBTABLES_BUILD_DIR) $(SOURCE_DIR) $(EBTABLES_NAME)-*.patch
24 touch $(EBTABLES_BUILD_DIR)/.configured
26 $(EBTABLES_BUILD_DIR)/$(EBTABLES_NAME): $(EBTABLES_BUILD_DIR)/.configured
27 $(TARGET_CONFIGURE_OPTS) \
28 $(MAKE) -C $(EBTABLES_BUILD_DIR) \
29 CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)"
31 $(TARGET_DIR)/sbin/$(EBTABLES_NAME): $(EBTABLES_BUILD_DIR)/$(EBTABLES_NAME)
32 $(TARGET_CONFIGURE_OPTS) \
33 $(MAKE) -C $(EBTABLES_BUILD_DIR) \
34 MANDIR=$(TARGET_DIR)/usr/share/man \
35 ETHERTYPESPATH=${D}/etc/ \
36 BINPATH=$(TARGET_DIR)/sbin/ \
38 CFLAGS="$(TARGET_CFLAGS)" \
40 $(STRIP) $(TARGET_DIR)/sbin/$(EBTABLES_NAME)
41 rm -rf $(TARGET_DIR)/usr/share/man
43 $(EBTABLES_NAME): $(TARGET_DIR)/sbin/$(EBTABLES_NAME)
45 $(EBTABLES_NAME)-source: $(DL_DIR)/$(EBTABLES_SOURCE)
47 $(EBTABLES_NAME)-clean:
48 -$(MAKE) -C $(EBTABLES_BUILD_DIR) clean
50 $(EBTABLES_NAME)-dirclean:
51 rm -rf $(EBTABLES_BUILD_DIR)