Makefile support for using NPROCS as an env var
This commit is contained in:
@@ -81,6 +81,7 @@ endif
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Get the number of cores for threaded build
|
||||
ifndef NPROCS
|
||||
NPROCS:=1
|
||||
ifeq ($(OS), Linux)
|
||||
NPROCS:=$(shell nproc)
|
||||
@@ -94,6 +95,7 @@ endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user