Dan Kujovich wrote:
I am trying to get my dependencies working for obvious reasons.  But when I try 
what has been offered, it lacks the primary goal of recompiling objects when 
any of the dependencies (header files) change.

I like the gcc -MD command as it provides the proper dependencies, but I am 
having trouble having my make file actually be able to use it.  Here is an 
example of what I am grabbing from paulandlesley.org/autodep.html

I assume you are actually looking at http://make.mad-scientist.us/autodep.html

In contrast to Mark's response, I had very little trouble incorporating Paul's autodep and multi-architecture suggestions into my build process. The rule you posted is very similar to what I use. In my case the source code is C, not C++.

%$(O) : %$(C)
        $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -MD -o $@ $<
        @cp $*.d $*.P; \
        sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
                -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
        rm -f $*.d


Did you look at the dependency file that was generated? Does it look correct? Did you remember to include it in the Makefile?

-include $(SRCS:.c=.P)


galen
--
Galen Seitz
[email protected]

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to