Improved Makefile dependency generation