minor locking change
[openwrt.git] / package / aodv-uu / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=aodv-uu
13 PKG_VERSION:=0.9.3
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://core.it.uu.se/core/files/
18 PKG_MD5SUM:=05460543054449cb4b170252a7168c65
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/aodv-uu/Default
23 TITLE:=Ad-hoc On-demand Distance Vector Routing
24 DEPENDS:=@BROKEN
25 DESCRIPTION:=\
26 AODV is the Ad-hoc On-demand Distance Vector routing protocol \\\
27 implementation created at Uppsala University.
28 URL:=http://core.it.uu.se/core/index.php/AODV-UU
29 endef
30
31 define Package/aodv-uu
32 $(call Package/aodv-uu/Default)
33 SECTION:=net
34 CATEGORY:=Network
35 TITLE+= (daemon)
36 DESCRIPTION+=\\\
37 \\\
38 This package contains the AODV userland daemon.
39 endef
40
41 define KernelPackage/aodv-uu
42 $(call Package/aodv-uu/Default)
43 TITLE+= (kernel module)
44 DESCRIPTION+=\\\
45 \\\
46 This package contains the AODV kernel module.
47 FILES:=$(PKG_BUILD_DIR)/lnx/kaodv.$(LINUX_KMOD_SUFFIX)
48 SUBMENU:=Network Support
49 AUTOLOAD:=$(call AutoLoad,80,$(shell cat ./files/aodv-uu.modules))
50 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
51 endef
52
53 ifeq ($(CONFIG_LINUX_2_6),y)
54 define Build/Compile/linux26
55 $(MAKE) -C $(LINUX_DIR) \
56 ARCH="$(LINUX_KARCH)" \
57 CROSS_COMPILE="$(TARGET_CROSS)" \
58 PATCHLEVEL="$(LINUX_VERSION)" \
59 KERNDIR="$(LINUX_DIR)" \
60 SUBDIRS="$(PKG_BUILD_DIR)/lnx" \
61 modules
62 endef
63 else
64 # We assume 2.4 builds are only for brcm-2.4 yet
65 define Build/Compile/linux24-brcm
66 $(call Build/Compile/Default,\
67 KERNEL_DIR="$(LINUX_DIR)" \
68 KCC="$(TARGET_CC)" \
69 CFLAGS="$(TARGET_CFLAGS)" \
70 kaodv-mips \
71 )
72 cp $(PKG_BUILD_DIR)/lnx/kaodv-mips.$(LINUX_KMOD_SUFFIX) $(PKG_BUILD_DIR)/lnx/kaodv.$(LINUX_KMOD_SUFFIX)
73 endef
74 endif
75
76 define Build/Compile
77 $(call Build/Compile/linux26)
78 $(call Build/Compile/linux24-brcm)
79 $(call Build/Compile/Default,\
80 KERNEL_DIR="$(LINUX_DIR)" \
81 KCC="$(TARGET_CC)" \
82 CFLAGS="$(TARGET_CFLAGS)" \
83 aodvd \
84 )
85 endef
86
87 define Package/aodv-uu/install
88 $(INSTALL_DIR) $(1)/usr/sbin
89 $(INSTALL_BIN) $(PKG_BUILD_DIR)/aodvd $(1)/usr/sbin
90 endef
91
92 define Package/kmod-aodv-uu/install
93 $(INSTALL_DIR) $(1)/etc/modules.d
94 $(INSTALL_DATA) ./files/aodv-uu.modules $(1)/etc/modules.d/80-aodv-uu
95 $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION)
96 $(CP) $(PKG_BUILD_DIR)/lnx/kaodv.$(LINUX_KMOD_SUFFIX) $(1)/lib/modules/$(LINUX_VERSION)/
97 endef
98
99 $(eval $(call BuildPackage,aodv-uu))
100 $(eval $(call KernelPackage,aodv-uu))
This page took 0.041637 seconds and 5 git commands to generate.