[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem --enable-shared and --enable-static together
From: |
Bob Friesenhahn |
Subject: |
Re: problem --enable-shared and --enable-static together |
Date: |
Fri, 4 Dec 2009 09:53:34 -0600 (CST) |
User-agent: |
Alpine 2.01 (GSO 1266 2009-07-14) |
On Fri, 4 Dec 2009, Andreas Otto wrote:
$(TCL_CFLAGS) $(AM_CFLAGS) -DMQ_IGNORE_EXTERN
tclmsgque_la_LIBADD = ../libmsgque/*.lo
The above line is wrong. You should refer to tclmsgque.la rather than
'*.lo'. Wildcard specifications do not belong in an Automake
makefile.
as you see both *lo and *.o are created. the *.o are useless and just
extend the compiling time
The .lo files are necessary in order to satisfy makefile dependency
logic. When shared libraries are supported, the object files are
built as PIC (when necessary/supported) even if they appear in a
static archive file.
I use "../libmsgque/*.lo" for in-project libraray dependency to avoid to
link to my own shared libraray
Q: what can I do to avoid build static libraries ...
You have the option to re-do your makefiles to use a non-recursive
build. This allows the dependencies to be fully known to one makefile
and makes it possible to avoid using libtool convenience libraries.
Creating libtool convenience libraries for the sole purpose of being
able to refer to the object files in a different directory is
wasteful, even though its a common usage.
Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/