annotate Problems/private/make.m @ 10:207a6ae9a76f version1.0

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