1 <!-- 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. -->
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="The eCos Component Writer's Guide"
20 HREF="cdl-guide.html"><LINK
22 TITLE="CDL Language Specification"
23 HREF="reference.html"><LINK
26 HREF="ref.make.html"><LINK
29 HREF="ref.no-define.html"></HEAD
40 SUMMARY="Header navigation table"
52 > Component Writer's Guide</TH
74 HREF="ref.no-define.html"
85 NAME="REF.MAKE-OBJECT"><SPAN
99 > -- Define a custom build step, resulting in an object file
100 that should go into a library.</DIV
102 CLASS="REFSYNOPSISDIV"
114 >cdl_option <name> {
115 make_object [-library=<library>] [-priority=<pri>] {
116 <custom build step>
132 >When building an <SPAN
135 > configuration the primary target is a single
139 >. Most of the object files
140 which go into this library will be generated as a result of <SPAN
144 properties. Occasionally it may be necessary to have special build
145 steps for a given object file, and this can be achieved with a
149 > property. The use of this property should be avoided
150 whenever possible because it greatly increases the risk of portability
151 problems, both on the host side because of possible problems with the
152 tools, and on the target side because a custom build step may not
153 allow adequately for the wide variety of architectures supported by
162 > property takes a single argument, which resembles a
163 makefile rule: it consists of a target, a list of dependencies, and
164 one or more commands that should be executed. The target should be an
165 object file. However the <SPAN
168 > argument is not a makefile
169 fragment, and custom build steps may get executed in build
170 environments that do not involve make. For full details of custom
172 HREF="build.make.html#BUILD.CUSTOM"
173 >the Section called <I
174 >Custom Build Steps</I
196 >The exact syntax and limitations of custom build steps have not yet
197 been finalized, and may change in future versions of the
198 configuration tools.</P
207 > property takes an optional library argument. If no
208 library is specified then the default library for the current package
209 will be used, which will be <TT
216 > command contains a <SPAN
224 > property also takes an optional priority argument
225 indicating the order in which build steps take place. This priority
226 complements the dependency list, and avoids problems with packages
227 needing to know details of custom build steps in other packages (which
228 may change between releases). The defined order is:</P
238 >The header files exported by the current set of packages are copied
239 to the appropriate places in the
243 > subdirectory of the
244 install tree. Any unnecessary copies are avoided, to prevent rebuilds
245 of package and application source modules caused by header file dependencies.</P
253 >A possible future enhancement of the build system may result in the
254 build and install trees being updated automatically if there has been
258 > configuration savefile.</P
266 >All files specified in <SPAN
269 > properties will get built, producing
270 the corresponding object files. In addition any custom build steps
274 > properties get executed, unless there is a
284 >The libraries now get built using the appropriate object files.</P
290 >Any custom build steps specified by <SPAN
294 executed, unless the priority for a particular build step is changed
300 >For example, if a custom build step needs to take place before any of
301 the normal source files get compiled then it should be given a
302 priority somewhere between 0 and 100. If a custom build step involves
303 post-processing an object file prior to its incorporation into a
304 library then a priority between 100 and 200 should be used. It is not
305 sensible to have a priority above 200, since that would imply building
306 an additional object file for a library that has already been created.</P
322 CLASS="PROGRAMLISTING"
328 $(CC) $(CFLAGS) -o $@ y.tab.c
344 HREF="ref.compile.html"
352 HREF="ref.library.html"
361 SUMMARY="Footer navigation table"
381 HREF="cdl-guide.html"
390 HREF="ref.no-define.html"
409 HREF="reference.html"