Skip to content

Commit

Permalink
doc: update README.md and doc/MEX_INTERFACE.md
Browse files Browse the repository at this point in the history
  • Loading branch information
siko1056 committed Aug 5, 2021
1 parent a9d9b08 commit 6c931bb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ interface (explained below) and vectorization wherever possible.

## Low-level MPFR Interface

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

Expand Down
31 changes: 18 additions & 13 deletions doc/MEX_INTERFACE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,29 @@ The APA MEX interface is known to work and tested for
> **MS Windows Note:** To compile MPFR with Visual Studio, please look at the
> following project <https://github.com/BrianGladman/mpfr>. However, this
> approach is not supported by APA and requires some adaptions.
> approach is not supported by APA and requires some adaptions of this project.

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

For macOS and UNIX/Linux systems
> Usually this step is **not** necessary, as pre-compiled static library
> versions (`libgmp.a`, `libmpfr.a`, `gmp.h`, `mpfr.h`, and `mpf2mpfr.h`)
> are included in the released package in the respective folders
> - `apa/inst/mex/macos`
> - `apa/inst/mex/mswin`
> - `apa/inst/mex/unix`
<https://wiki.octave.org/Windows_Installer>
For macOS and UNIX/Linux systems (Octave or Matlab) this can be conveniently
done by calling:
```matlab
cd apa/inst/mex
system ('make')
```

For MS Windows one has to cross-compile the respective libraries using
the [octave-mxe](https://wiki.octave.org/Windows_Installer) project.

> The following steps have to be done on Linux (e.g. in a virtual machine).
```
hg clone https://hg.octave.org/mxe-octave
Expand All @@ -72,13 +87,3 @@ cp ./usr/x86_64-w64-mingw32/lib/libgmp.a \
./usr/x86_64-w64-mingw32/include/mpf2mpfr.h \
/path/to/apa/inst/mex/mswin
```

### Matlab

> Only Matlab R2018b and later




$(ENABLE_SHARED_OR_STATIC) --with-pic=yes

0 comments on commit 6c931bb

Please sign in to comment.