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