2008-01-21 00:56:34 +00:00
|
|
|
#
|
2008-03-16 18:32:13 +00:00
|
|
|
# Copyright (C) 2008 OpenWrt.org
|
2007-07-31 21:14:30 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=batmand-adv
|
2009-02-07 20:51:42 +00:00
|
|
|
PKG_REV:=1220
|
2008-01-21 00:56:34 +00:00
|
|
|
PKG_VERSION:=r$(PKG_REV)
|
2007-07-31 21:14:30 +00:00
|
|
|
PKG_RELEASE:=1
|
2008-01-21 00:56:34 +00:00
|
|
|
PKG_BRANCH:=batman-adv-userspace
|
2007-07-31 21:14:30 +00:00
|
|
|
|
2008-01-21 00:56:34 +00:00
|
|
|
PKG_SOURCE_PROTO:=svn
|
|
|
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
|
|
|
PKG_SOURCE_SUBDIR:=batman-adv-$(PKG_VERSION)
|
|
|
|
PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/trunk/
|
|
|
|
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
|
2007-07-31 21:14:30 +00:00
|
|
|
|
2009-01-01 17:55:45 +00:00
|
|
|
PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/batman-adv-kernelland
|
2008-01-21 00:56:34 +00:00
|
|
|
|
|
|
|
PKG_TOOL_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-battool-install
|
|
|
|
PKG_TOOL_BUILD_DIR:=$(PKG_BUILD_DIR)/battool
|
|
|
|
|
2007-07-31 21:14:30 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2008-01-21 00:56:34 +00:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2007-07-31 21:14:30 +00:00
|
|
|
|
2008-01-21 00:56:34 +00:00
|
|
|
define Package/batman-adv/Default
|
2007-07-31 21:14:30 +00:00
|
|
|
URL:=https://www.open-mesh.net/
|
2008-01-21 00:56:34 +00:00
|
|
|
MAINTAINER:=Marek Lindner <lindner_marek@yahoo.de>
|
2007-07-31 21:14:30 +00:00
|
|
|
endef
|
|
|
|
|
2008-01-21 00:56:34 +00:00
|
|
|
define Package/batmand-adv
|
|
|
|
$(call Package/batman-adv/Default)
|
2008-03-16 18:32:13 +00:00
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
2008-01-21 00:56:34 +00:00
|
|
|
DEPENDS:=+libpthread +kmod-tun
|
|
|
|
TITLE:=B.A.T.M.A.N. layer 2 routing daemon
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/batmand-adv/description
|
|
|
|
B.A.T.M.A.N. layer 2 routing daemon
|
2007-07-31 21:14:30 +00:00
|
|
|
endef
|
|
|
|
|
2008-01-21 00:56:34 +00:00
|
|
|
define Package/battool
|
|
|
|
$(call Package/batman-adv/Default)
|
2008-03-16 18:32:13 +00:00
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
2008-01-21 00:56:34 +00:00
|
|
|
TITLE:=B.A.T.M.A.N. layer 2 debug tools
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/battool/description
|
|
|
|
B.A.T.M.A.N. layer 2 debug tools
|
|
|
|
endef
|
|
|
|
|
2009-01-01 17:55:45 +00:00
|
|
|
define KernelPackage/batman-advanced
|
2008-01-21 00:56:34 +00:00
|
|
|
$(call Package/batman-adv/Default)
|
2008-03-16 18:32:13 +00:00
|
|
|
SUBMENU:=Network Support
|
2008-01-21 00:56:34 +00:00
|
|
|
DEPENDS:=@LINUX_2_6
|
|
|
|
TITLE:=Kernel routing module for B.A.T.M.A.N. layer 2
|
2009-01-01 17:55:45 +00:00
|
|
|
FILES:=$(PKG_KMOD_BUILD_DIR)/batman-adv.$(LINUX_KMOD_SUFFIX)
|
|
|
|
AUTOLOAD:=$(call AutoLoad,50,batman-adv)
|
2008-01-21 00:56:34 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
2009-01-01 17:55:45 +00:00
|
|
|
define KernelPackage/batman-advanced/description
|
2008-01-21 00:56:34 +00:00
|
|
|
Kernel routing module for B.A.T.M.A.N. layer 2
|
|
|
|
endef
|
|
|
|
|
|
|
|
MAKE_ARGS += \
|
2007-07-31 22:07:27 +00:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
CCFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
OFLAGS="$(TARGET_CFLAGS)" \
|
2008-01-21 00:56:34 +00:00
|
|
|
REVISION="$(PKG_REV)" \
|
|
|
|
CC="$(TARGET_CC)" \
|
2007-07-31 22:07:27 +00:00
|
|
|
NODEBUG=1 \
|
|
|
|
UNAME="Linux" \
|
|
|
|
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
|
|
|
|
STRIP="/bin/true" \
|
|
|
|
batmand-adv install
|
2009-02-07 20:51:42 +00:00
|
|
|
|
|
|
|
MAKE_KMOD_ARGS += \
|
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
ARCH="$(LINUX_KARCH)" \
|
|
|
|
PATH="$(TARGET_PATH)" \
|
|
|
|
SUBDIRS="$(PKG_KMOD_BUILD_DIR)" \
|
|
|
|
LINUX_VERSION="$(LINUX_VERSION)" \
|
|
|
|
REVISION="$(PKG_REV)" modules
|
2007-07-31 21:14:30 +00:00
|
|
|
|
2008-01-21 00:56:34 +00:00
|
|
|
MAKE_TOOL_ARGS += \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
CCFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
OFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
REVISION="$(PKG_REV)" \
|
|
|
|
CC="$(TARGET_CC)" \
|
|
|
|
NODEBUG=1 \
|
|
|
|
UNAME="Linux" \
|
|
|
|
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
|
|
|
|
STRIP="/bin/true" \
|
|
|
|
battool install
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
endef
|
|
|
|
|
2009-02-07 20:51:42 +00:00
|
|
|
ifeq ($(CONFIG_PACKAGE_batmand-adv),y)
|
|
|
|
BUILD_ADV = $(MAKE) -C $(PKG_BUILD_DIR)/batman-adv-userspace $(MAKE_ARGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_PACKAGE_kmod-batman-advanced),y)
|
|
|
|
BUILD_KMOD_ADV = $(MAKE) -C "$(LINUX_DIR)" $(MAKE_KMOD_ARGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_PACKAGE_battool),y)
|
|
|
|
BUILD_BATTOOL = $(MAKE) -C $(PKG_TOOL_BUILD_DIR) $(MAKE_TOOL_ARGS)
|
|
|
|
endif
|
|
|
|
|
2008-01-21 00:56:34 +00:00
|
|
|
define Build/Compile
|
2009-02-07 20:51:42 +00:00
|
|
|
$(BUILD_ADV)
|
2008-01-21 00:56:34 +00:00
|
|
|
cp $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild $(PKG_KMOD_BUILD_DIR)/Makefile
|
2009-02-07 20:51:42 +00:00
|
|
|
$(BUILD_KMOD_ADV)
|
|
|
|
$(BUILD_BATTOOL)
|
2008-01-21 00:56:34 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/batmand-adv/install
|
2007-07-31 22:07:27 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/batmand-adv $(1)/usr/sbin/
|
2008-01-21 00:56:34 +00:00
|
|
|
$(INSTALL_BIN) ./files/etc/init.d/batmand-adv $(1)/etc/init.d
|
|
|
|
$(INSTALL_DATA) ./files/etc/config/batmand-adv $(1)/etc/config
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/battool/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/battool $(1)/usr/sbin/
|
2007-07-31 21:14:30 +00:00
|
|
|
endef
|
|
|
|
|
2008-01-21 00:56:34 +00:00
|
|
|
$(eval $(call BuildPackage,batmand-adv))
|
|
|
|
$(eval $(call BuildPackage,battool))
|
2009-01-01 17:55:45 +00:00
|
|
|
$(eval $(call KernelPackage,batman-advanced))
|