]> git.kernelconcepts.de Git - karo-tx-redboot.git/blobdiff - doc/html/cdl-guide/ref.library.html
Initial revision
[karo-tx-redboot.git] / doc / html / cdl-guide / ref.library.html
diff --git a/doc/html/cdl-guide/ref.library.html b/doc/html/cdl-guide/ref.library.html
new file mode 100644 (file)
index 0000000..7974cdd
--- /dev/null
@@ -0,0 +1,331 @@
+<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
+<!-- This material may be distributed only subject to the terms      -->
+<!-- and conditions set forth in the Open Publication License, v1.0  -->
+<!-- or later (the latest version is presently available at          -->
+<!-- http://www.opencontent.org/openpub/).                           -->
+<!-- Distribution of the work or derivative of the work in any       -->
+<!-- standard (paper) book form is prohibited unless prior           -->
+<!-- permission is obtained from the copyright holder.               -->
+<HTML
+><HEAD
+><TITLE
+>library</TITLE
+><meta name="MSSmartTagsPreventParsing" content="TRUE">
+<META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"><LINK
+REL="HOME"
+TITLE="The eCos Component Writer's Guide"
+HREF="cdl-guide.html"><LINK
+REL="UP"
+TITLE="CDL Language Specification"
+HREF="reference.html"><LINK
+REL="PREVIOUS"
+TITLE="legal_values"
+HREF="ref.legal-values.html"><LINK
+REL="NEXT"
+TITLE="make"
+HREF="ref.make.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+SUMMARY="Header navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>The <SPAN
+CLASS="APPLICATION"
+>eCos</SPAN
+> Component Writer's Guide</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="ref.legal-values.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+></TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="ref.make.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><H1
+><A
+NAME="REF.LIBRARY"><SPAN
+CLASS="PROPERTY"
+>library</SPAN
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN4667"
+></A
+><H2
+>Name</H2
+>Property <SPAN
+CLASS="PROPERTY"
+>library</SPAN
+>&nbsp;--&nbsp;Specify which library should contain the object files
+generated by building this package.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN4671"><H2
+>Synopsis</H2
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>cdl_package &lt;name&gt; {
+    library &lt;library name&gt;
+    &#8230;
+}</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN4673"
+></A
+><H2
+>Description</H2
+><P
+>By default all object files that get built for all packages end up in
+a single library, <TT
+CLASS="FILENAME"
+>libtarget.a</TT
+>. This makes things
+easier for the typical application developer because it is only
+necessary to link with a single library, rather than with separate
+libraries for each package. It is possible to specify an alternative
+library for specific files as an option to the <SPAN
+CLASS="PROPERTY"
+>compile</SPAN
+> and
+<SPAN
+CLASS="PROPERTY"
+>make_object</SPAN
+> properties, and there is one library <A
+HREF="build.html"
+><TT
+CLASS="FILENAME"
+>libextras.a</TT
+></A
+> which serves a
+specific purpose in the build system. The <SPAN
+CLASS="PROPERTY"
+>library</SPAN
+> property allows an
+alternative library to be specified for all the object files that will
+be generated for a given package.</P
+><P
+>The use of the <SPAN
+CLASS="PROPERTY"
+>library</SPAN
+> property should be avoided, since it makes
+things more difficult for application developers. The property is
+intended only for special cases, for example if there are legal
+objections to mingling object files from different packages in a
+single library. It could also be used to work around name clash
+problems if two packages happen to define an exported symbol with the
+same name, but any attempt to use multiple libraries in this way is
+error-prone and should be avoided.</P
+><P
+>The <SPAN
+CLASS="PROPERTY"
+>library</SPAN
+> property takes a single argument, the name of a library,
+which should follow the standard naming convention of
+<TT
+CLASS="LITERAL"
+>lib&lt;something&gt;.a</TT
+>. A <SPAN
+CLASS="PROPERTY"
+>library</SPAN
+> property can
+only occur in the body of a <TT
+CLASS="LITERAL"
+>cdl_package</TT
+> command and applies to all
+object files generated for that package (except where explicitly
+overwritten with a <TT
+CLASS="LITERAL"
+>-library=</TT
+> option to one of the
+build-related properties). A <TT
+CLASS="LITERAL"
+>cdl_package</TT
+> body can contain at most
+one <SPAN
+CLASS="PROPERTY"
+>library</SPAN
+> property.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN4692"
+></A
+><H2
+>Example</H2
+><TABLE
+BORDER="5"
+BGCOLOR="#E0E0F0"
+WIDTH="70%"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>cdl_package &lt;SOME_PACKAGE&gt; {
+    &#8230;
+    library  libSomePackage.a
+}</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN4695"
+></A
+><H2
+>See Also</H2
+><P
+>Properties <A
+HREF="ref.compile.html"
+><SPAN
+CLASS="PROPERTY"
+>compile</SPAN
+></A
+>,
+<A
+HREF="ref.make.html"
+><SPAN
+CLASS="PROPERTY"
+>make</SPAN
+></A
+>, and
+<A
+HREF="ref.make-object.html"
+><SPAN
+CLASS="PROPERTY"
+>make_object</SPAN
+></A
+>,
+command <A
+HREF="ref.cdl-package.html"
+><TT
+CLASS="LITERAL"
+>cdl_package</TT
+></A
+>.</P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+SUMMARY="Footer navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="ref.legal-values.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="cdl-guide.html"
+ACCESSKEY="H"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="ref.make.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><SPAN
+CLASS="PROPERTY"
+>legal_values</SPAN
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="reference.html"
+ACCESSKEY="U"
+>Up</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><SPAN
+CLASS="PROPERTY"
+>make</SPAN
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file