OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [doc/] [develenv/] [compile.texi] - Diff between revs 1026 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 1026 Rev 1765
@c This chapter is not currently in the Development Environment Guide.
@c This chapter is not currently in the Development Environment Guide.
 
 
@c
@c
@c  COPYRIGHT (c) 1988-2002.
@c  COPYRIGHT (c) 1988-2002.
@c  On-Line Applications Research Corporation (OAR).
@c  On-Line Applications Research Corporation (OAR).
@c  All rights reserved.
@c  All rights reserved.
@c
@c
@c  compile.texi,v 1.5 2002/01/17 21:47:44 joel Exp
@c  compile.texi,v 1.5 2002/01/17 21:47:44 joel Exp
@c
@c
 
 
@ifinfo
@ifinfo
@node Compilation and GNU Make Stanzas, Compilation and GNU Make Stanzas Building the Entire Tree, Test Suite Source Directory, Top
@node Compilation and GNU Make Stanzas, Compilation and GNU Make Stanzas Building the Entire Tree, Test Suite Source Directory, Top
@end ifinfo
@end ifinfo
@chapter Compilation and GNU Make Stanzas
@chapter Compilation and GNU Make Stanzas
@ifinfo
@ifinfo
@menu
@menu
* Compilation and GNU Make Stanzas Building the Entire Tree::
* Compilation and GNU Make Stanzas Building the Entire Tree::
* Compilation and GNU Make Stanzas Making a Component::
* Compilation and GNU Make Stanzas Making a Component::
* Compilation and GNU Make Stanzas Optional Manager Support::
* Compilation and GNU Make Stanzas Optional Manager Support::
@end menu
@end menu
@end ifinfo
@end ifinfo
 
 
RTEMS is compiled using the GNU gmake(1G) utilities.
RTEMS is compiled using the GNU gmake(1G) utilities.
All examples in this section are with the gmake(1G) command.
All examples in this section are with the gmake(1G) command.
Note that the installation procedure for GNU Make installs it as
Note that the installation procedure for GNU Make installs it as
make.  It is referred to as gmake in this document to
make.  It is referred to as gmake in this document to
distinguish it from any other make utilities which may also be
distinguish it from any other make utilities which may also be
on the development system.
on the development system.
 
 
The GNU Make utility uses a file that describes the
The GNU Make utility uses a file that describes the
relationships among the files and the operations necessary for
relationships among the files and the operations necessary for
updating each file. The GNU Make utility uses stanzas to specify
updating each file. The GNU Make utility uses stanzas to specify
which set of relationships to update.  Each component and suite
which set of relationships to update.  Each component and suite
control directory contains a make control file, Makefile, which
control directory contains a make control file, Makefile, which
describes the relationships which must be checked and the
describes the relationships which must be checked and the
associated update operations for each stanza. This facility is
associated update operations for each stanza. This facility is
used to perform compilation, to remove intermediate files, to
used to perform compilation, to remove intermediate files, to
install RTEMS, and to maintain release and working set source
install RTEMS, and to maintain release and working set source
and documentation notebooks. The following is a list of stanzas
and documentation notebooks. The following is a list of stanzas
used by RTEMS make control files:
used by RTEMS make control files:
 
 
@ifset use-texinfo-tables
@ifset use-texinfo-tables
@table @code
@table @code
@item all
@item all
perform compilation but do not install
perform compilation but do not install
 
 
@item install
@item install
perform compilation if directory contains source but do not install
perform compilation if directory contains source but do not install
 
 
@item clean
@item clean
delete most generated files and directories for the current CPU and target
delete most generated files and directories for the current CPU and target
 
 
@item clobber
@item clobber
delete all generated files and directories for the current CPU and target
delete all generated files and directories for the current CPU and target
@end table
@end table
@end ifset
@end ifset
 
 
@ifclear use-texinfo-tables
@ifclear use-texinfo-tables
@html
@html
<CENTER>
<CENTER>
  <TABLE COLS=2 WIDTH="80%" BORDER=2>
  <TABLE COLS=2 WIDTH="80%" BORDER=2>
<TR><TD ALIGN=center>all</TD>
<TR><TD ALIGN=center>all</TD>
    <TD ALIGN=center>perform compilation but do not install</TD></TR>
    <TD ALIGN=center>perform compilation but do not install</TD></TR>
<TR><TD ALIGN=center>install</TD>
<TR><TD ALIGN=center>install</TD>
    <TD ALIGN=center>perform compilation if directory contains source
    <TD ALIGN=center>perform compilation if directory contains source
        but do not install</TD></TR>
        but do not install</TD></TR>
<TR><TD ALIGN=center>clean</TD>
<TR><TD ALIGN=center>clean</TD>
    <TD ALIGN=center>delete most generated files and directories for
    <TD ALIGN=center>delete most generated files and directories for
        the current CPU and target</TD></TR>
        the current CPU and target</TD></TR>
<TR><TD ALIGN=center>clobber</TD>
<TR><TD ALIGN=center>clobber</TD>
    <TD ALIGN=center>delete all generated files and directories for
    <TD ALIGN=center>delete all generated files and directories for
        the current CPU and target</TD></TR>
        the current CPU and target</TD></TR>
  </TABLE>
  </TABLE>
