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

Contents of /trunk/escriptcore/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6168 - (show annotations)
Wed Apr 13 03:08:12 2016 UTC (2 years, 4 months ago) by jfenwick
File size: 3885 byte(s)
Making Lazy and the rest of escript use the same operator enumeration


1 ##############################################################################
2 #
3 # Copyright (c) 2003-2016 by The University of Queensland
4 # http://www.uq.edu.au
5 #
6 # Primary Business: Queensland, Australia
7 # Licensed under the Apache License, version 2.0
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
11 # Development 2012-2013 by School of Earth Sciences
12 # Development from 2014 by Centre for Geoscience Computing (GeoComp)
13 #
14 ##############################################################################
15
16 Import('*')
17
18 module_name = 'escript'
19
20 sources = """
21 AbstractContinuousDomain.cpp
22 AbstractDomain.cpp
23 AbstractReducer.cpp
24 AbstractSystemMatrix.cpp
25 AbstractTransportProblem.cpp
26 ArrayOps.cpp
27 BinaryDataReadyOps.cpp
28 Data.cpp
29 DataAbstract.cpp
30 DataConstant.cpp
31 DataEmpty.cpp
32 DataExpanded.cpp
33 DataFactory.cpp
34 DataLazy.cpp
35 DataReady.cpp
36 DataTagged.cpp
37 DataTypes.cpp
38 DataVector.cpp
39 DataVectorAlt.cpp
40 DataVectorOps.cpp
41 DataVectorTaipan.cpp
42 EscriptParams.cpp
43 EsysMPI.cpp
44 ES_optype.cpp
45 ExceptionTranslators.cpp
46 FunctionSpace.cpp
47 FunctionSpaceFactory.cpp
48 LapackInverseHelper.cpp
49 MPIDataReducer.cpp
50 MPIScalarReducer.cpp
51 NonReducedVariable.cpp
52 NullDomain.cpp
53 pyerr.cpp
54 Random.cpp
55 SolverOptions.cpp
56 SplitWorld.cpp
57 SubWorld.cpp
58 Taipan.cpp
59 TestDomain.cpp
60 Utils.cpp
61 WrappedArray.cpp
62 """.split()
63
64 headers = """
65 AbstractContinuousDomain.h
66 AbstractDomain.h
67 AbstractReducer.h
68 AbstractSystemMatrix.h
69 AbstractTransportProblem.h
70 ArrayOps.h
71 Assert.h
72 BinaryDataReadyOps.h
73 Data.h
74 DataAbstract.h
75 DataConstant.h
76 DataEmpty.h
77 DataException.h
78 DataExpanded.h
79 DataFactory.h
80 DataLazy.h
81 DataReady.h
82 DataTagged.h
83 DataTypes.h
84 DataVector.h
85 DataVectorAlt.h
86 DataVectorOps.h
87 DataVectorTaipan.h
88 Dodgy.h
89 DomainException.h
90 EscriptParams.h
91 EsysException.h
92 EsysMPI.h
93 ES_optype.h
94 ExceptionTranslators.h
95 FileWriter.h
96 FunctionSpace.h
97 FunctionSpaceException.h
98 FunctionSpaceFactory.h
99 IndexList.h
100 LapackInverseHelper.h
101 NonReducedVariable.h
102 NullDomain.h
103 MPIDataReducer.h
104 MPIScalarReducer.h
105 Pointers.h
106 Random.h
107 SolverOptions.h
108 SplitWorld.h
109 SplitWorldException.h
110 SubWorld.h
111 SystemMatrixException.h
112 Taipan.h
113 TestDomain.h
114 TransportProblemException.h
115 Utils.h
116 WrappedArray.h
117 index.h
118 pyerr.h
119 system_dep.h
120 """.split()
121
122 dodgy_sources = """
123 Dodgy.cpp
124 """.split()
125
126 local_env = env.Clone()
127
128 # collect dependencies for other modules
129 escriptlibs = []
130
131 if env['uselapack']:
132 escriptlibs += env['lapack_libs']
133 if env['mkl']:
134 escriptlibs += env['mkl_libs']
135 if env['netcdf']:
136 escriptlibs += env['netcdf_libs']
137
138 local_env.PrependUnique(LIBS = escriptlibs)
139 env['escript_libs'] = [module_name] + escriptlibs
140
141 if IS_WINDOWS:
142 local_env.Append(CPPDEFINES = ['ESCRIPT_EXPORTS'])
143
144 # specify to build shared object
145 if local_env['iknowwhatimdoing']:
146 nonped = [local_env.SharedObject(x) for x in dodgy_sources]
147 else:
148 nonped = []
149
150 include_path = Dir(module_name, local_env['incinstall'])
151 hdr_inst = local_env.Install(include_path, headers)
152
153 lib = local_env.SharedLibrary(module_name, sources+nonped)
154 lib_inst = local_env.Install(local_env['libinstall'], lib)
155
156 ### Python wrapper ###
157 py_env = env.Clone()
158 py_env.Prepend(LIBS = [module_name])
159 py_lib_name = module_name + 'cpp'
160 py_lib = py_env.PythonModule(py_lib_name, 'escriptcpp.cpp')
161
162 mod_path = Dir('escriptcore', local_env['pyinstall'])
163 mod_inst = py_env.Install(mod_path, py_lib)
164
165 build = env.Alias('build_escript', [hdr_inst, lib, py_lib])
166 env.Alias('install_escript', [build, lib_inst, mod_inst])
167

  ViewVC Help
Powered by ViewVC 1.1.26