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

Subversion Repositories openrisc

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

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
>make</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="library"
26
HREF="ref.library.html"><LINK
27
REL="NEXT"
28
TITLE="make_object"
29
HREF="ref.make-object.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.library.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-object.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.MAKE"><SPAN
86
CLASS="PROPERTY"
87
>make</SPAN
88
></H1
89
><DIV
90
CLASS="REFNAMEDIV"
91
><A
92
NAME="AEN4710"
93
></A
94
><H2
95
>Name</H2
96
>Property <SPAN
97
CLASS="PROPERTY"
98
>make</SPAN
99
>&nbsp;--&nbsp;Define an additional custom build step associated with an
100
option, resulting in a target that should not go directly into a library.</DIV
101
><DIV
102
CLASS="REFSYNOPSISDIV"
103
><A
104
NAME="AEN4714"><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_option &lt;name&gt; {
115
    make [-priority=&lt;pri&gt;]  {
116
        &lt;custom build step&gt;
117
    }
118
    &#8230;
119
}</PRE
120
></TD
121
></TR
122
></TABLE
123
></DIV
124
><DIV
125
CLASS="REFSECT1"
126
><A
127
NAME="AEN4716"
128
></A
129
><H2
130
>Description</H2
131
><P
132
>When building an <SPAN
133
CLASS="APPLICATION"
134
>eCos</SPAN
135
> configuration the primary target is a single
136
library, <TT
137
CLASS="FILENAME"
138
>libtarget.a</TT
139
>. In some cases it is
140
necessary to build some additional targets. For example architectural
141
HAL packages typically build a linker script and some start-up code.
142
Such additional targets can be specified by a <SPAN
143
CLASS="PROPERTY"
144
>make</SPAN
145
> property. Any
146
option can have one or more <SPAN
147
CLASS="PROPERTY"
148
>make</SPAN
149
> properties, although typically such
150
properties only occur in the body of a <TT
151
CLASS="LITERAL"
152
>cdl_package</TT
153
> command.</P
154
><P
155
>The <SPAN
156
CLASS="PROPERTY"
157
>make</SPAN
158
> property takes a single argument, which resembles a
159
makefile rule: it consists of a target, a list of dependencies, and
160
one or more commands that should be executed. However the argument is
161
not a makefile fragment, and custom build steps may get executed in
162
build environments that do not involve make. For full details of
163
custom build steps see <A
164
HREF="build.make.html#BUILD.CUSTOM"
165
>the Section called <I
166
>Custom Build Steps</I
167
> in Chapter 4</A
168
>.</P
169
><DIV
170
CLASS="WARNING"
171
><P
172
></P
173
><TABLE
174
CLASS="WARNING"
175
BORDER="1"
176
WIDTH="100%"
177
><TR
178
><TD
179
ALIGN="CENTER"
180
><B
181
>Warning</B
182
></TD
183
></TR
184
><TR
185
><TD
186
ALIGN="LEFT"
187
><P
188
>The exact syntax and limitations of custom build steps have not yet
189
been finalized, and are subject to change in future versions of the
190
configuration tools.</P
191
></TD
192
></TR
193
></TABLE
194
></DIV
195
><P
196
>The <SPAN
197
CLASS="PROPERTY"
198
>make</SPAN
199
> property takes an optional priority argument indicating the
200
order in which build steps take place. This priority complements the
201
dependency list, and avoids problems with packages needing to know
202
details of custom build steps in other packages (which may change
203
between releases). The defined order is:</P
204
><P
205
></P
206
><DIV
207
CLASS="VARIABLELIST"
208
><DL
209
><DT
210
>Priority 0</DT
211
><DD
212
><P
213
>The header files exported by the current set of packages are copied
214
to the appropriate places in the
215
<TT
216
CLASS="FILENAME"
217
>include</TT
218
> subdirectory of the
219
install tree. Any unnecessary copies are avoided, to prevent rebuilds
220
of package and application source modules caused by header file dependencies.</P
221
><DIV
222
CLASS="NOTE"
223
><BLOCKQUOTE
224
CLASS="NOTE"
225
><P
226
><B
227
>Note: </B
228
>A possible future enhancement of the build system may result in the
229
build and install trees being updated automatically if there has been
230
a change to the <TT
231
CLASS="FILENAME"
232
>ecos.ecc</TT
233
> configuration savefile.</P
234
></BLOCKQUOTE
235
></DIV
236
></DD
237
><DT
238
>Priority 100</DT
239
><DD
240
><P
241
>All files specified in <SPAN
242
CLASS="PROPERTY"
243
>compile</SPAN
244
> properties will get built, producing
245
the corresponding object files. In addition any custom build steps
246
defined by <SPAN
247
CLASS="PROPERTY"
248
>make_object</SPAN
249
> properties get executed, unless there is
250
a <TT
251
CLASS="LITERAL"
252
>-priority=</TT
253
> option.</P
254
></DD
255
><DT
256
>Priority 200</DT
257
><DD
258
><P
259
>The libraries now get built using the appropriate object files.</P
260
></DD
261
><DT
262
>Priority 300</DT
263
><DD
264
><P
265
>Any custom build steps specified by <SPAN
266
CLASS="PROPERTY"
267
>make</SPAN
268
> properties now get
269
executed, unless the priority for a particular build step is changed
270
from its default.</P
271
></DD
272
></DL
273
></DIV
274
><P
275
>For example, if a custom build step needs to take place before any of
276
the normal source files get compiled then it should be given a
277
priority somewhere between 0 and 100. If a custom build step involves
278
post-processing an object file prior to its incorporation into a
279
library then a priority between 100 and 200 should be used.</P
280
></DIV
281
><DIV
282
CLASS="REFSECT1"
283
><A
284
NAME="AEN4757"
285
></A
286
><H2
287
>Example</H2
288
><TABLE
289
BORDER="5"
290
BGCOLOR="#E0E0F0"
291
WIDTH="70%"
292
><TR
293
><TD
294
><PRE
295
CLASS="PROGRAMLISTING"
296
>cdl_package CYGPKG_HAL_MN10300_AM33 {
297
    display       "MN10300 AM33 variant"
298
    parent        CYGPKG_HAL_MN10300
299
    implements    CYGINT_HAL_MN10300_VARIANT
300
    hardware
301
    include_dir   cyg/hal
302
    define_header hal_mn10300_am33.h
303
    description   "
304
           The MN10300 AM33 variant HAL package provides generic
305
           support for this processor architecture. It is also
306
           necessary to select a specific target platform HAL
307
           package."
308
 
309
    make {
310
        &lt;PREFIX&gt;/lib/target.ld: &lt;PACKAGE&gt;/src/mn10300_am33.ld
311
        $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $&lt;
312
        @echo $@ ": \\" &gt; $(notdir $@).deps
313
        @tail +2 target.tmp &gt;&gt; $(notdir $@).deps
314
        @echo &gt;&gt; $(notdir $@).deps
315
        @rm target.tmp
316
    }
317
}</PRE
318
></TD
319
></TR
320
></TABLE
321
></DIV
322
><DIV
323
CLASS="REFSECT1"
324
><A
325
NAME="AEN4760"
326
></A
327
><H2
328
>See Also</H2
329
><P
330
>Properties <A
331
HREF="ref.compile.html"
332
>compile</A
333
>,
334
<A
335
HREF="ref.make-object.html"
336
>make_object</A
337
> and
338
<A
339
HREF="ref.library.html"
340
>library</A
341
>.</P
342
></DIV
343
><DIV
344
CLASS="NAVFOOTER"
345
><HR
346
ALIGN="LEFT"
347
WIDTH="100%"><TABLE
348
SUMMARY="Footer navigation table"
349
WIDTH="100%"
350
BORDER="0"
351
CELLPADDING="0"
352
CELLSPACING="0"
353
><TR
354
><TD
355
WIDTH="33%"
356
ALIGN="left"
357
VALIGN="top"
358
><A
359
HREF="ref.library.html"
360
ACCESSKEY="P"
361
>Prev</A
362
></TD
363
><TD
364
WIDTH="34%"
365
ALIGN="center"
366
VALIGN="top"
367
><A
368
HREF="cdl-guide.html"
369
ACCESSKEY="H"
370
>Home</A
371
></TD
372
><TD
373
WIDTH="33%"
374
ALIGN="right"
375
VALIGN="top"
376
><A
377
HREF="ref.make-object.html"
378
ACCESSKEY="N"
379
>Next</A
380
></TD
381
></TR
382
><TR
383
><TD
384
WIDTH="33%"
385
ALIGN="left"
386
VALIGN="top"
387
><SPAN
388
CLASS="PROPERTY"
389
>library</SPAN
390
></TD
391
><TD
392
WIDTH="34%"
393
ALIGN="center"
394
VALIGN="top"
395
><A
396
HREF="reference.html"
397
ACCESSKEY="U"
398
>Up</A
399
></TD
400
><TD
401
WIDTH="33%"
402
ALIGN="right"
403
VALIGN="top"
404
><SPAN
405
CLASS="PROPERTY"
406
>make_object</SPAN
407
></TD
408
></TR
409
></TABLE
410
></DIV
411
></BODY
412
></HTML
413
>

powered by: WebSVN 2.1.0

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