summaryrefslogtreecommitdiff
path: root/tools/scilab/windows/src/loader.sce
blob: b247189c682aa79c533c285c55e76db3b7c83cef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// This file is released under the 3-clause BSD license. See COPYING-BSD.
// Generated by builder.sce : Please, do not edit this file
// ----------------------------------------------------------------------------
//
//if win64() then
//  warning(_("This module requires a Windows x86 platform."));
//  return
//end
////
serial_path = get_absolute_file_path('loader.sce');
//
// ulink previous function with same name
[bOK, ilib] = c_link('open_serial');
if bOK then
  ulink(ilib);
end
//
[bOK, ilib] = c_link('close_serial');
if bOK then
  ulink(ilib);
end
//
[bOK, ilib] = c_link('write_serial');
if bOK then
  ulink(ilib);
end
//
[bOK, ilib] = c_link('status_serial');
if bOK then
  ulink(ilib);
end
//
[bOK, ilib] = c_link('read_serial');
if bOK then
  ulink(ilib);
end
//
[version, opts]=getversion();
if (opts(2)=='x86') then
    link(serial_path + 'libserial' + getdynlibext(), ['open_serial','close_serial','write_serial','status_serial','read_serial'],'c');
elseif (opts(2)=='x64') then
    link(serial_path + 'libserial64' + getdynlibext(), ['open_serial','close_serial','write_serial','status_serial','read_serial'],'c');
else
    disp('Unsupported architecture')
end
// remove temp. variables on stack
clear serial_path;
clear bOK;
clear ilib;
// ----------------------------------------------------------------------------