mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 12:51:47 +00:00
Make sure dependency files are generated for assembly files too in the BUILD build system module. Minor code cleanups.
This commit is contained in:
parent
8b985b44b5
commit
3f4efc6159
@ -140,12 +140,12 @@ endif
|
|||||||
# Convert input source filenames into a list of required output object files
|
# Convert input source filenames into a list of required output object files
|
||||||
OBJECT_FILES := $(addsuffix .o, $(basename $(SRC)))
|
OBJECT_FILES := $(addsuffix .o, $(basename $(SRC)))
|
||||||
ifneq ($(OBJDIR),.)
|
ifneq ($(OBJDIR),.)
|
||||||
$(shell mkdir $(OBJDIR) 2>&1 | /dev/null)
|
$(shell mkdir $(OBJDIR) 2>&1 > /dev/null)
|
||||||
VPATH += $(dir $(SRC))
|
VPATH += $(dir $(SRC))
|
||||||
|
|
||||||
OBJECT_FILES := $(addprefix $(patsubst %/,%,$(OBJDIR))/, $(notdir $(OBJECT_FILES)))
|
OBJECT_FILES := $(addprefix $(patsubst %/,%,$(OBJDIR))/, $(notdir $(OBJECT_FILES)))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Create a list of dependency files from the list of object files
|
||||||
DEPENDENCY_FILES := $(OBJECT_FILES:%.o=%.d)
|
DEPENDENCY_FILES := $(OBJECT_FILES:%.o=%.d)
|
||||||
|
|
||||||
# Create a list of common flags to pass to the compiler/linker/assembler
|
# Create a list of common flags to pass to the compiler/linker/assembler
|
||||||
@ -237,7 +237,7 @@ $(OBJDIR)/%.o: %.cpp $(MAKEFILE_LIST)
|
|||||||
|
|
||||||
$(OBJDIR)/%.o: %.S $(MAKEFILE_LIST)
|
$(OBJDIR)/%.o: %.S $(MAKEFILE_LIST)
|
||||||
@echo $(MSG_ASSEMBLE_CMD) Assembling \"$(notdir $<)\"
|
@echo $(MSG_ASSEMBLE_CMD) Assembling \"$(notdir $<)\"
|
||||||
$(CROSS)-gcc -c $(BASE_CC_FLAGS) $(BASE_ASM_FLAGS) $(CC_FLAGS) $(ASM_FLAGS) $< -o $@
|
$(CROSS)-gcc -c $(BASE_CC_FLAGS) $(BASE_ASM_FLAGS) $(CC_FLAGS) $(ASM_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
|
||||||
|
|
||||||
.PRECIOUS : $(OBJECT_FILES)
|
.PRECIOUS : $(OBJECT_FILES)
|
||||||
.SECONDARY : %.a
|
.SECONDARY : %.a
|
||||||
|
Loading…
Reference in New Issue
Block a user