annotate Problems/private/make.m @ 57:3a58e70e8cbe

(none)
author idamnjanovic
date Mon, 14 Mar 2011 17:06:07 +0000
parents 41a5a3c26961
children
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@16 16 % August 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@16 35 sourcefiles = {{'addtocols.c'}, {'collincomb.c'}, {'rowlincomb.c'}, {'sprow.c','mexutils.c'}, {'im2colstep.c'}, {'col2imstep.c'}};
idamnjanovic@10 36
idamnjanovic@10 37 for i = 1:length(sourcefiles)
idamnjanovic@16 38 printf('Compiling %s...', sourcefiles{i}{1});
idamnjanovic@16 39 mex(sourcefiles{i}{:},compile_params{:});
idamnjanovic@10 40 end