mirror of
https://codeberg.org/armin/rmx-19.git
synced 2026-10-11 16:51:55 +02:00
build with all cores by default (JOBS override)
This commit is contained in:
parent
20c999ef21
commit
0e7c0c4c4d
2 changed files with 7 additions and 3 deletions
5
Makefile
5
Makefile
|
|
@ -14,6 +14,9 @@ BUILD_DIR ?= build
|
||||||
CONFIG ?= Release
|
CONFIG ?= Release
|
||||||
PLUGIN_BASE = RMX-19
|
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
|
CMAKE := cmake
|
||||||
BUILD_DIR_ABSPATH := $(abspath $(BUILD_DIR))
|
BUILD_DIR_ABSPATH := $(abspath $(BUILD_DIR))
|
||||||
ARTEFACTS := $(BUILD_DIR)/RMX19_artefacts/$(CONFIG)
|
ARTEFACTS := $(BUILD_DIR)/RMX19_artefacts/$(CONFIG)
|
||||||
|
|
@ -46,7 +49,7 @@ CMAKE_BUILD_TYPE := $(CONFIG)
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
build: configure
|
build: configure
|
||||||
$(CMAKE) --build $(BUILD_DIR) --config $(CONFIG) --parallel
|
$(CMAKE) --build $(BUILD_DIR) --config $(CONFIG) --parallel $(JOBS)
|
||||||
|
|
||||||
juce:
|
juce:
|
||||||
@if [ ! -d "$(JUCE_DIR)" ]; then \
|
@if [ ! -d "$(JUCE_DIR)" ]; then \
|
||||||
|
|
|
||||||
|
|
@ -237,8 +237,9 @@ make info # print build paths
|
||||||
|
|
||||||
On Linux the AU format is skipped automatically; only the VST3 is produced, and
|
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).
|
`make install` copies it to `~/.vst3` (JUCE's default Linux VST3 scan path).
|
||||||
A plain `cmake -S . -B build -DJUCE_ROOT=<JUCE source> && cmake --build build`
|
A plain `cmake -S . -B build -DJUCE_ROOT=<JUCE source> && cmake --build build --parallel`
|
||||||
works on Linux as well.
|
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
|
`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
|
the git branch/hash and timestamp embedded in the LCD footer on every
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue