3 include $(TOPDIR
)/rules.mk
6 PKG_VERSION
:=cvs
.2006.03.02
8 PKG_MD5SUM
:=7aed4ba94926010d76febb797b288e98
10 ROOFNET_VERSION
:=0.0.1
12 PKG_SOURCE_URL
:=http
://pdos.csail.mit.edu
/~jbicket
/click_snapshots
/
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
19 include $(TOPDIR
)/package
/rules.mk
21 $(eval
$(call PKG_template
,CLICK
,$(PKG_NAME
),$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
22 $(eval
$(call PKG_template
,ROOFNET
,roofnet
,$(ROOFNET_VERSION
),$(ARCH
)))
24 $(PKG_BUILD_DIR
)/.configured
:
25 (cd
$(PKG_BUILD_DIR
); \
27 cp
include/click
/config.h
include/click
/config-host.h
; \
28 rm -rf config.
{cache
,status
} ; \
29 $(TARGET_CONFIGURE_OPTS
) \
30 CXXFLAGS
="-static -O2 -MD" \
31 CFLAGS
="-static -MD" \
32 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
33 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
36 --target
=$(GNU_TARGET_NAME
) \
37 --host
=$(GNU_TARGET_NAME
) \
38 --build
=$(GNU_HOST_NAME
) \
40 --disable-linuxmodule \
41 --enable-tools
=mixed \
42 --disable-dynamic-linking \
47 # don't build the full click (it's huge), but only include
48 # the elements needed for roofnet
49 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
50 rm -rf
$(PKG_INSTALL_DIR
)
51 mkdir
-p
$(PKG_INSTALL_DIR
)
52 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
53 BUILD_CXX
="g++ -include $(PKG_BUILD_DIR)/include/click/config-host.h" \
55 (cd
$(PKG_BUILD_DIR
)/userlevel
; \
56 ..
/tools
/click-mkmindriver
/click-mkmindriver
-p roofnet
-C .. \
57 -f
$(PKG_BUILD_DIR
)/conf
/wifi
/sample.click \
58 -A
--all -E IPNameInfo
-E FromHost
-E ToHost
-E Discard
; \
59 $(MAKE
) -f Makefile.roofnet
; \
64 install -d
-m0755
$(IDIR_CLICK
)/usr
/bin
65 $(CP
) $(PKG_BUILD_DIR
)/userlevel
/roofnetclick
$(IDIR_CLICK
)/usr
/bin
/click
66 $(CP
) $(PKG_BUILD_DIR
)/tools
/click-align
/click-align
$(IDIR_CLICK
)/usr
/bin
/click-align
67 $(RSTRIP
) $(IDIR_CLICK
)
68 $(IPKG_BUILD
) $(IDIR_CLICK
) $(PACKAGE_DIR
)
72 install -d
-m0755
$(IDIR_ROOFNET
)/usr
/bin
73 $(CP
) $(PKG_BUILD_DIR
)/conf
/wifi
/gen_config_roofnet.sh
$(IDIR_ROOFNET
)/usr
/bin
74 $(CP
) $(PKG_BUILD_DIR
)/conf
/wifi
/srcr.click
$(IDIR_ROOFNET
)/usr
/bin
75 $(CP
) $(PKG_BUILD_DIR
)/conf
/wifi
/read_handler
$(IDIR_ROOFNET
)/usr
/bin
76 $(CP
) $(PKG_BUILD_DIR
)/conf
/wifi
/write_handler
$(IDIR_ROOFNET
)/usr
/bin
77 mkdir
-p
$(IDIR_ROOFNET
)/etc
/init.d
78 install -m
755 .
/files
/S50roofnet
$(IDIR_ROOFNET
)/etc
/init.d
/
79 $(IPKG_BUILD
) $(IDIR_ROOFNET
) $(PACKAGE_DIR
)