libtool
[Top][All Lists]
Advanced

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

Re: Separate CPPFLAGS for static and shared libs


From: Vikram Ambrose
Subject: Re: Separate CPPFLAGS for static and shared libs
Date: Thu, 05 Jun 2008 09:59:38 -0400
User-agent: Thunderbird 2.0.0.14 (X11/20080501)

Roumen Petrov wrote:
Vincent Torri wrote:


On Wed, 4 Jun 2008, Ralf Wildenhues wrote:

* Vikram Ambrose wrote on Wed, Jun 04, 2008 at 03:54:35PM CEST:

However I need to pass separate CPPFLAGS to the objects destined for the
shared library as opposed to the objects destined for the library
archive.

As Andreas already replied, just use "#ifdef PIC" for shared and
"#ifndef PIC" for static code.  That usually works.

I think that it will not work with MinGW. But then you can use DLL_EXPORT.

Vincent Torri

-DPIC is defined in conjunction with -DDLL_EXPORT

Roumen


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool
Thanks all. However modifying the code is not a possibility. I do understand that the code is not designed properly. I am looking for a way to configure the build tools to build the code properly instead of configuring the code to get the build tools to build it properly.

Basically the only functionality I need is for libtool to recognise $lib_a_CPPFLAGS in the Makefile.am; ie:

LT_LIBRARIES = libfile.la
libfile_la_####
libfile_a_#### <--- this being detected/read by libtool also.

So to the original question, Does anyone know a way of providing separate CPPFLAGS to libtool when it builds the static lib?

Vikram

--
Vikram Ambrose | Linux Products Division | WindRiver Corporation





reply via email to

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