1 % v = regexp(version(),'\.','split');
\r
2 % mj = str2double(v{1});
\r
3 % mn = str2double(v{2});
\r
5 % % di = find(v=='.');
\r
6 % % mj= str2double(v(1:di(1)-1));
\r
7 % % mn= str2double(v(di(1)+1 :di(2)-1));
\r
9 if strfind(computer(),'64')
\r
10 defs = '-DA64BITS '; % for 64bit machines - define pointer type
\r
14 % if mj < 7 || (mj==7 && mn < 3)
\r
15 if verLessThan('matlab','7.3')
\r
16 defs = [defs, '-DmwIndex=int -DmwSize=size_t '];
\r
19 cmd = sprintf('mex -O -largeArrayDims %s GraphCutMex.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp', defs);
\r
21 cmd = sprintf('mex -O -largeArrayDims %s GraphCut3dConstr.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp', defs);
\r
23 cmd = sprintf('mex -O -largeArrayDims %s GraphCutConstrSparse.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp', defs);
\r
25 cmd = sprintf('mex -O -largeArrayDims %s GraphCutConstr.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp', defs);
\r
27 clear cmd mj mn v di defs
\r
30 % if strcmp(computer(),'GLNXA64')
\r
31 % mex -g -DA64BITS GraphCutMex.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp
\r
32 % mex -g -DA64BITS GraphCut3dConstr.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp
\r
34 % mex -g -largeArrayDims -DMAT73 -DA64BITS GraphCutConstrSparse.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp
\r
36 % mex -g -DA64BITS GraphCutConstrSparse.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp
\r
38 % mex -g -DA64BITS GraphCutConstr.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp
\r
40 % mex -g GraphCutMex.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp
\r
41 % mex -g GraphCut3dConstr.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp
\r
43 % mex -g -largeArrayDims -DMAT73 GraphCutConstrSparse.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp
\r
45 % mex -g GraphCutConstrSparse.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp
\r
47 % mex -g GraphCutConstr.cpp graph.cpp GCoptimization.cpp GraphCut.cpp LinkedBlockList.cpp maxflow.cpp
\r