This is the mail archive of the 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?

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 files, you will find lines of the form


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

        $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) \
                $< $(DESTDIR)$(pkglibdir)/$<

Some examples of use can be found in the Parma Polyhedra Library's files, but I am sure there are more authoritative sources
out there (i.e., we may well misuse Libtool).
I hope it helps,


Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy

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