source: rtems/doc/develenv/compile.texi @ aa41429

4.104.114.84.95
Last change on this file since aa41429 was 6449498, checked in by Joel Sherrill <joel.sherrill@…>, on 01/17/02 at 21:47:47

2001-01-17 Joel Sherrill <joel@…>

  • SUPPORT, LICENSE: New files.
  • Numerous files touched as part of merging the 4.5 branch onto the mainline development trunk and ensuring that the script that cuts snapshots and releases works on the documentation.
  • Property mode set to 100644
File size: 5.5 KB
Line 
1@c This chapter is not currently in the Development Environment Guide.
2
3@c
4@c  COPYRIGHT (c) 1988-2002.
5@c  On-Line Applications Research Corporation (OAR).
6@c  All rights reserved.
7@c
8@c  $Id$
9@c
10
11@ifinfo
12@node Compilation and GNU Make Stanzas, Compilation and GNU Make Stanzas Building the Entire Tree, Test Suite Source Directory, Top
13@end ifinfo
14@chapter Compilation and GNU Make Stanzas
15@ifinfo
16@menu
17* Compilation and GNU Make Stanzas Building the Entire Tree::
18* Compilation and GNU Make Stanzas Making a Component::
19* Compilation and GNU Make Stanzas Optional Manager Support::
20@end menu
21@end ifinfo
22
23RTEMS is compiled using the GNU gmake(1G) utilities.
24All examples in this section are with the gmake(1G) command.
25Note that the installation procedure for GNU Make installs it as
26make.  It is referred to as gmake in this document to
27distinguish it from any other make utilities which may also be
28on the development system.
29
30The GNU Make utility uses a file that describes the
31relationships among the files and the operations necessary for
32updating each file. The GNU Make utility uses stanzas to specify
33which set of relationships to update.  Each component and suite
34control directory contains a make control file, Makefile, which
35describes the relationships which must be checked and the
36associated update operations for each stanza. This facility is
37used to perform compilation, to remove intermediate files, to
38install RTEMS, and to maintain release and working set source
39and documentation notebooks. The following is a list of stanzas
40used by RTEMS make control files:
41
42@ifset use-texinfo-tables
43@table @code
44@item all
45perform compilation but do not install
46
47@item install
48perform compilation if directory contains source but do not install
49
50@item clean
51delete most generated files and directories for the current CPU and target
52
53@item clobber
54delete all generated files and directories for the current CPU and target
55@end table
56@end ifset
57
58@ifclear use-texinfo-tables
59@html
60<CENTER>
61  <TABLE COLS=2 WIDTH="80%" BORDER=2>
62<TR><TD ALIGN=center>all</TD>
63    <TD ALIGN=center>perform compilation but do not install</TD></TR>
64<TR><TD ALIGN=center>install</TD>
65    <TD ALIGN=center>perform compilation if directory contains source
66        but do not install</TD></TR>
67<TR><TD ALIGN=center>clean</TD>
68    <TD ALIGN=center>delete most generated files and directories for
69        the current CPU and target</TD></TR>
70<TR><TD ALIGN=center>clobber</TD>
71    <TD ALIGN=center>delete all generated files and directories for
72        the current CPU and target</TD></TR>
73  </TABLE>
74</CENTER>
75@end html
76@end ifclear
77
78@ifinfo
79@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
80@end ifinfo
81@section Building the Entire Tree
82
83At the top of the C source tree, execute the command
84gmake all.  This will build and install all components and tests
85into the directory <TARGET> in this directory.
86
87@ifinfo
88@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
89@end ifinfo
90@section Making a Component
91
92A single component can be compiled by changing to the
93directory which contains that component and performing the
94following command:
95
96@example
97gmake
98@end example
99
100
101This is equivalent to the following command:
102
103@example
104gmake all
105@end example
106
107Both commands will result in the GNU Make utility
108determining which files require compilation or assembly.  If any
109files require compilation or assembly, then these operations
110will be performed followed by the appropriate archive or link
111command. Files installed are placed in subdirectories under the
112install point.  The install point is determined by the setting
113of the variable PROJECT_HOME in the file
114c/make/custom/<TARGET>.cfg.
115
116If the current directory is not a leaf directory,
117then the requested operation will be performed recursively to
118all subdirectories under the current directory.
119
120By specifying one of the other stanzas supported by
121the Makefile, the GNU Make utility can be used to perform such
122operations as removing all automatically generated files in a
123component (clean and clobbers stanza).
124
125NOTE: For many components it is not possible to
126compile them until other components have been installed.
127
128@ifinfo
129@node Compilation and GNU Make Stanzas Optional Manager Support, Sample Applications, Compilation and GNU Make Stanzas Making a Component, Compilation and GNU Make Stanzas
130@end ifinfo
131@section Optional Manager Support
132
133RTEMS allows the C applications developer to build
134images that only contain those components of the executive that
135are needed, leaving out those that will not be utilized.  This
136is accomplished by the RTEMS Makefile system linking in the
137"stub" versions of the optional managers in the place of those
138managers not needed by the specific application.   The
139application Makefile sets the system variable $(MANAGERS) list
140to contain those managers that are required by the application.
141The RTEMS Makefile system then is able to build a list of
142managers that are unwanted, effectively linking in the stubbed
143versions of these managers before the RTEMS library is built.
144
145For more information and implementation details refer
146to the following files:
147
148@itemize @bullet
149@item c/make/leaf.cfg,
150
151@item a Makefile for a test or sample application, and
152
153@item a compiler description file from c/make/compilers
154@end itemize
155
156These files demonstrate the use of $(MANAGERS) and
157how the unwanted managers are handled.
158
159
Note: See TracBrowser for help on using the repository browser.