From 90fe724afd20c3c677e68250b2e493828b99e17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Fri, 6 Feb 2015 10:58:11 +0100 Subject: [PATCH] use actual number of CPUs for building --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5d53a8b44..74e30e826 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,12 @@ endif ifeq ($(shell uname -s), Darwin) HOST ?= osx +JOBS = $(shell sysctl -n hw.ncpu) endif +ifeq ($(shell uname -s), Linux) HOST ?= linux +JOBS = $(shell nproc) +endif # Explicitly disable the default FileSource implementation ASSET = none @@ -22,7 +26,7 @@ global: build .PHONY: build build: build/Makefile - @node-gyp build $(DEBUG_FLAG) -- -j8 + @node-gyp build $(DEBUG_FLAG) -- -j$(JOBS) .PHONY: build/Makefile build/Makefile: $(MBGL)/config/$(HOST).gypi