From c4e1210897e804a19b3fa35d542765b3feb0236e Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 7 Oct 2021 11:35:42 +0100 Subject: [PATCH] Make plugin objects depend on EXTRA_LIBS, add *.m/*.mm targets Signed-off-by: falkTX --- Makefile.plugins.mk | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile.plugins.mk b/Makefile.plugins.mk index 7b9dae29..67f8f2d8 100644 --- a/Makefile.plugins.mk +++ b/Makefile.plugins.mk @@ -238,26 +238,36 @@ all: # --------------------------------------------------------------------------------------------------------------------- # Common -$(BUILD_DIR)/%.S.o: %.S +$(BUILD_DIR)/%.S.o: %.S $(EXTRA_LIBS) -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" @$(CC) $< $(BUILD_C_FLAGS) -c -o $@ -$(BUILD_DIR)/%.c.o: %.c +$(BUILD_DIR)/%.c.o: %.c $(EXTRA_LIBS) -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" $(SILENT)$(CC) $< $(BUILD_C_FLAGS) -c -o $@ -$(BUILD_DIR)/%.cc.o: %.cc +$(BUILD_DIR)/%.cc.o: %.cc $(EXTRA_LIBS) -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ -$(BUILD_DIR)/%.cpp.o: %.cpp +$(BUILD_DIR)/%.cpp.o: %.cpp $(EXTRA_LIBS) -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ +$(BUILD_DIR)/%.m.o: %.m $(EXTRA_LIBS) + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CC) $< $(BUILD_C_FLAGS) -ObjC -c -o $@ + +$(BUILD_DIR)/%.mm.o: %.mm $(EXTRA_LIBS) + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CC) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@ + clean: rm -rf $(BUILD_DIR) rm -rf $(TARGET_DIR)/$(NAME) $(TARGET_DIR)/$(NAME)-* $(TARGET_DIR)/$(NAME).lv2