From: Joseph Roback <openwrt-devel@roback.cc>
authorMichael Büsch <mb@bu3sch.de>
Tue, 7 Sep 2010 10:00:34 +0000 (10:00 +0000)
committerMichael Büsch <mb@bu3sch.de>
Tue, 7 Sep 2010 10:00:34 +0000 (10:00 +0000)
26 Makefile patches for enabling parallel builds. Tested on Linux (8-core) and Darwin (12-core), individually and from clean build_root. The first set is from trunk, the second is from feeds/packages.

Signed-off-by: Joe Roback <joe@roback.cc>
SVN-Revision: 22965

package/busybox/Makefile
package/cyassl/Makefile
package/dropbear/Makefile
package/iptables/Makefile
package/mac80211/Makefile
package/ncurses/Makefile
package/zlib/Makefile

index 7e7e447b44ad02a2f834589b8932447b16c6dbbf..4ea9a61e4eb79453a103c1008333f6b3ddb5516a 100644 (file)
@@ -16,6 +16,8 @@ PKG_SOURCE_URL:=http://www.busybox.net/downloads \
                http://distfiles.gentoo.org/distfiles/
 PKG_MD5SUM:=7360b7138b899ee7fc885791c740c3c3
 
+PKG_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 ifeq ($(DUMP),)
@@ -65,7 +67,7 @@ ifdef CONFIG_GCC_VERSION_4_5_0
 endif
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                CC="$(TARGET_CC)" \
                CROSS_COMPILE="$(TARGET_CROSS)" \
                KBUILD_HAVE_NLS=no \
index a8168ec4c9db4d90271e917bea6695830038217a..d8e5bae139deae53a97331c5e58d54af953d9ae2 100644 (file)
@@ -17,6 +17,7 @@ PKG_MD5SUM:=037397c7df84b9a12e614bf46135df1c
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index 77d6d9707b04e4ec166cb2ef793423a64d5e0d1d..6fad273660a4f160dcea3dfe778fd1ea54c54a9e 100644 (file)
@@ -17,6 +17,8 @@ PKG_SOURCE_URL:= \
        http://www.mirrors.wiretapped.net/security/cryptography/apps/ssh/dropbear/
 PKG_MD5SUM:=1c69ec674481d7745452f68f2ea5597e
 
+PKG_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/dropbear/Default
@@ -70,12 +72,12 @@ define Build/Configure
 endef
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
                LD="$(TARGET_CC)" \
                PROGRAMS="dropbear dbclient dropbearkey scp" \
                MULTI=1 SCPPROGRESS=1
-       $(MAKE) -C $(PKG_BUILD_DIR) \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
                LD="$(TARGET_CC)" \
                PROGRAMS="dropbearconvert"
index 08b145070331b97a79745c7dd8df8925c4f3d39c..8609b6d7c4e26ed4bb47e8f0b92ce8823202551c 100644 (file)
@@ -21,6 +21,7 @@ PKG_SOURCE_URL:=http://www.netfilter.org/projects/iptables/files \
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 ifeq ($(DUMP),)
index 450f8443df8724ebf862f507f934160a3ffe4deb..f3b441c8f6ba4792a7417a925988c7724d91b19d 100644 (file)
@@ -19,6 +19,7 @@ PKG_MD5SUM:=5d720b6d8de97ae61a4c3e4ee10a6de1
 
 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_kmod-mac80211 \
@@ -955,7 +956,7 @@ endef
 ifneq ($(CONFIG_PACKAGE_kmod-cfg80211),)
  define Build/Compile/kmod
        rm -rf $(PKG_BUILD_DIR)/modules
-       $(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_OPTS) all
+       $(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" $(MAKE_OPTS) all
  endef
 endif
 
index cbbb098cb2daff957cafc8c6e0cea01169e4b614..8fac06eca15f448952c236bdb2a7c54215ef7216 100644 (file)
@@ -17,6 +17,7 @@ PKG_SOURCE_URL:=@GNU/ncurses
 PKG_MD5SUM:=cce05daf61a64501ef6cd8da1f727ec6
 
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index c6a18378dce9c8c8b3c67009babeec08fdf34abb..bcd6ae040afd7f83e99afdf41a56ef07552792ba 100644 (file)
@@ -15,6 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.zlib.net @SF/libpng
 PKG_MD5SUM:=dee233bf288ee795ac96a98cc2e369b6
 
+PKG_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/zlib
@@ -37,7 +39,7 @@ define Build/Configure
 endef
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
                LDSHARED="$(TARGET_CROSS)ld -shared" \
                CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \