use actual number of CPUs for building

This commit is contained in:
Konstantin Käfer
2015-02-06 10:58:11 +01:00
parent fc4df7992f
commit 90fe724afd

View File

@@ -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