2026-10-01 00:36:37 +02:00
|
|
|
# RMX-19 build & install Makefile (macOS arm64 and Linux)
|
2026-09-07 21:03:31 +02:00
|
|
|
#
|
2026-10-01 00:36:37 +02:00
|
|
|
# make configure + build (VST3 everywhere; AU additionally on macOS)
|
|
|
|
|
# make install build and install the VST3 (and AU on macOS). macOS bundles
|
|
|
|
|
# are ad-hoc codesigned and de-quarantined; on Linux the plug-in
|
|
|
|
|
# is copied to ~/.vst3
|
2026-09-07 21:03:31 +02:00
|
|
|
# make uninstall remove installed bundles
|
|
|
|
|
# make clean delete the CMake build tree
|
|
|
|
|
#
|
2026-10-01 00:36:37 +02:00
|
|
|
# Note (macOS): after install, restart (or cold-start) the audio host so it
|
|
|
|
|
# rescans AudioComponents. A fresh AU/AUv3 may first appear after a host relaunch.
|
2026-09-07 21:03:31 +02:00
|
|
|
|
|
|
|
|
BUILD_DIR ?= build
|
|
|
|
|
CONFIG ?= Release
|
|
|
|
|
PLUGIN_BASE = RMX-19
|
|
|
|
|
|
2026-10-01 00:39:45 +02:00
|
|
|
# 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)
|
|
|
|
|
|
2026-09-07 21:03:31 +02:00
|
|
|
CMAKE := cmake
|
|
|
|
|
BUILD_DIR_ABSPATH := $(abspath $(BUILD_DIR))
|
|
|
|
|
ARTEFACTS := $(BUILD_DIR)/RMX19_artefacts/$(CONFIG)
|
|
|
|
|
|
2026-09-08 15:10:12 +02:00
|
|
|
JUCE_DIR := $(BUILD_DIR)/JUCE
|
|
|
|
|
JUCE_REPO := https://github.com/juce-framework/JUCE.git
|
|
|
|
|
JUCE_TAG := 8.0.4
|
|
|
|
|
|
2026-09-07 21:03:31 +02:00
|
|
|
VST3_SRC := $(ARTEFACTS)/VST3/$(PLUGIN_BASE).vst3
|
|
|
|
|
AU_SRC := $(ARTEFACTS)/AU/$(PLUGIN_BASE).component
|
|
|
|
|
|
2026-10-01 00:36:37 +02:00
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
|
|
|
|
|
|
ifeq ($(UNAME_S),Darwin)
|
2026-09-07 21:03:31 +02:00
|
|
|
VST3_DEST := $(HOME)/Library/Audio/Plug-Ins/VST3/$(PLUGIN_BASE).vst3
|
|
|
|
|
AU_DEST := $(HOME)/Library/Audio/Plug-Ins/Components/$(PLUGIN_BASE).component
|
|
|
|
|
USER_PLUGIN_DIRS := $(HOME)/Library/Audio/Plug-Ins/VST3 $(HOME)/Library/Audio/Plug-Ins/Components
|
2026-10-01 00:36:37 +02:00
|
|
|
else
|
|
|
|
|
# Linux/BSD: the VST3 SDK scans ~/.vst3 by default. No AU, no codesigning.
|
|
|
|
|
VST3_DEST := $(HOME)/.vst3/$(PLUGIN_BASE).vst3
|
|
|
|
|
AU_DEST :=
|
|
|
|
|
USER_PLUGIN_DIRS := $(HOME)/.vst3
|
|
|
|
|
endif
|
2026-09-07 21:03:31 +02:00
|
|
|
|
|
|
|
|
.EXPORT_ALL_VARIABLES:
|
|
|
|
|
CMAKE_BUILD_TYPE := $(CONFIG)
|
|
|
|
|
|
2026-09-08 15:10:12 +02:00
|
|
|
.PHONY: all configure build install uninstall clean info juce
|
2026-09-07 21:03:31 +02:00
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
|
|
build: configure
|
2026-10-01 00:39:45 +02:00
|
|
|
$(CMAKE) --build $(BUILD_DIR) --config $(CONFIG) --parallel $(JOBS)
|
2026-09-07 21:03:31 +02:00
|
|
|
|
2026-09-08 15:10:12 +02:00
|
|
|
juce:
|
|
|
|
|
@if [ ! -d "$(JUCE_DIR)" ]; then \
|
|
|
|
|
echo "Fetching JUCE $(JUCE_TAG)..."; \
|
2026-09-09 12:50:03 +02:00
|
|
|
git clone -c advice.detachedHead=false --branch $(JUCE_TAG) --depth 1 $(JUCE_REPO) $(JUCE_DIR); \
|
2026-09-08 15:10:12 +02:00
|
|
|
else \
|
|
|
|
|
echo "JUCE already present at $(JUCE_DIR)"; \
|
|
|
|
|
fi
|
|
|
|
|
|
2026-09-07 21:03:31 +02:00
|
|
|
# Re-run cmake on every invocation: it is cheap when nothing changed and keeps
|
|
|
|
|
# the footer's git branch/hash and local build timestamp fresh.
|
2026-09-08 15:10:12 +02:00
|
|
|
configure: juce
|
|
|
|
|
$(CMAKE) -S . -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=$(CONFIG) -DJUCE_ROOT=$(JUCE_DIR)
|
2026-09-07 21:03:31 +02:00
|
|
|
|
2026-10-01 00:36:37 +02:00
|
|
|
ifeq ($(UNAME_S),Darwin)
|
2026-09-07 21:03:31 +02:00
|
|
|
install: build
|
|
|
|
|
@codesign --force --deep --sign - "$(VST3_SRC)" >/dev/null 2>&1 || true
|
|
|
|
|
@codesign --force --deep --sign - "$(AU_SRC)" >/dev/null 2>&1 || true
|
|
|
|
|
@mkdir -p $(USER_PLUGIN_DIRS)
|
|
|
|
|
@cp -Rf "$(VST3_SRC)" "$(HOME)/Library/Audio/Plug-Ins/VST3/"
|
|
|
|
|
@cp -Rf "$(AU_SRC)" "$(HOME)/Library/Audio/Plug-Ins/Components/"
|
|
|
|
|
@xattr -dr com.apple.quarantine "$(VST3_DEST)" 2>/dev/null || true
|
|
|
|
|
@xattr -dr com.apple.quarantine "$(AU_DEST)" 2>/dev/null || true
|
|
|
|
|
@echo "installed:"
|
|
|
|
|
@echo " $(VST3_DEST)"
|
|
|
|
|
@echo " $(AU_DEST)"
|
|
|
|
|
@echo ""
|
|
|
|
|
@echo "audiosignature:"
|
|
|
|
|
@codesign -dv "$(VST3_DEST)" 2>&1 | head -1
|
|
|
|
|
@echo ""
|
|
|
|
|
@echo "Restart your DAW / AudioHost to make the AU rescan."
|
2026-10-01 00:36:37 +02:00
|
|
|
else
|
|
|
|
|
install: build
|
|
|
|
|
@mkdir -p $(USER_PLUGIN_DIRS)
|
|
|
|
|
@rm -rf "$(VST3_DEST)"
|
|
|
|
|
@cp -Rf "$(VST3_SRC)" "$(USER_PLUGIN_DIRS)/"
|
|
|
|
|
@echo "installed:"
|
|
|
|
|
@echo " $(VST3_DEST)"
|
|
|
|
|
endif
|
2026-09-07 21:03:31 +02:00
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
|
@rm -rf "$(VST3_DEST)" "$(AU_DEST)"
|
2026-10-01 00:36:37 +02:00
|
|
|
@echo "removed RMX-19 from user plug-in folder(s)."
|
2026-09-07 21:03:31 +02:00
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
@rm -rf $(BUILD_DIR)
|
|
|
|
|
@echo "removed $(BUILD_DIR)."
|
|
|
|
|
|
|
|
|
|
info:
|
|
|
|
|
@echo "BUILD_DIR : $(BUILD_DIR_ABSPATH)"
|
|
|
|
|
@echo "CONFIG : $(CONFIG)"
|
|
|
|
|
@echo "VST3 : $(VST3_SRC)"
|
|
|
|
|
@echo "AU : $(AU_SRC)"
|