This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to compile a new package


>>>>> "pyxue" == pyxue  <pyxue@cygnus.co.uk> writes:

    pyxue> Hi, everyone:

    pyxue>          I want to add a new package to ecos, a package of
    pyxue> vrc4373 device driver. But unfortunately, I meet some
    pyxue> problems, can some one do me a favor to solve it?

    pyxue>          I modified the file ecos.db to add my package, and
    pyxue> then edit a cdl file to describe the package, all these
    pyxue> seem work well. When I compile it in the ecos configuration
    pyxue> tool , I gat following error messages:

    pyxue> ....
    pyxue> make -r -C drivers/v1_3_1 build
    pyxue> make[1]:*** No rule to make target 'src/kdbmouse.o.d'. needed by
    pyxue> 'libextros.a.stamp.' Stop.
    pyxue> make:***[build] error 2

    pyxue>          What is the meaning of no rule to make kbdmuse.o.d
    pyxue> from kbdmouse.c(the first file of my new package)? It seems
    pyxue> that the added package need some makefiles to describe how
    pyxue> to compile it. While I find that in other packages there
    pyxue> are no makefiles too, so how the ecos configuration tool
    pyxue> compile these packkages and generate makefiles for them?

The makefiles are generated from information in the CDL scripts. In
this case I suspect that the CDL script has a line resembling:

    compile kdbmouse.c

This tells the configuration system that when the containing option or
package is enabled, there is a file kdbmouse.c which should get built
and added to the library libextras.a (not libextros.a, unless that is
a typo in your CDL edits). The configuration tools will look for this
file in the package's src subdirectory (if that exists), then in the
package's toplevel directory. If the file cannot be found in either
location then the assumption is that the file will be generated
somehow by e.g. a custom build step. There should really be a cdllint
or similar tool which would warn about such things, but that has not
been written yet.

The .d and .stamp suffixes can be ignored, they are auxiliary targets
used to get header file dependencies etc. working correctly. What make
is actually complaining about is that libextras.a needs a file
kdbmouse.o. There are default rules in place to generate kdbmouse.o
from any of kdbmouse.c, kdbmouse.cxx or kdbmouse.s, but make cannot
find any of those either so it has no way of generating kdbmouse.o

For more details of CDL and how to control what gets built, see the
eCos Component Writer's Guide.

Bart

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]