/[escript]/branches/scons-dev/finley/src/SConscript
ViewVC logotype

Contents of /branches/scons-dev/finley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1671 - (show annotations)
Thu Jul 24 04:33:41 2008 UTC (14 years ago) by ksteube
File size: 5214 byte(s)
Now detecting and using UMFPACK, MKL

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

  ViewVC Help
Powered by ViewVC 1.1.26