/[escript]/trunk/ripley/src/SConscript
ViewVC logotype

Annotation of /trunk/ripley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4622 - (hide annotations)
Fri Jan 17 04:55:41 2014 UTC (5 years, 4 months ago) by sshaw
File size: 2749 byte(s)
Added dirac support to ripley, added interface for custom assemblers for ripleydomains (also added the custom assembler for 2D VTI waves), changed synthetic_VTI example to use the new, faster custom assembler

1 caltinay 3670
2 jfenwick 3982 ##############################################################################
3 caltinay 3670 #
4 jfenwick 4154 # Copyright (c) 2003-2013 by University of Queensland
5 jfenwick 3982 # http://www.uq.edu.au
6 caltinay 3670 #
7     # Primary Business: Queensland, Australia
8     # Licensed under the Open Software License version 3.0
9     # http://www.opensource.org/licenses/osl-3.0.php
10     #
11 jfenwick 3982 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12     # Development since 2012 by School of Earth Sciences
13     #
14     ##############################################################################
15 caltinay 3670
16     import os
17     Import('*')
18    
19     local_env = env.Clone()
20     py_wrapper_local_env = env.Clone()
21     local_unroll_env = env.Clone()
22    
23    
24 caltinay 3791 # Remove the shared library prefix on all platforms - we don't want 'lib'
25     # mucking with our python modules
26 caltinay 3670 del py_wrapper_local_env['SHLIBPREFIX']
27    
28     sources = """
29 caltinay 3691 Brick.cpp
30     Rectangle.cpp
31 caltinay 3791 RipleyDomain.cpp
32 caltinay 3670 RipleyException.cpp
33 sshaw 4622 DefaultAssembler2D.cpp
34     DefaultAssembler3D.cpp
35     AbstractAssembler.cpp
36     WaveAssembler2D.cpp
37 caltinay 3670 """.split()
38    
39     headers = """
40 caltinay 3691 Brick.h
41     Rectangle.h
42 caltinay 3670 Ripley.h
43 caltinay 3791 RipleyDomain.h
44 caltinay 3670 RipleyException.h
45     system_dep.h
46 sshaw 4622 DefaultAssembler2D.h
47     DefaultAssembler3D.h
48     AbstractAssembler.h
49     WaveAssembler2D.h
50 caltinay 3670 """.split()
51    
52 caltinay 3740 local_env.Prepend(LIBS = ['pasowrap', 'escript', 'paso', 'esysUtils'])
53 caltinay 3691 if local_env['silo']:
54     local_env.Append(CPPDEFINES = ['USE_SILO'])
55     local_env.AppendUnique(LIBS = env['silo_libs'])
56 caltinay 3670
57     if IS_WINDOWS:
58     local_env.Append(CPPDEFINES = ['RIPLEY_EXPORTS'])
59    
60     module_name = 'ripley'
61    
62 caltinay 3791 lib = local_env.SharedLibrary(module_name, sources)
63 caltinay 3670 env.Alias('build_ripley_lib', lib)
64    
65     include_path = Dir('ripley', local_env['incinstall'])
66    
67     hdr_inst = local_env.Install(include_path, headers)
68     env.Alias('install_ripley_headers', hdr_inst)
69    
70     lib_inst = local_env.Install(local_env['libinstall'], lib)
71     env.Alias('install_ripley_lib', lib_inst)
72    
73     ### Python wrapper ###
74 caltinay 3740 py_wrapper_local_env.Prepend(LIBS = ['ripley', 'pasowrap', 'escript', 'paso', 'esysUtils'])
75 caltinay 3670 py_wrapper_name = module_name + 'cpp'
76     py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'ripleycpp.cpp')
77     env.Alias('build_ripleycpp_lib', py_wrapper_lib)
78    
79     tmp_inst = os.path.join(local_env['pyinstall'], module_name)
80     if IS_WINDOWS:
81     wrapper_ext = '.pyd'
82     else:
83     wrapper_ext = '.so'
84    
85     share_name = os.path.join(tmp_inst, py_wrapper_name+wrapper_ext)
86     mod_inst = py_wrapper_local_env.InstallAs(target=share_name,
87     source=py_wrapper_lib[0])
88     env.Alias('install_ripleycpp_lib', mod_inst)
89    
90     # configure python module
91     local_env.SConscript(dirs = ['#/ripley/py_src'], variant_dir='py', duplicate=0)
92    
93     # configure unit tests
94 caltinay 4035 local_env.SConscript(dirs = ['#/ripley/test'], variant_dir='test', duplicate=0, exports=['py_wrapper_lib'])
95 caltinay 3670

  ViewVC Help
Powered by ViewVC 1.1.26