Makefile question

Ralf Corsepius ralf_corsepius at rtems.org
Tue Nov 23 04:23:17 UTC 2004


On Mon, 2004-11-22 at 15:12 -0500, Etienne Fortin wrote:
> Hi everyone,
> I'm currently trying to structure my application directories and
> Makefile and I have some interrogations. I read the Makefile README and
> I don't understand completely how to use the leaf and directory
> Makefiles.
This file describes the way Joel uses make.

> What I want to do is have a main Makefile at the root of my sources that
> link the final executable of the application. This Makefile recurse all
> subdirectory, each compiling some .o from some sources. The main
> Makefile at the root just link all the .o made by the subdirs into the
> executable.
> 
> My problem is that I don't understand how to make that all work with the
> directory and leaf Makefiles concept of RTEMS applications. It seems
> that a directory Makefile is just used to force creation of
> sub-standalone-executables that are in subdirs. But I really just want
> to compile sub-modules from a main application executable.
>
> Any help will be appreciated.
My recommendation: Unless you are building inside of the source-tree,
write your Makefiles like you would write them for any arbitrary
application. Use the tools you want to use and use the style you want to
write them.

To me, RTEMS Makefile fragments are less than helpful ;)

Ralf





More information about the users mailing list