This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libtool for shared objects?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]