summaryrefslogtreecommitdiffstats
path: root/config/deps.mk
diff options
context:
space:
mode:
Diffstat (limited to 'config/deps.mk')
-rw-r--r--config/deps.mk13
1 files changed, 13 insertions, 0 deletions
diff --git a/config/deps.mk b/config/deps.mk
new file mode 100644
index 0000000..7d991ab
--- /dev/null
+++ b/config/deps.mk
@@ -0,0 +1,13 @@
+# Copyright © Tavian Barnes <tavianator@tavianator.com>
+# SPDX-License-Identifier: 0BSD
+
+# Makefile that generates gen/deps.mk
+
+.OBJDIR: .
+
+include config/vars.mk
+
+default::
+ 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