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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [doc/] [develenv/] [compile.texi] - Blame information for rev 1771

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
@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  compile.texi,v 1.5 2002/01/17 21:47:44 joel Exp
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
 
23
RTEMS is compiled using the GNU gmake(1G) utilities.
24
All examples in this section are with the gmake(1G) command.
25
Note that the installation procedure for GNU Make installs it as
26
make.  It is referred to as gmake in this document to
27
distinguish it from any other make utilities which may also be
28
on the development system.
29
 
30
The GNU Make utility uses a file that describes the
31
relationships among the files and the operations necessary for
32
updating each file. The GNU Make utility uses stanzas to specify
33
which set of relationships to update.  Each component and suite
34
control directory contains a make control file, Makefile, which
35
describes the relationships which must be checked and the
36
associated update operations for each stanza. This facility is
37
used to perform compilation, to remove intermediate files, to
38
install RTEMS, and to maintain release and working set source
39
and documentation notebooks. The following is a list of stanzas
40
used by RTEMS make control files:
41
 
42
@ifset use-texinfo-tables
43
@table @code
44
@item all
45
perform compilation but do not install
46
 
47
@item install
48
perform compilation if directory contains source but do not install
49
 
50
@item clean
51
delete most generated files and directories for the current CPU and target
52
 
53
@item clobber
54
delete 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
 
83
At the top of the C source tree, execute the command
84
gmake all.  This will build and install all components and tests
85
into 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
 
92
A single component can be compiled by changing to the
93
directory which contains that component and performing the
94
following command:
95
 
96
@example
97
gmake
98
@end example
99
 
100
 
101
This is equivalent to the following command:
102
 
103
@example
104
gmake all
105
@end example
106
 
107
Both commands will result in the GNU Make utility
108
determining which files require compilation or assembly.  If any
109
files require compilation or assembly, then these operations
110
will be performed followed by the appropriate archive or link
111
command. Files installed are placed in subdirectories under the
112
install point.  The install point is determined by the setting
113
of the variable PROJECT_HOME in the file
114
c/make/custom/<TARGET>.cfg.
115
 
116
If the current directory is not a leaf directory,
117
then the requested operation will be performed recursively to
118
all subdirectories under the current directory.
119
 
120
By specifying one of the other stanzas supported by
121
the Makefile, the GNU Make utility can be used to perform such
122
operations as removing all automatically generated files in a
123
component (clean and clobbers stanza).
124
 
125
NOTE: For many components it is not possible to
126
compile 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
 
133
RTEMS allows the C applications developer to build
134
images that only contain those components of the executive that
135
are needed, leaving out those that will not be utilized.  This
136
is accomplished by the RTEMS Makefile system linking in the
137
"stub" versions of the optional managers in the place of those
138
managers not needed by the specific application.   The
139
application Makefile sets the system variable $(MANAGERS) list
140
to contain those managers that are required by the application.
141
The RTEMS Makefile system then is able to build a list of
142
managers that are unwanted, effectively linking in the stubbed
143
versions of these managers before the RTEMS library is built.
144
 
145
For more information and implementation details refer
146
to 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
 
156
These files demonstrate the use of $(MANAGERS) and
157
how the unwanted managers are handled.
158
 
159
 

powered by: WebSVN 2.1.0

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