-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakeHorde.m
executable file
·65 lines (59 loc) · 2.34 KB
/
makeHorde.m
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
function makeHorde
% Rebuild the Horde3DCore MEX-File from its source code Horde3DCore.cpp
%
% Requirements: Needs all relevant Horde3D SDK header files and libraries
% inside the local subfolder HordeEngineSDK/
%
% Needs a recent version of Psychtoolbox-3 (V3.0.15 or later) installed.
%
% May need additional Horder runtime libraries installed on your system.
%
% Usage:
%
% 1. Change Matlab/Octave working directory to the location of this
% makeHorde.m file.
%
% 2. Call as: clear all; makeHorde
%
% --> Updated MEX file should appear inside the directory for the currently
% running operating system and target environment.
%
% Written by Mario Kleiner, 25.7.2009.
% Updated 1.4.2012 in preparation of public release.
% Updated 19.9.2015 for current Horde 1.0.0-Beta 5 git master and VR HMD
% rendering support, as well as for OSX 10.10 build environment.
if IsWin
if ~IsWin(1)
error('Building Horde3DCore for 32-Bit Windows is no longer supported.');
end
% Windows 64-Bit build for Matlab:
mex -v Horde3DCore.cpp -I.\HordeEngineSDK -L.\HordeEngineSDK -lHorde3D_vc10 -lHorde3DUtils_vc10
movefile(['Horde3DCore.' mexext], ['HordeWin64/Horde3DCore.' mexext]);
end
if IsLinux
% GNU/Linux build: Works for both Matlab and GNU/Octave 3.2.x:
if IsLinux(1)
% 64-Bit: Use system installed Horde SDK
mex -v Horde3DCore.cpp -I./HordeEngineSDK -lHorde3D -lHorde3DUtils
movefile(['Horde3DCore.' mexext], ['HordeLinux64/Horde3DCore.' mexext]);
else
% 32-Bit: Use bundled libraries in SDK folder
mex -v Horde3DCore.cpp -I./HordeEngineSDK -L./HordeEngineSDK -lHorde3D -lHorde3DUtils
movefile(['Horde3DCore.' mexext], ['HordeLinux32/Horde3DCore.' mexext]);
end
end
if IsOSX
% OS/X build:
if IsOctave
mex -v Horde3DCore.cpp -I./HordeEngineSDK "-Wno-deprecated-declarations -mmacosx-version-min='10.11'" "-Wl,-headerpad_max_install_names,-F/Library/Frameworks/,-framework,Horde3D,-framework,Horde3DUtils"
osxsetoctaverpath('Horde3DCore', './');
else
mex -v Horde3DCore.cpp -I./HordeEngineSDK LDFLAGS="\$LDFLAGS -framework Horde3D -framework Horde3DUtils"
end
if Is64Bit
movefile(['Horde3DCore.' mexext], ['HordeOSX64/Horde3DCore.' mexext]);
else
movefile(['Horde3DCore.' mexext], ['HordeOSX32/Horde3DCore.' mexext]);
end
end
return