[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: building extensions with libtool
From: |
Ludovic Courtès |
Subject: |
Re: building extensions with libtool |
Date: |
Tue, 28 Feb 2006 09:21:22 +0100 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
Hi,
Aaron VanDevender <address@hidden> writes:
> But this documentation doesn't actually exist. Does anyone have even a
> sketchy HOWTO or a simple example on how to write a Makefile.am which
> builds extensions using libtool?
Building Libtool-made shared libraries is quite simple. Suppose you
want to create `libmy-guile-ext.so' (or `libmy-guile-ext.sl' on HP-UX,
etc.). All you need to do is put the following in your `Makefile.am':
# `.la' is the extension for Libtool's ``pseudo-libraries''
lib_LTLIBRARIES = libmy-guile-ext.la
libmy_guile_ext_la_SOURCES = chbouib.c foo.c bar.c
libmy_guile_ext_la_LDADD = -lsmurf -lm
And that's it. See [0,1] for details.
Then you need to create some `my-guile-ext.scm' module that will load
the extension library using `dynamic-link' and `dynamic-call' (both of
which are described in Guile's manual I think).
Thanks,
Ludovic.
[0] http://www.gnu.org/software/libtool/manual.html#Linking-libraries
[1] http://www.gnu.org/software/libtool/manual.html#Using-Automake
- Re: building extensions with libtool,
Ludovic Courtès <=