Headers in application makefiles
Aaron J. Grier
aaron at frye.com
Thu Dec 22 18:11:49 UTC 2005
On Wed, Dec 21, 2005 at 11:15:49AM -0200, Fabrício de Novaes Kucinskis wrote:
> I'm using a makefile based on the "hello_world_c" makefile, and I
> tried to use DEPEND and "foo.o: foo.c foo.h", but with no success. How
> can I inform that there's dependency to a header in RTEMS makefiles?
you'll either need to include all the RTEMS makefiles as dependents of
your .o file, or automatically generate the dependencies with the
preprocessor and then have these included in your makefile.
since you're using GNU make, take a look at the chapter "Generating
Prerequisites Automatically" in the make info documentation. a copy
online can be found at
http://www.gnu.org/software/make/manual/html_chapter/make_4.html#SEC51
.
a little messy, but automatic dependency tracking is preferable to me
than having a separate "make depends" step.
--
Aaron J. Grier | Frye Electronics, Tigard, OR | aaron at frye.com
More information about the users
mailing list