BayesOpt
compile_matlab.m
1 %
2 % -------------------------------------------------------------------------
3 % This file is part of BayesOpt, an efficient C++ library for
4 % Bayesian optimization.
5 %
6 % Copyright (C) 2011-2015 Ruben Martinez-Cantin <rmcantin@unizar.es>
7 %
8 % BayesOpt is free software: you can redistribute it and/or modify it
9 % under the terms of the GNU Affero General Public License as published by
10 % the Free Software Foundation, either version 3 of the License, or
11 % (at your option) any later version.
12 %
13 % BayesOpt is distributed in the hope that it will be useful, but
14 % WITHOUT ANY WARRANTY; without even the implied warranty of
15 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 % GNU Affero General Public License for more details.
17 %
18 % You should have received a copy of the GNU Affero General Public License
19 % along with BayesOpt. If not, see <http://www.gnu.org/licenses/>.
20 % ------------------------------------------------------------------------
21 %
22 
23 % You can also change ../lib for the correspoding install path
24 % MATLAB
25 if (ispc)
26  if exist('../bin/Release/bayesopt.dll','file')
27  disp('Compiling dynamic library');
28  mex -DBAYESOPT_DLL -output bayesoptcont bayesoptmex.c ...
29  -L..\lib\Release -L. -lbayesopt ...
30  -I..\include -I..\wrappers
31  mex -DBAYESOPT_DLL -output bayesoptdisc bayesoptdiscmex.c ...
32  -L..\lib\Release -L. -lbayesopt ...
33  -I..\include -I..\wrappers
34  mex -DBAYESOPT_DLL -output bayesoptcat bayesoptcatmex.c ...
35  -L..\lib\Release -L. -lbayesopt ...
36  -I..\include -I..\wrappers
37  else
38  disp('Compiling static library');
39  mex -output bayesoptcont bayesoptmex.c ...
40  -L../lib/Release -lbayesopt -lnlopt ...
41  -I../include -I../wrappers
42 
43  mex -output bayesoptdisc bayesoptdiscmex.c ...
44  -L../lib/Release -lbayesopt -lnlopt ...
45  -I../include -I../wrappers
46 
47  mex -output bayesoptcat bayesoptcatmex.c ...
48  -L../lib/Release -lbayesopt -lnlopt ...
49  -I../include -I../wrappers
50  end
51 else
52  mex -output bayesoptcont bayesoptmex.c -L../lib -lbayesopt ...
53  -lnlopt -I../include -I../wrappers -I../nlopt/api
54 
55  mex -output bayesoptdisc bayesoptdiscmex.c -L../lib -lbayesopt ...
56  -lnlopt -I../include -I../wrappers -I../nlopt/api
57 
58  mex -output bayesoptcat bayesoptcatmex.c -L../lib -lbayesopt ...
59  -lnlopt -I../include -I../wrappers -I../nlopt/api
60 end
Namespace of the library interface.
Definition: using.dox:1