527c756fd1
The target build inherits configure properties from the host. This results in broken compile for an ARM target and PPC host. (and other combinations as well). This tries to fix it. However, it still is not 100% safe. However, it does work on ARM/PPC with these changes. We should either split this into host and target packages, or run a "make clean" between the host and target parts. git-svn-id: svn://svn.openwrt.org/openwrt/packages@23376 3c298f89-4303-0410-b956-a3cf2f4a3e73
112 lines
3.0 KiB
Makefile
112 lines
3.0 KiB
Makefile
#
|
|
# Copyright (C) 2006-2009 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=wing
|
|
|
|
ifneq ($(CONFIG_WING_STABLE),)
|
|
PKG_VERSION:=20100903
|
|
PKG_RELEASE:=4
|
|
PKG_REV:=520e3168a5af4d26bec3779cfa4901d128a4bc6f
|
|
else
|
|
PKG_VERSION:=$(shell date +%Y%m%d)
|
|
PKG_RELEASE:=1
|
|
PKG_REV:=HEAD
|
|
endif
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
PKG_SOURCE_URL:=http://github.com/create-net/click-wing.git
|
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
|
PKG_SOURCE_PROTO:=git
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|
PKG_INSTALL:=1
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/wing
|
|
TITLE:=Wireless mesh networking toolkit
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
MAINTAINER:=Roberto Riggio <roberto.riggio@create-net.org>
|
|
DEPENDS:=+kmod-tun
|
|
URL:=http://www.wing-project.org/
|
|
endef
|
|
|
|
define Package/wing/Description
|
|
Wing is a wireless mesh routing software. The routing protocol
|
|
is derived from Roofnet. It supports multiple radio interfaces and
|
|
link quality routing using the ETX, ETT, and WCETT metrics.
|
|
endef
|
|
|
|
define Package/wing/config
|
|
source "$(SOURCE)/Config.in"
|
|
endef
|
|
|
|
EXTRA_LDFLAGS:=-ldl
|
|
|
|
MAKE_FLAGS+=\
|
|
V=1 \
|
|
MINDRIVER=$(PKG_NAME) \
|
|
BUILD_CC=$(TARGET_CC) \
|
|
BUILD_CXX=$(TARGET_CXX)
|
|
|
|
HOST_MAKE_FLAGS:=\
|
|
V=1 \
|
|
MINDRIVER=$(PKG_NAME)
|
|
|
|
define Build/Configure
|
|
(cd $(PKG_BUILD_DIR); \
|
|
rm -rf config.{cache,status}; \
|
|
./configure \
|
|
--prefix=/usr \
|
|
--enable-userlevel \
|
|
--enable-wifi \
|
|
--enable-wing \
|
|
--disable-linuxmodule \
|
|
);
|
|
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(HOST_MAKE_FLAGS) tools
|
|
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(HOST_MAKE_FLAGS) elementmap.xml
|
|
$(CP) $(PKG_BUILD_DIR)/tools/click-mkmindriver/click-mkmindriver $(PKG_BUILD_DIR)/
|
|
rm -rf $(PKG_BUILD_DIR)/config.{cache,status}
|
|
$(call Build/Configure/Default, \
|
|
--enable-tools=mixed \
|
|
--enable-userlevel \
|
|
--enable-wifi \
|
|
--enable-wing \
|
|
--disable-linuxmodule \
|
|
)
|
|
(cd $(PKG_BUILD_DIR)/userlevel; \
|
|
../click-mkmindriver -p $(PKG_NAME) -C .. \
|
|
-f $(PKG_BUILD_DIR)/conf/wing/sample.click \
|
|
-A --all -E Discard -E Print -E Null \
|
|
-E InfiniteSource -E RatedSource -E EtherEncap -E UDPIPEncap \
|
|
-E RadiotapDecap -E RadiotapEncap \
|
|
-E ProbeTXRate -E MadwifiRate -E AutoRateFallback \
|
|
-E RoundRobinSched -E DRRSched; \
|
|
)
|
|
endef
|
|
|
|
define Package/wing/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_DIR) $(1)/etc/wing
|
|
$(INSTALL_DIR) $(1)/usr/share/click
|
|
$(CP) ./files/* $(1)/
|
|
$(CP) $(PKG_BUILD_DIR)/conf/wing/click_config $(1)/usr/bin/
|
|
$(CP) $(PKG_BUILD_DIR)/conf/wing/write_handler $(1)/usr/bin/
|
|
$(CP) $(PKG_BUILD_DIR)/conf/wing/read_handler $(1)/usr/bin/
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME)click $(1)/usr/bin/click
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/click-align $(1)/usr/bin/click-align
|
|
$(CP) $(PKG_BUILD_DIR)/conf/wing/*click $(1)/etc/wing/
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/click/elementmap.xml $(1)/usr/share/click/elementmap.xml
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,wing))
|
|
|