commit 08a99f5a676249b665330d209cd7b82293d2333d
parent c6304d2e92351641e91d24a8008b777e4f0dea36
Author: falkTX <falktx@falktx.com>
Date: Sun, 5 Mar 2023 12:23:09 +0100
Expose VST2/3_BINARY_DIR in base makefile, handy for packaging
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
2 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/Makefile.base.mk b/Makefile.base.mk
@@ -639,6 +639,32 @@ SHARED = -shared
endif
# ---------------------------------------------------------------------------------------------------------------------
+# Set VST2 binary directory
+
+ifeq ($(MACOS),true)
+VST2_BINARY_DIR = Contents/MacOS
+else
+VST2_BINARY_DIR =
+endif
+
+# ---------------------------------------------------------------------------------------------------------------------
+# Set VST3 binary directory, see https://vst3sdk-doc.diatonic.jp/doc/vstinterfaces/vst3loc.html
+
+ifeq ($(LINUX),true)
+VST3_BINARY_DIR = Contents/$(TARGET_PROCESSOR)-linux
+else ifeq ($(MACOS),true)
+VST3_BINARY_DIR = Contents/MacOS
+else ifeq ($(WASM),true)
+VST3_BINARY_DIR = Contents/wasm
+else ifeq ($(WINDOWS)$(CPU_I386),truetrue)
+VST3_BINARY_DIR = Contents/x86-win
+else ifeq ($(WINDOWS)$(CPU_X86_64),truetrue)
+VST3_BINARY_DIR = Contents/x86_64-win
+else
+VST3_BINARY_DIR =
+endif
+
+# ---------------------------------------------------------------------------------------------------------------------
# Handle the verbosity switch
SILENT =
diff --git a/Makefile.plugins.mk b/Makefile.plugins.mk
@@ -232,7 +232,7 @@ BASE_FLAGS += $(DGL_FLAGS)
ifeq ($(MACOS),true)
VST2_CONTENTS = $(NAME).vst/Contents
-VST2_FILENAME = $(VST2_CONTENTS)/MacOS/$(NAME)
+VST2_FILENAME = $(NAME).vst/Contents/MacOS/$(NAME)
else ifeq ($(USE_VST2_BUNDLE),true)
VST2_FILENAME = $(NAME).vst/$(NAME)$(LIB_EXT)
else
@@ -243,18 +243,12 @@ endif
# Set VST3 filename, see https://vst3sdk-doc.diatonic.jp/doc/vstinterfaces/vst3loc.html
ifeq ($(LINUX),true)
-VST3_FILENAME = $(NAME).vst3/Contents/$(TARGET_PROCESSOR)-linux/$(NAME).so
+VST3_FILENAME = $(NAME).vst3/$(VST3_BINARY_DIR)/$(NAME)$(LIB_EXT)
else ifeq ($(MACOS),true)
VST3_CONTENTS = $(NAME).vst3/Contents
-VST3_FILENAME = $(VST3_CONTENTS)/MacOS/$(NAME)
-else ifeq ($(WASM),true)
-VST3_FILENAME = $(NAME).vst3/Contents/wasm/$(NAME).vst3
-else ifeq ($(WINDOWS),true)
-ifeq ($(CPU_I386),true)
-VST3_FILENAME = $(NAME).vst3/Contents/x86-win/$(NAME).vst3
-else ifeq ($(CPU_X86_64),true)
-VST3_FILENAME = $(NAME).vst3/Contents/x86_64-win/$(NAME).vst3
-endif
+VST3_FILENAME = $(NAME).vst3/Contents/MacOS/$(NAME)
+else ifneq ($(VST3_BINARY_DIR),)
+VST3_FILENAME = $(NAME).vst3/$(VST3_BINARY_DIR)/$(NAME).vst3
endif
# ---------------------------------------------------------------------------------------------------------------------