diff --git a/core/Makefile b/core/Makefile index 10c1c5215..e555e9898 100644 --- a/core/Makefile +++ b/core/Makefile @@ -51,6 +51,7 @@ SYSTEM_FILES_DIR ?= \ ###################################### CPP_SOURCES ?= +CC_SOURCES ?= C_SOURCES += \ $(SYSTEM_FILES_DIR)/startup_stm32h750xx.c @@ -224,6 +225,8 @@ OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o))) vpath %.c $(sort $(dir $(C_SOURCES))) OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(CPP_SOURCES:.cpp=.o))) vpath %.cpp $(sort $(dir $(CPP_SOURCES))) +OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(CC_SOURCES:.cc=.o))) +vpath %.cc $(sort $(dir $(CC_SOURCES))) # list of ASM program objects OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o))) vpath %.s $(sort $(dir $(ASM_SOURCES))) @@ -234,6 +237,9 @@ $(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR) $(BUILD_DIR)/%.o: %.cpp Makefile | $(BUILD_DIR) $(CXX) -c $(CPPFLAGS) $(CPP_STANDARD) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.cpp=.lst)) $< -o $@ +$(BUILD_DIR)/%.o: %.cc Makefile | $(BUILD_DIR) + $(CXX) -c $(CPPFLAGS) $(CPP_STANDARD) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.cc=.lst)) $< -o $@ + $(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR) $(AS) -c $(ASFLAGS) $< -o $@