summaryrefslogtreecommitdiff
path: root/mk/cc.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/cc.mk')
-rw-r--r--mk/cc.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/mk/cc.mk b/mk/cc.mk
index 36e16b2..700edd6 100644
--- a/mk/cc.mk
+++ b/mk/cc.mk
@@ -25,8 +25,10 @@ endef
define cc_unit_rule
define obj_rules
$(3): $(2) $$(obj_deps)
- $$(call run,CC,$$<) $(core_info/$(1)/cross)gcc $(core_info/$(1)/cc_flags) -c $$< -o $$@
+ $$(call run,CC,$$<) $(core_info/$(1)/cross)gcc $(core_info/$(1)/cc_flags) -MMD -c $$< -o $$@
endef
$$(eval $$(call add_obj_rules,$(1)))
+
+ -include $$(patsubst %.o,%.d,$(3))
endef