Refering to my earlier mail today,I have a comment about .cpp.o: source='$<' object='$@' libtool=no \ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ $(CXXDEPMODE) $(depcomp) \ $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< The name of the dependency file is connected to the source file, not the object file, it should maybe better to build the name with the object file since the object might have been compiled with different defines flags. In my case I have a list of sources for a library MUDDIR = . UTILSRC = $(MUDDIR)/argparsing.cpp $(MUDDIR)/integrate.cpp MUDSRC = $(MUDDIR)/init.cpp $(MUDDIR)/lop.cpp $(MUDDIR)/mudfas.cpp\ $(MUDDIR)/prolon.cpp $(MUDDIR)/qnc.cpp $(MUDDIR)/restrict.cpp\ $(MUDDIR)/restrict_ops.cpp $(MUDDIR)/restrictphi.cpp\ $(MUDDIR)/smooth.cpp $(MUDDIR)/smooth_ops.cpp This library is compiled in 2d (-DDIM=2) and 3d (-DDIM=3) and I have MUD2DOBJ := $(patsubst %.cpp, %2d.o, $(MUDSRC)) MUD3DOBJ := $(patsubst %.cpp, %3d.o, $(MUDSRC)) $(MUD2DOBJ): %2d.o: %.cpp source='$<' object='$@' libtool=no \ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ $(CXXDEPMODE) $(depcomp) \ $(CXXCOMPILE) $(INCLUDES) -DDIM=2 -c -o $@ `test -f $< || echo '$(srcdir)/'`$< $(MUD3DOBJ): %3d.o: %.cpp source='$<' object='$@' libtool=no \ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ $(CXXDEPMODE) $(depcomp) \ $(CXXCOMPILE) $(INCLUDES) -DDIM=3 -c -o $@ `test -f $< || echo '$(srcdir)/'`$< But only '$(patsubst %.cpp, %.Po, $(MUDSRC))' are created. Sincerely Patrick Guio