support 64-bit preprocessor, #862

time-shift
Houtan Bastani 2015-03-26 19:08:30 +01:00
parent 82bd6bcdf3
commit d7c253ae59
3 changed files with 24 additions and 3 deletions

2
.gitignore vendored
View File

@ -97,6 +97,8 @@ mex/build/matlab/run_m2html.m
# Preprocessor
/preprocessor/dynare_m
/preprocessor/dynare_m.exe
/preprocessor/dynare_m64
/preprocessor/dynare_m64.exe
/preprocessor/DynareBison.cc
/preprocessor/DynareBison.hh
/preprocessor/FlexLexer.h

View File

@ -16,7 +16,7 @@ function dynare(fname, varargin)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2001-2014 Dynare Team
% Copyright (C) 2001-2015 Dynare Team
%
% This file is part of Dynare.
%
@ -145,7 +145,21 @@ if exist(fname(1:end-4),'dir') && exist([fname(1:end-4) filesep 'hooks'],'dir')
run([fname(1:end-4) filesep 'hooks/priorprocessing'])
end
command = ['"' dynareroot 'dynare_m" ' fname] ;
if ispc
[junk, arch] = getenv('PROCESSOR_ARCHITECTURE');
else
[junk, arch] = system('uname -m');
end
if isempty(strfind(arch, '64'))
arch_ext64 = '';
disp('Using 32-bit preprocessor');
else
arch_ext64 = '64';
disp('Using 64-bit preprocessor');
end
command = ['"' dynareroot 'dynare_m' arch_ext64 '" ' fname] ;
for i=2:nargin
command = [command ' ' varargin{i-1}];
end

View File

@ -69,7 +69,12 @@ DynareBison.cc DynareBison.hh location.hh stack.hh position.hh: DynareBison.yy
$(YACC) -o DynareBison.cc DynareBison.yy
all-local:
cd ../matlab && $(LN_S) -f $(abs_srcdir)/$(PROGRAMS) $(PROGRAMS)
if [ -z "`file $(PROGRAMS) | grep x86.64`" ]; then \
ARCH=""; \
else \
ARCH="64"; \
fi; \
cd ../matlab && $(LN_S) -f $(abs_srcdir)/$(PROGRAMS) $(PROGRAMS)$$ARCH
if HAVE_DOXYGEN
html-local: