handle builddependencies via Config.in, suggested by nbd
[openwrt.git] / openwrt / package / bridge / bridge.mk
1 #############################################################
2 #
3 # bridgeutils - User Space Program For Controling Bridging
4 #
5 #############################################################
6 #
7 BRIDGE_SOURCE_URL=http://umn.dl.sourceforge.net/sourceforge/bridge/
8 BRIDGE_SOURCE=bridge-utils-1.0.4.tar.gz
9 BRIDGE_BUILD_DIR=$(BUILD_DIR)/bridge-utils-1.0.4
10 BRIDGE_PATCHES=$(PACKAGE_DIR)/bridge/patches
11 BRIDGE_TARGET_BINARY:=usr/sbin/brctl
12
13 $(DL_DIR)/$(BRIDGE_SOURCE):
14 $(WGET) -P $(DL_DIR) $(BRIDGE_SOURCE_URL)/$(BRIDGE_SOURCE)
15
16 $(BRIDGE_BUILD_DIR)/.unpacked: $(DL_DIR)/$(BRIDGE_SOURCE)
17 zcat $(DL_DIR)/$(BRIDGE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
18 touch $(BRIDGE_BUILD_DIR)/.unpacked
19
20 $(BRIDGE_BUILD_DIR)/.patched: $(BRIDGE_BUILD_DIR)/.unpacked
21 $(PATCH) $(BRIDGE_BUILD_DIR) $(BRIDGE_PATCHES)
22 touch $(BRIDGE_BUILD_DIR)/.patched
23
24 $(BRIDGE_BUILD_DIR)/.configured: $(BRIDGE_BUILD_DIR)/.patched
25 (cd $(BRIDGE_BUILD_DIR); rm -rf config.cache; \
26 $(TARGET_CONFIGURE_OPTS) \
27 CFLAGS="$(TARGET_CFLAGS)" \
28 ./configure \
29 --target=$(GNU_TARGET_NAME) \
30 --host=$(GNU_TARGET_NAME) \
31 --build=$(GNU_HOST_NAME) \
32 --prefix=/usr \
33 --exec-prefix=/usr \
34 --bindir=/usr/bin \
35 --sbindir=/usr/sbin \
36 --libexecdir=/usr/lib \
37 --sysconfdir=/etc \
38 --datadir=/usr/share \
39 --localstatedir=/var \
40 --mandir=/usr/man \
41 --infodir=/usr/info \
42 $(DISABLE_NLS) \
43 --with-linux-headers=$(LINUX_DIR) \
44 );
45 touch $(BRIDGE_BUILD_DIR)/.configured
46
47 $(BRIDGE_BUILD_DIR)/brctl/brctl: $(BRIDGE_BUILD_DIR)/.configured
48 $(MAKE) -C $(BRIDGE_BUILD_DIR)
49
50 $(TARGET_DIR)/$(BRIDGE_TARGET_BINARY): $(BRIDGE_BUILD_DIR)/brctl/brctl
51 mkdir -p $(TARGET_DIR)/usr/sbin
52 cp -af $(BRIDGE_BUILD_DIR)/brctl/brctl $(TARGET_DIR)/$(BRIDGE_TARGET_BINARY)
53 $(STRIP) $(TARGET_DIR)/$(BRIDGE_TARGET_BINARY)
54
55 bridge: uclibc $(TARGET_DIR)/$(BRIDGE_TARGET_BINARY)
56
57 bridge-source: $(DL_DIR)/$(BRIDGE_SOURCE)
58
59 bridge-clean:
60 #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BRIDGE_BUILD_DIR) uninstall
61 -$(MAKE) -C $(BRIDGE_BUILD_DIR) clean
62
63 bridge-dirclean:
64 rm -rf $(BRIDGE_BUILD_DIR)
65
66 #############################################################
67 #
68 # Toplevel Makefile options
69 #
70 #############################################################
71 ifeq ($(strip $(BR2_PACKAGE_BRIDGE)),y)
72 TARGETS+=bridge
73 endif
This page took 0.042464 seconds and 5 git commands to generate.