libtool
[Top][All Lists]
Advanced

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

Re: Is it possible to pass different options to static/shared builds?


From: Howard Chu
Subject: Re: Is it possible to pass different options to static/shared builds?
Date: Fri, 14 Oct 2005 11:56:21 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050925 SeaMonkey/1.1a

J.T. Conklin wrote:
I'm one of the ACE/TAO developers that maintain its autoconf/automake
build infrastructure.

We use preprocessor macros to conditionally compile in factory
methods, static constructors, and export/visibility directives.  For
example, for the TAO library, TAO_BUILD_DLL is defined when building
a shared library, but not for static libraries.  Similar macros are
used for the (many) other libraries.

Is there any way to specify options that will be used for only one of
the build types?  Short of that, is there a way to disable the static
build so it can't be overriden by --enable-static by the user (since
inappropriate options will be passed through).

For preprocessor macros, you can just toss them into a config.h and select using #ifdef DLL.

Similarly, how do folks generally go about providing static, profile
instrumented, libraries?

To get separate commandline options for static vs shared, use explicit make rules. Have one rule invoke "libtool --tag=disable-static" to produce only the shared files, and another with "libtool --tag=disable-shared" to produce only the static files.

--
  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc
  OpenLDAP Core Team            http://www.openldap.org/project/




reply via email to

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