restructure makefiles, move *.d files to dep directories