This uses a trick from scottmcpeak.com/autodepend/autodepend.html. It may seem like overkill for such a small codebase, but note that header modifications did not trigger rebuilds in the affected object files in the existing Makefile.
update clear line number method