Commit 93b4e4c7 authored by sebastien's avatar sebastien
Browse files

build_matlab.m: added building of dynare_simul_ + factorized compilation of...

build_matlab.m: added building of dynare_simul_ + factorized compilation of libdynare++ (fixes trac issue #50)


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3129 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 2c43941d
......@@ -99,36 +99,15 @@ eval([ COMPILE_COMMAND ' -I. kronecker/sparse_hessian_times_B_kronecker_C.cc' ])
disp('Compiling A_times_B_kronecker_C...')
eval([ COMPILE_COMMAND ' -I. kronecker/A_times_B_kronecker_C.cc ' BLAS_PATH]);
disp('Compiling gensylv...')
eval([ COMPILE_COMMAND ' -I. -I../../dynare++/sylv/cc ' ...
'../../dynare++/sylv/matlab/gensylv.cpp ' ...
'../../dynare++/sylv/cc/BlockDiagonal.cpp ' ...
'../../dynare++/sylv/cc/GeneralMatrix.cpp ' ...
'../../dynare++/sylv/cc/GeneralSylvester.cpp ' ...
'../../dynare++/sylv/cc/IterativeSylvester.cpp ' ...
'../../dynare++/sylv/cc/KronUtils.cpp ' ...
'../../dynare++/sylv/cc/KronVector.cpp ' ...
'../../dynare++/sylv/cc/QuasiTriangular.cpp ' ...
'../../dynare++/sylv/cc/QuasiTriangularZero.cpp ' ...
'../../dynare++/sylv/cc/SchurDecomp.cpp ' ...
'../../dynare++/sylv/cc/SchurDecompEig.cpp ' ...
'../../dynare++/sylv/cc/SimilarityDecomp.cpp ' ...
'../../dynare++/sylv/cc/SylvException.cpp ' ...
'../../dynare++/sylv/cc/SylvMatrix.cpp ' ...
'../../dynare++/sylv/cc/SylvMemory.cpp ' ...
'../../dynare++/sylv/cc/SylvParams.cpp ' ...
'../../dynare++/sylv/cc/TriangularSylvester.cpp ' ...
'../../dynare++/sylv/cc/Vector.cpp ' ...
BLAS_PATH ' ' LAPACK_PATH ]);
disp('Compiling bytecode...')
eval([ COMPILE_COMMAND ' -Ibytecode -I../../preprocessor bytecode/bytecode.cc bytecode/Interpreter.cc bytecode/Mem_Mngr.cc bytecode/SparseMatrix.cc']);
disp('Compiling k_order_perturbation')
eval([ COMPILE_COMMAND ...
disp('Compiling objects from dynare++...')
LIBDYNAREPP_DIR = [ OUTPUT_DIR '/libdynare++' ];
if exist(LIBDYNAREPP_DIR,'dir')
delete([ LIBDYNAREPP_DIR '/*' ])
else
mkdir(LIBDYNAREPP_DIR)
end
eval([ 'mex ' COMPILE_OPTIONS ' -c -outdir ' LIBDYNAREPP_DIR ...
' -I../../dynare++/src -I../../dynare++/kord -I../../dynare++/tl/cc -I../../dynare++/utils/cc -I../../dynare++/sylv/cc -I../../dynare++/integ/cc -I. ' ...
' -DMEXEXT=' mexext ' ' ...
'-output k_order_perturbation ' ...
'../../dynare++/kord/faa_di_bruno.cpp ' ...
'../../dynare++/kord/korder_stoch.cpp ' ...
'../../dynare++/kord/journal.cpp ' ...
......@@ -184,8 +163,56 @@ eval([ COMPILE_COMMAND ...
'../../dynare++/integ/cc/quasi_mcarlo.cpp ' ...
'../../dynare++/integ/cc/smolyak.cpp ' ...
'../../dynare++/integ/cc/vector_function.cpp ' ...
'../../dynare++/src/nlsolve.cpp'])
LIBDYNAREPP_O = '';
tmp = dir([ LIBDYNAREPP_DIR '/*.o' ])
for i = 1:size(tmp, 1)
LIBDYNAREPP_O = [ LIBDYNAREPP_O ' ' LIBDYNAREPP_DIR '/' tmp(i).name ];
end
disp('Compiling gensylv...')
eval([ COMPILE_COMMAND ' -I. -I../../dynare++/sylv/cc ' ...
'../../dynare++/sylv/matlab/gensylv.cpp ' ...
LIBDYNAREPP_DIR '/BlockDiagonal.o ' ...
LIBDYNAREPP_DIR '/GeneralMatrix.o ' ...
LIBDYNAREPP_DIR '/GeneralSylvester.o ' ...
LIBDYNAREPP_DIR '/IterativeSylvester.o ' ...
LIBDYNAREPP_DIR '/KronUtils.o ' ...
LIBDYNAREPP_DIR '/KronVector.o ' ...
LIBDYNAREPP_DIR '/QuasiTriangular.o ' ...
LIBDYNAREPP_DIR '/QuasiTriangularZero.o ' ...
LIBDYNAREPP_DIR '/SchurDecomp.o ' ...
LIBDYNAREPP_DIR '/SchurDecompEig.o ' ...
LIBDYNAREPP_DIR '/SimilarityDecomp.o ' ...
LIBDYNAREPP_DIR '/SylvException.o ' ...
LIBDYNAREPP_DIR '/SylvMatrix.o ' ...
LIBDYNAREPP_DIR '/SylvMemory.o ' ...
LIBDYNAREPP_DIR '/SylvParams.o ' ...
LIBDYNAREPP_DIR '/TriangularSylvester.o ' ...
LIBDYNAREPP_DIR '/Vector.o ' ...
BLAS_PATH ' ' LAPACK_PATH ]);
disp('Compiling bytecode...')
eval([ COMPILE_COMMAND ' -Ibytecode -I../../preprocessor bytecode/bytecode.cc bytecode/Interpreter.cc bytecode/Mem_Mngr.cc bytecode/SparseMatrix.cc']);
disp('Compiling k_order_perturbation')
eval([ COMPILE_COMMAND ...
' -I../../dynare++/src -I../../dynare++/kord -I../../dynare++/tl/cc -I../../dynare++/utils/cc -I../../dynare++/sylv/cc -I../../dynare++/integ/cc -I. ' ...
' -DMEXEXT=' mexext ' ' ...
'-output k_order_perturbation ' ...
'k_order_perturbation/k_order_perturbation.cpp ' ...
'k_order_perturbation/k_ord_dynare.cpp ' ...
'k_order_perturbation/dynamic_dll.cpp ' ...
'../../dynare++/src/nlsolve.cpp ' ...
LIBDYNAREPP_O ' ' ...
DL_PATH ' ' BLAS_PATH ' ' LAPACK_PATH]);
disp('Compiling dynare_simul_')
eval([ COMPILE_COMMAND ...
' -I../../dynare++/kord -I../../dynare++/tl/cc -I../../dynare++/sylv/cc -I. ' ...
'-output dynare_simul_ ' ...
'../../dynare++/extern/matlab/dynare_simul.cpp ' ...
LIBDYNAREPP_O ' ' ...
BLAS_PATH ' ' LAPACK_PATH]);
rmdir(LIBDYNAREPP_DIR, 's')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment