2 # Copyright (C) 2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
9 include $(TOPDIR
)/rules.mk
15 PKG_MD5SUM
:=b1518e84ce530883d224c6ca4c673ce8
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
18 PKG_SOURCE_URL
:=http
://downloads.open-mesh.org
/batman
/releases
/batman-adv-
$(PKG_VERSION
)
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)/$(PKG_NAME
)-$(PKG_VERSION
)
23 include $(INCLUDE_DIR
)/package.mk
24 include $(INCLUDE_DIR
)/kernel.mk
26 define KernelPackage
/batman-adv
27 URL
:=http
://www.open-mesh.org
/
28 MAINTAINER
:=Marek Lindner
<mareklindner@neomailbox.ch
>
29 SUBMENU
:=Network Support
30 DEPENDS
:=+KMOD_BATMAN_ADV_BLA
:kmod-lib-crc16
+kmod-crypto-core
+kmod-crypto-crc32c
+kmod-lib-crc32c
31 TITLE
:=B.A.T.M.A.N. Adv
32 FILES
:=$(PKG_BUILD_DIR
)/batman-adv.
$(LINUX_KMOD_SUFFIX
)
33 AUTOLOAD
:=$(call AutoLoad
,50,batman-adv
)
36 define KernelPackage
/batman-adv
/description
37 B.A.T.M.A.N. advanced is a kernel module which allows to
38 build layer
2 mesh networks. This package builds
39 version
$(PKG_VERSION
) of the kernel module.
42 define KernelPackage
/batman-adv
/config
43 source
"$(SOURCE)/Config.in"
46 define Package
/kmod-batman-adv
/conffiles
47 /etc
/config
/batman-adv
50 MAKE_BATMAN_ADV_ARGS
+= \
51 CROSS_COMPILE
="$(TARGET_CROSS)" \
52 KERNELPATH
="$(LINUX_DIR)" \
53 ARCH
="$(LINUX_KARCH)" \
54 PATH
="$(TARGET_PATH)" \
55 SUBDIRS
="$(PKG_BUILD_DIR)" \
56 PWD
="$(PKG_BUILD_DIR)" \
57 LINUX_VERSION
="$(LINUX_VERSION)" \
58 CONFIG_BATMAN_ADV_DEBUG
=$(if
$(CONFIG_KMOD_BATMAN_ADV_DEBUG_LOG
),y
,n
) \
59 CONFIG_BATMAN_ADV_BLA
=$(if
$(CONFIG_KMOD_BATMAN_ADV_BLA
),y
,n
) \
60 CONFIG_BATMAN_ADV_DAT
=$(if
$(CONFIG_KMOD_BATMAN_ADV_DAT
),y
,n
) \
61 CONFIG_BATMAN_ADV_MCAST
=$(if
$(CONFIG_KMOD_BATMAN_ADV_MCAST
),y
,n
) \
62 CONFIG_BATMAN_ADV_NC
=$(if
$(CONFIG_KMOD_BATMAN_ADV_NC
),y
,n
) \
66 $(call Build
/Prepare
/Default
)
67 $(SED
) '/#define _NET_BATMAN_ADV_MAIN_H_/a\#undef CONFIG_MODULE_STRIPPED' \
68 $(PKG_BUILD_DIR
)/main.h
72 $(MAKE
) -C
"$(PKG_BUILD_DIR)" $(MAKE_BATMAN_ADV_ARGS
)
76 rm -rf
$(BUILD_DIR
)/$(PKG_NAME
)/
79 define KernelPackage
/batman-adv
/install
80 $(INSTALL_DIR
) $(1)/etc
/config
$(1)/etc
/hotplug.d
/net
$(1)/etc
/hotplug.d
/iface
$(1)/lib
/batman-adv
$(1)/usr
/sbin
$(1)/lib
/netifd
/proto
81 $(INSTALL_DATA
) .
/files
/etc
/config
/batman-adv
$(1)/etc
/config
82 $(INSTALL_DATA
) .
/files
/lib
/batman-adv
/config.sh
$(1)/lib
/batman-adv
83 $(INSTALL_BIN
) .
/files
/etc
/hotplug.d
/net
/99-batman-adv
$(1)/etc
/hotplug.d
/net
84 $(INSTALL_BIN
) .
/files
/lib
/netifd
/proto
/batadv.sh
$(1)/lib
/netifd
/proto
85 $(INSTALL_BIN
) .
/files
/lib
/netifd
/proto
/batadv_vlan.sh
$(1)/lib
/netifd
/proto
88 $(eval
$(call KernelPackage
,batman-adv
))