[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building .so files only.

From: Stephen Torri
Subject: Re: Building .so files only.
Date: 31 Aug 2003 08:55:02 -0500

On Fri, 2003-08-29 at 06:55, Benjamin Reed wrote:
> On Aug 29, 2003, at 12:55 AM, Daniel Reed wrote:
> > To produce only .la and .so files, you can pass -module -avoid-version 
> > to
> > libtool. In Automake, you can do this by using something similar to:
> >
> > pkglib_LTLIBRARIES =
> > mymod_la_SOURCES = mymod.c
> >
> > mymod_la_LDFLAGS = -module -avoid-version
> >
> > This also removes the requirement that the library name start with 
> > "lib."
> This may work on Linux, but on some platforms, this produces a very 
> different file from a library created without -module.
> "modules" are meant to only be used as a plugin, ie dlopened or 
> something similar.  With the module flag, it's a plugin; without, it's 
> a shared library.
> If you're using -module to make shared libs (that will get linked 
> against by other things), your project isn't portable.  ;)

So far I have the following for creating a 'plugin' module:

AC_TRY_CPPFLAGS("-Wall", wall="-Wall", wall="")
CXXFLAGS="-g $wall"
MODULE_LDFLAGS="-export-dynamic -module -avoid-version"

For example, a module called (Filesystem module) will produce and in the installation directory. The only way that I
know to only see in the install directory is to place a script
in the to remove the Is this the correct method?

Stephen Torri
GPG Key:

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]