Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile26
1 files changed, 14 insertions, 12 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 80366af2610..d37d810626f 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -81,18 +81,20 @@ endif
# -----------------------------------------------------------------------------
# Get the number of cores for threaded build
-NPROCS:=1
-ifeq ($(OS), Linux)
- NPROCS:=$(shell nproc)
-endif
-ifeq ($(OS), Darwin)
- NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f3)
-endif
-ifeq ($(OS), FreeBSD)
- NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
-endif
-ifeq ($(OS), NetBSD)
- NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
+ifndef NPROCS
+ NPROCS:=1
+ ifeq ($(OS), Linux)
+ NPROCS:=$(shell nproc)
+ endif
+ ifeq ($(OS), Darwin)
+ NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f3)
+ endif
+ ifeq ($(OS), FreeBSD)
+ NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
+ endif
+ ifeq ($(OS), NetBSD)
+ NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
+ endif
endif