Use an implicit rule to generate dependency files.

Also sorted the includes of those dependency files.