I've gone over and over the documentation, and browsed the mailing
list archives, but I'm not seeing what I'm looking for.
I have an application with two subdirectories, both of which contain
sources that will be made into shared libraries. In the /lib
directory, I make a single, standard shared library. This all works fine.
In the /handlers directory, I make a series of plugin (module)
libraries, one for each source file in the directory. These plugin
libraries need to reference the common library that was made in /lib.
Ideally I would be able to use make's $(wildcard ...) function in
handlers/Makefile.am, but I understand why that doesn't work... so at
least I have to create pkglib_LTLIBRARIES and module_..._SOURCES lines
for each library to be created in /handlers.
However, I also have to create module_..._LDFLAGS lines to specify
"-module -avoid-version", and module_..._LIBADD lines to reference the
library in /lib. I can eliminate the need for all 25 of these sets of
lines by just putting all that stuff into LDFLAGS (_not_ AM_LDFLAGS),
but I don't want to do that because I don't want to forcibly override
the user's LDFLAGS setting.
If I move the "-module -avoid-version" stuff into AM_LDFLAGS, the
build works normally, but automake complains that the library names
are non-standard. I could live with this, but I'd rather the check for
"-module" look into AM_LDFLAGS if module_..._LDFLAGS has not been
specified.
I can't seem to find any LDADD/LIBADD/LIBOBJS/etc. variable I can
define at the top of Makefile.am that will apply to all _LTLIBRARIES
in that Makefile. Should there be one?
I'm willing to make patches to automake to add these features if
there's some chance they'll be accepted, but I hope to hear this
already in CVS (which I haven't had time to check yet) or something :-)
- Re: Some confusion regarding LIBADD/LDFLAGS/etc. Kevin P. Fleming
- Re: Some confusion regarding LIBADD/LDFLAGS/etc. Alexandre Duret-Lutz
