e: Problem to use VFS modules

Alexandre Oliva oliva at lsd.ic.unicamp.br
Tue May 8 18:40:58 GMT 2001


On May  8, 2001, Andrew Tridgell <tridge at sevenofnine.su.valinux.com> wrote:

> So do you think we can use libtool in such a restrained way?

Yep

> - tell us if the system has the capabilities we need

libtool --features | grep "enable shared"

> - compile a .c file with necssary flags so that it can be later put
>   into a shared lib

libtool --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c foo.c

this creates foo.lo

> - combine several object files into a shared lib

libtool --mode=link $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
foo.lo bar.lo ... -o libbaz.la -rpath $(libdir)

Then, at install time:

libtool --mode=install install -c libbaz.la $(libdir)/libbaz.la


And that's all, as long as all you want is to create a shared
library.

If you want to get this library linked into a program, you'd have to
add:

libtool --mode=link $(CC) ... x.o y.o -o prog libfoo.la

And use libtool to install the program:

libtool --mode-install install prog $(bindir)/prog

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me




More information about the samba-technical mailing list