1 # Copyright (C) 2006 OpenWrt.org
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
11 PKG_VERSION:=cvs.2006.03.02
13 PKG_MD5SUM:=7aed4ba94926010d76febb797b288e98
15 ROOFNET_VERSION:=0.0.1
17 PKG_SOURCE_URL:=http://pdos.csail.mit.edu/~jbicket/click_snapshots/
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
24 include $(INCLUDE_DIR)/package.mk
30 TITLE:=The Click Modular Router
31 DESCRIPTION:=The Click Modular Router
32 URL:=http://pdos.csail.mit.edu/click/
35 define Package/roofnet
39 TITLE:=roofnet mesh networking scripts
40 DESCRIPTION:=roofnet mesh networking scripts
41 URL:=http://pdos.csail.mit.edu/roofnet/
45 define Build/Configure
46 (cd $(PKG_BUILD_DIR); \
48 cp include/click/config.h include/click/config-host.h; \
49 rm -rf config.{cache,status} ; \
50 $(TARGET_CONFIGURE_OPTS) \
51 CXXFLAGS="-static -O2 -MD" \
52 CFLAGS="-static -MD" \
53 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
54 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
57 --target=$(GNU_TARGET_NAME) \
58 --host=$(GNU_TARGET_NAME) \
59 --build=$(GNU_HOST_NAME) \
61 --disable-linuxmodule \
62 --enable-tools=mixed \
63 --disable-dynamic-linking \
69 rm -rf $(PKG_INSTALL_DIR)
70 mkdir -p $(PKG_INSTALL_DIR)
71 $(MAKE) -C $(PKG_BUILD_DIR) \
72 BUILD_CXX="g++ -include $(PKG_BUILD_DIR)/include/click/config-host.h" \
74 (cd $(PKG_BUILD_DIR)/userlevel; \
75 ../tools/click-mkmindriver/click-mkmindriver -p roofnet -C .. \
76 -f $(PKG_BUILD_DIR)/conf/wifi/sample.click \
77 -A --all -E IPNameInfo -E FromHost -E ToHost -E Discard; \
78 $(MAKE) -f Makefile.roofnet; \
82 define Package/click/install
83 install -d -m0755 $(1)/usr/bin
84 $(CP) $(PKG_BUILD_DIR)/userlevel/roofnetclick $(1)/usr/bin/click
85 $(CP) $(PKG_BUILD_DIR)/tools/click-align/click-align $(1)/usr/bin/click-align
88 define Package/roofnet/install
89 install -d -m0755 $(1)/usr/bin
90 $(CP) $(PKG_BUILD_DIR)/conf/wifi/gen_config_roofnet.sh $(1)/usr/bin
91 $(CP) $(PKG_BUILD_DIR)/conf/wifi/srcr.click $(1)/usr/bin
92 $(CP) $(PKG_BUILD_DIR)/conf/wifi/read_handler $(1)/usr/bin
93 $(CP) $(PKG_BUILD_DIR)/conf/wifi/write_handler $(1)/usr/bin
94 mkdir -p $(1)/etc/init.d
95 install -m 755 ./files/S50roofnet $(1)/etc/init.d/
98 $(eval $(call BuildPackage,click))
99 $(eval $(call BuildPackage,roofnet))