2008-01-21 00:56:34 +00:00
|
|
|
#
|
2008-03-16 18:32:13 +00:00
|
|
|
# Copyright (C) 2008 OpenWrt.org
|
2007-03-17 03:59:59 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2009-04-21 19:16:40 +00:00
|
|
|
# $Id: Makefile 14803 2009-03-09 05:50:38Z marek $
|
2007-03-17 03:59:59 +00:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
2008-08-05 06:38:06 +00:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2007-03-17 03:59:59 +00:00
|
|
|
|
2007-07-31 19:42:13 +00:00
|
|
|
PKG_NAME:=batmand
|
2009-10-07 18:28:58 +00:00
|
|
|
PKG_REV:=1439
|
2008-01-16 19:15:46 +00:00
|
|
|
PKG_VERSION:=r$(PKG_REV)
|
2009-04-21 19:16:40 +00:00
|
|
|
PKG_RELEASE:=1
|
2008-11-05 10:06:09 +00:00
|
|
|
PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\"
|
2007-03-17 03:59:59 +00:00
|
|
|
|
2008-01-16 19:15:46 +00:00
|
|
|
PKG_SOURCE_PROTO:=svn
|
|
|
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
2008-08-05 06:38:06 +00:00
|
|
|
PKG_SOURCE_SUBDIR:=$(if $(PKG_BRANCH),$(PKG_BRANCH),$(PKG_NAME))-$(PKG_VERSION)
|
2009-04-21 19:16:40 +00:00
|
|
|
PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/trunk/
|
2008-01-16 19:15:46 +00:00
|
|
|
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
|
2008-08-05 06:38:06 +00:00
|
|
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
|
2007-03-17 03:59:59 +00:00
|
|
|
|
2009-04-21 19:16:40 +00:00
|
|
|
PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/batman/linux/modules
|
2008-01-16 19:15:46 +00:00
|
|
|
|
2007-03-17 03:59:59 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2008-01-16 19:15:46 +00:00
|
|
|
define Package/batmand/Default
|
2009-01-25 19:10:26 +00:00
|
|
|
URL:=http://www.open-mesh.net/
|
2008-01-16 19:15:46 +00:00
|
|
|
MAINTAINER:=Marek Lindner <lindner_marek@yahoo.de>
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/batmand
|
|
|
|
$(call Package/batmand/Default)
|
2008-03-16 18:32:13 +00:00
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
2007-03-17 03:59:59 +00:00
|
|
|
DEPENDS:=+libpthread +kmod-tun
|
2008-01-21 00:56:34 +00:00
|
|
|
TITLE:=B.A.T.M.A.N. layer 3 routing daemon
|
2007-03-17 03:59:59 +00:00
|
|
|
endef
|
|
|
|
|
2008-01-16 19:15:46 +00:00
|
|
|
define Package/batmand/description
|
|
|
|
B.A.T.M.A.N. layer 3 routing daemon
|
|
|
|
endef
|
|
|
|
|
2009-04-21 19:16:40 +00:00
|
|
|
define Package/vis
|
|
|
|
$(call Package/batmand/Default)
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
DEPENDS:=+libpthread
|
|
|
|
TITLE:=visualization server for B.A.T.M.A.N. layer 3
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/vis/description
|
|
|
|
visualization server for B.A.T.M.A.N. layer 3
|
|
|
|
endef
|
|
|
|
|
2008-01-21 00:56:34 +00:00
|
|
|
define KernelPackage/batgat
|
2008-01-16 19:15:46 +00:00
|
|
|
$(call Package/batmand/Default)
|
2008-03-16 18:32:13 +00:00
|
|
|
SUBMENU:=Network Support
|
|
|
|
DEPENDS:=+batmand
|
2008-01-16 19:15:46 +00:00
|
|
|
TITLE:=B.A.T.M.A.N. gateway module
|
|
|
|
FILES:=$(PKG_KMOD_BUILD_DIR)/batgat.$(LINUX_KMOD_SUFFIX)
|
2008-01-21 00:56:34 +00:00
|
|
|
AUTOLOAD:=$(call AutoLoad,50,batgat)
|
2008-01-16 19:15:46 +00:00
|
|
|
endef
|
|
|
|
|
2008-01-21 00:56:34 +00:00
|
|
|
|
|
|
|
define KernelPackage/batgat/description
|
2009-04-21 19:16:40 +00:00
|
|
|
Kernel gateway module for B.A.T.M.A.N. for better tunnel performance
|
2007-03-17 03:59:59 +00:00
|
|
|
endef
|
|
|
|
|
2009-04-21 19:16:40 +00:00
|
|
|
MAKE_BATMAND_ARGS += \
|
2008-11-05 10:06:09 +00:00
|
|
|
EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \
|
2007-07-31 19:42:13 +00:00
|
|
|
CCFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
OFLAGS="$(TARGET_CFLAGS)" \
|
2008-01-21 00:56:34 +00:00
|
|
|
REVISION="$(PKG_REV)" \
|
2008-01-16 19:15:46 +00:00
|
|
|
CC="$(TARGET_CC)" \
|
2007-07-31 19:42:13 +00:00
|
|
|
NODEBUG=1 \
|
|
|
|
UNAME="Linux" \
|
|
|
|
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
|
|
|
|
STRIP="/bin/true" \
|
|
|
|
batmand install
|
2009-04-21 19:16:40 +00:00
|
|
|
|
|
|
|
MAKE_VIS_ARGS += \
|
|
|
|
EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_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" \
|
|
|
|
vis install
|
|
|
|
|
|
|
|
MAKE_BATGAT_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-03-17 03:59:59 +00:00
|
|
|
|
2008-01-16 19:15:46 +00:00
|
|
|
define Build/Configure
|
|
|
|
endef
|
|
|
|
|
2009-05-18 17:49:15 +00:00
|
|
|
ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_batmand),)
|
2009-04-21 19:16:40 +00:00
|
|
|
BUILD_BATMAND := $(MAKE) -C $(PKG_BUILD_DIR)/batman $(MAKE_BATMAND_ARGS)
|
|
|
|
endif
|
|
|
|
|
2009-05-18 17:49:15 +00:00
|
|
|
ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_vis),)
|
2009-04-21 19:16:40 +00:00
|
|
|
BUILD_VIS := $(MAKE) -C $(PKG_BUILD_DIR)/vis $(MAKE_VIS_ARGS)
|
|
|
|
endif
|
|
|
|
|
2009-05-18 17:49:15 +00:00
|
|
|
ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_kmod-batgat),)
|
2009-04-21 19:16:40 +00:00
|
|
|
BUILD_BATGAT := $(MAKE) -C "$(LINUX_DIR)" $(MAKE_BATGAT_ARGS)
|
|
|
|
endif
|
|
|
|
|
2008-01-16 19:15:46 +00:00
|
|
|
define Build/Compile
|
2009-04-21 19:16:40 +00:00
|
|
|
$(BUILD_BATMAND)
|
|
|
|
$(BUILD_VIS)
|
2008-01-21 00:56:34 +00:00
|
|
|
cp $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild $(PKG_KMOD_BUILD_DIR)/Makefile
|
2009-04-21 19:16:40 +00:00
|
|
|
$(BUILD_BATGAT)
|
2008-01-16 19:15:46 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/batmand/install
|
2007-07-31 22:08:27 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/
|
2008-01-16 19:15:46 +00:00
|
|
|
$(INSTALL_BIN) ./files/etc/init.d/batmand $(1)/etc/init.d
|
|
|
|
$(INSTALL_DATA) ./files/etc/config/batmand $(1)/etc/config
|
2007-03-17 03:59:59 +00:00
|
|
|
endef
|
|
|
|
|
2009-04-21 19:16:40 +00:00
|
|
|
define Package/vis/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/vis $(1)/usr/sbin/
|
|
|
|
$(INSTALL_BIN) ./files/etc/init.d/vis $(1)/etc/init.d
|
|
|
|
$(INSTALL_DATA) ./files/etc/config/vis $(1)/etc/config
|
|
|
|
endef
|
|
|
|
|
2008-01-16 19:15:46 +00:00
|
|
|
$(eval $(call BuildPackage,batmand))
|
2009-04-21 19:16:40 +00:00
|
|
|
$(eval $(call BuildPackage,vis))
|
2008-01-21 00:56:34 +00:00
|
|
|
$(eval $(call KernelPackage,batgat))
|