On 04/20/2011 07:21 PM, Ralf Wildenhues wrote:
Why do you ever need to use the former?  (It can come in handy in
included Makefile.am fragments.)  The important bits are: however
you specify a file in one Makefile.am, you should always do it the
same way, or things may go wrong.  So a library built from the same
Makefile.am should have a relative name; but arguably, you could
also write, e.g.,

lib_LTLIBRARIES = ./libfoo.la
__libfoo_la_SOURCES = ...

if you really want to make your life hard; I'd always suggest

lib_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = ...

and using plain 'libfoo.la' in libbar_la_LIBADD.

Thanks Ralf.

I'm trying to link to a library built using a different Makefile.am in a different location in the source tree. I haven't been able to get the plain "libfoo.la" to work for that. Is there a way to do so?

The only way I've found that works is to give the complete relative path using $(top_builddir).

Sorry if I'm misunderstanding something; I really appreciate the help.

- Daniel


Reply via email to