Makefiles for multi-directory applications

Alan Cudmore Alan.P.Cudmore at nasa.gov
Thu Nov 20 15:27:50 UTC 2003


I have used the makefiles for RTEMS applications and demos for simple apps 
with a handful of C files in one directory.
Now I would like to create makefiles for an application with multiple 
levels of directories.
In my directory tree, the make file calls other makefiles in 
sub-directories and compiles the C files for each sub-system ( or task ). 
When it gets to the part of the directory tree with the RTEMS startup code, 
that is where I would like to link it into an executable.

What rules do I use in a subsystem makefile to just compile C files into 
objects ( and not try to link or create an application? )

Is there an example of a multi-directory build like this?

I want to take advantage of the RTEMS_MAKEFILE_PATH and the makefile 
includes for portability. I can easily see what settings the RTEMS makefile 
is using and put them in my own makefile, but then it would have to be set 
for each RTEMS target..

Thanks
Alan Cudmore




More information about the users mailing list