http://make.paulandlesley.org/autodep.html
One of the most important, and yet potentially frustrating, tasks that is required to allow any make-based build environment to function properly is the correct listing of dependencies in the makefile. This document describes a very useful method for having make itself create and maintain these dependencies completely automatically.
This paper by the current maintainer of GnuMake appears to be the last word on dependency-tracking for makefiles, a surprisingly tricky thing to get right.