|
1 | 1 | function ft_compile_mex(force)
|
2 | 2 |
|
3 |
| -% FT_COMPILE_MEX can be used for compiling most of the FieldTrip MEX files |
4 |
| -% Note that this function does not put the MEX files in the correct |
5 |
| -% location in the private folders, this is managed by SVN autosync. In case |
6 |
| -% you are not working with SVN and you want to recompile the mex files for |
7 |
| -% your platform, you can find all mex files for your platform and move them |
8 |
| -% to a backup directory that is not on your MATLAB path. Subsequently you |
9 |
| -% can rtun this function to recompile it on your platform with your |
10 |
| -% compiler settings |
| 3 | +% FT_COMPILE_MEX can be used for compiling most of the FieldTrip MEX files Note that |
| 4 | +% this function does not put the MEX files in the correct location in the private |
| 5 | +% folders, this is managed by a Bash script. In case you are not working with Git and |
| 6 | +% you want to recompile the mex files for your platform, you can find all mex files |
| 7 | +% for your platform and move them to a backup directory that is not on your MATLAB |
| 8 | +% path. Subsequently you can rtun this function to recompile it on your platform with |
| 9 | +% your compiler settings |
11 | 10 | %
|
12 | 11 | % The standards procedure for compiling mex files is detailled on
|
13 | 12 | % http://www.fieldtriptoolbox.org/development/guidelines/code#compiling_mex_files
|
14 | 13 | %
|
15 |
| -% Please note that this script does NOT set up your MEX environment for |
16 |
| -% you, so in case you haven't selected the C compiler on Windows yet, you |
17 |
| -% need to type 'mex -setup' first to choose either the LCC, Borland or |
18 |
| -% Microsoft compiler. If you want to use MinGW, you also need to install |
19 |
| -% Gnumex (http://gnumex.sourceforget.net), which comes with its own |
20 |
| -% procedure for setting up the MEX environment. |
| 14 | +% Please note that this script does NOT set up your MEX environment for you, so in |
| 15 | +% case you haven't selected the C compiler on Windows yet, you need to type 'mex |
| 16 | +% -setup' first to choose either the LCC, Borland or Microsoft compiler. If you want |
| 17 | +% to use MinGW, you also need to install Gnumex (http://gnumex.sourceforget.net), |
| 18 | +% which comes with its own procedure for setting up the MEX environment. |
21 | 19 | %
|
22 |
| -% The logic in this script is to first build a list of files that actually |
23 |
| -% need compilation for the particular platform that MATLAB is running on, |
24 |
| -% and then to go through that list. Functions are added to the list by |
25 |
| -% giving their destination directory and (relative to that) the name of the |
26 |
| -% source file (without the .c). Optionally, you can specify a list of |
27 |
| -% platform this file needs to be compiled on only, and a list of platforms |
28 |
| -% where you don't compile it on. Finally, you can give extra arguments to |
29 |
| -% the MEX command, e.g., for including other c-sources or giving compiler |
30 |
| -% flags. |
| 20 | +% The logic in this script is to first build a list of files that actually need |
| 21 | +% compilation for the particular platform that MATLAB is running on, and then to go |
| 22 | +% through that list. Functions are added to the list by giving their destination |
| 23 | +% directory and (relative to that) the name of the source file (without the .c). |
| 24 | +% Optionally, you can specify a list of platform this file needs to be compiled on |
| 25 | +% only, and a list of platforms where you don't compile it on. Finally, you can give |
| 26 | +% extra arguments to the MEX command, e.g., for including other c-sources or giving |
| 27 | +% compiler flags. |
31 | 28 | %
|
32 | 29 | % See also MEX
|
33 | 30 |
|
|
0 commit comments