Skip to content

Commit

Permalink
Merge branch 'luizcavalcanti-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
vrabaud committed Jan 10, 2016
2 parents 9622809 + 82f2094 commit 2c04085
Showing 1 changed file with 32 additions and 18 deletions.
50 changes: 32 additions & 18 deletions grouping/compile.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,36 +44,42 @@ function compile(gccVer)
% build the SBA mex file
cd('source/gpb_src/');

% Octave on Linux
%mkoctfile --mex ./matlab/recognition/mex_category_db.cc -I./include
%mkoctfile --mex ./matlab/recognition/mex_clusterer.cc -I./include

%mkoctfile --mex ./matlab/segmentation/mex_contour.cc -I./include
mkoctfile --mex ./matlab/segmentation/mex_contour_sides.cc -I./include
%mkoctfile --mex ./matlab/segmentation/mex_line_inds.cc -I./include
mkoctfile --mex ./matlab/segmentation/mex_nonmax_oriented.cc -I./include -L./ -L../../lib -lopencv_gpb
%mkoctfile --mex ./matlab/segmentation/mex_oe.cc -I./include
%mkoctfile --mex ./matlab/segmentation/mex_pb.cc -I./include
mkoctfile --mex ./matlab/segmentation/mex_pb_parts_final_selected.cc -I./include -L../../lib -lopencv_gpb
%mkoctfile --mex ./matlab/segmentation/mex_pb_parts_lg.cc -I./include
%mkoctfile --mex ./matlab/segmentation/mex_pb_parts_sm.cc -I./include
%mkoctfile --mex ./matlab/segmentation/mex_textons.cc -I./include
isOctave = exist('OCTAVE_VERSION', 'builtin') ~= 0;

if isOctave
% Octave on Linux
mkoctfile --mex ./matlab/segmentation/mex_contour_sides.cc -I./include
mkoctfile --mex ./matlab/segmentation/mex_nonmax_oriented.cc -I./include -L./ -L../../lib -lopencv_gpb
mkoctfile --mex ./matlab/segmentation/mex_pb_parts_final_selected.cc -I./include -L../../lib -lopencv_gpb
else
mex ./matlab/segmentation/mex_contour_sides.cc -I./include
mex ./matlab/segmentation/mex_nonmax_oriented.cc -I./include -L./ -L../../lib -lopencv_gpb
mex ./matlab/segmentation/mex_pb_parts_final_selected.cc -I./include -L../../lib -lopencv_gpb
end

system('mv *mex ../../lib')
cd(savepwd);

% process savgol
cd('source/savgol/');

mkoctfile --mex ./savgol_border.cpp
if isOctave
mkoctfile --mex ./savgol_border.cpp
else
mex ./savgol_border.cpp
end

system('mv *mex ../../lib')
cd(savepwd);

% process buildW
cd('source/buildW/');

mkoctfile --mex ./buildW.cpp -I./util -L../../lib -lopencv_gpb
if isOctave
mkoctfile --mex ./buildW.cpp -I./util -L../../lib -lopencv_gpb
else
mex ./buildW.cpp -I./util -L../../lib -lopencv_gpb
end

system('mv *mex ../../lib')
cd(savepwd);
Expand All @@ -82,7 +88,11 @@ function compile(gccVer)
% process custom mex files
cd('source/opencv_gpb/');

mkoctfile --mex ./mex/watershed.cpp ./mex/MxArray.cpp -I./src -I../buildW/util/ -I../buildW -I/opt/ros/fuerte/include -L../../lib -L/opt/ros/fuerte/lib -lopencv_gpb -lopencv_core -lopencv_imgproc -L../build -lbuildW -lopencv_gpb
if isOctave
mkoctfile --mex ./mex/watershed.cpp ./mex/MxArray.cpp -I./src -I../buildW/util/ -I../buildW -I/opt/ros/fuerte/include -L../../lib -L/opt/ros/fuerte/lib -lopencv_gpb -lopencv_core -lopencv_imgproc -L../build -lbuildW -lopencv_gpb
else
mex ./mex/watershed.cpp ./mex/MxArray.cpp -I./src -I../buildW/util/ -I../buildW -I/opt/ros/fuerte/include -L../../lib -L/opt/ros/fuerte/lib -lopencv_gpb -lopencv_core -lopencv_imgproc -L../build -lbuildW -lopencv_gpb
end

system('mv *.mex ../../lib')
cd(savepwd);
Expand All @@ -91,7 +101,11 @@ function compile(gccVer)
% process ucm
cd('source/ucm/');

mkoctfile --mex ./ucm_mean_pb.cpp -L../../lib -lopencv_gpb
if isOctave
mkoctfile --mex ./ucm_mean_pb.cpp -L../../lib -lopencv_gpb
else
mex ./ucm_mean_pb.cpp -L../../lib -lopencv_gpb
end

system('mv *mex ../../lib')
cd(savepwd);
Expand Down

0 comments on commit 2c04085

Please sign in to comment.