diff --git a/Makefile b/Makefile index 18b3e11f..919ae5a8 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,15 @@ # See index.html for further information. MXE_TARGETS := i686-pc-mingw32 +DEFAULT_MAX_JOBS := 6 SOURCEFORGE_MIRROR := freefr.dl.sourceforge.net PKG_MIRROR := s3.amazonaws.com/mxe-pkg PKG_CDN := d1yihgixbnrglp.cloudfront.net PWD := $(shell pwd) SHELL := bash -JOBS := $(shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 1) +NPROCS := $(shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 1) +JOBS := $(shell printf "$(DEFAULT_MAX_JOBS)\n$(NPROCS)" | sort -n | head -1) INSTALL := $(shell ginstall --help >/dev/null 2>&1 && echo g)install LIBTOOL := $(shell glibtool --help >/dev/null 2>&1 && echo g)libtool