Fix Makefile so that libgraphd.a is only rebuilt when necessary