[yocto] Using other recipes output in Makefile-project

Burton, Ross ross.burton at intel.com
Fri Sep 21 03:07:05 PDT 2012


On 21 September 2012 10:06, Jonas Jonsson L
<jonas.l.jonsson at ericsson.com> wrote:
> Hi, I'm having trouble with understanding how to use built libraries (and
> their include-files).
>
> I'm writing a bitbake-recipe for some piece of software that is
> Makefile-based.  The SW has a compilation and runtime dependency on
> readline, Sqlite3 and libxml2.
>
> In my bb-file, I've added 'DEPEND = "readline sqlite3 libxml2"' and the
> three packages are built and installed for my chosen architecture.
>
> Now how do I use the build artifacts for my compilation??  I would like to
> add 'XML2_CFLAGS=FOO', 'XML2_LIBS=BAR' etc to my EXTRA_OEMAKE so that my
> Makefile can pick up the location of the necessary include-files and
> libraries?

I'd recommend considering porting the build system to autotools, but I
know that for a lot of situations that isn't doable.

I'd also recommend changing the build system to use pkg-config for
libxml2 and sqlite3, that way it will automatically find the right
headers.

The magic variables you're looking for though are ${STAGING_INCDIR}
and ${STAGING_LIBDIR}, these are the include and lib directories under
the staging tree for the target.

Ross



More information about the yocto mailing list