This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libtool for shared objects?
- From: Roberto Bagnara <bagnara at cs dot unipr dot it>
- To: Basile STARYNKEVITCH <basile at starynkevitch dot net>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Wed, 12 Mar 2008 07:14:57 +0100
- Subject: Re: libtool for shared objects?
- References: <47D6E92E.3080407@starynkevitch.net> <20080311162321.Q50807@shannon.csl.cornell.edu> <47D6EEB2.1060708@starynkevitch.net>
Basile STARYNKEVITCH wrote:
But I'm not sure to understand the relation between libtool & $(LIBTOOL)
(ie @libtool@)
Any clues?
Hi Basile,
I will tell you what (I think) is the relation in projects using Autoconf,
Automake and Libtool.
@LIBTOOL@ is a placeholder that stands for the Libtool main script.
In the Makefile.in files, you will find lines of the form
LIBTOOL = @LIBTOOL@
At configure time, what has to take the place of the placeholder
is computed. In the generated config.status file, you will find
something like
s,@LIBTOOL@,|#_!!_#|$(SHELL) $(top_builddir)/libtool,g
and, consequently, in your Makefile files you will have
LIBTOOL = $(SHELL) $(top_builddir)/libtool
Thus the right way to invoke the libtool command is to use $(LIBTOOL)
in the makefiles, as in
install-data-local: ppl_sicstus.so
$(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) \
$< $(DESTDIR)$(pkglibdir)/$<
Some examples of use can be found in the Parma Polyhedra Library's
Makefile.am files, but I am sure there are more authoritative sources
out there (i.e., we may well misuse Libtool).
I hope it helps,
Roberto
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it