Skip to content

Commit

Permalink
updated compilation of toolbox for ubuntu 20
Browse files Browse the repository at this point in the history
  • Loading branch information
ebertolazzi committed Dec 1, 2020
1 parent 8cbbafd commit ce6b7e8
Show file tree
Hide file tree
Showing 5 changed files with 168 additions and 197 deletions.
283 changes: 141 additions & 142 deletions Clothoids.prj
Original file line number Diff line number Diff line change
@@ -1,143 +1,142 @@
<deployment-project plugin="plugin.toolbox" plugin-version="1.0">
<configuration build-checksum="2095973427" file="/Users/enrico/Ricerca/develop/C++/pins-mechatronix/LibSources/submodules/Clothoids/Clothoids.prj" location="/Users/enrico/Ricerca/develop/C++/pins-mechatronix/LibSources/submodules/Clothoids" name="Clothoids" target="target.toolbox" target-name="Package Toolbox">
<param.appname>Clothoids</param.appname>
<param.authnamewatermark>Enrico Bertolazzi</param.authnamewatermark>
<param.email>enrico.bertolazzi@unitn.it</param.email>
<param.company>Unversità degli Studi di Trento</param.company>
<param.summary>Clothoids, a library for clothoids computation and more</param.summary>
<param.description>A library for clothoids computation and more.</param.description>
<param.screenshot>${PROJECT_ROOT}/toolbox/logo.png</param.screenshot>
<param.version>2.0.3</param.version>
<param.output>${PROJECT_ROOT}/Clothoids.mltbx</param.output>
<param.products.name />
<param.products.id />
<param.products.version />
<param.platforms />
<param.guid>b42d3f6f-9769-4fb7-a2da-cae5046d9f9f</param.guid>
<param.exclude.filters>% List files contained in your toolbox folder that you would like to exclude
% from packaging. Excludes should be listed relative to the toolbox folder.
% Some examples of how to specify excludes are provided below:
%
% A single file in the toolbox folder:
% .svn
%
% A single file in a subfolder of the toolbox folder:
% example/.svn
%
% All files in a subfolder of the toolbox folder:
% example/*
%
% All files of a certain name in all subfolders of the toolbox folder:
% **/.svn
%
% All files matching a pattern in all subfolders of the toolbox folder:
% **/*.bak
%
populate_toolbox.rb
setup.m
.DS_Store</param.exclude.filters>
<param.exclude.pcodedmfiles>true</param.exclude.pcodedmfiles>
<param.examples />
<param.demosxml />
<param.apps />
<param.registered.apps />
<param.docs>${PROJECT_ROOT}/toolbox/info.xml</param.docs>
<param.getting.started.guide>${PROJECT_ROOT}/toolbox/doc/GettingStarted.mlx</param.getting.started.guide>
<param.matlabpath.excludes />
<param.javaclasspath.excludes />
<param.exported.on.package>false</param.exported.on.package>
<param.required.addons />
<param.matlab.project.id />
<param.matlab.project.name />
<param.release.start />
<param.release.end />
<param.release.current.only>false</param.release.current.only>
<param.compatiblity.windows>true</param.compatiblity.windows>
<param.compatiblity.macos>true</param.compatiblity.macos>
<param.compatiblity.linux>true</param.compatiblity.linux>
<param.compatiblity.matlabonline>true</param.compatiblity.matlabonline>
<param.installation.map />
<param.additional.sw.names />
<param.additional.sw.licenses />
<param.additional.sw.win.url />
<param.additional.sw.mac.url />
<param.additional.sw.linux.url />
<unset>
<param.authnamewatermark />
<param.email />
<param.output />
<param.products.name />
<param.products.id />
<param.products.version />
<param.platforms />
<param.exclude.pcodedmfiles />
<param.examples />
<param.demosxml />
<param.apps />
<param.registered.apps />
<param.matlabpath.excludes />
<param.javaclasspath.excludes />
<param.exported.on.package />
<param.required.addons />
<param.matlab.project.id />
<param.matlab.project.name />
<param.release.start />
<param.release.end />
<param.release.current.only />
<param.compatiblity.windows />
<param.compatiblity.macos />
<param.compatiblity.linux />
<param.compatiblity.matlabonline />
<param.additional.sw.names />
<param.additional.sw.licenses />
<param.additional.sw.win.url />
<param.additional.sw.mac.url />
<param.additional.sw.linux.url />
</unset>
<fileset.rootdir>
<file>${PROJECT_ROOT}/toolbox</file>
</fileset.rootdir>
<fileset.rootfiles>
<file>${PROJECT_ROOT}/toolbox/.vscode</file>
<file>${PROJECT_ROOT}/toolbox/CompileClothoidsLib.m</file>
<file>${PROJECT_ROOT}/toolbox/bin</file>
<file>${PROJECT_ROOT}/toolbox/demos.xml</file>
<file>${PROJECT_ROOT}/toolbox/doc</file>
<file>${PROJECT_ROOT}/toolbox/helptoc.xml</file>
<file>${PROJECT_ROOT}/toolbox/html</file>
<file>${PROJECT_ROOT}/toolbox/info.xml</file>
<file>${PROJECT_ROOT}/toolbox/lib</file>
<file>${PROJECT_ROOT}/toolbox/license.txt</file>
<file>${PROJECT_ROOT}/toolbox/logo.png</file>
<file>${PROJECT_ROOT}/toolbox/src</file>
<file>${PROJECT_ROOT}/toolbox/src_mex</file>
<file>${PROJECT_ROOT}/toolbox/tests</file>
</fileset.rootfiles>
<fileset.depfun.included />
<fileset.depfun.excluded />
<fileset.package />
<build-deliverables>
<file location="${PROJECT_ROOT}" name="Clothoids.mltbx" optional="false">/Users/enrico/Ricerca/develop/C++/pins-mechatronix/LibSources/submodules/Clothoids/Clothoids.mltbx</file>
</build-deliverables>
<workflow />
<matlab>
<root>/Applications/MATLAB_R2020b.app</root>
<toolboxes />
</matlab>
<platform>
<unix>true</unix>
<mac>true</mac>
<windows>false</windows>
<win2k>false</win2k>
<winxp>false</winxp>
<vista>false</vista>
<linux>false</linux>
<solaris>false</solaris>
<osver>10.15.7</osver>
<os32>false</os32>
<os64>true</os64>
<arch>maci64</arch>
<matlab>true</matlab>
</platform>
</configuration>
<deployment-project plugin="plugin.toolbox" plugin-version="1.0">
<configuration build-checksum="2095973427" file="/home/enrico/pins-mechatronix/LibSources/submodules/Clothoids/Clothoids.prj" location="/home/enrico/pins-mechatronix/LibSources/submodules/Clothoids" name="Clothoids" target="target.toolbox" target-name="Package Toolbox">
<param.appname>Clothoids</param.appname>
<param.authnamewatermark />
<param.email />
<param.company>Unversità degli Studi di Trento</param.company>
<param.summary>Clothoids, a library for clothoids computation and more</param.summary>
<param.description>A library for clothoids computation and more.</param.description>
<param.screenshot>${PROJECT_ROOT}/toolbox/logo.png</param.screenshot>
<param.version>2.0.3</param.version>
<param.output>${PROJECT_ROOT}/Clothoids.mltbx</param.output>
<param.products.name />
<param.products.id />
<param.products.version />
<param.platforms />
<param.guid>b42d3f6f-9769-4fb7-a2da-cae5046d9f9f</param.guid>
<param.exclude.filters>% List files contained in your toolbox folder that you would like to exclude
% from packaging. Excludes should be listed relative to the toolbox folder.
% Some examples of how to specify excludes are provided below:
%
% A single file in the toolbox folder:
% .svn
%
% A single file in a subfolder of the toolbox folder:
% example/.svn
%
% All files in a subfolder of the toolbox folder:
% example/*
%
% All files of a certain name in all subfolders of the toolbox folder:
% **/.svn
%
% All files matching a pattern in all subfolders of the toolbox folder:
% **/*.bak
%
populate_toolbox.rb
setup.m
.DS_Store</param.exclude.filters>
<param.exclude.pcodedmfiles>true</param.exclude.pcodedmfiles>
<param.examples />
<param.demosxml />
<param.apps />
<param.registered.apps />
<param.docs>${PROJECT_ROOT}/toolbox/info.xml</param.docs>
<param.getting.started.guide>${PROJECT_ROOT}/toolbox/doc/GettingStarted.mlx</param.getting.started.guide>
<param.matlabpath.excludes />
<param.javaclasspath.excludes />
<param.exported.on.package>false</param.exported.on.package>
<param.required.addons />
<param.matlab.project.id />
<param.matlab.project.name />
<param.release.start />
<param.release.end />
<param.release.current.only>false</param.release.current.only>
<param.compatiblity.windows>true</param.compatiblity.windows>
<param.compatiblity.macos>true</param.compatiblity.macos>
<param.compatiblity.linux>true</param.compatiblity.linux>
<param.compatiblity.matlabonline>true</param.compatiblity.matlabonline>
<param.installation.map />
<param.additional.sw.names />
<param.additional.sw.licenses />
<param.additional.sw.win.url />
<param.additional.sw.mac.url />
<param.additional.sw.linux.url />
<unset>
<param.authnamewatermark />
<param.email />
<param.output />
<param.products.name />
<param.products.id />
<param.products.version />
<param.platforms />
<param.exclude.pcodedmfiles />
<param.examples />
<param.demosxml />
<param.apps />
<param.registered.apps />
<param.matlabpath.excludes />
<param.javaclasspath.excludes />
<param.exported.on.package />
<param.required.addons />
<param.matlab.project.id />
<param.matlab.project.name />
<param.release.start />
<param.release.end />
<param.release.current.only />
<param.compatiblity.windows />
<param.compatiblity.macos />
<param.compatiblity.linux />
<param.compatiblity.matlabonline />
<param.additional.sw.names />
<param.additional.sw.licenses />
<param.additional.sw.win.url />
<param.additional.sw.mac.url />
<param.additional.sw.linux.url />
</unset>
<fileset.rootdir>
<file>${PROJECT_ROOT}/toolbox</file>
</fileset.rootdir>
<fileset.rootfiles>
<file>${PROJECT_ROOT}/toolbox/CompileClothoidsLib.m</file>
<file>${PROJECT_ROOT}/toolbox/bin</file>
<file>${PROJECT_ROOT}/toolbox/demos.xml</file>
<file>${PROJECT_ROOT}/toolbox/doc</file>
<file>${PROJECT_ROOT}/toolbox/helptoc.xml</file>
<file>${PROJECT_ROOT}/toolbox/html</file>
<file>${PROJECT_ROOT}/toolbox/info.xml</file>
<file>${PROJECT_ROOT}/toolbox/lib</file>
<file>${PROJECT_ROOT}/toolbox/license.txt</file>
<file>${PROJECT_ROOT}/toolbox/logo.png</file>
<file>${PROJECT_ROOT}/toolbox/src</file>
<file>${PROJECT_ROOT}/toolbox/src_mex</file>
<file>${PROJECT_ROOT}/toolbox/tests</file>
</fileset.rootfiles>
<fileset.depfun.included />
<fileset.depfun.excluded />
<fileset.package />
<build-deliverables>
<file location="${PROJECT_ROOT}" name="Clothoids.mltbx" optional="false">/home/enrico/pins-mechatronix/LibSources/submodules/Clothoids/Clothoids.mltbx</file>
</build-deliverables>
<workflow />
<matlab>
<root>/usr/local/MATLAB/R2020a</root>
<toolboxes />
</matlab>
<platform>
<unix>true</unix>
<mac>false</mac>
<windows>false</windows>
<win2k>false</win2k>
<winxp>false</winxp>
<vista>false</vista>
<linux>true</linux>
<solaris>false</solaris>
<osver>5.4.0-56-generic</osver>
<os32>false</os32>
<os64>true</os64>
<arch>glnxa64</arch>
<matlab>true</matlab>
</platform>
</configuration>
</deployment-project>
40 changes: 17 additions & 23 deletions toolbox/CompileClothoidsLib.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@
elseif ispc
end

for k=1:length(NAMES)
N=NAMES{k};
disp('---------------------------------------------------------');
fprintf(1,'Compiling: %s\n',N)
CMD = [CMDBASE ' -c src_mex/mex_' N '.cc' ];
disp('---------------------------------------------------------');
disp(CMD);
eval(CMD);
end
%for k=1:length(NAMES)
% N=NAMES{k};
% disp('---------------------------------------------------------');
% fprintf(1,'Compiling: %s\n',N)
% CMD = [CMDBASE ' -c src_mex/mex_' N '.cc' ];
% disp('---------------------------------------------------------');
% disp(CMD);
% eval(CMD);
%end

LIB_OBJS = '';
for k=1:length(LIB_NAMES)
Expand All @@ -85,23 +85,17 @@
eval(CMD);
end

[~,mexLoaded] = inmem('-completenames');

for k=1:length(NAMES)
N=NAMES{k};
disp('---------------------------------------------------------');
fprintf(1,'Linking: %s\n',N);
fprintf(1,'Compiling: %s\n',N);

CMD = [ 'while mislocked(''' N '''); munlock(''' N '''); end;'];
eval(CMD);

CMD = [ 'mex -Isrc -output bin/', N, ' -largeArrayDims mex_'];
if ispc
CMD = [ CMD, N, '.obj ', LIB_OBJS ];
else
CMD = [ CMD, N, '.o ', LIB_OBJS ];
end

CMD = [ 'mex -Isrc -output bin/', N ];
CMD = [ CMD, ' -largeArrayDims src_mex/mex_', N ];
CMD = [ CMD, '.cc ', LIB_OBJS ];

if ismac
CMD = [CMD, ' CXXFLAGS="\$CXXFLAGS -Wall -O2 -g"'];
Expand All @@ -114,7 +108,7 @@
CMD = [ CMD, ...
' CXXFLAGS="\$CXXFLAGS -Wall -O2 -g"' ...
' LDFLAGS="\$LDFLAGS -static-libgcc -static-libstdc++"' ...
' LINKLIBS="-L\$MATLABROOT/bin/\$ARCH -L\$MATLABROOT/extern/bin/\$ARCH -lMatlabDataArray -lmx -lmex -lmat -lm "' ...
' LINKLIBS="-ldl -L\$MATLABROOT/bin/\$ARCH -L\$MATLABROOT/extern/bin/\$ARCH -lMatlabDataArray -lmx -lmex -lmat -lm "' ...
];
elseif ispc
end
Expand All @@ -124,9 +118,9 @@
end

if isunix
delete *.o;
elseif ispc
delete *.obj;
delete *.o
else
delete *.obj
end

cd(old_dir);
Expand Down
17 changes: 3 additions & 14 deletions toolbox/src_mex/mex_BiarcListMexWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ namespace G2lib {
int nrhs, mxArray const *prhs[]
) {

#define CMD "BiarcListMexWrapper('findST1',OBJ,x,y[,ibegin,iend]): "
#define CMD "BiarcListMexWrapper('findST1',OBJ,x,y): "
MEX_ASSERT2(
nrhs == 4 || nrhs == 6,
CMD "expected 4 or 6 inputs, nrhs = {}\n", nrhs
nrhs == 4,
CMD "expected 4 inputs, nrhs = {}\n", nrhs
);
MEX_ASSERT2(
nlhs == 3,
Expand Down Expand Up @@ -389,17 +389,6 @@ namespace G2lib {
nrx, ncx, nry, ncy
);

int64_t ibegin = 0;
int64_t iend = ptr->numSegment()-1;
if ( nrhs == 6 ) {
ibegin = getInt(
arg_in_4, CMD "`ibegin` expected to be a scalar integer"
);
iend = getInt(
arg_in_5, CMD "`iend` expected to be a scalar integer"
);
}

real_type * s = createMatrixValue( arg_out_0, nrx, ncx );
real_type * t = createMatrixValue( arg_out_1, nrx, ncx );
real_type * idx = createMatrixValue( arg_out_2, nrx, ncx );
Expand Down
Loading

0 comments on commit ce6b7e8

Please sign in to comment.