[Top][All Lists]

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

Re: How to combine several functions in a single oct-file? (2)

From: Lukas Reichlin
Subject: Re: How to combine several functions in a single oct-file? (2)
Date: Mon, 13 Feb 2012 15:15:50 +0100

On 13.02.2012, at 13:28, c. wrote:

> On 13 Feb 2012, at 13:20, Lukas Reichlin wrote:
>> Thanks, Carlo. I think I do the following:
>> 1. Include slicot.tar.gz [1] (as an archive) in my package. Adapt the 
>> package makefile such that it compiles all the Fortran code inside the 
>> archive and that it creates a static library (slicotlibrary.a) out of it. 
>> Then I include that library in my various oct-files.
>> If I succeed with 1:
>> 2. Combine all my DEFUN_DLD in one oct-file, link slicotlibrary.a statically 
>> and use autoload as you proposed.
> Sounds like a reasonable choice.
>> One last question: Does mkoctfile create the PKG_ADD file automatically if 
>> needed? Or do I have to create it manually?
> It's up to you: if you insert directives [1] in your .m or .cc files pkg will 
> generate the PKG_ADD files, 
> otherwise you can write them manually.
> c.
> [1] 

Thanks! Before I start with makefiles, I tried to compile slicot manually:

system ('tar -xzf slicot.tar.gz')
cd slicot/src
system ('mkoctfile *.f "$(mkoctfile -p LAPACK_LIBS)" "$(mkoctfile -p 
BLAS_LIBS)" "$(mkoctfile -p FLIBS)"');
cd ./../../

This creates the file "AB01MD.oct", because AB01MD.f is alphabetically the 
first *.f Fortran file.

Now my question: Is "AB01MD.oct" already the desired slicotlibrary.a file? Do I 
have to rename it simply by "-o slicotlibrary.a":
system ('mkoctfile *.f "$(mkoctfile -p LAPACK_LIBS)" "$(mkoctfile -p 
BLAS_LIBS)" "$(mkoctfile -p FLIBS)" -o slicotlibrary.a');

As this produces a file called slicotlibrary.a.oct, it seems to be more 
complicated than that?

Best regards,

reply via email to

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