BUILD_DIR := build

all: build

build: cmake-configure
	cmake --build $(BUILD_DIR) --config Release -j$(shell sysctl -n hw.ncpu)

cmake-configure:
	cmake -S . -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Release

install: build
	cmake --install $(BUILD_DIR)

# Install directly to the standard macOS user plugin folders (AU + VST3).
install-local: build
	cmake --install $(BUILD_DIR) --prefix "$(HOME)"

clean:
	rm -rf $(BUILD_DIR)

.PHONY: all build cmake-configure install install-local clean
