Skip to content

Commit

Permalink
Update macOS compilation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
gllmflndn authored Nov 8, 2023
1 parent b0a866d commit 11d986f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/development/compilation/macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ To compile SPM MEX files, you need to have Apple's development environment [Xcod
You also need to have the `mex` executable in your system path. To do
so, type the following in a Terminal:
```
export PATH=/Applications/MATLAB_R2017a.app/bin:$PATH
export PATH=/Applications/MATLAB_R2023b.app/bin:$PATH
```
with the appropriate path where MATLAB is installed

If you get errors such as `Bad : modifier in $ (/)`, this is because
the instructions are given for a `bash` Terminal while you are using a
`tcsh` Terminal. The equivalent commands are:
```
setenv PATH /Applications/MATLAB_R2017a.app/bin:${PATH}
setenv PATH /Applications/MATLAB_R2023b.app/bin:${PATH}
```

An alternative is to use the `MEXBIN` environment variable when invoking `make`:
```
make MEXBIN=/Applications/MATLAB_R2023b.app/bin/mex
```

## Instructions
Expand All @@ -33,7 +38,7 @@ make external-distclean
make external && make external-install
```

This will generate `*.mexmaci64` or `*.mexmaca64` MEX files.
This will generate `*.mexmaci64` MEX files. To generate `*.mexmaca64` MEX files, add `PLATFORM=arm64` to the commands above.

## Troubleshooting

Expand Down

0 comments on commit 11d986f

Please sign in to comment.