build with all cores by default (JOBS override)

This commit is contained in:
Armin 2026-10-01 00:39:45 +02:00
commit 0e7c0c4c4d
2 changed files with 7 additions and 3 deletions

View file

@ -14,6 +14,9 @@ BUILD_DIR ?= build
CONFIG ?= Release
PLUGIN_BASE = RMX-19
# Parallel compile: use every logical core by default. Override with `make JOBS=8`.
JOBS ?= $(shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4)
CMAKE := cmake
BUILD_DIR_ABSPATH := $(abspath $(BUILD_DIR))
ARTEFACTS := $(BUILD_DIR)/RMX19_artefacts/$(CONFIG)
@ -46,7 +49,7 @@ CMAKE_BUILD_TYPE := $(CONFIG)
all: build
build: configure
$(CMAKE) --build $(BUILD_DIR) --config $(CONFIG) --parallel
$(CMAKE) --build $(BUILD_DIR) --config $(CONFIG) --parallel $(JOBS)
juce:
@if [ ! -d "$(JUCE_DIR)" ]; then \