Skip to content

Commit 6c931bb

Browse files
committed
doc: update README.md and doc/MEX_INTERFACE.md
1 parent a9d9b08 commit 6c931bb

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ interface (explained below) and vectorization wherever possible.
4040

4141
## Low-level MPFR Interface
4242

43+
> For information how to compile/develop the interface, see
44+
> [`doc/MEX_INTERFACE.md`](https://github.com/gnu-octave/apa/blob/main/doc/MEX_INTERFACE.md).
45+
4346
The low-level MPFR interface permits efficient access to almost all functions
4447
specified by MPFR 4.1.0 <https://www.mpfr.org/mpfr-current/mpfr.html>.
4548

doc/MEX_INTERFACE.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,29 @@ The APA MEX interface is known to work and tested for
4444
4545
> **MS Windows Note:** To compile MPFR with Visual Studio, please look at the
4646
> following project <https://github.com/BrianGladman/mpfr>. However, this
47-
> approach is not supported by APA and requires some adaptions.
47+
> approach is not supported by APA and requires some adaptions of this project.
4848
4949

5050
## Compiling static GMP and MPFR libraries for MS Windows, macOS, and UNIX (Linux)
5151

52-
For macOS and UNIX/Linux systems
52+
> Usually this step is **not** necessary, as pre-compiled static library
53+
> versions (`libgmp.a`, `libmpfr.a`, `gmp.h`, `mpfr.h`, and `mpf2mpfr.h`)
54+
> are included in the released package in the respective folders
55+
> - `apa/inst/mex/macos`
56+
> - `apa/inst/mex/mswin`
57+
> - `apa/inst/mex/unix`
5358
54-
<https://wiki.octave.org/Windows_Installer>
59+
For macOS and UNIX/Linux systems (Octave or Matlab) this can be conveniently
60+
done by calling:
61+
```matlab
62+
cd apa/inst/mex
63+
system ('make')
64+
```
65+
66+
For MS Windows one has to cross-compile the respective libraries using
67+
the [octave-mxe](https://wiki.octave.org/Windows_Installer) project.
68+
69+
> The following steps have to be done on Linux (e.g. in a virtual machine).
5570
5671
```
5772
hg clone https://hg.octave.org/mxe-octave
@@ -72,13 +87,3 @@ cp ./usr/x86_64-w64-mingw32/lib/libgmp.a \
7287
./usr/x86_64-w64-mingw32/include/mpf2mpfr.h \
7388
/path/to/apa/inst/mex/mswin
7489
```
75-
76-
### Matlab
77-
78-
> Only Matlab R2018b and later
79-
80-
81-
82-
83-
84-
$(ENABLE_SHARED_OR_STATIC) --with-pic=yes

0 commit comments

Comments
 (0)