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] - Diff between revs 28 and 174

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 28 Rev 174
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
<!-- This material may be distributed only subject to the terms      -->
<!-- This material may be distributed only subject to the terms      -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- or later (the latest version is presently available at          -->
<!-- or later (the latest version is presently available at          -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- permission is obtained from the copyright holder.               -->
<!-- permission is obtained from the copyright holder.               -->
<HTML
<HTML
><HEAD
><HEAD
><TITLE
><TITLE
>make</TITLE
>make</TITLE
><meta name="MSSmartTagsPreventParsing" content="TRUE">
><meta name="MSSmartTagsPreventParsing" content="TRUE">
<META
<META
NAME="GENERATOR"
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
"><LINK
REL="HOME"
REL="HOME"
TITLE="The eCos Component Writer's Guide"
TITLE="The eCos Component Writer's Guide"
HREF="cdl-guide.html"><LINK
HREF="cdl-guide.html"><LINK
REL="UP"
REL="UP"
TITLE="CDL Language Specification"
TITLE="CDL Language Specification"
HREF="reference.html"><LINK
HREF="reference.html"><LINK
REL="PREVIOUS"
REL="PREVIOUS"
TITLE="library"
TITLE="library"
HREF="ref.library.html"><LINK
HREF="ref.library.html"><LINK
REL="NEXT"
REL="NEXT"
TITLE="make_object"
TITLE="make_object"
HREF="ref.make-object.html"></HEAD
HREF="ref.make-object.html"></HEAD
><BODY
><BODY
CLASS="REFENTRY"
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
BGCOLOR="#FFFFFF"
TEXT="#000000"
TEXT="#000000"
LINK="#0000FF"
LINK="#0000FF"
VLINK="#840084"
VLINK="#840084"
ALINK="#0000FF"
ALINK="#0000FF"
><DIV
><DIV
CLASS="NAVHEADER"
CLASS="NAVHEADER"
><TABLE
><TABLE
SUMMARY="Header navigation table"
SUMMARY="Header navigation table"
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TH
><TH
COLSPAN="3"
COLSPAN="3"
ALIGN="center"
ALIGN="center"
>The <SPAN
>The <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>eCos</SPAN
>eCos</SPAN
> Component Writer's Guide</TH
> Component Writer's Guide</TH
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="left"
ALIGN="left"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="ref.library.html"
HREF="ref.library.html"
ACCESSKEY="P"
ACCESSKEY="P"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="80%"
WIDTH="80%"
ALIGN="center"
ALIGN="center"
VALIGN="bottom"
VALIGN="bottom"
></TD
></TD
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="right"
ALIGN="right"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="ref.make-object.html"
HREF="ref.make-object.html"
ACCESSKEY="N"
ACCESSKEY="N"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"></DIV
WIDTH="100%"></DIV
><H1
><H1
><A
><A
NAME="REF.MAKE"><SPAN
NAME="REF.MAKE"><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make</SPAN
>make</SPAN
></H1
></H1
><DIV
><DIV
CLASS="REFNAMEDIV"
CLASS="REFNAMEDIV"
><A
><A
NAME="AEN4710"
NAME="AEN4710"
></A
></A
><H2
><H2
>Name</H2
>Name</H2
>Property <SPAN
>Property <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make</SPAN
>make</SPAN
>&nbsp;--&nbsp;Define an additional custom build step associated with an
>&nbsp;--&nbsp;Define an additional custom build step associated with an
option, resulting in a target that should not go directly into a library.</DIV
option, resulting in a target that should not go directly into a library.</DIV
><DIV
><DIV
CLASS="REFSYNOPSISDIV"
CLASS="REFSYNOPSISDIV"
><A
><A
NAME="AEN4714"><H2
NAME="AEN4714"><H2
>Synopsis</H2
>Synopsis</H2
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="SYNOPSIS"
CLASS="SYNOPSIS"
>cdl_option &lt;name&gt; {
>cdl_option &lt;name&gt; {
    make [-priority=&lt;pri&gt;]  {
    make [-priority=&lt;pri&gt;]  {
        &lt;custom build step&gt;
        &lt;custom build step&gt;
    }
    }
    &#8230;
    &#8230;
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
><DIV
><DIV
CLASS="REFSECT1"
CLASS="REFSECT1"
><A
><A
NAME="AEN4716"
NAME="AEN4716"
></A
></A
><H2
><H2
>Description</H2
>Description</H2
><P
><P
>When building an <SPAN
>When building an <SPAN
CLASS="APPLICATION"
CLASS="APPLICATION"
>eCos</SPAN
>eCos</SPAN
> configuration the primary target is a single
> configuration the primary target is a single
library, <TT
library, <TT
CLASS="FILENAME"
CLASS="FILENAME"
>libtarget.a</TT
>libtarget.a</TT
>. In some cases it is
>. In some cases it is
necessary to build some additional targets. For example architectural
necessary to build some additional targets. For example architectural
HAL packages typically build a linker script and some start-up code.
HAL packages typically build a linker script and some start-up code.
Such additional targets can be specified by a <SPAN
Such additional targets can be specified by a <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make</SPAN
>make</SPAN
> property. Any
> property. Any
option can have one or more <SPAN
option can have one or more <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make</SPAN
>make</SPAN
> properties, although typically such
> properties, although typically such
properties only occur in the body of a <TT
properties only occur in the body of a <TT
CLASS="LITERAL"
CLASS="LITERAL"
>cdl_package</TT
>cdl_package</TT
> command.</P
> command.</P
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make</SPAN
>make</SPAN
> property takes a single argument, which resembles a
> property takes a single argument, which resembles a
makefile rule: it consists of a target, a list of dependencies, and
makefile rule: it consists of a target, a list of dependencies, and
one or more commands that should be executed. However the argument is
one or more commands that should be executed. However the argument is
not a makefile fragment, and custom build steps may get executed in
not a makefile fragment, and custom build steps may get executed in
build environments that do not involve make. For full details of
build environments that do not involve make. For full details of
custom build steps see <A
custom build steps see <A
HREF="build.make.html#BUILD.CUSTOM"
HREF="build.make.html#BUILD.CUSTOM"
>the Section called <I
>the Section called <I
>Custom Build Steps</I
>Custom Build Steps</I
> in Chapter 4</A
> in Chapter 4</A
>.</P
>.</P
><DIV
><DIV
CLASS="WARNING"
CLASS="WARNING"
><P
><P
></P
></P
><TABLE
><TABLE
CLASS="WARNING"
CLASS="WARNING"
BORDER="1"
BORDER="1"
WIDTH="100%"
WIDTH="100%"
><TR
><TR
><TD
><TD
ALIGN="CENTER"
ALIGN="CENTER"
><B
><B
>Warning</B
>Warning</B
></TD
></TD
></TR
></TR
><TR
><TR
><TD
><TD
ALIGN="LEFT"
ALIGN="LEFT"
><P
><P
>The exact syntax and limitations of custom build steps have not yet
>The exact syntax and limitations of custom build steps have not yet
been finalized, and are subject to change in future versions of the
been finalized, and are subject to change in future versions of the
configuration tools.</P
configuration tools.</P
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
><P
><P
>The <SPAN
>The <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make</SPAN
>make</SPAN
> property takes an optional priority argument indicating the
> property takes an optional priority argument indicating the
order in which build steps take place. This priority complements the
order in which build steps take place. This priority complements the
dependency list, and avoids problems with packages needing to know
dependency list, and avoids problems with packages needing to know
details of custom build steps in other packages (which may change
details of custom build steps in other packages (which may change
between releases). The defined order is:</P
between releases). The defined order is:</P
><P
><P
></P
></P
><DIV
><DIV
CLASS="VARIABLELIST"
CLASS="VARIABLELIST"
><DL
><DL
><DT
><DT
>Priority 0</DT
>Priority 0</DT
><DD
><DD
><P
><P
>The header files exported by the current set of packages are copied
>The header files exported by the current set of packages are copied
to the appropriate places in the
to the appropriate places in the
<TT
<TT
CLASS="FILENAME"
CLASS="FILENAME"
>include</TT
>include</TT
> subdirectory of the
> subdirectory of the
install tree. Any unnecessary copies are avoided, to prevent rebuilds
install tree. Any unnecessary copies are avoided, to prevent rebuilds
of package and application source modules caused by header file dependencies.</P
of package and application source modules caused by header file dependencies.</P
><DIV
><DIV
CLASS="NOTE"
CLASS="NOTE"
><BLOCKQUOTE
><BLOCKQUOTE
CLASS="NOTE"
CLASS="NOTE"
><P
><P
><B
><B
>Note: </B
>Note: </B
>A possible future enhancement of the build system may result in the
>A possible future enhancement of the build system may result in the
build and install trees being updated automatically if there has been
build and install trees being updated automatically if there has been
a change to the <TT
a change to the <TT
CLASS="FILENAME"
CLASS="FILENAME"
>ecos.ecc</TT
>ecos.ecc</TT
> configuration savefile.</P
> configuration savefile.</P
></BLOCKQUOTE
></BLOCKQUOTE
></DIV
></DIV
></DD
></DD
><DT
><DT
>Priority 100</DT
>Priority 100</DT
><DD
><DD
><P
><P
>All files specified in <SPAN
>All files specified in <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>compile</SPAN
>compile</SPAN
> properties will get built, producing
> properties will get built, producing
the corresponding object files. In addition any custom build steps
the corresponding object files. In addition any custom build steps
defined by <SPAN
defined by <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make_object</SPAN
>make_object</SPAN
> properties get executed, unless there is
> properties get executed, unless there is
a <TT
a <TT
CLASS="LITERAL"
CLASS="LITERAL"
>-priority=</TT
>-priority=</TT
> option.</P
> option.</P
></DD
></DD
><DT
><DT
>Priority 200</DT
>Priority 200</DT
><DD
><DD
><P
><P
>The libraries now get built using the appropriate object files.</P
>The libraries now get built using the appropriate object files.</P
></DD
></DD
><DT
><DT
>Priority 300</DT
>Priority 300</DT
><DD
><DD
><P
><P
>Any custom build steps specified by <SPAN
>Any custom build steps specified by <SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make</SPAN
>make</SPAN
> properties now get
> properties now get
executed, unless the priority for a particular build step is changed
executed, unless the priority for a particular build step is changed
from its default.</P
from its default.</P
></DD
></DD
></DL
></DL
></DIV
></DIV
><P
><P
>For example, if a custom build step needs to take place before any of
>For example, if a custom build step needs to take place before any of
the normal source files get compiled then it should be given a
the normal source files get compiled then it should be given a
priority somewhere between 0 and 100. If a custom build step involves
priority somewhere between 0 and 100. If a custom build step involves
post-processing an object file prior to its incorporation into a
post-processing an object file prior to its incorporation into a
library then a priority between 100 and 200 should be used.</P
library then a priority between 100 and 200 should be used.</P
></DIV
></DIV
><DIV
><DIV
CLASS="REFSECT1"
CLASS="REFSECT1"
><A
><A
NAME="AEN4757"
NAME="AEN4757"
></A
></A
><H2
><H2
>Example</H2
>Example</H2
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>cdl_package CYGPKG_HAL_MN10300_AM33 {
>cdl_package CYGPKG_HAL_MN10300_AM33 {
    display       "MN10300 AM33 variant"
    display       "MN10300 AM33 variant"
    parent        CYGPKG_HAL_MN10300
    parent        CYGPKG_HAL_MN10300
    implements    CYGINT_HAL_MN10300_VARIANT
    implements    CYGINT_HAL_MN10300_VARIANT
    hardware
    hardware
    include_dir   cyg/hal
    include_dir   cyg/hal
    define_header hal_mn10300_am33.h
    define_header hal_mn10300_am33.h
    description   "
    description   "
           The MN10300 AM33 variant HAL package provides generic
           The MN10300 AM33 variant HAL package provides generic
           support for this processor architecture. It is also
           support for this processor architecture. It is also
           necessary to select a specific target platform HAL
           necessary to select a specific target platform HAL
           package."
           package."
 
 
    make {
    make {
        &lt;PREFIX&gt;/lib/target.ld: &lt;PACKAGE&gt;/src/mn10300_am33.ld
        &lt;PREFIX&gt;/lib/target.ld: &lt;PACKAGE&gt;/src/mn10300_am33.ld
        $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $&lt;
        $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $&lt;
        @echo $@ ": \\" &gt; $(notdir $@).deps
        @echo $@ ": \\" &gt; $(notdir $@).deps
        @tail +2 target.tmp &gt;&gt; $(notdir $@).deps
        @tail +2 target.tmp &gt;&gt; $(notdir $@).deps
        @echo &gt;&gt; $(notdir $@).deps
        @echo &gt;&gt; $(notdir $@).deps
        @rm target.tmp
        @rm target.tmp
    }
    }
}</PRE
}</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
><DIV
><DIV
CLASS="REFSECT1"
CLASS="REFSECT1"
><A
><A
NAME="AEN4760"
NAME="AEN4760"
></A
></A
><H2
><H2
>See Also</H2
>See Also</H2
><P
><P
>Properties <A
>Properties <A
HREF="ref.compile.html"
HREF="ref.compile.html"
>compile</A
>compile</A
>,
>,
<A
<A
HREF="ref.make-object.html"
HREF="ref.make-object.html"
>make_object</A
>make_object</A
> and
> and
<A
<A
HREF="ref.library.html"
HREF="ref.library.html"
>library</A
>library</A
>.</P
>.</P
></DIV
></DIV
><DIV
><DIV
CLASS="NAVFOOTER"
CLASS="NAVFOOTER"
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
SUMMARY="Footer navigation table"
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="ref.library.html"
HREF="ref.library.html"
ACCESSKEY="P"
ACCESSKEY="P"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="cdl-guide.html"
HREF="cdl-guide.html"
ACCESSKEY="H"
ACCESSKEY="H"
>Home</A
>Home</A
></TD
></TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="ref.make-object.html"
HREF="ref.make-object.html"
ACCESSKEY="N"
ACCESSKEY="N"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>library</SPAN
>library</SPAN
></TD
></TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="reference.html"
HREF="reference.html"
ACCESSKEY="U"
ACCESSKEY="U"
>Up</A
>Up</A
></TD
></TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
><SPAN
><SPAN
CLASS="PROPERTY"
CLASS="PROPERTY"
>make_object</SPAN
>make_object</SPAN
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
></BODY
></BODY
></HTML
></HTML
 
 

powered by: WebSVN 2.1.0

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