libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Howto tell libtool to generate multiple libraries from a variable?


From: Ralf Wildenhues
Subject: Re: Howto tell libtool to generate multiple libraries from a variable?
Date: Sun, 22 Jul 2007 11:32:07 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hi Bob,

* Bob Rossi wrote on Fri, Jul 20, 2007 at 05:34:57PM CEST:
> 
> What I want to do is this:
> 
>   PLUGINS = plugin1 plugin2
> 
>   lib_LTLIBRARIES += $(patsubst %, lib%.la, $(PLUGINS))
>   $(patsubst %, lib%_la_SOURCES, $(PLUGINS)) = address@hidden
>   $(patsubst %, lib%_la_CPPFLAGS, $(PLUGINS)) = -I$(top_srcdir)/lib
>   $(patsubst %, lib%_la_LDFLAGS, $(PLUGINS)) = "-no-undefined"
> 
> Is this possible?

First, actually this is entirely an Automake issue, not a Libtool one.
automake is not able to parse GNU make-specific constructs like patsubst
and similar.  If in this Makefile.am, you build no other stuff, you can
turn flags globally by setting AM_CPPFLAGS and AM_LDFLAGS, but I'm
afraid you'll have to list libraries and their sources explicitly.

If I were you, I'd write a script generating a makefile snippet to be
included from Makefile.am.

Hope that helps.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]