[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libtool and JNI libraries on Mac OS X
From: |
Schleicher Ralph (LLI) |
Subject: |
Re: libtool and JNI libraries on Mac OS X |
Date: |
Wed, 22 May 2002 15:27:44 +0200 |
Don Anderson <address@hidden> writes:
> I was of a libtool option:
>
> --moduleext=.jnilib
Hi,
I second that. I'm experimenting building Matlab MEX-files using
Libtool and run into the same problem. At present, my Makefile.am
looks as follows:
------------------------------------------------------------------------
# Libtool library.
lib_LTLIBRARIES = libhello.la
include_HEADERS = hello.h
libhello_la_SOURCES = hello.h hello.c
libhello_la_LDFLAGS = -no-undefined -version-info 0:0:0
# Executable program.
bin_PROGRAMS = hello
hello_SOURCES = main.c
hello_CFLAGS = @LIBHELLO_DLL_IMPORT@
hello_LDADD = libhello.la
# Matlab MEX-file.
noinst_SCRIPTS = hell.$(MEXEXT)
matlabarch_LTLIBRARIES = hell.la
hell_la_SOURCES = hell.c
hell_la_CFLAGS = @LIBHELLO_DLL_IMPORT@ -I$(MATLAB)/extern/include
hell_la_LDFLAGS = -no-undefined -avoid-version -module
hell_la_LDFLAGS += -export-symbols $(srcdir)/mex-symbols
hell_la_LDFLAGS += libhello.la -L$(MATLAB)/bin/$(MATLAB_ARCH) -lmex -lmx -lm
CLEANFILES = $(noinst_SCRIPTS)
SUFFIXES = .$(MEXEXT)
$(noinst_SCRIPTS): $(matlabarch_LTLIBRARIES)
rm -f $@
eval `$(LIBTOOL) --config | grep '^objdir='` ; \
eval `grep '^dlname=' $*.la` ; \
$(LN_S) $$objdir/$$dlname $@
------------------------------------------------------------------------
That works so far. What I miss is a Libtool option for
a) Using $(MEXEXT) as the file name extension for modules.
$(MEXEXT) is equal to dll on Windows but, for example, mexsol on Sun
Solaris.
b) Building and installing only shared objects for hell.la.
There's no need to build static objects and archive libraries for
modules because they can not be dlopened. I know there is a global
--disable-shared option for configure but I want to have an archive
library for libhello.la, too.
Regards,
--
Ralph