From 0e7c0c4c4d721889d7f8770cc0f24eff4ef1454d Mon Sep 17 00:00:00 2001 From: Armin Date: Thu, 1 Oct 2026 00:39:45 +0200 Subject: [PATCH] build with all cores by default (JOBS override) --- Makefile | 5 ++++- README.md | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6196e66..d28eb2f 100644 --- a/Makefile +++ b/Makefile @@ -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 \ diff --git a/README.md b/README.md index 3dbace0..addd353 100644 --- a/README.md +++ b/README.md @@ -237,8 +237,9 @@ make info # print build paths On Linux the AU format is skipped automatically; only the VST3 is produced, and `make install` copies it to `~/.vst3` (JUCE's default Linux VST3 scan path). -A plain `cmake -S . -B build -DJUCE_ROOT= && cmake --build build` -works on Linux as well. +A plain `cmake -S . -B build -DJUCE_ROOT= && cmake --build build --parallel` +works on Linux as well. Both `make` and that command compile with all logical +cores by default; override with `make JOBS=8`. `make` (configure) is designed to be cheap when nothing changed and refreshes the git branch/hash and timestamp embedded in the LCD footer on every