[Top][All Lists]

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

Need more

From: Schleicher Ralph (LLI)
Subject: Need more
Date: Thu, 12 Sep 2002 15:41:27 +0200


I want to use Libtool for building Matlab MEX-files.  MEX-files
are loadable modules with a fixed entry point.  Unfortunately,
Matlab uses an architecture dependent MEX-file extension, for
example, `mexsol' for Solaris.  Up to now I use the following hack:

# Libtool library.
include_HEADERS = hello.h

libhello_la_SOURCES = hello.h hello.c
libhello_la_LDFLAGS = -version-info 0:0:0

# Executable program.
bin_PROGRAMS = hello

hello_SOURCES = main.c
hello_LDADD =

# Matlab MEX-file.
matlabarch_LTLIBRARIES =
matlabarch_SCRIPTS = hell.$(MEXEXT)

hell_la_SOURCES = hell.c
hell_la_CFLAGS = -DMATLAB_MEX_FILE -I$(MATLAB)/extern/include
hell_la_LDFLAGS = -avoid-version -module \
-L$(MATLAB)/bin/$(MATLAB_ARCH) -lmex -lmx -lm

# Work around Libtool limitations.

        rm -f $@
        eval `$(LIBTOOL) --config | grep '^objdir='` ; \
        eval `grep '^dlname=' $<` ; \
        $(LN_S) $$objdir/$$dlname $@

        rm -f *.mex* *.dll

To make life easier, I would be nice if Libtool provides the following
additional features:

 * A link flag for Libtool to suppress generation of a static
   library on a per target basis.  The --disable-static option
   for configure is not what I want.

 * A link flag for Libtool to specify a different installation
   file name for a module.

Thank you,


reply via email to

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