diff --git a/templates/lv2-make/Makefile b/templates/lv2-make/Makefile index 68f23f1..6ab7ef7 100644 --- a/templates/lv2-make/Makefile +++ b/templates/lv2-make/Makefile @@ -82,6 +82,9 @@ DLL_FILE := $(BUNDLE_NAME)$(DLL_SUFFIX) C_SRCS := $(COMMON_DIR)/src/lv2.c $(C_SRCS_EXTRA) C_OBJS := $(addprefix build/obj/, $(notdir $(C_SRCS:.c=.o))) +M_SRCS := $(M_SRCS_EXTRA) +M_OBJS := $(addprefix build/obj/, $(notdir $(M_SRCS:.m=.o))) + CXX_SRCS := $(CXX_SRCS_EXTRA) CXX_OBJS := $(addprefix build/obj/, $(notdir $(CXX_SRCS:.cpp=.o))) @@ -95,10 +98,10 @@ build/$(BUNDLE_DIR)/manifest.ttl: $(DATA_DIR)/data/manifest.ttl.in | build/$(BUN cat $^ | sed s/@DLL_SUFFIX@/$(DLL_SUFFIX)/g | sed s/@UI_TYPE@/$(UI_TYPE)/g > $@ ifeq ($(CXX_OBJS),) -build/$(BUNDLE_DIR)/$(DLL_FILE): $(C_OBJS) | build/$(BUNDLE_DIR) +build/$(BUNDLE_DIR)/$(DLL_FILE): $(C_OBJS) $(M_OBJS) | build/$(BUNDLE_DIR) $(CC) $^ -o $@ $(CFLAGS_ALL) $(LDFLAGS_ALL) else -build/$(BUNDLE_DIR)/$(DLL_FILE): $(C_OBJS) $(CXX_OBJS) | build/$(BUNDLE_DIR) +build/$(BUNDLE_DIR)/$(DLL_FILE): $(C_OBJS) $(M_OBJS) $(CXX_OBJS) | build/$(BUNDLE_DIR) $(CXX) $^ -o $@ $(CFLAGS_ALL) $(CXXFLAGS_ALL) $(LDFLAGS_ALL) endif @@ -147,6 +150,9 @@ PERCENT := % $(C_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).c,$$(C_SRCS)) | build/obj $(CC) $^ -o $@ -c $(CFLAGS_ALL) +$(M_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).c,$$(M_SRCS)) | build/obj + $(CC) $^ -o $@ -c $(CFLAGS_ALL) + $(CXX_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).cpp,$$(CXX_SRCS)) | build/obj $(CXX) $^ -o $@ -c $(CXXFLAGS_ALL) diff --git a/templates/vst3-make/Makefile b/templates/vst3-make/Makefile index 0e6f3fa..9c67481 100644 --- a/templates/vst3-make/Makefile +++ b/templates/vst3-make/Makefile @@ -104,6 +104,9 @@ DLL_FILE := $(DLL_DIR)/$(BUNDLE_NAME)$(DLL_SUFFIX) C_SRCS := $(COMMON_DIR)/src/vst3.c $(C_SRCS_EXTRA) C_OBJS := $(addprefix build/obj/, $(notdir $(C_SRCS:.c=.o))) +M_SRCS := $(M_SRCS_EXTRA) +M_OBJS := $(addprefix build/obj/, $(notdir $(M_SRCS:.m=.o))) + CXX_SRCS := $(CXX_SRCS_EXTRA) CXX_OBJS := $(addprefix build/obj/, $(notdir $(CXX_SRCS:.cpp=.o))) @@ -118,10 +121,10 @@ endif all: $(ALL) ifeq ($(CXX_OBJS),) -build/$(BUNDLE_DIR)/$(DLL_FILE): $(C_OBJS) | build/$(BUNDLE_DIR)/$(DLL_DIR) +build/$(BUNDLE_DIR)/$(DLL_FILE): $(C_OBJS) $(M_OBJS) | build/$(BUNDLE_DIR)/$(DLL_DIR) $(CC) $^ -o $@ $(CFLAGS_ALL) $(LDFLAGS_ALL) else -build/$(BUNDLE_DIR)/$(DLL_FILE): $(C_OBJS) $(CXX_OBJS) | build/$(BUNDLE_DIR)/$(DLL_DIR) +build/$(BUNDLE_DIR)/$(DLL_FILE): $(C_OBJS) $(M_OBJS) $(CXX_OBJS) | build/$(BUNDLE_DIR)/$(DLL_DIR) $(CXX) $^ -o $@ $(CFLAGS_ALL) $(CXXFLAGS_ALL) $(LDFLAGS_ALL) endif @@ -178,6 +181,9 @@ PERCENT := % $(C_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).c,$$(C_SRCS)) | build/obj $(CC) $^ -o $@ -c $(CFLAGS_ALL) +$(M_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).c,$$(M_SRCS)) | build/obj + $(CC) $^ -o $@ -c $(CFLAGS_ALL) + $(CXX_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).cpp,$$(CXX_SRCS)) | build/obj $(CXX) $^ -o $@ -c $(CXXFLAGS_ALL)