commit c4e1210897e804a19b3fa35d542765b3feb0236e
parent f79095abdeb7442121f9f26adc53b87352f04e26
Author: falkTX <falktx@falktx.com>
Date: Thu, 7 Oct 2021 11:35:15 +0100
Make plugin objects depend on EXTRA_LIBS, add *.m/*.mm targets
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git 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