[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shared libraries and automake
From: |
Alexandre Duret-Lutz |
Subject: |
Re: shared libraries and automake |
Date: |
Mon, 01 Apr 2002 16:05:05 +0200 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu) |
>>> "Eric" == Eric Ray <address@hidden> writes:
Eric> is it possible to link to a non-libtool generated shared object in the
Eric> Makefile.am?
Eric> for example, instead of
Eric> lib_LTLIBRARIES=libSomeLibrary.la
Eric> is there another command to use a regular .so file?
Eric> lib_LIBRARIES only appears to work with static libraries. I can find no
Eric> documentation in the Automake manuel that describes how to use
Eric> non-libtool libraries.
_LTLIBRARIES and _LIBRARIES are used to *produce* libraries.
If all you want is to link with a .so file which already exists
(or for which you have supplied your own building rules), you
can use _LDADD:
bin_PROGRAMS = foo
foo_SOURCES = foo.c foo.h
foo_LDADD = pathto/libyours.so
Alternatively, you can play with the -L and -l linker flags
bin_PROGRAMS = foo
foo_SOURCES = foo.c foo.h
foo_LDADD = -Lpathto -lyours
but this second form won't handle dependencies (in case
pathto/libyours.so is built in the same project) automatically.
(All of this remains true for any kind of libraries, e.g. static
libraries or libtool libraries.)
HTH,
--
Alexandre Duret-Lutz