summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2013-06-19 13:41:59 (GMT)
committerTony Theodore <tonyt@logyst.com>2013-06-19 13:41:59 (GMT)
commitdff87501259e9d2a822b12c97552b915847e1148 (patch)
treedb25963e6c22c033213b4c16da3263f5ff072fb0
parentdd88ffb6fe05aa5d239ea3ce901f677984235e1d (diff)
downloadmxe-dff87501259e9d2a822b12c97552b915847e1148.zip
mxe-dff87501259e9d2a822b12c97552b915847e1148.tar.gz
mxe-dff87501259e9d2a822b12c97552b915847e1148.tar.bz2
Makefile: add new DEFAULT_MAX_JOBS variable
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 18b3e11..919ae5a 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