idamnjanovic@60: function make idamnjanovic@60: %MAKE Build the KSVDBox MEX support files. idamnjanovic@60: % MAKE compiles the KSVDBox supporting MEX functions, using Matlab's idamnjanovic@60: % default MEX compiler. If the MEX compiler has not been set-up before, idamnjanovic@60: % please run idamnjanovic@60: % idamnjanovic@60: % mex -setup idamnjanovic@60: % idamnjanovic@60: % before using this MAKE file. idamnjanovic@60: idamnjanovic@60: % Ron Rubinstein idamnjanovic@60: % Computer Science Department idamnjanovic@60: % Technion, Haifa 32000 Israel idamnjanovic@60: % ronrubin@cs idamnjanovic@60: % idamnjanovic@60: % August 2009 idamnjanovic@60: idamnjanovic@60: idamnjanovic@60: % detect platform idamnjanovic@60: idamnjanovic@60: compstr = computer; idamnjanovic@60: is64bit = strcmp(compstr(end-1:end),'64'); idamnjanovic@60: idamnjanovic@60: idamnjanovic@60: % compilation parameters idamnjanovic@60: idamnjanovic@60: compile_params = cell(0); idamnjanovic@60: if (is64bit) idamnjanovic@60: compile_params{1} = '-largeArrayDims'; idamnjanovic@60: end idamnjanovic@60: idamnjanovic@60: idamnjanovic@60: % Compile files % idamnjanovic@60: idamnjanovic@60: sourcefiles = {{'addtocols.c'}, {'collincomb.c'}, {'rowlincomb.c'}, {'sprow.c','mexutils.c'}, {'im2colstep.c'}, {'col2imstep.c'}}; idamnjanovic@60: idamnjanovic@60: for i = 1:length(sourcefiles) idamnjanovic@60: printf('Compiling %s...', sourcefiles{i}{1}); idamnjanovic@60: mex(sourcefiles{i}{:},compile_params{:}); idamnjanovic@60: end