1 |
# Copyright 2006 by ACcESS MNRF |
# Copyright 2006 by ACcESS MNRF |
2 |
# |
# |
3 |
# http://www.access.edu.au |
# http://www.access.edu.au |
4 |
# Primary Business: Queensland, Australia |
# Primary Business: Queensland, Australia |
5 |
# Licensed under the Open Software License version 3.0 |
# Licensed under the Open Software License version 3.0 |
6 |
# http://www.opensource.org/licenses/osl-3.0.php |
# http://www.opensource.org/licenses/osl-3.0.php |
7 |
# |
# |
8 |
# |
# |
9 |
# |
# |
10 |
|
|
11 |
# top-level Scons configuration file for all esys13 modules |
# top-level Scons configuration file for all esys13 modules |
12 |
# Begin initialisation Section |
# Begin initialisation Section |
13 |
# all of this section just intialises default environments and helper |
# all of this section just intialises default environments and helper |
14 |
# scripts. You shouldn't need to modify this section. |
# scripts. You shouldn't need to modify this section. |
15 |
EnsureSConsVersion(0,96,91) |
EnsureSConsVersion(0,96,91) |
16 |
EnsurePythonVersion(2,3) |
EnsurePythonVersion(2,3) |
18 |
# import tools: |
# import tools: |
19 |
import glob |
import glob |
20 |
import sys, os |
import sys, os |
21 |
|
import socket |
22 |
# Add our extensions |
# Add our extensions |
23 |
if sys.path.count('scons')==0: sys.path.append('scons') |
if sys.path.count('scons')==0: sys.path.append('scons') |
24 |
import scons_extensions |
import scons_extensions |
25 |
|
|
26 |
# check if UMFPACK is installed on the system: |
# check if UMFPACK is installed on the system: |
27 |
if os.path.isdir('/opt/UMFPACK/Include') and os.path.isdir('/opt/UMFPACK/Lib') and os.path.isdir('/opt/AMD/Lib'): |
if os.path.isdir('/opt/UMFPACK/Include') and os.path.isdir('/opt/UMFPACK/Lib'): |
28 |
umf_path_default='/opt/UMFPACK/Include' |
umf_path_default='/opt/UMFPACK/Include' |
29 |
umf_lib_path_default='/opt/UMFPACK/Lib' |
umf_lib_path_default='/opt/UMFPACK/Lib' |
30 |
amd_lib_path_default='/opt/AMD/Lib' |
umf_libs_default=['umfpack'] |
|
umf_libs_default=['amd', 'umfpack'] |
|
31 |
else: |
else: |
32 |
umf_path_default=None |
umf_path_default=None |
33 |
umf_lib_path_default=None |
umf_lib_path_default=None |
|
amd_lib_path_default=None |
|
34 |
umf_libs_default=None |
umf_libs_default=None |
35 |
if os.path.isdir('/opt/GotoBLAS'): |
|
36 |
blas_path_default='/opt/GotoBLAS' |
if os.path.isdir('/opt/AMD/Include') and os.path.isdir('/opt/AMD/Lib'): |
37 |
blas_lib_path_default='/opt/GotoBLAS' |
amd_path_default='/opt/AMD/Include' |
38 |
blas_libs_default=['goto',] |
amd_lib_path_default='/opt/AMD/Lib' |
39 |
else: |
amd_libs_default=['amd'] |
40 |
blas_path_default=None |
else: |
41 |
blas_lib_path_default=None |
amd_path_default=None |
42 |
blas_libs_default=None |
amd_lib_path_default=None |
43 |
|
amd_libs_default=None |
44 |
|
|
45 |
|
if os.path.isdir('/opt/UFconfig'): |
46 |
|
ufc_path_default='/opt/UFconfig' |
47 |
|
else: |
48 |
|
ufc_path_default=None |
49 |
|
|
50 |
# Default options and options help text |
# Default options and options help text |
51 |
# These are defaults and can be overridden using command line arguments or an options file. |
# These are defaults and can be overridden using command line arguments or an options file. |
52 |
# if the options_file or ARGUMENTS do not exist then the ones listed as default here are used |
# if the options_file or ARGUMENTS do not exist then the ones listed as default here are used |
54 |
if ARGUMENTS.get('options_file',0): |
if ARGUMENTS.get('options_file',0): |
55 |
options_file = ARGUMENTS.get('options_file',0) |
options_file = ARGUMENTS.get('options_file',0) |
56 |
else: |
else: |
|
import socket |
|
57 |
from string import ascii_letters,digits |
from string import ascii_letters,digits |
58 |
hostname="" |
hostname="" |
59 |
for s in socket.gethostname().split('.')[0]: |
for s in socket.gethostname().split('.')[0]: |
66 |
opts = Options(options_file, ARGUMENTS) |
opts = Options(options_file, ARGUMENTS) |
67 |
opts.AddOptions( |
opts.AddOptions( |
68 |
# Where to install esys stuff |
# Where to install esys stuff |
69 |
('incinstall', 'where the esys headers will be installed', Dir('#.').abspath+'/include'), |
('incinstall', 'where the esys headers will be installed', Dir('#.').abspath+'/include'), |
70 |
('libinstall', 'where the esys libraries will be installed', Dir('#.').abspath+'/lib'), |
('libinstall', 'where the esys libraries will be installed', Dir('#.').abspath+'/lib'), |
71 |
('pyinstall', 'where the esys python modules will be installed', Dir('#.').abspath), |
('pyinstall', 'where the esys python modules will be installed', Dir('#.').abspath), |
72 |
('src_zipfile', 'the source zip file will be installed.', Dir('#.').abspath+"/release/escript_src.zip"), |
('src_zipfile', 'the source zip file will be installed.', Dir('#.').abspath+"/release/escript_src.zip"), |
73 |
('test_zipfile', 'the test zip file will be installed.', Dir('#.').abspath+"/release/escript_tests.zip"), |
('test_zipfile', 'the test zip file will be installed.', Dir('#.').abspath+"/release/escript_tests.zip"), |
74 |
('src_tarfile', 'the source tar file will be installed.', Dir('#.').abspath+"/release/escript_src.tar.gz"), |
('src_tarfile', 'the source tar file will be installed.', Dir('#.').abspath+"/release/escript_src.tar.gz"), |
75 |
('test_tarfile', 'the test tar file will be installed.', Dir('#.').abspath+"/release/escript_tests.tar.gz"), |
('test_tarfile', 'the test tar file will be installed.', Dir('#.').abspath+"/release/escript_tests.tar.gz"), |
76 |
('examples_tarfile', 'the examples tar file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.tar.gz"), |
('examples_tarfile', 'the examples tar file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.tar.gz"), |
77 |
('examples_zipfile', 'the examples zip file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.zip"), |
('examples_zipfile', 'the examples zip file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.zip"), |
78 |
('guide_pdf', 'name of the user guide in pdf format', Dir('#.').abspath+"/release/doc/user/guide.pdf"), |
('guide_pdf', 'name of the user guide in pdf format', Dir('#.').abspath+"/release/doc/user/guide.pdf"), |
79 |
('api_epydoc', 'name of the epydoc api docs directory',Dir('#.').abspath+"/release/doc/epydoc"), |
('api_epydoc', 'name of the epydoc api docs directory',Dir('#.').abspath+"/release/doc/epydoc"), |
80 |
('guide_html', 'name of the directory for user guide in html format', Dir('#.').abspath+"/release/doc/user/html"), |
('guide_html', 'name of the directory for user guide in html format', Dir('#.').abspath+"/release/doc/user/html"), |
81 |
# Compilation options |
# Compilation options |
82 |
BoolOption('dodebug', 'Do you want a debug build?', 'no'), |
BoolOption('dodebug', 'Do you want a debug build?', 'no'), |
83 |
('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/hostname_options.py)", options_file), |
('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/hostname_options.py)", options_file), |
94 |
('sys_libs', 'System libraries to link with', None), |
('sys_libs', 'System libraries to link with', None), |
95 |
('tar_flags','flags for zip files','-c -z'), |
('tar_flags','flags for zip files','-c -z'), |
96 |
# MKL |
# MKL |
97 |
PathOption('mkl_path', 'Path to MKL includes', None), |
PathOption('mkl_path', 'Path to MKL includes', None), |
98 |
PathOption('mkl_lib_path', 'Path to MKL libs', None), |
PathOption('mkl_lib_path', 'Path to MKL libs', None), |
99 |
('mkl_libs', 'MKL libraries to link with', None), |
('mkl_libs', 'MKL libraries to link with', None), |
100 |
# SCSL |
# SCSL |
101 |
PathOption('scsl_path', 'Path to SCSL includes', None), |
PathOption('scsl_path', 'Path to SCSL includes', None), |
102 |
PathOption('scsl_lib_path', 'Path to SCSL libs', None), |
PathOption('scsl_lib_path', 'Path to SCSL libs', None), |
103 |
('scsl_libs', 'SCSL libraries to link with', None), |
('scsl_libs', 'SCSL libraries to link with', None), |
104 |
('scsl_libs_MPI', 'SCSL libraries to link with for MPI build', None), |
('scsl_libs_MPI', 'SCSL libraries to link with for MPI build', None), |
105 |
# UMFPACK |
# UMFPACK |
106 |
PathOption('umf_path', 'Path to UMF includes', umf_path_default), |
PathOption('ufc_path', 'Path to UFconfig includes', ufc_path_default), |
107 |
PathOption('umf_lib_path', 'Path to UMF libs', umf_lib_path_default), |
PathOption('umf_path', 'Path to UMFPACK includes', umf_path_default), |
108 |
PathOption('amd_lib_path', 'Path to UMF libs', amd_lib_path_default), |
PathOption('umf_lib_path', 'Path to UMFPACK libs', umf_lib_path_default), |
109 |
('umf_libs', 'UMF libraries to link with', umf_libs_default), |
('umf_libs', 'UMFPACK libraries to link with', umf_libs_default), |
110 |
|
# AMD (used by UMFPACK) |
111 |
|
PathOption('amd_path', 'Path to AMD includes', amd_path_default), |
112 |
|
PathOption('amd_lib_path', 'Path to AMD libs', amd_lib_path_default), |
113 |
|
('amd_libs', 'AMD libraries to link with', amd_libs_default), |
114 |
# BLAS |
# BLAS |
115 |
PathOption('blas_path', 'Path to BLAS includes', blas_path_default), |
PathOption('blas_path', 'Path to BLAS includes', None), |
116 |
PathOption('blas_lib_path', 'Path to BLAS libs', blas_lib_path_default ), |
PathOption('blas_lib_path', 'Path to BLAS libs', None), |
117 |
('blas_libs', 'BLAS libraries to link with', blas_libs_default ), |
('blas_libs', 'BLAS libraries to link with', None), |
118 |
|
# netCDF |
119 |
|
PathOption('netCDF_path', 'Path to netCDF includes', '/home/jongui/netcdf-3.6.1/netcdf-3.6.1/include'), |
120 |
|
PathOption('netCDF_lib_path', 'Path to netCDF libs', '/home/jongui/netcdf-3.6.1/netcdf-3.6.1/lib'), |
121 |
|
('netCDF_libs_cxx', 'netCDF C++ libraries to link with', [ 'netcdf_c++', 'netcdf'] ), |
122 |
# Python |
# Python |
123 |
# locations of include files for python |
# locations of include files for python |
124 |
PathOption('python_path', 'Path to Python includes', '/usr/include/python%s.%s'%(sys.version_info[0],sys.version_info[1])), |
PathOption('python_path', 'Path to Python includes', '/usr/include/python%s.%s'%(sys.version_info[0],sys.version_info[1])), |
125 |
PathOption('python_lib_path', 'Path to Python libs', '/usr/lib'), |
PathOption('python_lib_path', 'Path to Python libs', '/usr/lib'), |
126 |
('python_lib', 'Python libraries to link with', ["python%s.%s"%(sys.version_info[0],sys.version_info[1]),]), |
('python_lib', 'Python libraries to link with', ["python%s.%s"%(sys.version_info[0],sys.version_info[1]),]), |
127 |
# Boost |
# Boost |
128 |
PathOption('boost_path', 'Path to Boost includes', '/usr/include'), |
PathOption('boost_path', 'Path to Boost includes', '/usr/include'), |
129 |
PathOption('boost_lib_path', 'Path to Boost libs', '/usr/lib'), |
PathOption('boost_lib_path', 'Path to Boost libs', '/usr/lib'), |
130 |
('boost_lib', 'Boost libraries to link with', ['boost_python',]), |
('boost_lib', 'Boost libraries to link with', ['boost_python',]), |
131 |
# Doc building |
# Doc building |
132 |
# PathOption('doxygen_path', 'Path to Doxygen executable', None), |
# PathOption('doxygen_path', 'Path to Doxygen executable', None), |
133 |
# PathOption('epydoc_path', 'Path to Epydoc executable', None), |
# PathOption('epydoc_path', 'Path to Epydoc executable', None), |
134 |
# PAPI |
# PAPI |
135 |
PathOption('papi_path', 'Path to PAPI includes', None), |
PathOption('papi_path', 'Path to PAPI includes', None), |
136 |
PathOption('papi_lib_path', 'Path to PAPI libs', None), |
PathOption('papi_lib_path', 'Path to PAPI libs', None), |
137 |
('papi_libs', 'PAPI libraries to link with', None), |
('papi_libs', 'PAPI libraries to link with', None), |
138 |
# MPI |
# MPI |
139 |
BoolOption('useMPI', 'Compile parallel version using MPI', 'no'), |
BoolOption('useMPI', 'Compile parallel version using MPI', 'no'), |
161 |
# environment which isn't the "scons way" |
# environment which isn't the "scons way" |
162 |
# This doesn't impact linux and windows which will use the default compiler (g++ or msvc, or the intel compiler if it is installed on both platforms) |
# This doesn't impact linux and windows which will use the default compiler (g++ or msvc, or the intel compiler if it is installed on both platforms) |
163 |
# FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix |
# FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix |
164 |
|
|
165 |
if os.name != "nt" and os.uname()[4]=='ia64': |
if os.name != "nt" and os.uname()[4]=='ia64': |
166 |
env = Environment(ENV = {'PATH':path}, tools = ['default', 'intelc'], options = opts) |
env = Environment(ENV = {'PATH':path}, tools = ['default', 'intelc'], options = opts) |
167 |
env['ENV']['PATH'] = path |
env['ENV']['PATH'] = path |
199 |
incinstall = env['incinstall'] |
incinstall = env['incinstall'] |
200 |
env.Append(CPPPATH = [incinstall,]) |
env.Append(CPPPATH = [incinstall,]) |
201 |
except KeyError: |
except KeyError: |
202 |
incinstall = None |
incinstall = None |
203 |
try: |
try: |
204 |
libinstall = env['libinstall'] |
libinstall = env['libinstall'] |
205 |
env.Append(LIBPATH = [libinstall,]) |
env.Append(LIBPATH = [libinstall,]) |
208 |
env.PrependENVPath('PATH', libinstall) |
env.PrependENVPath('PATH', libinstall) |
209 |
env.PrependENVPath('PATH', env['boost_lib_path']) |
env.PrependENVPath('PATH', env['boost_lib_path']) |
210 |
except KeyError: |
except KeyError: |
211 |
libinstall = None |
libinstall = None |
212 |
try: |
try: |
213 |
pyinstall = env['pyinstall']+'/esys' # all targets will install into pyinstall/esys but PYTHONPATH points at straight pyinstall so you go import esys.escript etc |
pyinstall = env['pyinstall']+'/esys' # all targets will install into pyinstall/esys but PYTHONPATH points at straight pyinstall so you go import esys.escript etc |
214 |
env.PrependENVPath('PYTHONPATH', env['pyinstall']) |
env.PrependENVPath('PYTHONPATH', env['pyinstall']) |
215 |
except KeyError: |
except KeyError: |
216 |
pyinstall = None |
pyinstall = None |
217 |
try: |
try: |
218 |
dodebug = env['dodebug'] |
dodebug = env['dodebug'] |
219 |
except KeyError: |
except KeyError: |
220 |
dodebug = None |
dodebug = None |
221 |
try: |
try: |
222 |
useMPI = env['useMPI'] |
useMPI = env['useMPI'] |
223 |
except KeyError: |
except KeyError: |
224 |
useMPI = None |
useMPI = None |
225 |
try: |
try: |
226 |
cc_defines = env['cc_defines'] |
cc_defines = env['cc_defines'] |
227 |
env.Append(CPPDEFINES = cc_defines) |
env.Append(CPPDEFINES = cc_defines) |
228 |
except KeyError: |
except KeyError: |
229 |
pass |
pass |
230 |
|
|
231 |
|
if 'shake71' == socket.gethostname().split('.')[0]: |
232 |
|
if useMPI: |
233 |
|
env['CC'] = 'mpicc' |
234 |
|
env['CXX'] = 'mpiCC' |
235 |
|
|
236 |
if dodebug: |
if dodebug: |
237 |
if useMPI: |
if useMPI: |
238 |
try: |
try: |
240 |
env.Append(CCFLAGS = flags) |
env.Append(CCFLAGS = flags) |
241 |
except KeyError: |
except KeyError: |
242 |
pass |
pass |
243 |
else: |
else: |
244 |
try: |
try: |
245 |
flags = env['cc_flags_debug'] |
flags = env['cc_flags_debug'] |
246 |
env.Append(CCFLAGS = flags) |
env.Append(CCFLAGS = flags) |
289 |
flags = env['ar_flags'] |
flags = env['ar_flags'] |
290 |
env.Append(ARFLAGS = flags) |
env.Append(ARFLAGS = flags) |
291 |
except KeyError: |
except KeyError: |
292 |
ar_flags = None |
ar_flags = None |
293 |
try: |
try: |
294 |
sys_libs = env['sys_libs'] |
sys_libs = env['sys_libs'] |
295 |
except KeyError: |
except KeyError: |
296 |
sys_libs = '' |
sys_libs = '' |
297 |
|
|
298 |
try: |
try: |
299 |
tar_flags = env['tar_flags'] |
tar_flags = env['tar_flags'] |
313 |
except KeyError: |
except KeyError: |
314 |
pass |
pass |
315 |
|
|
316 |
try: |
if useMPI: |
|
mkl_libs = env['mkl_libs'] |
|
|
except KeyError: |
|
317 |
mkl_libs = '' |
mkl_libs = '' |
318 |
|
else: |
319 |
|
try: |
320 |
|
mkl_libs = env['mkl_libs'] |
321 |
|
except KeyError: |
322 |
|
mkl_libs = '' |
323 |
|
|
324 |
try: |
try: |
325 |
includes = env['scsl_path'] |
includes = env['scsl_path'] |
326 |
env.Append(CPPPATH = [includes,]) |
env.Append(CPPPATH = [includes,]) |
327 |
except KeyError: |
except KeyError: |
328 |
pass |
pass |
329 |
|
|
330 |
try: |
try: |
331 |
lib_path = env['scsl_lib_path'] |
lib_path = env['scsl_lib_path'] |
332 |
env.Append(LIBPATH = [lib_path,]) |
env.Append(LIBPATH = [lib_path,]) |
333 |
except KeyError: |
except KeyError: |
334 |
pass |
pass |
335 |
if useMPI: |
|
336 |
|
if useMPI: |
337 |
try: |
try: |
338 |
scsl_libs = env['scsl_libs_MPI'] |
scsl_libs = env['scsl_libs_MPI'] |
339 |
except KeyError: |
except KeyError: |
340 |
scsl_libs = '' |
scsl_libs = '' |
341 |
else: |
else: |
342 |
try: |
try: |
343 |
scsl_libs = env['scsl_libs'] |
scsl_libs = env['scsl_libs'] |
344 |
except KeyError: |
except KeyError: |
356 |
except KeyError: |
except KeyError: |
357 |
pass |
pass |
358 |
|
|
359 |
|
if useMPI: |
360 |
|
umf_libs = '' |
361 |
|
else: |
362 |
|
try: |
363 |
|
umf_libs = env['umf_libs'] |
364 |
|
except KeyError: |
365 |
|
umf_libs = '' |
366 |
|
|
367 |
try: |
try: |
368 |
lib_path = env['amd_lib_path'] |
includes = env['ufc_path'] |
369 |
env.Append(LIBPATH = [lib_path,]) |
env.Append(CPPPATH = [includes,]) |
370 |
except KeyError: |
except KeyError: |
371 |
pass |
pass |
372 |
|
|
373 |
try: |
try: |
374 |
umf_libs = env['umf_libs'] |
includes = env['amd_path'] |
375 |
|
env.Append(CPPPATH = [includes,]) |
376 |
except KeyError: |
except KeyError: |
377 |
umf_libs = '' |
pass |
378 |
|
|
379 |
|
try: |
380 |
|
lib_path = env['amd_lib_path'] |
381 |
|
env.Append(LIBPATH = [lib_path,]) |
382 |
|
except KeyError: |
383 |
|
pass |
384 |
|
|
385 |
|
if useMPI: |
386 |
|
amd_libs = '' |
387 |
|
else: |
388 |
|
try: |
389 |
|
amd_libs = env['amd_libs'] |
390 |
|
except KeyError: |
391 |
|
amd_libs = '' |
392 |
|
|
393 |
try: |
try: |
394 |
includes = env['blas_path'] |
includes = env['blas_path'] |
395 |
env.Append(CPPPATH = [includes,]) |
env.Append(CPPPATH = [includes,]) |
396 |
except KeyError: |
except KeyError: |
397 |
pass |
pass |
398 |
|
|
399 |
try: |
try: |
400 |
lib_path = env['blas_lib_path'] |
lib_path = env['blas_lib_path'] |
401 |
env.Append(LIBPATH = [lib_path,]) |
env.Append(LIBPATH = [lib_path,]) |
402 |
except KeyError: |
except KeyError: |
403 |
pass |
pass |
404 |
|
|
405 |
try: |
try: |
406 |
blas_libs = env['blas_libs'] |
blas_libs = env['blas_libs'] |
407 |
except KeyError: |
except KeyError: |
408 |
blas_libs = '' |
blas_libs = '' |
409 |
|
|
410 |
try: |
try: |
411 |
|
includes = env['netCDF_path'] |
412 |
|
env.Append(CPPPATH = [includes,]) |
413 |
|
except KeyError: |
414 |
|
pass |
415 |
|
|
416 |
|
try: |
417 |
|
lib_path = env['netCDF_lib_path'] |
418 |
|
env.Append(LIBPATH = [lib_path,]) |
419 |
|
except KeyError: |
420 |
|
pass |
421 |
|
|
422 |
|
try: |
423 |
|
netCDF_libs_cxx = env['netCDF_libs_cxx'] |
424 |
|
except KeyError: |
425 |
|
netCDF_lib_cxx = [ ] |
426 |
|
|
427 |
|
try: |
428 |
includes = env['boost_path'] |
includes = env['boost_path'] |
429 |
env.Append(CPPPATH = [includes,]) |
env.Append(CPPPATH = [includes,]) |
430 |
except KeyError: |
except KeyError: |
437 |
try: |
try: |
438 |
boost_lib = env['boost_lib'] |
boost_lib = env['boost_lib'] |
439 |
except KeyError: |
except KeyError: |
440 |
boost_lib = None |
boost_lib = None |
441 |
try: |
try: |
442 |
includes = env['python_path'] |
includes = env['python_path'] |
443 |
env.Append(CPPPATH = [includes,]) |
env.Append(CPPPATH = [includes,]) |
451 |
try: |
try: |
452 |
python_lib = env['python_lib'] |
python_lib = env['python_lib'] |
453 |
except KeyError: |
except KeyError: |
454 |
python_lib = None |
python_lib = None |
455 |
try: |
try: |
456 |
doxygen_path = env['doxygen_path'] |
doxygen_path = env['doxygen_path'] |
457 |
except KeyError: |
except KeyError: |
458 |
doxygen_path = None |
doxygen_path = None |
459 |
try: |
try: |
460 |
epydoc_path = env['epydoc_path'] |
epydoc_path = env['epydoc_path'] |
461 |
except KeyError: |
except KeyError: |
462 |
epydoc_path = None |
epydoc_path = None |
463 |
try: |
try: |
464 |
includes = env['papi_path'] |
includes = env['papi_path'] |
465 |
env.Append(CPPPATH = [includes,]) |
env.Append(CPPPATH = [includes,]) |
473 |
try: |
try: |
474 |
papi_libs = env['papi_libs'] |
papi_libs = env['papi_libs'] |
475 |
except KeyError: |
except KeyError: |
476 |
papi_libs = None |
papi_libs = None |
477 |
|
|
478 |
|
|
479 |
try: |
try: |
480 |
src_zipfile = env.File(env['src_zipfile']) |
src_zipfile = env.File(env['src_zipfile']) |
481 |
except KeyError: |
except KeyError: |
482 |
src_zipfile = None |
src_zipfile = None |
483 |
try: |
try: |
484 |
test_zipfile = env.File(env['test_zipfile']) |
test_zipfile = env.File(env['test_zipfile']) |
485 |
except KeyError: |
except KeyError: |
486 |
test_zipfile = None |
test_zipfile = None |
487 |
try: |
try: |
488 |
examples_zipfile = env.File(env['examples_zipfile']) |
examples_zipfile = env.File(env['examples_zipfile']) |
489 |
except KeyError: |
except KeyError: |
490 |
examples_zipfile = None |
examples_zipfile = None |
491 |
|
|
492 |
try: |
try: |
493 |
src_tarfile = env.File(env['src_tarfile']) |
src_tarfile = env.File(env['src_tarfile']) |
494 |
except KeyError: |
except KeyError: |
495 |
src_tarfile = None |
src_tarfile = None |
496 |
try: |
try: |
497 |
test_tarfile = env.File(env['test_tarfile']) |
test_tarfile = env.File(env['test_tarfile']) |
498 |
except KeyError: |
except KeyError: |
499 |
test_tarfile = None |
test_tarfile = None |
500 |
try: |
try: |
501 |
examples_tarfile = env.File(env['examples_tarfile']) |
examples_tarfile = env.File(env['examples_tarfile']) |
502 |
except KeyError: |
except KeyError: |
503 |
examples_tarfile = None |
examples_tarfile = None |
504 |
|
|
505 |
try: |
try: |
506 |
guide_pdf = env.File(env['guide_pdf']) |
guide_pdf = env.File(env['guide_pdf']) |
507 |
except KeyError: |
except KeyError: |
508 |
guide_pdf = None |
guide_pdf = None |
509 |
|
|
510 |
try: |
try: |
511 |
guide_html_index = env.File('index.htm',env['guide_html']) |
guide_html_index = env.File('index.htm',env['guide_html']) |
512 |
except KeyError: |
except KeyError: |
513 |
guide_html_index = None |
guide_html_index = None |
514 |
|
|
515 |
try: |
try: |
516 |
api_epydoc = env.Dir(env['api_epydoc']) |
api_epydoc = env.Dir(env['api_epydoc']) |
517 |
except KeyError: |
except KeyError: |
518 |
api_epydoc = None |
api_epydoc = None |
519 |
|
|
520 |
# Zipgets |
# Zipgets |
521 |
|
|
522 |
env.Default(libinstall) |
env.Default(libinstall) |
523 |
env.Default(incinstall) |
env.Default(incinstall) |
524 |
env.Default(pyinstall) |
env.Default(pyinstall) |
525 |
env.Alias('release_src',[ src_zipfile, src_tarfile ]) |
env.Alias('release_src',[ src_zipfile, src_tarfile ]) |
526 |
env.Alias('release_tests',[ test_zipfile, test_tarfile]) |
env.Alias('release_tests',[ test_zipfile, test_tarfile]) |
527 |
env.Alias('release_examples',[ examples_zipfile, examples_tarfile]) |
env.Alias('release_examples',[ examples_zipfile, examples_tarfile]) |
528 |
env.Alias('api_epydoc',api_epydoc) |
env.Alias('api_epydoc',api_epydoc) |
529 |
env.Alias('docs',[ 'release_examples', guide_pdf, guide_html_index, api_epydoc]) |
env.Alias('guide_pdf', guide_pdf) |
530 |
|
env.Alias('docs',[ 'release_examples', 'guide_pdf', guide_html_index, api_epydoc]) |
531 |
env.Alias('release', ['release_src', 'release_tests', 'docs']) |
env.Alias('release', ['release_src', 'release_tests', 'docs']) |
532 |
env.Alias('build_tests') # target to build all C++ tests |
env.Alias('build_tests') # target to build all C++ tests |
533 |
env.Alias('build_py_tests') # target to build all python tests |
env.Alias('build_py_tests') # target to build all python tests |
541 |
env.Alias(init_target) |
env.Alias(init_target) |
542 |
|
|
543 |
# Allow sconscripts to see the env |
# Allow sconscripts to see the env |
544 |
Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", |
Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", "amd_libs", "blas_libs", "netCDF_libs_cxx", |
545 |
"boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs", |
"boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs", |
546 |
"sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile", |
"sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile", |
547 |
"guide_pdf", "guide_html_index", "api_epydoc", "useMPI"]) |
"guide_pdf", "guide_html_index", "api_epydoc", "useMPI"]) |
548 |
|
|
563 |
env.SConscript(dirs = ['tools/CppUnitTest/src'], build_dir='build/$PLATFORM/tools/CppUnitTest', duplicate=0) |
env.SConscript(dirs = ['tools/CppUnitTest/src'], build_dir='build/$PLATFORM/tools/CppUnitTest', duplicate=0) |
564 |
# C/C++ Libraries |
# C/C++ Libraries |
565 |
env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0) |
env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0) |
566 |
env.SConscript(dirs = ['bruce/src'], build_dir='build/$PLATFORM/bruce', duplicate=0) |
# bruce is removed for now as it doesn't really do anything |
567 |
|
# env.SConscript(dirs = ['bruce/src'], build_dir='build/$PLATFORM/bruce', duplicate=0) |
568 |
env.SConscript(dirs = ['escript/src'], build_dir='build/$PLATFORM/escript', duplicate=0) |
env.SConscript(dirs = ['escript/src'], build_dir='build/$PLATFORM/escript', duplicate=0) |
569 |
env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0) |
env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0) |
570 |
env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0) |
env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0) |
571 |
env.SConscript(dirs = ['modellib/py_src'], build_dir='build/$PLATFORM/modellib', duplicate=0) |
env.SConscript(dirs = ['modellib/py_src'], build_dir='build/$PLATFORM/modellib', duplicate=0) |
572 |
env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0) |
env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0) |
573 |
env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0) |
env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0) |
574 |
|
env.SConscript(dirs = ['pycad/py_src'], build_dir='build/$PLATFORM/pycad', duplicate=0) |
575 |
|
|
576 |
# added by Ben Cumming |
# added by Ben Cumming |
577 |
env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0) |
env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0) |
578 |
#env.SConscript(dirs = ['../test'], build_dir='../test/build', duplicate=0) |
#env.SConscript(dirs = ['../test'], build_dir='../test/build', duplicate=0) |