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

Contents of /trunk/ripley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3792 - (show annotations)
Wed Feb 1 06:16:25 2012 UTC (7 years, 6 months ago) by caltinay
File size: 2458 byte(s)
Merged ripley rectangular domain into trunk.

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

  ViewVC Help
Powered by ViewVC 1.1.26