From 289d8a80f264b786e3d61bacdbfda4e19c008c93 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 19 Oct 2021 01:30:52 +0100 Subject: [PATCH] Fix macOS build --- deps/Makefile | 18 +++++++++++------- plugins/Makefile | 11 ++++++++--- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/deps/Makefile b/deps/Makefile index a58d947..347f445 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -16,20 +16,24 @@ include ../dpf/Makefile.base.mk # -------------------------------------------------------------- # override VCV arch.mk stuff so we can build more architectures -ifeq ($(CPU_ARM),true) -ARCH_NAME = arm -MACHINE = i686-bring-forth-the-rack +ifeq ($(CPU_AARCH64),true) +ARCH_NAME = aarch64 +MACHINE = x86_64-bring-forth-the-rack else ifeq ($(CPU_ARM64),true) ARCH_NAME = arm64 MACHINE = x86_64-bring-forth-the-rack -else ifeq ($(CPU_AARCH64),true) -ARCH_NAME = aarch64 -MACHINE = x86_64-bring-forth-the-rack +else ifeq ($(CPU_ARM),true) +ARCH_NAME = arm +MACHINE = i686-bring-forth-the-rack else MACHINE = $(TARGET_MACHINE) endif -ifneq ($(MACOS_OR_WINDOWS),true) +ifeq ($(MACOS),true) +MACHINE_SUFFIX = -darwin +else ifeq ($(WINDOWS),true) +MACHINE_SUFFIX = -mingw32 +else MACHINE_SUFFIX = -linux endif diff --git a/plugins/Makefile b/plugins/Makefile index 147cfdc..0d48eea 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -290,10 +290,15 @@ $(TARGET): $(PLUGIN_OBJS) $(SILENT)rm -f $@ $(SILENT)$(AR) crs $@ $^ -$(BUILD_DIR)/%.bin.o: % res2c.py +$(BUILD_DIR)/%.bin.c: % res2c.py -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" - @echo "Generating and Compiling $<" - $(shell python3 ./res2c.py $< | $(CC) -x c - $(BUILD_C_FLAGS) -c -o $@) + @echo "Generating $*.bin.c" + $(SILENT)python3 ./res2c.py $< > $@ + +$(BUILD_DIR)/%.bin.o: $(BUILD_DIR)/%.bin.c + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $*.bin" + $(SILENT)$(CC) $< $(BUILD_C_FLAGS) -c -o $@ $(BUILD_DIR)/plugins.cpp.o: plugins.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"