Skip to content

Commit

Permalink
update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
eye-wave committed Jun 18, 2024
1 parent d033199 commit f913406
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
#!make
.PHONY: preview dev build post-build format lint test

project_name := "one_x_osc"
UNAME := $(shell uname)
PROJECT_NAME := "one_x_osc"

VST3_PATH := ~/.vst3
CLAP_PATH := ~/.clap

ifeq ($(OS),Windows_NT)
VST3_PATH := "C:/Program Files/Common Files/VST3/"
CLAP_PATH := "C:/Program Files/Common Files/CLAP/"
endif

ifeq ($(UNAME), Darwin)
VST3_PATH := ~/Library/Audio/Plug-Ins/VST3
CLAP_PATH := ~/Library/Audio/Plug-Ins/CLAP
endif

preview:
cargo watch -x run

dev:
cargo watch -x "xtask bundle $(project_name)" -s "make post-build"
cargo watch -x "xtask bundle $(PROJECT_NAME)" -s "make post-build"

build:
cargo xtask bundle $(project_name) --release
cargo xtask bundle $(PROJECT_NAME) --release
$(MAKE) post-build

post-build:
cp target/bundled/*.clap ~/.clap
cp target/bundled/*.vst3 ~/.vst3 -r
cp target/bundled/*.clap $(CLAP_PATH)
cp target/bundled/*.vst3 $(VST3_PATH) -r

format:
cargo fmt
Expand Down

0 comments on commit f913406

Please sign in to comment.