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

Contents of /trunk/ripley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4657 - (show annotations)
Thu Feb 6 06:12:20 2014 UTC (5 years, 7 months ago) by jfenwick
File size: 2899 byte(s)
I changed some files.
Updated copyright notices, added GeoComp.



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

  ViewVC Help
Powered by ViewVC 1.1.26