/[escript]/branches/domexper/dudley/src/SConscript
ViewVC logotype

Contents of /branches/domexper/dudley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3156 - (show annotations)
Mon Sep 6 00:50:17 2010 UTC (9 years, 5 months ago) by jfenwick
File size: 4958 byte(s)
Removing 1D code
1
2
3 ########################################################
4 #
5 # Copyright (c) 2003-2010 by University of Queensland
6 # Earth Systems Science Computational Center (ESSCC)
7 # http://www.uq.edu.au/esscc
8 #
9 # Primary Business: Queensland, Australia
10 # Licensed under the Open Software License version 3.0
11 # http://www.opensource.org/licenses/osl-3.0.php
12 #
13 ########################################################
14
15
16 import os
17 Import('*')
18
19 local_env = clone_env(env_mpi)
20 py_wrapper_local_env = clone_env(env_mpi)
21
22 # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules
23 del py_wrapper_local_env['SHLIBPREFIX']
24
25 sources = """
26 Assemble_AverageElementData.c
27 Assemble_CopyElementData.c
28 Assemble_CopyNodalData.c
29 Assemble_LumpedSystem.c
30 Assemble_NodeCoordinates.c
31 Assemble_PDE.c
32 Assemble_PDE_Single2_2D.c
33 Assemble_PDE_Single2_3D.c
34 Assemble_PDE_System2_2D.c
35 Assemble_PDE_System2_3D.c
36 Assemble_addToSystemMatrix.c
37 Assemble_getAssembleParameters.c
38 Assemble_getSize.c
39 Assemble_gradient.c
40 Assemble_integrate.c
41 Assemble_interpolate.c
42 Assemble_jacobeans.c
43 Assemble_setNormal.c
44 ElementFile.c
45 ElementFile_allocTable.c
46 ElementFile_copyTable.c
47 ElementFile_createColoring.c
48 ElementFile_distributeByRankOfDOF.c
49 ElementFile_gather.c
50 ElementFile_jacobeans.c
51 ElementFile_markNodes.c
52 ElementFile_optimizeOrdering.c
53 ElementFile_relableNodes.c
54 ElementFile_scatter.c
55 ElementFile_setCoordinates.c
56 ElementFile_setNodeRange.c
57 ElementFile_setTags.c
58 Dudley.c
59 IndexList.c
60 Mesh.c
61 Mesh_createNodeFileMappings.c
62 Mesh_distributeByRankOfDOF.c
63 Mesh_findMatchingFaces.c
64 Mesh_getPattern.c
65 Mesh_glueFaces.c
66 Mesh_joinFaces.c
67 Mesh_markNodes.c
68 Mesh_merge.c
69 Mesh_optimizeDOFDistribution.c
70 Mesh_optimizeDOFLabeling.c
71 Mesh_prepare.c
72 Mesh_print.c
73 Mesh_read.c
74 Mesh_readGmsh.c
75 Mesh_relableElementNodes.c
76 Mesh_resolveNodeIds.c
77 Mesh_saveDX.c
78 Mesh_saveVTK.c
79 Mesh_setCoordinates.c
80 Mesh_tagmaps.c
81 Mesh_tet4.c
82 Mesh_tri3.c
83 Mesh_write.c
84 NodeFile.c
85 NodeFile_allocTable.c
86 NodeFile_copyTable.c
87 NodeFile_createDenseLabelings.c
88 NodeFile_gather.c
89 NodeFile_scatter.c
90 NodeFile_setCoordinates.c
91 NodeFile_setIdRange.c
92 NodeFile_setTags.c
93 NodeMapping.c
94 Quadrature.c
95 ReferenceElements.c
96 ShapeFunctions.c
97 TagMap.c
98 Util.c
99 ReferenceElementSets.c
100 CPPAdapter/DudleyAdapterException.cpp
101 CPPAdapter/DudleyError.cpp
102 CPPAdapter/MeshAdapter.cpp
103 CPPAdapter/MeshAdapterFactory.cpp
104 CPPAdapter/SystemMatrixAdapter.cpp
105 CPPAdapter/TransportProblemAdapter.cpp
106 """.split()
107 headers = """
108 Assemble.h
109 ElementFile.h
110 Dudley.h
111 DudleyVersion.h
112 IndexList.h
113 Mesh.h
114 NodeFile.h
115 NodeMapping.h
116 Quadrature.h
117 TriangularMesh.h
118 ReferenceElements.h
119 ShapeFunctions.h
120 TagMap.h
121 Util.h
122 ReferenceElementSets.h
123 vtkCellType.h
124 """.split()
125 cppadapter_headers = """
126 CPPAdapter/DudleyAdapterException.h
127 CPPAdapter/DudleyError.h
128 CPPAdapter/MeshAdapter.h
129 CPPAdapter/MeshAdapterFactory.h
130 CPPAdapter/SystemMatrixAdapter.h
131 CPPAdapter/TransportProblemAdapter.h
132 CPPAdapter/system_dep.h
133 """.split()
134
135 local_env.Append(LIBS = ['escript', 'esysUtils', 'paso'] + env['sys_libs'] )
136
137 if IS_WINDOWS_PLATFORM :
138 local_env.Append(CPPDEFINES = ['DUDLEY_EXPORTS'])
139
140 py_wrapper_local_env.Append(LIBS = ['dudley', 'escript', 'esysUtils', 'paso'] + env['sys_libs'] )
141
142 module_name = 'dudley'
143 py_wrapper_name = module_name + 'cpp'
144
145 lib = local_env.SharedLibrary(module_name, sources)
146 env.Alias('target_dudley_so', lib)
147
148 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'CPPAdapter/dudleycpp.cpp')
149 env.Alias('target_dudleycpp_so', py_wrapper_lib)
150
151 include_path = Dir('dudley', local_env['incinstall'])
152 cppadapter_include_path = Dir('CppAdapter', include_path)
153
154 tmp1 = local_env.Install(include_path, headers )
155 tmp2 = local_env.Install(cppadapter_include_path, cppadapter_headers )
156 env.Alias('target_install_dudley_headers', [tmp1, tmp2])
157
158 tmp3 = local_env.Install(local_env['libinstall'], lib)
159 env.Alias('target_install_dudley_so', tmp3)
160
161 #windows specific mod
162 tmp_inst = os.path.join(local_env['pyinstall'],module_name)
163 if os.name == 'nt':
164 wrapper_postfix = '.pyd'
165 else:
166 wrapper_postfix = '.so'
167
168 share_name = os.path.join(tmp_inst,py_wrapper_name+wrapper_postfix)
169
170 tmp4 = py_wrapper_local_env.InstallAs(target=share_name,
171 source=py_wrapper_lib[0])
172
173 env.Alias('target_install_dudleycpp_so', tmp4)
174
175 # export the lib target since tests will depend on it
176 # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
177 # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
178 dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
179 Export('dep_lib')
180
181 # Call the python sconscript
182 CallSConscript(env,dirs = ['#/dudley/py_src'], variant_dir='py', duplicate=0)
183
184 # Call the unit tests SConscript
185 CallSConscript(local_env,dirs = ['#/dudley/test'], variant_dir='#/build/$PLATFORM/dudley/test', duplicate=0)
186

  ViewVC Help
Powered by ViewVC 1.1.26