fix Makefile on win32 and macos

This commit is contained in:
Stefano D'Angelo 2023-01-20 16:16:57 +01:00
parent 1d4d715449
commit 4077c5271b
3 changed files with 16 additions and 26 deletions

View File

@ -15,22 +15,22 @@ SO_FILE := ${SO_DIR}/${NAME}
EXTRA_RESOURCE_TARGETS += ${BUILD_PLUGIN_DIR}/Contents/PkgInfo
RESOURCE_TARGETS += ${EXTRA_RESOURCE_TARGETS}
ALL_TARGETS += ${DLL_FILE} ${EXTRA_RESOURCE_TARGETS} ${BUILD_PLUGIN_DIR}/Contents/Info.plist
ALL_DIRS += ${DLL_DIR} ${BUILD_PLUGIN_DIR}/Contents build/tmp
ALL_TARGETS += ${SO_FILE} ${EXTRA_RESOURCE_TARGETS} ${BUILD_PLUGIN_DIR}/Contents/Info.plist
ALL_DIRS += ${SO_DIR} ${BUILD_PLUGIN_DIR}/Contents build/tmp
INSTALL_USER_PREFIX := ${HOME}/Library/Audio/Plug-Ins/VST3
INSTALL_PREFIX := /Library/Audio/Plug-Ins/VST3
CLEAN_RM += build/tmp
${SO_FILE}: build/tmp/${NAME}-x86_64 build/tmp/${NAME}-arm64 | build/tmp
echo lipo -create -output $@ $^
${SO_FILE}: build/tmp/${NAME}-x86_64 build/tmp/${NAME}-arm64 | ${SO_DIR}
lipo -create -output $@ $^
build/tmp/${NAME}-x86_64: ${SOURCES} | build/tmp
echo ${CXX} $^ ${CXXFLAGS} ${LDFLAGS} -arch x86_64 -o $@
${CXX} $^ ${CXXFLAGS} ${LDFLAGS} -arch x86_64 -o $@
build/tmp/${NAME}-arm64: ${SOURCES} | build/tmp
echo ${CXX} $^ ${CXXFLAGS} ${LDFLAGS} -arch arm64 -o $@
${CXX} $^ ${CXXFLAGS} ${LDFLAGS} -arch arm64 -o $@
${BUILD_PLUGIN_DIR}/Contents/Info.plist: ${TEMPLATE_DIR}/Contents/Info.plist | ${BUILD_PLUGIN_DIR}/Contents
cat $^ | sed s:@NAME@:${NAME}:g > $@

View File

@ -27,14 +27,4 @@ ALL_DIRS += ${DLL_DIR} ${BUILD_PLUGIN_DIR}
${DLL_FILE}: ${SOURCES} | ${DLL_DIR}
${CXX} $^ ${CXXFLAGS} ${LDFLAGS} -o $@
#USER_PREFIX=$(shell echo '${LOCALAPPDATA}' | sed 's:\\:/:g')
#install-user: all
# mkdir -p ${USER_PREFIX}/Programs/Common/VST3
# @echo mkdir -p -m 0755 `find build/${NAME}.vst3 -type d | sed s?^build/?${USER_PREFIX}/Programs/Common/VST3/?g`
# @mkdir -p -m 0755 `find build/${NAME}.vst3 -type d | sed s?^build/?${USER_PREFIX}/Programs/Common/VST3/?g`
# @for f in `find build/${NAME}.vst3 -type f | sed s?^build/??g`; do \
# d=`dirname $$f`; \
# echo install -m `[ -x build/$$f ] && echo 0755 || echo 0644` build/$$f ${USER_PREFIX}/Programs/Common/VST3/$$d; \
# install -m `[ -x build/$$f ] && echo 0755 || echo 0644` build/$$f ${USER_PREFIX}/Programs/Common/VST3/$$d; \
# done
INSTALL_USER_PREFIX := $(shell echo '${LOCALAPPDATA}' | sed 's:\\:/:g')/Programs/Common/VST3

View File

@ -1,8 +1,8 @@
default: all
COMMON_DIR := $(shell realpath --relative-to . ${ROOT_DIR}/../../common/vst3)
VST3_SDK_DIR := $(shell realpath --relative-to . ${ROOT_DIR}/../../../../VST_SDK/vst3sdk)
TEMPLATE_DIR := $(shell realpath --relative-to . ${ROOT_DIR}/../../common/vst3/template.vst3)
COMMON_DIR := ${ROOT_DIR}/../../common/vst3
VST3_SDK_DIR := ${ROOT_DIR}/../../../../VST_SDK/vst3sdk
TEMPLATE_DIR := ${ROOT_DIR}/../../common/vst3/template.vst3
BUILD_PLUGIN_DIR := build/${NAME}.vst3
CXXFLAGS := \
@ -81,9 +81,9 @@ ${ALL_DIRS}:
install-user:
mkdir -p ${INSTALL_USER_PREFIX}
@echo mkdir -p -m 0755 `find ${BUILD_PLUGIN_DIR} -type d | sed s:^build/:${INSTALL_USER_PREFIX}/:g`
@mkdir -p -m 0755 `find ${BUILD_PLUGIN_DIR} -type d | sed s:^build/:${INSTALL_USER_PREFIX}/:g`
@for f in `find ${BUILD_PLUGIN_DIR} -type f | sed s:^build/::g`; do \
@echo mkdir -p -m 0755 `find ${BUILD_PLUGIN_DIR} -type d | sed s?^build/?${INSTALL_USER_PREFIX}/?g`
@mkdir -p -m 0755 `find ${BUILD_PLUGIN_DIR} -type d | sed s?^build/?${INSTALL_USER_PREFIX}/?g`
@for f in `find ${BUILD_PLUGIN_DIR} -type f | sed s?^build/??g`; do \
d=`dirname $$f`; \
echo install -m `[ -x build/$$f ] && echo 0755 || echo 0644` build/$$f ${INSTALL_USER_PREFIX}/$$d; \
install -m `[ -x build/$$f ] && echo 0755 || echo 0644` build/$$f ${INSTALL_USER_PREFIX}/$$d; \
@ -91,9 +91,9 @@ install-user:
install:
mkdir -p ${INSTALL_PREFIX}
@echo mkdir -p -m 0755 `find ${BUILD_PLUGIN_DIR} -type d | sed s:^build/:${INSTALL_PREFIX}/:g`
@mkdir -p -m 0755 `find ${BUILD_PLUGIN_DIR} -type d | sed s:^build/:${INSTALL_PREFIX}/:g`
@for f in `find ${BUILD_PLUGIN_DIR} -type f | sed s:^build/::g`; do \
@echo mkdir -p -m 0755 `find ${BUILD_PLUGIN_DIR} -type d | sed s?^build/?${INSTALL_PREFIX}/?g`
@mkdir -p -m 0755 `find ${BUILD_PLUGIN_DIR} -type d | sed s?^build/?${INSTALL_PREFIX}/?g`
@for f in `find ${BUILD_PLUGIN_DIR} -type f | sed s?^build/??g`; do \
d=`dirname $$f`; \
echo install -m `[ -x build/$$f ] && echo 0755 || echo 0644` build/$$f ${INSTALL_PREFIX}/$$d; \
install -m `[ -x build/$$f ] && echo 0755 || echo 0644` build/$$f ${INSTALL_PREFIX}/$$d; \