Mercurial > hg > smallbox
annotate examples/private/make.m @ 1:7750624e0c73 version0.5
(none)
author | idamnjanovic |
---|---|
date | Thu, 05 Nov 2009 16:36:01 +0000 |
parents | |
children |
rev | line source |
---|---|
idamnjanovic@1 | 1 function make |
idamnjanovic@1 | 2 %MAKE Build the KSVDBox MEX support files. |
idamnjanovic@1 | 3 % MAKE compiles the KSVDBox supporting MEX functions, using Matlab's |
idamnjanovic@1 | 4 % default MEX compiler. If the MEX compiler has not been set-up before, |
idamnjanovic@1 | 5 % please run |
idamnjanovic@1 | 6 % |
idamnjanovic@1 | 7 % mex -setup |
idamnjanovic@1 | 8 % |
idamnjanovic@1 | 9 % before using this MAKE file. |
idamnjanovic@1 | 10 |
idamnjanovic@1 | 11 % Ron Rubinstein |
idamnjanovic@1 | 12 % Computer Science Department |
idamnjanovic@1 | 13 % Technion, Haifa 32000 Israel |
idamnjanovic@1 | 14 % ronrubin@cs |
idamnjanovic@1 | 15 % |
idamnjanovic@1 | 16 % April 2009 |
idamnjanovic@1 | 17 |
idamnjanovic@1 | 18 |
idamnjanovic@1 | 19 % detect platform |
idamnjanovic@1 | 20 |
idamnjanovic@1 | 21 compstr = computer; |
idamnjanovic@1 | 22 is64bit = strcmp(compstr(end-1:end),'64'); |
idamnjanovic@1 | 23 |
idamnjanovic@1 | 24 |
idamnjanovic@1 | 25 % compilation parameters |
idamnjanovic@1 | 26 |
idamnjanovic@1 | 27 compile_params = cell(0); |
idamnjanovic@1 | 28 if (is64bit) |
idamnjanovic@1 | 29 compile_params{1} = '-largeArrayDims'; |
idamnjanovic@1 | 30 end |
idamnjanovic@1 | 31 |
idamnjanovic@1 | 32 |
idamnjanovic@1 | 33 % Compile files % |
idamnjanovic@1 | 34 |
idamnjanovic@1 | 35 sourcefiles = {'addtocols.c','collincomb.c','rowlincomb.c'}; |
idamnjanovic@1 | 36 |
idamnjanovic@1 | 37 for i = 1:length(sourcefiles) |
idamnjanovic@1 | 38 printf('Compiling %s...', sourcefiles{i}); |
idamnjanovic@1 | 39 mex(sourcefiles{i},compile_params{:}); |
idamnjanovic@1 | 40 end |