diff --git a/depends/Makefile b/depends/Makefile --- a/depends/Makefile +++ b/depends/Makefile @@ -17,6 +17,7 @@ DOWNLOAD_RETRIES:=3 HOST_ID_SALT ?= salt BUILD_ID_SALT ?= salt +JOBS ?= $(shell echo $$(($(shell nproc 2> /dev/null || sysctl -n hw.ncpu 2> /dev/null || echo 0) + 1))) host:=$(BUILD) ifneq ($(HOST),) diff --git a/depends/README.md b/depends/README.md --- a/depends/README.md +++ b/depends/README.md @@ -10,7 +10,7 @@ For example: - make HOST=x86_64-w64-mingw32 -j4 + make HOST=x86_64-w64-mingw32 A prefix will be generated that's suitable for plugging into Bitcoin's configure. In the above example, a dir named x86_64-w64-mingw32 will be @@ -41,6 +41,7 @@ DEBUG: disable some optimizations and enable more runtime checking HOST_ID_SALT: Optional salt to use when generating host package ids BUILD_ID_SALT: Optional salt to use when generating build package ids + JOBS: Number of jobs to use for each package build If some packages are not built, for example `make NO_WALLET=1`, the appropriate options will be passed to bitcoin's configure. In this case, `--disable-wallet`. diff --git a/depends/packages/native_ccache.mk b/depends/packages/native_ccache.mk --- a/depends/packages/native_ccache.mk +++ b/depends/packages/native_ccache.mk @@ -13,7 +13,7 @@ endef define $(package)_build_cmds - $(MAKE) + $(MAKE) -j$(JOBS) endef define $(package)_stage_cmds