packages: fix parallel build by adding + for every make command that passes the jobserver
[packages.git] / net / lispmob / Makefile
1 #
2 # Copyright (C) 2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=lispmob
12 PKG_REV:=50eeffe971a07e06b2f1b73b0b7a6bc4167e0ab5
13 PKG_VERSION:=20120417
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=git://github.com/LISPmob/lispmob.git
18 PKG_SOURCE_PROTO:=git
19 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20 PKG_SOURCE_VERSION:=$(PKG_REV)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define KernelPackage/lisp
25   SUBMENU:=Network Support
26   TITLE:=LISP Protocol Support
27   DEPENDS:=+kmod-lisp-int +kmod-ipv6
28   URL:=http://lisp.cisco.com/
29   FILES:=$(PKG_BUILD_DIR)/lisp_mod/lisp.ko
30   AUTOLOAD:=$(call AutoLoad,51,lisp)
31 endef
32
33 define KernelPackage/lisp/description
34   Kernel module for Locator/ID Separation Protocol
35 endef
36
37 define KernelPackage/lisp-int
38   SUBMENU:=Network Support
39   TITLE:=Logical Interface for LISP
40   URL:=http://lisp.cisco.com/
41   FILES:=$(PKG_BUILD_DIR)/lisp_int/lisp_int.ko
42   AUTOLOAD:=$(call AutoLoad,50,lisp_int)
43 endef
44
45 define KernelPackage/lisp-int/description
46   Kernel module for LISP logical interface
47 endef
48
49 define Package/lispd
50   SECTION:=net
51   CATEGORY:=Network
52   TITLE:=Locator/ID separation protocol daemon
53   URL:=http://lisp.cisco.com/
54   DEPENDS:= +librt +libopenssl +confuse +kmod-lisp
55 endef
56
57 define Package/lispd/description
58   lispd is the Locator/ID separation protocol daemon
59 endef
60
61 define Package/lispconf
62   SECTION:=net
63   CATEGORY:=Network
64   TITLE:=Tool to query the LISP kernel module
65   URL:=http://lisp.cisco.com/
66 endef
67
68 define Package/lispconf/description
69   lispconf can be used to query the kernel module for
70   information such as map-cache or database contents
71 endef
72
73 include $(INCLUDE_DIR)/kernel-defaults.mk
74
75 ifdef CONFIG_PACKAGE_kmod-lisp
76   define Build/Compile/lisp
77         $(MAKE) $(KERNEL_MAKEOPTS) \
78                 SUBDIRS="$(PKG_BUILD_DIR)/lisp_mod" \
79                 modules
80   endef
81 endif
82
83 ifdef CONFIG_PACKAGE_kmod-lisp-int
84   define Build/Compile/lisp-int
85         $(MAKE) $(KERNEL_MAKEOPTS) \
86                 SUBDIRS="$(PKG_BUILD_DIR)/lisp_int" \
87                 modules
88   endef
89 endif
90
91 ifdef CONFIG_PACKAGE_lispd
92   define Build/Compile/lispd
93         +$(MAKE_VARS) \
94         $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lispd \
95                 $(MAKE_FLAGS)
96   endef
97 endif
98
99 ifdef CONFIG_PACKAGE_lispconf
100   define Build/Compile/lispconf
101         +$(MAKE_VARS) \
102         $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lispconf \
103                 $(MAKE_FLAGS)
104   endef
105 endif
106
107 define Build/Compile
108         $(Build/Compile/lisp)
109         $(Build/Compile/lisp-int)
110         $(Build/Compile/lispd)
111         $(Build/Compile/lispconf)
112 endef
113
114 define Package/lispconf/install
115         $(INSTALL_DIR) $(1)/usr/sbin
116         $(INSTALL_BIN) $(PKG_BUILD_DIR)/lispconf/lispconf $(1)/usr/sbin/
117 endef
118
119 define Package/lispd/install
120         $(INSTALL_DIR) $(1)/etc $(1)/usr/sbin
121         $(INSTALL_BIN) $(PKG_BUILD_DIR)/lispd/lispd $(1)/usr/sbin/
122         $(INSTALL_CONF) $(PKG_BUILD_DIR)/lispd/lispd.conf.example $(1)/etc/lispd.conf
123 endef
124
125 $(eval $(call KernelPackage,lisp))
126 $(eval $(call KernelPackage,lisp-int))
127 $(eval $(call BuildPackage,lispd))
128 $(eval $(call BuildPackage,lispconf))