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
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
30 TITLE
:=The Click Modular Router
31 URL
:=http
://www.read.cs.ucla.edu
/click
/
34 define Package
/click
/description
35 The Click Modular Router
38 define Package
/roofnet
41 DEPENDS
:=@BROKEN click
42 TITLE
:=roofnet mesh networking scripts
43 URL
:=http
://pdos.csail.mit.edu
/roofnet
/
46 define Package
/roofnet
/description
47 roofnet mesh networking scripts
51 BUILD_CXX
="g++ -I $(PKG_BUILD_DIR)/include-host" \
54 define Build
/Configure
55 (cd
$(PKG_BUILD_DIR
); \
56 rm -rf config.
{cache
,status
} ; \
59 rm -rf include-host
; \
60 $(CP
) include include-host
; \
61 rm -rf config.
{cache
,status
} ; \
62 $(TARGET_CONFIGURE_OPTS
) \
63 CXXFLAGS
="-static -Os -MD" \
64 CFLAGS
="-static -MD" \
65 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
66 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
70 --target
=$(GNU_TARGET_NAME
) \
71 --host
=$(GNU_TARGET_NAME
) \
72 --build
=$(GNU_HOST_NAME
) \
74 --disable-linuxmodule \
75 --enable-tools
=mixed \
76 --disable-dynamic-linking \
82 rm -rf
$(PKG_INSTALL_DIR
)
83 mkdir
-p
$(PKG_INSTALL_DIR
)
85 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
88 (cd
$(PKG_BUILD_DIR
)/userlevel
; \
89 ..
/tools
/click-mkmindriver
/click-mkmindriver
-p roofnet
-C .. \
90 -f
$(PKG_BUILD_DIR
)/conf
/wifi
/sample.click \
91 -A
--all -E IPNameInfo
-E FromHost
-E ToHost
-E Discard
; \
92 $(MAKE
) -f Makefile.roofnet
; \
96 define Package
/click
/install
97 $(INSTALL_DIR
) $(1)/usr
/bin
98 $(CP
) $(PKG_BUILD_DIR
)/userlevel
/roofnetclick
$(1)/usr
/bin
/click
99 $(CP
) $(PKG_BUILD_DIR
)/tools
/click-align
/click-align
$(1)/usr
/bin
/click-align
102 define Package
/roofnet
/install
103 $(INSTALL_DIR
) $(1)/usr
/bin
104 $(CP
) $(PKG_BUILD_DIR
)/conf
/wifi
/gen_config_roofnet.sh
$(1)/usr
/bin
105 $(CP
) $(PKG_BUILD_DIR
)/conf
/wifi
/srcr.click
$(1)/usr
/bin
106 $(CP
) $(PKG_BUILD_DIR
)/conf
/wifi
/read_handler
$(1)/usr
/bin
107 $(CP
) $(PKG_BUILD_DIR
)/conf
/wifi
/write_handler
$(1)/usr
/bin
108 mkdir
-p
$(1)/etc
/init.d
109 $(INSTALL_BIN
) .
/files
/roofnet.init
$(1)/etc
/init.d
/roofnet
112 $(eval
$(call BuildPackage
,click
))
113 $(eval
$(call BuildPackage
,roofnet
))