2 # Copyright (C) 2006-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
12 ifneq ($(CONFIG_WING_STABLE
),)
15 PKG_REV
:=21aae2ae5bea85426aded47b055b4fe62c2cea2e
17 PKG_VERSION
:=$(shell date
+%Y
%m
%d
)
22 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
23 PKG_SOURCE_URL
:=http
://github.com
/create-net
/click-wing.git
24 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
25 PKG_SOURCE_VERSION
:=$(PKG_REV
)
28 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
30 include $(INCLUDE_DIR
)/package.mk
33 TITLE
:=Wireless mesh networking toolkit
36 MAINTAINER
:=Roberto Riggio
(roberto.riggio@create-net.org
)
38 URL
:=http
://www.wing-project.org
/
41 define Package
/wing
/Description
42 Wing is a wireless mesh routing software. The routing protocol
43 is derived from Roofnet. It supports multiple radio interfaces and
44 link quality routing using the ETX
, ETT
, and WCETT metrics.
47 define Package
/wing
/config
48 source
"$(SOURCE)/Config.in"
51 define Build
/Configure
52 (cd
$(PKG_BUILD_DIR
); \
53 rm -rf config.
{cache
,status
}; \
59 --disable-linuxmodule \
61 $(MAKE
) -C
$(PKG_BUILD_DIR
) tools elementmap.xml
62 (cd
$(PKG_BUILD_DIR
)/userlevel
; \
63 ..
/tools
/click-mkmindriver
/click-mkmindriver
-p
$(PKG_NAME
) -C .. \
64 -f
$(PKG_BUILD_DIR
)/conf
/wing
/sample.click \
65 -A
--all -E Discard
-E Print
-E Null \
66 -E InfiniteSource
-E RatedSource
-E EtherEncap
-E UDPIPEncap \
67 -E AthdescEncap
-E AthdescDecap
-E RadiotapDecap
-E RadiotapEncap \
68 -E ProbeTXRate
-E MadwifiRate
-E AutoRateFallback \
69 -E RoundRobinSched
-E DRRSched
; \
71 (cd
$(PKG_BUILD_DIR
); \
72 rm -rf config.
{cache
,status
} ; \
73 $(TARGET_CONFIGURE_OPTS
) \
74 CXXFLAGS
="-static -O2 -MD" CFLAGS
="-static -MD" \
75 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
76 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
79 --target
=$(GNU_TARGET_NAME
) \
80 --host
=$(GNU_TARGET_NAME
) \
81 --build
=$(GNU_HOST_NAME
) \
82 --enable-tools
=mixed \
86 --disable-linuxmodule \
91 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
92 MINDRIVER
=$(PKG_NAME
) \
93 DESTDIR
="$(PKG_INSTALL_DIR)" \
97 define Package
/wing
/install
98 $(INSTALL_DIR
) $(1)/usr
/bin
99 $(INSTALL_DIR
) $(1)/etc
/wing
100 $(INSTALL_DIR
) $(1)/usr
/share
/click
101 $(CP
) .
/files
/* $(1)/
102 $(CP
) $(PKG_BUILD_DIR
)/conf
/wing
/click_config
$(1)/usr
/bin
/
103 $(CP
) $(PKG_BUILD_DIR
)/conf
/wing
/write_handler
$(1)/usr
/bin
/
104 $(CP
) $(PKG_BUILD_DIR
)/conf
/wing
/read_handler
$(1)/usr
/bin
/
105 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/$(PKG_NAME
)click
$(1)/usr
/bin
/click
106 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/click-align
$(1)/usr
/bin
/click-align
107 $(CP
) $(PKG_BUILD_DIR
)/conf
/wing
/*click
$(1)/etc
/wing
/
108 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/click
/elementmap.xml
$(1)/usr
/share
/click
/elementmap.xml
111 $(eval
$(call BuildPackage
,wing
))