source: packages/net/wing/Makefile @ 23377

Last change on this file since 23377 was 23377, checked in by mb, 6 years ago

wing: Enable parallel build

File size: 3.0 KB
Line 
1#
2# Copyright (C) 2006-2009 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=wing
11
12ifneq ($(CONFIG_WING_STABLE),)
13        PKG_VERSION:=20100903
14        PKG_RELEASE:=4
15        PKG_REV:=520e3168a5af4d26bec3779cfa4901d128a4bc6f
16else
17        PKG_VERSION:=$(shell date +%Y%m%d)
18        PKG_RELEASE:=1
19        PKG_REV:=HEAD
20endif
21
22PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
23PKG_SOURCE_URL:=http://github.com/create-net/click-wing.git
24PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
25PKG_SOURCE_VERSION:=$(PKG_REV)
26PKG_SOURCE_PROTO:=git
27
28PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
29PKG_BUILD_PARALLEL:=1
30PKG_INSTALL:=1
31
32include $(INCLUDE_DIR)/package.mk
33
34define Package/wing
35        TITLE:=Wireless mesh networking toolkit
36        SECTION:=net
37        CATEGORY:=Network
38        MAINTAINER:=Roberto Riggio <roberto.riggio@create-net.org>
39        DEPENDS:=+kmod-tun
40        URL:=http://www.wing-project.org/
41endef
42
43define Package/wing/Description
44        Wing is a wireless mesh routing software. The routing protocol
45        is derived from Roofnet. It supports multiple radio interfaces and
46        link quality routing using the ETX, ETT, and WCETT metrics.
47endef
48
49define Package/wing/config
50        source "$(SOURCE)/Config.in"
51endef
52
53EXTRA_LDFLAGS:=-ldl
54
55MAKE_FLAGS+=\
56        V=1 \
57        MINDRIVER=$(PKG_NAME) \
58        BUILD_CC=$(TARGET_CC) \
59        BUILD_CXX=$(TARGET_CXX)
60
61HOST_MAKE_FLAGS:=\
62        V=1 \
63        MINDRIVER=$(PKG_NAME)
64
65define Build/Configure
66        (cd $(PKG_BUILD_DIR); \
67                rm -rf config.{cache,status}; \
68                 ./configure \
69                        --prefix=/usr \
70                        --enable-userlevel \
71                        --enable-wifi \
72                        --enable-wing \
73                        --disable-linuxmodule \
74        );
75        $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(HOST_MAKE_FLAGS) tools
76        $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(HOST_MAKE_FLAGS) elementmap.xml
77        $(CP) $(PKG_BUILD_DIR)/tools/click-mkmindriver/click-mkmindriver $(PKG_BUILD_DIR)/
78        rm -rf $(PKG_BUILD_DIR)/config.{cache,status}
79        $(call Build/Configure/Default, \
80                --enable-tools=mixed \
81                --enable-userlevel \
82                --enable-wifi \
83                --enable-wing \
84                --disable-linuxmodule \
85        )
86        (cd $(PKG_BUILD_DIR)/userlevel; \
87                ../click-mkmindriver -p $(PKG_NAME) -C .. \
88                -f $(PKG_BUILD_DIR)/conf/wing/sample.click \
89                -A --all -E Discard -E Print -E Null \
90                -E InfiniteSource -E RatedSource -E EtherEncap -E UDPIPEncap \
91                -E RadiotapDecap -E RadiotapEncap \
92                -E ProbeTXRate -E MadwifiRate -E AutoRateFallback \
93                -E RoundRobinSched -E DRRSched; \
94        )
95endef
96
97define 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
109endef
110
111$(eval $(call BuildPackage,wing))
112
Note: See TracBrowser for help on using the repository browser.