About g++ option -MM

Dima Sorkin dima.sorkin@gmail.com
Sun Jan 29 07:27:00 GMT 2006

On 1/28/06, Peng Yu  wrote:
> What if I want to keep both versions like main-g.o and main-o.o?

This can be a litle tricky: implicit rules may be used, something like this:
%-g.o : %.cc
  $(COMPILE.c) -o $@ -c $<
%-o.o : %.cc


More information about the Gcc-help mailing list