[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Different flags for static and shared build of a library
From: |
Ralf Wildenhues |
Subject: |
Re: Different flags for static and shared build of a library |
Date: |
Thu, 23 Dec 2010 11:33:07 +0100 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
* Zdenek Hutyra wrote on Tue, Dec 21, 2010 at 09:16:07AM CET:
> Is it possible to specify CFLAGS different for static and shared library in
> .am file?
>
> lib_LTLIBRARIES = libFOO.la
> libFOO_la_CFLAGS = ...
Not directly. If this is only about preprocessor flags, -DPIC is set
for the shared lib. Otherwise, you could make two different libraries,
lib_LTLIBRARIES += libFOO-static.la
libFOO_static_SOURCES = $(libFOO_SOURCES)
libFOO_static_CFLAGS = ...
and either
libFOO_static_LDFLAGS = -static
or
libFOO_static_LIBTOOLFLAGS = --tag=disable-shared
Cheers,
Ralf