Update Makefile to put the generated .d files in build directories