mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Makefile.base: Set targets of *.d files to absolute object path
By passing the -MT flag with the absolute path to the object we make sure that the compiler generates dependency files with rules that match our building rules.
This commit is contained in:
parent
d868c9c5c3
commit
dc845841f0
@ -100,25 +100,25 @@ $(OBJC): $(BINDIR)/$(MODULE)/%.o: %.c $(RIOTBUILD_CONFIG_HEADER_C)
|
||||
$(Q)$(CCACHE) $(CC) \
|
||||
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$(abspath $<))\" \
|
||||
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
||||
$(CFLAGS) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)
|
||||
$(CFLAGS) $(INCLUDES) -MQ '$@' -MD -MP -c -o $@ $(abspath $<)
|
||||
|
||||
$(GENOBJC): %.o: %.c $(RIOTBUILD_CONFIG_HEADER_C)
|
||||
$(Q) $(CCACHE) $(CC) \
|
||||
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$<)\" \
|
||||
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
||||
$(CFLAGS) $(INCLUDES) -MD -MP -c -o $@ $<
|
||||
$(CFLAGS) $(INCLUDES) -MQ '$@' -MD -MP -c -o $@ $<
|
||||
|
||||
$(OBJCXX): $(BINDIR)/$(MODULE)/%.o: %.cpp $(RIOTBUILD_CONFIG_HEADER_C)
|
||||
$(Q)$(CCACHE) $(CXX) \
|
||||
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$(abspath $<))\" \
|
||||
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
||||
$(CXXFLAGS) $(CXXINCLUDES) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)
|
||||
$(CXXFLAGS) $(CXXINCLUDES) $(INCLUDES) -MQ '$@' -MD -MP -c -o $@ $(abspath $<)
|
||||
|
||||
$(ASMOBJ): $(BINDIR)/$(MODULE)/%.o: %.s
|
||||
$(Q)$(AS) $(ASFLAGS) -o $@ $(abspath $<)
|
||||
|
||||
$(ASSMOBJ): $(BINDIR)/$(MODULE)/%.o: %.S $(RIOTBUILD_CONFIG_HEADER_C)
|
||||
$(Q)$(CCAS) $(CCASFLAGS) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)
|
||||
$(Q)$(CCAS) $(CCASFLAGS) $(INCLUDES) -MQ '$@' -MD -MP -c -o $@ $(abspath $<)
|
||||
|
||||
# pull in dependency info for *existing* .o files
|
||||
# deleted header files will be silently ignored
|
||||
|
Loading…
Reference in New Issue
Block a user