Add source files to prerequisites list for the compile rule

This commit is contained in:
Vincent Sanders 2018-04-21 11:35:19 +01:00
parent d670e28d4c
commit fb6f33129d

View File

@ -771,7 +771,7 @@ endef
ifeq ($(CC_MAJOR),2)
# simpler deps tracking for gcc2...
define compile_target_c
$$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $$(OBJROOT)/created
$$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $(1) $$(OBJROOT)/created
$$(VQ)echo " DEP: $(1)"
$$(Q)$$(RM) $$(DEPROOT)/$(3)
$$(Q)$$(CC) $$(IFLAGS) $$(CFLAGS) -MM \
@ -784,7 +784,7 @@ $$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $$(OBJROOT)/created
endef
else
define compile_target_c
$$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $$(OBJROOT)/created
$$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $(1) $$(OBJROOT)/created
$$(VQ)echo " COMPILE: $(1)"
$$(Q)$$(RM) $$(DEPROOT)/$(3)
$$(Q)$$(RM) $$(OBJROOT)/$(2)
@ -796,7 +796,7 @@ endef
endif
define compile_target_cpp
$$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $$(OBJROOT)/created
$$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $(1) $$(OBJROOT)/created
$$(VQ)echo " DEP: $(1)"
$$(Q)$$(RM) $$(DEPROOT)/$(3)
$$(Q)$$(CC) $$(IFLAGS) $$(CXXFLAGS) $$(COMMON_WARNFLAGS) $$(CXXWARNFLAGS) -MM \
@ -812,7 +812,7 @@ endef
# 2 = obj filename, no prefix
# 3 = dep filename, no prefix
define compile_target_s
$$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $$(OBJROOT)/created
$$(DEPROOT)/$(3) $$(OBJROOT)/$(2): $(1) $$(OBJROOT)/created
$$(VQ)echo "ASSEMBLE: $(1)"
$$(Q)$$(RM) $$(DEPROOT)/$(3)
$$(Q)$$(RM) $$(OBJROOT)/$(2)