</CENTER>
</CENTER>
@end html
@end html
@end ifclear
@end ifclear
 
 
@ifinfo
@ifinfo
@node Compilation and GNU Make Stanzas Building the Entire Tree, Compilation and GNU Make Stanzas Making a Component, Compilation and GNU Make Stanzas, Compilation and GNU Make Stanzas
@node Compilation and GNU Make Stanzas Building the Entire Tree, Compilation and GNU Make Stanzas Making a Component, Compilation and GNU Make Stanzas, Compilation and GNU Make Stanzas
@end ifinfo
@end ifinfo
@section Building the Entire Tree
@section Building the Entire Tree
 
 
At the top of the C source tree, execute the command
At the top of the C source tree, execute the command
gmake all.  This will build and install all components and tests
gmake all.  This will build and install all components and tests
into the directory <TARGET> in this directory.
into the directory <TARGET> in this directory.
 
 
@ifinfo
@ifinfo
@node Compilation and GNU Make Stanzas Making a Component, Compilation and GNU Make Stanzas Optional Manager Support, Compilation and GNU Make Stanzas Building the Entire Tree, Compilation and GNU Make Stanzas
@node Compilation and GNU Make Stanzas Making a Component, Compilation and GNU Make Stanzas Optional Manager Support, Compilation and GNU Make Stanzas Building the Entire Tree, Compilation and GNU Make Stanzas
@end ifinfo
@end ifinfo
@section Making a Component
@section Making a Component
 
 
A single component can be compiled by changing to the
A single component can be compiled by changing to the
directory which contains that component and performing the
directory which contains that component and performing the
following command:
following command:
 
 
@example
@example
gmake
gmake
@end example
@end example
 
 
 
 
This is equivalent to the following command:
This is equivalent to the following command:
 
 
@example
@example
gmake all
gmake all
@end example
@end example
 
 
Both commands will result in the GNU Make utility
Both commands will result in the GNU Make utility
determining which files require compilation or assembly.  If any
determining which files require compilation or assembly.  If any
files require compilation or assembly, then these operations
files require compilation or assembly, then these operations
will be performed followed by the appropriate archive or link
will be performed followed by the appropriate archive or link
command. Files installed are placed in subdirectories under the
command. Files installed are placed in subdirectories under the
install point.  The install point is determined by the setting
install point.  The install point is determined by the setting
of the variable PROJECT_HOME in the file
of the variable PROJECT_HOME in the file
c/make/custom/<TARGET>.cfg.
c/make/custom/<TARGET>.cfg.
 
 
If the current directory is not a leaf directory,
If the current directory is not a leaf directory,
then the requested operation will be performed recursively to
then the requested operation will be performed recursively to
all subdirectories under the current directory.
all subdirectories under the current directory.
 
 
By specifying one of the other stanzas supported by
By specifying one of the other stanzas supported by
the Makefile, the GNU Make utility can be used to perform such
the Makefile, the GNU Make utility can be used to perform such
operations as removing all automatically generated files in a
operations as removing all automatically generated files in a
component (clean and clobbers stanza).
component (clean and clobbers stanza).
 
 
NOTE: For many components it is not possible to
NOTE: For many components it is not possible to
compile them until other components have been installed.
compile them until other components have been installed.
 
 
@ifinfo
@ifinfo
@node Compilation and GNU Make Stanzas Optional Manager Support, Sample Applications, Compilation and GNU Make Stanzas Making a Component, Compilation and GNU Make Stanzas
@node Compilation and GNU Make Stanzas Optional Manager Support, Sample Applications, Compilation and GNU Make Stanzas Making a Component, Compilation and GNU Make Stanzas
@end ifinfo
@end ifinfo
@section Optional Manager Support
@section Optional Manager Support
 
 
RTEMS allows the C applications developer to build
RTEMS allows the C applications developer to build
images that only contain those components of the executive that
images that only contain those components of the executive that
are needed, leaving out those that will not be utilized.  This
are needed, leaving out those that will not be utilized.  This
is accomplished by the RTEMS Makefile system linking in the
is accomplished by the RTEMS Makefile system linking in the
"stub" versions of the optional managers in the place of those
"stub" versions of the optional managers in the place of those
managers not needed by the specific application.   The
managers not needed by the specific application.   The
application Makefile sets the system variable $(MANAGERS) list
application Makefile sets the system variable $(MANAGERS) list
to contain those managers that are required by the application.
to contain those managers that are required by the application.
The RTEMS Makefile system then is able to build a list of
The RTEMS Makefile system then is able to build a list of
managers that are unwanted, effectively linking in the stubbed
managers that are unwanted, effectively linking in the stubbed
versions of these managers before the RTEMS library is built.
versions of these managers before the RTEMS library is built.
 
 
For more information and implementation details refer
For more information and implementation details refer
to the following files:
to the following files:
 
 
@itemize @bullet
@itemize @bullet
@item c/make/leaf.cfg,
@item c/make/leaf.cfg,
 
 
@item a Makefile for a test or sample application, and
@item a Makefile for a test or sample application, and
 
 
@item a compiler description file from c/make/compilers
@item a compiler description file from c/make/compilers
@end itemize
@end itemize
 
 
These files demonstrate the use of $(MANAGERS) and
These files demonstrate the use of $(MANAGERS) and
how the unwanted managers are handled.
how the unwanted managers are handled.
 
 
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.