update lighttpd to 1.4.11
[openwrt.git] / package / click / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=click
4 PKG_VERSION:=cvs.2006.03.02
5 PKG_RELEASE:=1
6 PKG_MD5SUM:=7aed4ba94926010d76febb797b288e98
7
8 ROOFNET_VERSION:=0.0.1
9
10 PKG_SOURCE_URL:=http://pdos.csail.mit.edu/~jbicket/click_snapshots/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,CLICK,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20 $(eval $(call PKG_template,ROOFNET,roofnet,$(ROOFNET_VERSION),$(ARCH)))
21
22 $(PKG_BUILD_DIR)/.configured:
23 (cd $(PKG_BUILD_DIR); \
24 ./configure; \
25 cp include/click/config.h include/click/config-host.h; \
26 rm -rf config.{cache,status} ; \
27 $(TARGET_CONFIGURE_OPTS) \
28 CXXFLAGS="-static -O2 -MD" \
29 CFLAGS="-static -MD" \
30 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
31 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
32 ./configure \
33 --prefix=/usr \
34 --target=$(GNU_TARGET_NAME) \
35 --host=$(GNU_TARGET_NAME) \
36 --build=$(GNU_HOST_NAME) \
37 --enable-wifi \
38 --disable-linuxmodule \
39 --enable-tools=mixed \
40 --disable-dynamic-linking \
41 )
42 touch $@
43
44
45 # don't build the full click (it's huge), but only include
46 # the elements needed for roofnet
47 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
48 rm -rf $(PKG_INSTALL_DIR)
49 mkdir -p $(PKG_INSTALL_DIR)
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 BUILD_CXX="g++ -include $(PKG_BUILD_DIR)/include/click/config-host.h" \
52 tools elementmap.xml
53 (cd $(PKG_BUILD_DIR)/userlevel; \
54 ../tools/click-mkmindriver/click-mkmindriver -p roofnet -C .. \
55 -f $(PKG_BUILD_DIR)/conf/wifi/sample.click \
56 -A --all -E IPNameInfo -E FromHost -E ToHost -E Discard; \
57 $(MAKE) -f Makefile.roofnet; \
58 )
59 touch $@
60
61 $(IPKG_CLICK):
62 install -d -m0755 $(IDIR_CLICK)/usr/bin
63 $(CP) $(PKG_BUILD_DIR)/userlevel/roofnetclick $(IDIR_CLICK)/usr/bin/click
64 $(CP) $(PKG_BUILD_DIR)/tools/click-align/click-align $(IDIR_CLICK)/usr/bin/click-align
65 $(RSTRIP) $(IDIR_CLICK)
66 $(IPKG_BUILD) $(IDIR_CLICK) $(PACKAGE_DIR)
67
68
69 $(IPKG_ROOFNET):
70 install -d -m0755 $(IDIR_ROOFNET)/usr/bin
71 $(CP) $(PKG_BUILD_DIR)/conf/wifi/gen_config_roofnet.sh $(IDIR_ROOFNET)/usr/bin
72 $(CP) $(PKG_BUILD_DIR)/conf/wifi/srcr.click $(IDIR_ROOFNET)/usr/bin
73 $(CP) $(PKG_BUILD_DIR)/conf/wifi/read_handler $(IDIR_ROOFNET)/usr/bin
74 $(CP) $(PKG_BUILD_DIR)/conf/wifi/write_handler $(IDIR_ROOFNET)/usr/bin
75 mkdir -p $(IDIR_ROOFNET)/etc/init.d
76 install -m 755 ./files/S50roofnet $(IDIR_ROOFNET)/etc/init.d/
77 $(IPKG_BUILD) $(IDIR_ROOFNET) $(PACKAGE_DIR)
This page took 0.040988 seconds and 5 git commands to generate.