manpagez: man pages & more
info automake
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.3.7 _LIBADD, _LDFLAGS, and _LIBTOOLFLAGS

As shown in previous sections, the ‘library_LIBADD’ variable should be used to list extra libtool objects (‘.lo’ files) or libtool libraries (‘.la’) to add to library.

The ‘library_LDFLAGS’ variable is the place to list additional libtool linking flags, such as ‘-version-info’, ‘-static’, and a lot more. See (libtool)Link mode section `Link mode' in The Libtool Manual.

The libtool command has two kinds of options: mode-specific options and generic options. Mode-specific options such as the aforementioned linking flags should be lumped with the other flags passed to the tool invoked by libtool (hence the use of ‘library_LDFLAGS’ for libtool linking flags). Generic options include ‘--tag=TAG’ and ‘--silent’ (see (libtool)Invoking libtool section `Invoking libtool' in The Libtool Manual for more options) should appear before the mode selection on the command line; in ‘Makefile.am’s they should be listed in the ‘library_LIBTOOLFLAGS’ variable.

If ‘library_LIBTOOLFLAGS’ is not defined, then the variable AM_LIBTOOLFLAGS is used instead.

These flags are passed to libtool after the ‘--tag=TAG’ option computed by Automake (if any), so ‘library_LIBTOOLFLAGS’ (or AM_LIBTOOLFLAGS) is a good place to override or supplement the ‘--tag=TAG’ setting.

The libtool rules also use a LIBTOOLFLAGS variable that should not be set in ‘Makefile.am’: this is a user variable (see section Flag Variables Ordering. It allows users to run ‘make LIBTOOLFLAGS=--silent’, for instance. Note that the verbosity of libtool can also be influenced with the Automake ‘silent-rules’ option (see section Changing Automake's Behavior).


© manpagez.com 2000-2024
Individual documents may contain additional copyright information.