Propagate -j in make calls for better parallelization
Pavel Chupin [Thu, 27 Feb 2014 12:33:58 +0000 (16:33 +0400)]
Also fix deps for parallel build.
It should speed up full NDK build.

Change-Id: Id62b4ba6b2d09fd28a2724c285eb0069b79b13fb
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>

Makefile.in

index a050e09..9c17c95 100644 (file)
@@ -95,6 +95,7 @@ HAVE_EXPAT=@have_expat@
 ENABLE_GOLD=@enable_gold@
 ENABLE_LD_DEFAULT=@enable_ld_default@
 STAMP=touch
+MAKEFLAGS+=-j$(NUM_JOBS)
 
 TARGET_BINUTILS_BUILDDIR=$(abs_builddir)/$(BINUTILS_VERSION)
 TARGET_GCC_BUILDDIR=$(abs_builddir)/$(GCC_VERSION)
@@ -488,7 +489,7 @@ stmp-config-target-gcc: config.status stmp-install-host-ppl stmp-install-host-is
           $(GCC_CONFIG_ARGS)) && \
        $(STAMP) $@
 build-target-gcc: stmp-build-target-gcc
-stmp-build-target-gcc: stmp-config-target-gcc
+stmp-build-target-gcc: stmp-config-target-gcc install-target-binutils
        ($(canadian_env) \
         $(MAKE) -C ${GCC_VERSION} \
                CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
@@ -806,7 +807,7 @@ build-target-gdb: stmp-build-target-gdb
 stmp-build-target-gdb: stmp-config-target-gdb
        ($(canadian_env) \
         $(MAKE) -C ${GDB_VERSION}) && $(STAMP) $@
-install-target-gdb: stmp-build-target-gdb
+install-target-gdb: stmp-build-target-gdb install-target-binutils
        ($(canadian_env) \
         $(MAKE) -C ${GDB_VERSION} install)
 endif