summaryrefslogtreecommitdiff
path: root/buildlib/defaults.mak
diff options
context:
space:
mode:
Diffstat (limited to 'buildlib/defaults.mak')
-rw-r--r--buildlib/defaults.mak13
1 files changed, 13 insertions, 0 deletions
diff --git a/buildlib/defaults.mak b/buildlib/defaults.mak
index d04b67ffa..3e145f673 100644
--- a/buildlib/defaults.mak
+++ b/buildlib/defaults.mak
@@ -134,3 +134,16 @@ else
endef
endif
endif
+
+ifeq ($(NUM_PROCS),1)
+ PARALLEL_RUN=no
+endif
+
+ifndef PARALLEL_RUN
+ PARALLEL_RUN=yes
+ .EXPORT: PARALLEL_RUN
+ ifneq ($(NUM_PROCS),)
+# handle recursion
+ MAKEFLAGS += -j $(NUM_PROCS)
+ endif
+endif