summaryrefslogtreecommitdiff
path: root/contrib/depends/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/depends/Makefile')
-rw-r--r--contrib/depends/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/depends/Makefile b/contrib/depends/Makefile
index 0cf6086..7474dcf 100644
--- a/contrib/depends/Makefile
+++ b/contrib/depends/Makefile
@@ -13,6 +13,14 @@ DOWNLOAD_CONNECT_TIMEOUT:=30
DOWNLOAD_RETRIES:=5
HOST_ID_SALT ?= salt
BUILD_ID_SALT ?= salt
+# Detect the number of CPU cores
+ifeq ($(shell uname), Darwin)
+ NUM_CORES := $(shell sysctl -n hw.ncpu)
+else ifeq ($(shell uname), Linux)
+ NUM_CORES := $(shell nproc)
+else
+ NUM_CORES := 1 # Default if the OS is not detected
+endif
host:=$(BUILD)
ifneq ($(HOST),)