diff --git a/ir_mex_build.m b/ir_mex_build.m index 098a1da..b140979 100644 --- a/ir_mex_build.m +++ b/ir_mex_build.m @@ -12,5 +12,6 @@ ir_mex_build_mri ir_mex_build_table +irt_mex_make % todo: ir_mex_build_penal diff --git a/mex/local/readme.txt b/mex/local/readme.txt new file mode 100644 index 0000000..3c28e41 --- /dev/null +++ b/mex/local/readme.txt @@ -0,0 +1,5 @@ +mex/local/readme.txt + +This directory contains MEX files that are compiled locally by the user, +typically by running (from the top-level MIRT directory) the m-function +>> ir_mex_build diff --git a/mex/src/irt_mex_make.m b/mex/src/irt_mex_make.m index 312f282..f6322ae 100644 --- a/mex/src/irt_mex_make.m +++ b/mex/src/irt_mex_make.m @@ -1,11 +1,11 @@ % irt_mex_make.m if ispc - cd penalty - mex penalty_mex.c mexarg.c 'penalty,diff.c' -DIs_pc -DMmex -outdir ../v7 - cd .. + cd mex/src/penalty + mex penalty_mex.c mexarg.c 'penalty,diff.c' -DIs_pc -DMmex -outdir ../../local + cd ../../.. else - cd penalty - mex -v penalty_mex.c mexarg.c 'penalty,diff.c' -DMmex -outdir ../v7 - cd .. + cd mex/src/penalty + mex -v penalty_mex.c '../def/mexarg.c' 'penalty,diff.c' -I'../def/' -DMmex -outdir ../../local + cd ../../.. end diff --git a/setup.m b/setup.m index 2b90217..2f9c4ec 100644 --- a/setup.m +++ b/setup.m @@ -29,6 +29,7 @@ irtdir = [irtdir filesep]; end + list = {... 'align', ... % image registration 'align/mex', ... % image registration mex files @@ -41,6 +42,8 @@ 'fbp', ... % FBP (filtered backprojection) code 'general', ... % generic image reconstruction 'graph', ... % graphics routines +'mex/local', ... % MEX files compiled for local OS/CPU +'mex/src', ... % MEX source code for irt_mex_make.m 'mri', ... % MRI reconstruction 'mri/fieldmap', ... % MRI B0 field map estimation 'mri-rf/yip-spsp', ... % MRI RF pulse design @@ -70,6 +73,7 @@ % e.g., 7.3 and running on earlier 7.0 won't work. % If you have mex problems, comment out the following line. % Much of the toolbox will work without mex, just slower. +addpath([irtdir 'mex/local']) % must precede "mex/v7" addpath([irtdir 'mex/v7']);