Well there is makefile2graph https://github.com/lindenb/makefile2graph. It is even packaged be Debian and it does exactly that.
I use it like this from inside the Makefile:
make-db.png:
make -f $(MAKEFILE) -Bnd | sed -e 's,$(MAKEDIR)/,,g' | make2graph | dot -Tpng -o $@
but with some gymnastics in order to remove very long path names (MAKEDIR) can be used from the shell directly.