makefiles: Generate dependencies to match each makefile to its subdirectory.