source: freewrt/package/click/Makefile@ d419478

freewrt_1_0 freewrt_2_0
Last change on this file since d419478 was d419478, checked in by Thorsten Glaser <tg@…>, 19 years ago
  • whitespace cleanup, while here
  • move WRKDIR and DISTFILES definition into PKG_template
  • define WRKDIR via parent BUILD_DIR instead of going up from WRKSRC
  • use a sub-directory as WRKDIR, like BSD
  • rename PKG_BUILD_DIR into WRKBUILD
  • define WRKBUILD relative via WRKDIR
  • rename PKG_INSTALL_DIR into WRKINST
  • fix a few dependencies
  • make use of common cases in the definition of WRKBUILD and WRKINST, removing many redundant lines
  • use WRKDIR instead of BUILD_DIR in places where the latter was used previously
  • while here, remove PKG_CAT stuff

this only affects packages, for now

git-svn-id: svn://www.freewrt.org/trunk/freewrt@303 afb5a338-a214-0410-bd46-81f09a774fd1

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