From 431ed8ee81f8ec02da084e22794af6573e45e828 Mon Sep 17 00:00:00 2001 From: Stefano D'Angelo Date: Thu, 1 Feb 2024 18:16:03 +0100 Subject: [PATCH] added -arch also to LDFLAGS --- templates/cmd-make/Makefile | 8 +++++--- templates/lv2-make/Makefile | 8 +++++--- templates/vst3-make/Makefile | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/templates/cmd-make/Makefile b/templates/cmd-make/Makefile index 15ece9d..afe84df 100644 --- a/templates/cmd-make/Makefile +++ b/templates/cmd-make/Makefile @@ -17,13 +17,15 @@ CC = gcc CFLAGS = -O3 -Wall -Wpedantic -Wextra CFLAGS_ALL = -I${DATA_DIR}/src -I${PLUGIN_DIR} -I${TINYWAV_DIR} -I${MIDI_PARSER_DIR}/include -fPIC ${CFLAGS} ${CFLAGS_EXTRA} -ifeq ($(UNAME_S), Darwin) -CFLAGS_ALL := ${CFLAGS_ALL} -arch arm64 -arch x86_64 -endif LDFLAGS = LDFLAGS_ALL = ${LDFLAGS} ${LDFLAGS_EXTRA} +ifeq ($(UNAME_S), Darwin) +CFLAGS_ALL := ${CFLAGS_ALL} -arch arm64 -arch x86_64 +LDFLAGS_ALL := ${LDFLAGS_ALL} -arch arm64 -arch x86_64 +endif + PROGRAM = ${BUNDLE_NAME}${EXE_SUFFIX} all: build/${PROGRAM} diff --git a/templates/lv2-make/Makefile b/templates/lv2-make/Makefile index f3849a0..d9d9462 100644 --- a/templates/lv2-make/Makefile +++ b/templates/lv2-make/Makefile @@ -27,13 +27,15 @@ PLUGIN_DIR := $(or $(PLUGIN_DIR),src) CFLAGS = -O3 -Wall -Wpedantic -Wextra CFLAGS_ALL = -I${DATA_DIR}/src -I${PLUGIN_DIR} -fPIC ${CFLAGS} ${CFLAGS_EXTRA} -ifeq ($(UNAME_S), Darwin) -CFLAGS_ALL := ${CFLAGS_ALL} -arch arm64 -arch x86_64 -endif LDFLAGS = LDFLAGS_ALL = -shared ${LDFLAGS} ${LDFLAGS_EXTRA} +ifeq ($(UNAME_S), Darwin) +CFLAGS_ALL := ${CFLAGS_ALL} -arch arm64 -arch x86_64 +LDFLAGS_ALL := ${LDFLAGS_ALL} -arch arm64 -arch x86_64 +endif + BUNDLE_DIR = ${BUNDLE_NAME}.lv2 DLL_FILE = ${BUNDLE_NAME}${DLL_SUFFIX} diff --git a/templates/vst3-make/Makefile b/templates/vst3-make/Makefile index d8b42be..c7c624e 100644 --- a/templates/vst3-make/Makefile +++ b/templates/vst3-make/Makefile @@ -29,13 +29,15 @@ PLUGIN_DIR := $(or $(PLUGIN_DIR),src) CFLAGS = -O3 -Wall -Wpedantic -Wextra CFLAGS_ALL = -I${DATA_DIR}/src -I${PLUGIN_DIR} -fPIC ${CFLAGS} ${CFLAGS_EXTRA} -ifeq ($(UNAME_S), Darwin) -CFLAGS_ALL := ${CFLAGS_ALL} -arch arm64 -arch x86_64 -endif LDFLAGS = LDFLAGS_ALL = -shared -lm ${LDFLAGS} ${LDFLAGS_EXTRA} +ifeq ($(UNAME_S), Darwin) +CFLAGS_ALL := ${CFLAGS_ALL} -arch arm64 -arch x86_64 +LDFLAGS_ALL := ${LDFLAGS_ALL} -arch arm64 -arch x86_64 +endif + BUNDLE_DIR = ${BUNDLE_NAME}.vst3 DLL_DIR = Contents/${PLATFORM}