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