Skip to content

Latest commit

 

History

History
executable file
·
40 lines (33 loc) · 1.19 KB

compile_manymouse_mex.m

File metadata and controls

executable file
·
40 lines (33 loc) · 1.19 KB
 
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
function compile_manymouse_mex
if isOctave()
% The file 'mkoctfile' (/usr/bin/mkoctfile on Ubuntu 12.04) should have these flags added to CXXFLAGS:
% -std=c++0x -fpermissive -fPIC -DNDEBUG
% While Matlab allows to add these flags when calling mex() (see below) , Octave doesn't ...
mex( '-I../..', '-lX11', '-ldl', ...
'manymouse_mex.cpp', ...
'../../manymouse.c', ...
'../../linux_evdev.c', ...
'../../macosx_hidmanager.c', ...
'../../macosx_hidutilities.c', ...
'../../windows_wminput.c', ...
'../../x11_xinput2.c' );
else
mex( '-I../..', '-lX11', '-ldl', 'CXXFLAGS=$CXXFLAGS -std=c++0x -fpermissive -fPIC -DNDEBUG', ...
'manymouse_mex.cpp', ...
'../../manymouse.c', ...
'../../linux_evdev.c', ...
'../../macosx_hidmanager.c', ...
'../../macosx_hidutilities.c', ...
'../../windows_wminput.c', ...
'../../x11_xinput2.c' );
end
end
function isOct = isOctave()
v = ver;
ret = strcmpi(v(1).Name,'Octave');
if ret
isOct = true;
else
isOct = false;
end
end