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

Contents of /trunk/speckley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6145 - (show annotations)
Wed Apr 6 06:28:57 2016 UTC (2 years, 6 months ago) by caltinay
File size: 2527 byte(s)
now refraining from adding all libraries to all targets. So we don't link
unnecessary libraries, e.g. escript does not need parmetis etc...

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2016 by The University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Apache License, version 2.0
9 # http://www.apache.org/licenses/LICENSE-2.0
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('*')
18
19 module_name = 'speckley'
20
21 sources = """
22 AbstractAssembler.cpp
23 Brick.cpp
24 BrickGradients.cpp
25 BrickIntegrals.cpp
26 BrickReductions.cpp
27 DefaultAssembler2D.cpp
28 DefaultAssembler3D.cpp
29 domainhelpers.cpp
30 Rectangle.cpp
31 RectangleGradients.cpp
32 RectangleIntegrals.cpp
33 RectangleReductions.cpp
34 SpeckleyDomain.cpp
35 WaveAssembler2D.cpp
36 WaveAssembler3D.cpp
37 """.split()
38
39 headers = """
40 AbstractAssembler.h
41 Brick.h
42 DefaultAssembler2D.h
43 DefaultAssembler3D.h
44 domainhelpers.h
45 lagrange_functions.h
46 Rectangle.h
47 Speckley.h
48 SpeckleyDomain.h
49 SpeckleyException.h
50 system_dep.h
51 WaveAssembler2D.h
52 WaveAssembler3D.h
53 """.split()
54
55 local_env = env.Clone()
56
57 if IS_WINDOWS:
58 local_env.Append(CPPDEFINES = ['Speckley_EXPORTS'])
59
60 # collect dependencies for other modules
61 speckleylibs = env['escript_libs']
62 if 'ripley' in env['domains']:
63 local_env.Append(CPPDEFINES = ['USE_RIPLEY'])
64 speckleylibs += env['ripley_libs']
65 sources += ['CrossDomainCoupler.cpp']
66 headers += ['CrossDomainCoupler.h']
67
68 if env['compressed_files']:
69 speckleylibs += env['compression_libs']
70 if env['silo']:
71 speckleylibs += env['silo_libs']
72
73 local_env.PrependUnique(LIBS = speckleylibs)
74
75 env['speckley_libs'] = [module_name] + speckleylibs
76
77 include_path = Dir(module_name, local_env['incinstall'])
78 hdr_inst = local_env.Install(include_path, headers)
79
80 lib = local_env.SharedLibrary(module_name, sources)
81 lib_inst = local_env.Install(local_env['libinstall'], lib)
82
83 ### Python wrapper ###
84 py_env = local_env.Clone()
85 py_env.Prepend(LIBS = [module_name])
86 py_lib_name = module_name + 'cpp'
87 py_lib = py_env.PythonModule(py_lib_name, 'speckleycpp.cpp')
88
89 mod_path = Dir(module_name, local_env['pyinstall'])
90 mod_inst = py_env.Install(mod_path, py_lib)
91
92 build = env.Alias('build_speckley', [hdr_inst, lib, py_lib])
93 env.Alias('install_speckley', [build, lib_inst, mod_inst])
94

  ViewVC Help
Powered by ViewVC 1.1.26