build system library path

Björn Döbel doebel at os.inf.tu-dresden.de
Thu Jan 15 09:43:11 CET 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Jason,

On 15.01.2015 00:28, teclis High Elf wrote:
> If I create a new library is there a library include path in the 
> Fiasco/L4Re build system that I need to add my new library to
> before I can link to it?

L4Re uses pkgconfig for that.

Suppose you have a subdirectory in l4/pkg/foo and there is a libfoo.a
being built in l4/pkg/foo/lib. If you use the standard L4Re build
system (i.e., l4/mk/lib.mk for building libraries) then the build
system will generate a package config file foo.pc in $BUILD/pc
containing all the necessary linker options.

In the application that links against libfoo, you then simply add a

REQUIRES_LIBS = foo

and the build system will then determine the linker flags using pkgconfig.

Other troubles with the library include path might arise if you do
out-of-tree builds, that is you have your pkg outside the L4 build
tree. In this case you might have to specify the linker flags
yourself. The build system allows you to do so using the LD_FLAGS
variable in the Makefiles.

Hth,
Bjoern
- -- 
Dr.-Ing. Bjoern Doebel      Mail:  doebel at tudos.org
TU Dresden, OS Chair        Phone: +49 351 463 38 799
Noethnitzer Str. 46         Fax:   +49 351 463 38 284
01187 Dresden, Germany      WWW:   http://www.tudos.org/~doebel
- --
"When the seagulls follow the trawler, it's because they think
 sardines will be thrown into the sea." (Eric Cantona)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlS3fZkACgkQP5ijxgQLUNnU6wCdF1Gz+d1lr72ENdrVosSxTLGw
/fAAnRpE6zURO2JZmUnQRvTNZhiC4q0/
=zNa+
-----END PGP SIGNATURE-----



More information about the l4-hackers mailing list