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

Annotation of /branches/domexper/dudley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26