Bug fix (output path for the generated mexglx).

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2578 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
stepan 2009-04-09 14:03:28 +00:00
parent 9fa3457791
commit 52b48c10d4
1 changed files with 12 additions and 15 deletions

View File

@ -16,13 +16,11 @@ if (strcmpi('GLNXA64', computer) || strcmpi('PCWIN64', computer)) ...
end
if matlab_ver_less_than('7.5')
OUTPUT_DIR = '../2007a';
OUTPUT_DIR = '../../2007a';
else
OUTPUT_DIR = '../2007b';
OUTPUT_DIR = '../../2007b';
end
OUTPUT_DIR = ' ';
disp(' ')
if exist(OUTPUT_DIR,'dir')
disp('Delete old qmc mex file.')
@ -34,6 +32,8 @@ else
end
disp(' ')
% Comment next line to suppress compilation debugging info
% COMPILE_OPTIONS = [ COMPILE_OPTIONS ' -v ' ];
% Set Optimization and Debug flags
CXXOPTIMFLAGS = ' CXXOPTIMFLAGS=-O3 ';
@ -42,21 +42,18 @@ CXXDEBUGFLAGS = ' CXXDEBUGFLAGS= ';
CDEBUGFLAGS = ' CDEBUGFLAGS= ';
LDOPTIMFLAGS = ' LDOPTIMFLAGS=-O3 ';
LDDEBUGFLAGS = ' LDDEBUGFLAGS= ';
COMPILE_OPTIONS = [ COMPILE_OPTIONS CDEBUGFLAGS COPTIMFLAGS CXXDEBUGFLAGS CXXOPTIMFLAGS LDDEBUGFLAGS LDOPTIMFLAGS];
% Comment next line to suppress compilation debugging info
% COMPILE_OPTIONS = [ COMPILE_OPTIONS ' -v ' ];
FC='FC=/usr/bin/gfortran ' ;
FFLAGS= 'FFLAGS= ' ;
FLIBS = 'FLIBS=-L/usr/lib -lgfortran ' ;
FOPTIMFLAGS = 'FOPTIMFLAGS=-O ' ;
FC='FC=/usr/bin/gfortran '
FFLAGS= 'FFLAGS= '
FLIBS = 'FLIBS=-L/usr/lib -lgfortran '
FOPTIMFLAGS = '-O ';
FOPTIMFLAGS = 'FOPTIMFLAGS=-O '
COMPILE_OPTIONS = [ COMPILE_OPTIONS FC FFLAGS FOPTIMFLAGS FLIBS ];
COMPILE_OPTIONS = [ COMPILE_OPTIONS FC FFLAGS FOPTIMFLAGS FLIBS];
COMPILE_COMMAND = [ 'mex ' COMPILE_OPTIONS ];%' -outdir ' OUTPUT_DIR ];
COMPILE_COMMAND = [ 'mex ' COMPILE_OPTIONS ' -outdir ' OUTPUT_DIR ] ;
disp('Compiling qmc')
system('gfortran -c -O3 low_discrepancy.f');
eval([ COMPILE_COMMAND ' qmc_sequence.cc low_discrepancy.o' ]);
eval([ COMPILE_COMMAND ' qmc_sequence.cc low_discrepancy.o' ]) ;