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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [cdl-guide/] [ref.library.html] - Blame information for rev 441

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

Line No. Rev Author Line
1 28 unneback
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>library</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="The eCos Component Writer's Guide"
20
HREF="cdl-guide.html"><LINK
21
REL="UP"
22
TITLE="CDL Language Specification"
23
HREF="reference.html"><LINK
24
REL="PREVIOUS"
25
TITLE="legal_values"
26
HREF="ref.legal-values.html"><LINK
27
REL="NEXT"
28
TITLE="make"
29
HREF="ref.make.html"></HEAD
30
><BODY
31
CLASS="REFENTRY"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>The <SPAN
50
CLASS="APPLICATION"
51
>eCos</SPAN
52
> Component Writer's Guide</TH
53
></TR
54
><TR
55
><TD
56
WIDTH="10%"
57
ALIGN="left"
58
VALIGN="bottom"
59
><A
60
HREF="ref.legal-values.html"
61
ACCESSKEY="P"
62
>Prev</A
63
></TD
64
><TD
65
WIDTH="80%"
66
ALIGN="center"
67
VALIGN="bottom"
68
></TD
69
><TD
70
WIDTH="10%"
71
ALIGN="right"
72
VALIGN="bottom"
73
><A
74
HREF="ref.make.html"
75
ACCESSKEY="N"
76
>Next</A
77
></TD
78
></TR
79
></TABLE
80
><HR
81
ALIGN="LEFT"
82
WIDTH="100%"></DIV
83
><H1
84
><A
85
NAME="REF.LIBRARY"><SPAN
86
CLASS="PROPERTY"
87
>library</SPAN
88
></H1
89
><DIV
90
CLASS="REFNAMEDIV"
91
><A
92
NAME="AEN4667"
93
></A
94
><H2
95
>Name</H2
96
>Property <SPAN
97
CLASS="PROPERTY"
98
>library</SPAN
99
>&nbsp;--&nbsp;Specify which library should contain the object files
100
generated by building this package.</DIV
101
><DIV
102
CLASS="REFSYNOPSISDIV"
103
><A
104
NAME="AEN4671"><H2
105
>Synopsis</H2
106
><TABLE
107
BORDER="5"
108
BGCOLOR="#E0E0F0"
109
WIDTH="70%"
110
><TR
111
><TD
112
><PRE
113
CLASS="SYNOPSIS"
114
>cdl_package &lt;name&gt; {
115
    library &lt;library name&gt;
116
    &#8230;
117
}</PRE
118
></TD
119
></TR
120
></TABLE
121
></DIV
122
><DIV
123
CLASS="REFSECT1"
124
><A
125
NAME="AEN4673"
126
></A
127
><H2
128
>Description</H2
129
><P
130
>By default all object files that get built for all packages end up in
131
a single library, <TT
132
CLASS="FILENAME"
133
>libtarget.a</TT
134
>. This makes things
135
easier for the typical application developer because it is only
136
necessary to link with a single library, rather than with separate
137
libraries for each package. It is possible to specify an alternative
138
library for specific files as an option to the <SPAN
139
CLASS="PROPERTY"
140
>compile</SPAN
141
> and
142
<SPAN
143
CLASS="PROPERTY"
144
>make_object</SPAN
145
> properties, and there is one library <A
146
HREF="build.html"
147
><TT
148
CLASS="FILENAME"
149
>libextras.a</TT
150
></A
151
> which serves a
152
specific purpose in the build system. The <SPAN
153
CLASS="PROPERTY"
154
>library</SPAN
155
> property allows an
156
alternative library to be specified for all the object files that will
157
be generated for a given package.</P
158
><P
159
>The use of the <SPAN
160
CLASS="PROPERTY"
161
>library</SPAN
162
> property should be avoided, since it makes
163
things more difficult for application developers. The property is
164
intended only for special cases, for example if there are legal
165
objections to mingling object files from different packages in a
166
single library. It could also be used to work around name clash
167
problems if two packages happen to define an exported symbol with the
168
same name, but any attempt to use multiple libraries in this way is
169
error-prone and should be avoided.</P
170
><P
171
>The <SPAN
172
CLASS="PROPERTY"
173
>library</SPAN
174
> property takes a single argument, the name of a library,
175
which should follow the standard naming convention of
176
<TT
177
CLASS="LITERAL"
178
>lib&lt;something&gt;.a</TT
179
>. A <SPAN
180
CLASS="PROPERTY"
181
>library</SPAN
182
> property can
183
only occur in the body of a <TT
184
CLASS="LITERAL"
185
>cdl_package</TT
186
> command and applies to all
187
object files generated for that package (except where explicitly
188
overwritten with a <TT
189
CLASS="LITERAL"
190
>-library=</TT
191
> option to one of the
192
build-related properties). A <TT
193
CLASS="LITERAL"
194
>cdl_package</TT
195
> body can contain at most
196
one <SPAN
197
CLASS="PROPERTY"
198
>library</SPAN
199
> property.</P
200
></DIV
201
><DIV
202
CLASS="REFSECT1"
203
><A
204
NAME="AEN4692"
205
></A
206
><H2
207
>Example</H2
208
><TABLE
209
BORDER="5"
210
BGCOLOR="#E0E0F0"
211
WIDTH="70%"
212
><TR
213
><TD
214
><PRE
215
CLASS="PROGRAMLISTING"
216
>cdl_package &lt;SOME_PACKAGE&gt; {
217
    &#8230;
218
    library  libSomePackage.a
219
}</PRE
220
></TD
221
></TR
222
></TABLE
223
></DIV
224
><DIV
225
CLASS="REFSECT1"
226
><A
227
NAME="AEN4695"
228
></A
229
><H2
230
>See Also</H2
231
><P
232
>Properties <A
233
HREF="ref.compile.html"
234
><SPAN
235
CLASS="PROPERTY"
236
>compile</SPAN
237
></A
238
>,
239
<A
240
HREF="ref.make.html"
241
><SPAN
242
CLASS="PROPERTY"
243
>make</SPAN
244
></A
245
>, and
246
<A
247
HREF="ref.make-object.html"
248
><SPAN
249
CLASS="PROPERTY"
250
>make_object</SPAN
251
></A
252
>,
253
command <A
254
HREF="ref.cdl-package.html"
255
><TT
256
CLASS="LITERAL"
257
>cdl_package</TT
258
></A
259
>.</P
260
></DIV
261
><DIV
262
CLASS="NAVFOOTER"
263
><HR
264
ALIGN="LEFT"
265
WIDTH="100%"><TABLE
266
SUMMARY="Footer navigation table"
267
WIDTH="100%"
268
BORDER="0"
269
CELLPADDING="0"
270
CELLSPACING="0"
271
><TR
272
><TD
273
WIDTH="33%"
274
ALIGN="left"
275
VALIGN="top"
276
><A
277
HREF="ref.legal-values.html"
278
ACCESSKEY="P"
279
>Prev</A
280
></TD
281
><TD
282
WIDTH="34%"
283
ALIGN="center"
284
VALIGN="top"
285
><A
286
HREF="cdl-guide.html"
287
ACCESSKEY="H"
288
>Home</A
289
></TD
290
><TD
291
WIDTH="33%"
292
ALIGN="right"
293
VALIGN="top"
294
><A
295
HREF="ref.make.html"
296
ACCESSKEY="N"
297
>Next</A
298
></TD
299
></TR
300
><TR
301
><TD
302
WIDTH="33%"
303
ALIGN="left"
304
VALIGN="top"
305
><SPAN
306
CLASS="PROPERTY"
307
>legal_values</SPAN
308
></TD
309
><TD
310
WIDTH="34%"
311
ALIGN="center"
312
VALIGN="top"
313
><A
314
HREF="reference.html"
315
ACCESSKEY="U"
316
>Up</A
317
></TD
318
><TD
319
WIDTH="33%"
320
ALIGN="right"
321
VALIGN="top"
322
><SPAN
323
CLASS="PROPERTY"
324
>make</SPAN
325
></TD
326
></TR
327
></TABLE
328
></DIV
329
></BODY
330
></HTML
331
>

powered by: WebSVN 2.1.0

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