summaryrefslogtreecommitdiffstats
path: root/config/deps.mk
diff options
context:
space:
mode:
Diffstat (limited to 'config/deps.mk')
-rw-r--r--config/deps.mk15
1 files changed, 10 insertions, 5 deletions
diff --git a/config/deps.mk b/config/deps.mk
index 7d991ab..52ee0e1 100644
--- a/config/deps.mk
+++ b/config/deps.mk
@@ -3,11 +3,16 @@
# Makefile that generates gen/deps.mk
-.OBJDIR: .
+include config/prelude.mk
+include ${GEN}/vars.mk
+include ${GEN}/flags.mk
+include config/exports.mk
-include config/vars.mk
-
-default::
+${GEN}/deps.mk::
+ ${MSG} "[ GEN] $@"
+ printf '# %s\n' "$@" >$@
if config/cc.sh -MD -MP -MF /dev/null config/empty.c; then \
printf 'DEPFLAGS = -MD -MP -MF $${@:.o=.d}\n'; \
- fi >${TARGET} 2>${TARGET}.log
+ fi >>$@ 2>$@.log
+ ${VCAT} $@
+ @printf -- '-include %s\n' ${OBJS:.o=.d} >>$@