improve parallel building
authorFelix Fietkau <nbd@openwrt.org>
Wed, 18 Oct 2006 19:00:05 +0000 (19:00 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 18 Oct 2006 19:00:05 +0000 (19:00 +0000)
SVN-Revision: 5208

include/kernel-build.mk
toolchain/uClibc/Makefile
tools/Makefile

index a3c714c688b59b743272a50c763eb72e711ecc59..251e985e8bb2ff9ad41cc4fd2eb6303eec9b4972 100644 (file)
@@ -85,7 +85,7 @@ else
 endif
 
 $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.linux-compile pkg-install ramdisk-config
-       $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) $(KERNELNAME)
+       $(MAKE) -j$(CONFIG_JLEVEL) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) $(KERNELNAME)
 
 $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux
        $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@
@@ -93,7 +93,7 @@ $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux
 
 $(LINUX_DIR)/.modules_done:
        rm -rf $(KERNEL_BUILD_DIR)/modules
-       $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) modules
+       $(MAKE) -j$(CONFIG_JLEVEL) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) modules
        $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install
        touch $(LINUX_DIR)/.modules_done
 
index 732911215eb2b6112da38472f5fd1f7e14d09335..b640405ddc04dfcda70125033d03be4bcb9a7ada 100644 (file)
@@ -68,7 +68,7 @@ define Build/Configure
 endef
 
 define Build/Compile
-       PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \
+       PATH=$(TARGET_PATH) $(MAKE) -j $(CONFIG_JLEVEL) -C $(PKG_BUILD_DIR) \
                PREFIX= \
                DEVEL_PREFIX=/ \
                RUNTIME_PREFIX=/ \
index c8fad2323683df3d62275ea3981b38fbebe41e08..eeadde2ed622693f32d30f6f2293ce9bce6bd3b9 100644 (file)
@@ -16,7 +16,9 @@ TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
 
 all: install
 download: $(TARGETS_DOWNLOAD)
-install: $(TARGETS_INSTALL)
+install: 
+       $(MAKE) install-targets
+install-targets: $(TARGETS_INSTALL)
 clean: $(TARGETS_CLEAN)
 
 squashfs-compile: lzma-install
@@ -58,3 +60,8 @@ $(TOOL_BUILD_DIR):
        @$(MAKE) -C $(patsubst %-clean,%,$@) clean
        @rm -f $(TOOL_STAMP_DIR)/.tool_$(patsubst %-clean,%,$@)-*
 
+ifeq ($(MAKECMDGOALS),install-targets)
+MAKEFLAGS:=$(MAKEFLAGS) -j$(CONFIG_JLEVEL)
+else
+.NOTPARALLEL:
+endif