Mercurial > hg > smallbox
annotate util/ksvd utils/make.m @ 159:23763c5fbda5 danieleb
Merge
author | Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk> |
---|---|
date | Wed, 31 Aug 2011 10:43:32 +0100 |
parents | c3eca463202d |
children |
rev | line source |
---|---|
idamnjanovic@70 | 1 function make |
idamnjanovic@70 | 2 %MAKE Build the KSVDBox MEX support files. |
idamnjanovic@70 | 3 % MAKE compiles the KSVDBox supporting MEX functions, using Matlab's |
idamnjanovic@70 | 4 % default MEX compiler. If the MEX compiler has not been set-up before, |
idamnjanovic@70 | 5 % please run |
idamnjanovic@70 | 6 % |
idamnjanovic@70 | 7 % mex -setup |
idamnjanovic@70 | 8 % |
idamnjanovic@70 | 9 % before using this MAKE file. |
idamnjanovic@70 | 10 |
idamnjanovic@70 | 11 % Ron Rubinstein |
idamnjanovic@70 | 12 % Computer Science Department |
idamnjanovic@70 | 13 % Technion, Haifa 32000 Israel |
idamnjanovic@70 | 14 % ronrubin@cs |
idamnjanovic@70 | 15 % |
idamnjanovic@70 | 16 % August 2009 |
idamnjanovic@70 | 17 |
idamnjanovic@70 | 18 |
idamnjanovic@70 | 19 % detect platform |
idamnjanovic@70 | 20 |
idamnjanovic@70 | 21 compstr = computer; |
idamnjanovic@70 | 22 is64bit = strcmp(compstr(end-1:end),'64'); |
idamnjanovic@70 | 23 |
idamnjanovic@70 | 24 |
idamnjanovic@70 | 25 % compilation parameters |
idamnjanovic@70 | 26 |
idamnjanovic@70 | 27 compile_params = cell(0); |
idamnjanovic@70 | 28 if (is64bit) |
idamnjanovic@70 | 29 compile_params{1} = '-largeArrayDims'; |
idamnjanovic@70 | 30 end |
idamnjanovic@70 | 31 |
idamnjanovic@70 | 32 |
idamnjanovic@70 | 33 % Compile files % |
idamnjanovic@70 | 34 |
idamnjanovic@70 | 35 sourcefiles = {{'addtocols.c'}, {'collincomb.c'}, {'rowlincomb.c'}, {'sprow.c','mexutils.c'}, {'im2colstep.c'}, {'col2imstep.c'}}; |
idamnjanovic@70 | 36 |
idamnjanovic@70 | 37 for i = 1:length(sourcefiles) |
idamnjanovic@70 | 38 printf('Compiling %s...', sourcefiles{i}{1}); |
idamnjanovic@70 | 39 mex(sourcefiles{i}{:},compile_params{:}); |
idamnjanovic@70 | 40 end |