[En-Nut-Discussion] Makefile Dependencies

Matthias Ringwald mringwal at inf.ethz.ch
Tue Mar 23 15:53:53 CET 2004


hi

the makefiles ot nut/os are quite nice & clean.
but they don't care for dependencies like headers, etc..

what do people think, should the object files also depend
on the header files they are including ?


or do you allways enter:
make clean; make install

after you changed something ?


from makefile docs
(http://pax.st.usm.edu/~kolibal/make_html/make_42.html#SEC41)
I got this snipped:

%.d: %.c
         $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< | sed '\"s/$*.o/& $@/g'\" 
 > $@'
sources = foo.c bar.c
include $(sources:.c=.d)

but I couldn't get it to work. the .d dependencies files are created, 
but
the objects are not build anymore.

regards,
matthias




More information about the En-Nut-Discussion mailing list