-MAKEDEPEND.C = $(CC) $(CPPFLAGS) -MM -MF $@ $<
-MAKEDEPEND.CXX = $(CXX) $(CPPFLAGS) -MM -MF $@ $<
-
-LOCALVERSION := localversion
-SETLOCALVERSION := ./setlocalversion
+MAKEDEPEND.FLAGS = $(CPPFLAGS) -MM -MG -MF $@ $<
+MAKEDEPEND.C = $(CC) $(CFLAGS) $(MAKEDEPEND.FLAGS)
+MAKEDEPEND.CXX = $(CXX) $(CXXFLAGS) $(MAKEDEPEND.FLAGS)