aboutsummaryrefslogtreecommitdiff
path: root/mk/depend.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/depend.mk')
-rw-r--r--mk/depend.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/mk/depend.mk b/mk/depend.mk
new file mode 100644
index 00000000..a4d717ae
--- /dev/null
+++ b/mk/depend.mk
@@ -0,0 +1,11 @@
+# This only works for make implementations that always include a .depend if
+# it exists. Only GNU make does not do this.
+
+# Copyright 2008 Roy Marples <roy@marples.name>
+
+CLEANFILES+= .depend
+
+.depend: ${SRCS}
+ ${CC} ${CFLAGS} -MM ${SRCS} > .depend
+
+depend: .depend