source: MML/trunk/machine/SOLEIL/common/naff/nafflib/naff_cc.m

Last change on this file was 17, checked in by zhangj, 10 years ago

To have a stable version on the server.

  • Property svn:executable set to *
File size: 892 bytes
Line 
1function naff_cc
2% naff_cc - Compile nafflibrary for Matlab
3%
4
5% Modified by Laurent S. Nadolski
6% April 6th, 2007
7
8cd_old = pwd;
9cd(fileparts(which('naff_cc')))
10
11disp(['Compiling NAFF routines on ', computer,'.'])
12
13% Object files
14disp('Compiling: modnaff.c');
15mex LDFLAGS='-pthread -shared -m64' -I/usr/local/matlab/extern/include -O -c modnaff.c
16
17disp('Compiling: example.c');
18mex LDFLAGS='-pthread -shared -m64' -I/usr/local/matlab/extern/include -O -c complexe.c
19
20disp('Compiling: nafflib.c');
21
22internal_cc('nafflib.c modnaff.o complexe.o');
23
24cd(cd_old);
25
26function internal_cc(fn)
27% cc(filename)
28%
29% MAC 64 bits
30% TODO WINDOWS
31
32disp(['Compiling: ',fn]);
33
34switch computer
35    case {'MACI64', 'GLNX86', 'GLNX64', 'PCWIN', 'PCWIN64'}
36        cmdstr = [ 'mex -I' matlabroot '/extern/include -O ', fn ];
37    otherwise
38        error('Architecture not defined')
39end
40disp(cmdstr);
41eval(cmdstr);
Note: See TracBrowser for help on using the repository browser.