[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Set dependencies between convenience libraries
From: |
Bob Friesenhahn |
Subject: |
Re: Set dependencies between convenience libraries |
Date: |
Wed, 21 May 2014 09:08:13 -0500 (CDT) |
User-agent: |
Alpine 2.01 (GSO 1266 2009-07-14) |
On Wed, 21 May 2014, Zé wrote:
Is there a way to specify dependencies between convenience libraries, and
also set the relevant include paths?
Convenience libraries do not have normal dependencies because they are
not used as libraries (they are just bundled object files). However,
you can use libNAME_la_LIBADD to add them as an linkage dependency for
another library and Automake will take that into consideration when
ordering the build within the same directory and also apply the
objects from the convenience library while linking. If the
convenience library is built in some other directory, you have to
ensure that SUBDIRS in the upper Makefile.am is listed in the correct
order so that the convenience library is built before it is used.
For example (if convenience library is in some other directory):
libNAME_la_LIBADD = $(top_builddir)/convenience/libconvenience.la
or (if convenience library is in same directory):
libNAME_la_LIBADD = libconvenience.la
In my opinion, convenience libraries are evil (they dramatically slow
down the build) and it is better to use a non-recursive build, using
Makefile variables to list the required object files in the link
rather than using a convenience library.
Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/