% Authors:
% - Carlos Jenkins <carlos@jenkins.co.cr>
%
-% This document contains proprietary information belonging to Czech
-% Technical University in Prague. Passing on and copying of this
-% document, and communication of its contents is not permitted
-% without prior written authorization.
+% Permission is hereby granted, free of charge, to any person
+% obtaining a copy of this software and associated documentation
+% files (the "Software"), to deal in the Software without
+% restriction, including without limitation the rights to use,
+% copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the
+% Software is furnished to do so, subject to the following
+% conditions:
+
+% The above copyright notice and this permission notice shall be
+% included in all copies or substantial portions of the Software.
+
+% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+% OTHER DEALINGS IN THE SOFTWARE.
%
% File : compile_blocks.m
% Abstract:
% link step fully evaluated.
% options = '-v -g';
options = '';
- mex = fullfile(matlabroot(), 'bin', 'mex');
+ matlabRootPath=strcat('"',matlabroot(),'"');
+ mex = fullfile(matlabRootPath, 'bin', 'mex');
+
sources = dir('sfunction_*.c');
for i = sources'
local_opts = options;
if strcmp(i.name, 'sfunction_canreceive.c') || ...
- strcmp(i.name, 'sfunction_cantransmit.c') || ...
- strcmp(i.name, 'sfunction_cansetup.c'),
+ strcmp(i.name, 'sfunction_cantransmit.c'),
local_opts = [local_opts ' ' ...
- '-I' matlabroot '/toolbox/shared/can/src/scanutil ' ...
- '-I' matlabroot '/toolbox/rtw/targets/common/can/datatypes ' ...
- matlabroot '/toolbox/rtw/targets/common/can/datatypes/sfun_can_util.c '...
- matlabroot '/toolbox/rtw/targets/common/can/datatypes/can_msg.c'];
+ '-I' matlabRootPath '/toolbox/shared/can/src/scanutil ' ...
+ '-I' matlabRootPath '/toolbox/rtw/targets/common/can/datatypes ' ...
+ matlabRootPath '/toolbox/rtw/targets/common/can/datatypes/sfun_can_util.c '...
+ matlabRootPath '/toolbox/rtw/targets/common/can/datatypes/can_msg.c'];
end
command = [mex ' ' i.name ' ' local_opts];
disp(command);