Source

BayesOpt / matlab / compile_octave.m

Full commit
% You can also change ../lib for the correspoding install path
% Octave
if exist('../lib/libbayesopt.a','file')
    disp('Compiling static library');
     mkoctfile -L../lib -lbayesopt -lnlopt -I../include -I../wrappers ...
        --mex "-Wl,-rpath=../lib" --output bayesoptcont.mex ...
        bayesoptmex.c

    mkoctfile -L../lib -lbayesopt -lnlopt -I../include -I../wrappers ...
        --mex "-Wl,-rpath=../lib" --output bayesoptdisc.mex ...
        bayesoptdiscmex.c
else %TODO: Does not work in MacOS
    disp('Compiling dynamic library');
    mkoctfile -L../lib -l:bayesopt.so -lnlopt -I../include -I../wrappers ...
        --mex "-Wl,-rpath=../lib" --output bayesoptcont.mex ...
        bayesoptmex.c

    mkoctfile -L../lib -l:bayesopt.so -lnlopt -I../include -I../wrappers ...
        --mex "-Wl,-rpath=../lib" --output bayesoptdisc.mex ...
        bayesoptdiscmex.c
end