# Copyright 2019 Mark Wooding
# Copyright 2019 Ian Jackson
# SPDX-License-Identifier: LGPL-2.0-or-later
+# There is NO WARRANTY.
&# Usage:
&# &:include subdirmk/cdeps.sd.mk
-&# (probably in Perdir.sd.mk)
+&# (probably in Suffix.sd.mk)
&#
&# Arranges for automatic #include dependency tracking for
&# C compilation. The compiler is asked to write the dependencies to
CDEPS_CFLAGS ?= -MD -MF $(*D)/.$(*F).d
-&DEPFILES += $(foreach b,$(patsubst %.o,%,$(&OBJECTS)), \
+&CDEPS_OBJECTS += $(&OBJECTS)
+
+&DEPFILES += $(foreach b,$(patsubst %.o,%,$(&CDEPS_OBJECTS)), \
$(dir $b).$(notdir $b).d)
-include $(&DEPFILES)