fix batman extra cflags and update revision
[feed/routing.git] / Makefile
index e25d0dbe222205690ea90a1d0c8503c2b1cde72a..566fe0fa1f4ee76245af7a6b3a4488d0d1d4c096 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2008 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,35 +7,35 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=batmand
-PKG_REV:=963
+PKG_REV:=1145
 PKG_VERSION:=r$(PKG_REV)
 PKG_RELEASE:=1
-PKG_BRANCH:=batman
+#PKG_BRANCH:=batman-0.3
+PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\"
 
 PKG_SOURCE_PROTO:=svn
 PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_SUBDIR:=$(PKG_BRANCH)d-$(PKG_VERSION)
-PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/trunk/$(PKG_BRANCH)
+PKG_SOURCE_SUBDIR:=$(if $(PKG_BRANCH),$(PKG_BRANCH),$(PKG_NAME))-$(PKG_VERSION)
+PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/$(if $(PKG_BRANCH),tags/$(PKG_BRANCH),trunk/batman/)
 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
 
 PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/linux/modules
 
 include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/kernel.mk
 
 define Package/batmand/Default
-  SECTION:=net
-  CATEGORY:=Network
   URL:=https://www.open-mesh.net/
   MAINTAINER:=Marek Lindner <lindner_marek@yahoo.de>
 endef
 
 define Package/batmand
 $(call Package/batmand/Default)
+  SECTION:=net
+  CATEGORY:=Network
   DEPENDS:=+libpthread +kmod-tun
   TITLE:=B.A.T.M.A.N. layer 3 routing daemon
 endef
@@ -46,7 +46,8 @@ endef
 
 define KernelPackage/batgat
 $(call Package/batmand/Default)
-  DEPENDS:=batmand
+  SUBMENU:=Network Support
+  DEPENDS:=+batmand
   TITLE:=B.A.T.M.A.N. gateway module
   FILES:=$(PKG_KMOD_BUILD_DIR)/batgat.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoLoad,50,batgat)
@@ -54,11 +55,11 @@ endef
 
 
 define KernelPackage/batgat/description
-Kernel gateway module for B.A.T.M.A.N.
+ Kernel gateway module for B.A.T.M.A.N.
 endef
 
 MAKE_ARGS += \
-       CFLAGS="$(TARGET_CFLAGS)" \
+       EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \
        CCFLAGS="$(TARGET_CFLAGS)" \
        OFLAGS="$(TARGET_CFLAGS)" \
        REVISION="$(PKG_REV)" \