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

Annotation of /trunk/finley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2484 - (hide annotations)
Mon Jun 22 04:22:19 2009 UTC (9 years, 10 months ago) by gross
File size: 5032 byte(s)
numarray removed from docu; Locator revised.
1 ksteube 1811
2 phornby 1847
3 ksteube 1811 ########################################################
4 gross 707 #
5 ksteube 1811 # Copyright (c) 2003-2008 by University of Queensland
6     # 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    
22 robwdcock 682 # 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 jgs 182
25 ksteube 1705 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_1D.c
33     Assemble_PDE_Single2_2D.c
34     Assemble_PDE_Single2_3D.c
35     Assemble_PDE_Single2_C.c
36     Assemble_PDE_System2_1D.c
37     Assemble_PDE_System2_2D.c
38     Assemble_PDE_System2_3D.c
39     Assemble_PDE_System2_C.c
40     Assemble_addToSystemMatrix.c
41     Assemble_getAssembleParameters.c
42     Assemble_getSize.c
43     Assemble_gradient.c
44     Assemble_integrate.c
45     Assemble_interpolate.c
46     Assemble_jacobeans.c
47     Assemble_setNormal.c
48     ElementFile.c
49     ElementFile_allocTable.c
50     ElementFile_copyTable.c
51     ElementFile_createColoring.c
52     ElementFile_distributeByRankOfDOF.c
53     ElementFile_gather.c
54     ElementFile_jacobeans.c
55     ElementFile_markNodes.c
56     ElementFile_optimizeOrdering.c
57     ElementFile_relableNodes.c
58     ElementFile_scatter.c
59     ElementFile_setCoordinates.c
60     ElementFile_setNodeRange.c
61     ElementFile_setTags.c
62     Finley.c
63     IndexList.c
64     Mesh.c
65     Mesh_createNodeFileMappings.c
66     Mesh_distributeByRankOfDOF.c
67     Mesh_findMatchingFaces.c
68     Mesh_getPattern.c
69     Mesh_glueFaces.c
70     Mesh_hex20.c
71     Mesh_hex8.c
72     Mesh_joinFaces.c
73     Mesh_markNodes.c
74     Mesh_merge.c
75     Mesh_optimizeDOFDistribution.c
76     Mesh_optimizeDOFLabeling.c
77     Mesh_prepare.c
78     Mesh_print.c
79     Mesh_read.c
80     Mesh_readGmsh.c
81     Mesh_rec4.c
82     Mesh_rec8.c
83     Mesh_relableElementNodes.c
84     Mesh_resolveNodeIds.c
85     Mesh_saveDX.c
86     Mesh_saveVTK.c
87     Mesh_setCoordinates.c
88     Mesh_tagmaps.c
89     Mesh_write.c
90     NodeFile.c
91     NodeFile_allocTable.c
92     NodeFile_copyTable.c
93     NodeFile_createDenseLabelings.c
94     NodeFile_gather.c
95     NodeFile_scatter.c
96     NodeFile_setCoordinates.c
97     NodeFile_setIdRange.c
98     NodeFile_setTags.c
99     NodeMapping.c
100     Quadrature.c
101     ReferenceElements.c
102     ShapeFunctions.c
103     TagMap.c
104     Util.c
105 gross 2484 CPPAdapter/FinleyAdapterException.cpp
106 ksteube 1705 CPPAdapter/FinleyError.cpp
107     CPPAdapter/MeshAdapter.cpp
108     CPPAdapter/MeshAdapterFactory.cpp
109     CPPAdapter/SystemMatrixAdapter.cpp
110     CPPAdapter/TransportProblemAdapter.cpp
111     """.split()
112     headers = """
113     Assemble.h
114     ElementFile.h
115     Finley.h
116     FinleyVersion.h
117     IndexList.h
118     Mesh.h
119     NodeFile.h
120     NodeMapping.h
121     Quadrature.h
122     RectangularMesh.h
123     ReferenceElements.h
124     ShapeFunctions.h
125     TagMap.h
126     Util.h
127     vtkCellType.h
128     """.split()
129     cppadapter_headers = """
130     CPPAdapter/FinleyAdapterException.h
131     CPPAdapter/FinleyError.h
132     CPPAdapter/MeshAdapter.h
133     CPPAdapter/MeshAdapterFactory.h
134     CPPAdapter/SystemMatrixAdapter.h
135     CPPAdapter/TransportProblemAdapter.h
136     CPPAdapter/system_dep.h
137     """.split()
138 jgs 277
139 ksteube 1705 local_env.Append(LIBS = ['escript', 'esysUtils', 'paso'] + env['sys_libs'] )
140 phornby 2027
141     if IS_WINDOWS_PLATFORM :
142 phornby 2041 local_env.Append(CPPDEFINES = ['FINLEY_EXPORTS'])
143 phornby 2027
144 ksteube 1705 py_wrapper_local_env.Append(LIBS = ['finley', 'escript', 'esysUtils', 'paso'] + env['sys_libs'] )
145 jgs 182
146 phornby 1847 module_name = 'finley'
147     py_wrapper_name = module_name + 'cpp'
148    
149     lib = local_env.SharedLibrary(module_name, sources)
150 ksteube 1705 env.Alias('target_finley_so', lib)
151 jgs 277
152 phornby 1847 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'CPPAdapter/finleycpp.cpp')
153 ksteube 1705 env.Alias('target_finleycpp_so', py_wrapper_lib)
154 jgs 277
155 ksteube 1705 include_path = Dir('finley', local_env['incinstall'])
156     cppadapter_include_path = Dir('CppAdapter', include_path)
157 jgs 190
158 ksteube 1705 tmp1 = local_env.Install(include_path, headers )
159     tmp2 = local_env.Install(cppadapter_include_path, cppadapter_headers )
160     env.Alias('target_install_finley_headers', [tmp1, tmp2])
161 jgs 481
162 ksteube 1705 tmp3 = local_env.Install(local_env['libinstall'], lib)
163     env.Alias('target_install_finley_so', tmp3)
164 gross 806
165 trankine 1428 #windows specific mod
166 phornby 1847 tmp_inst = os.path.join(local_env['pyinstall'],module_name)
167 trankine 1428 if os.name == 'nt':
168 phornby 1840 wrapper_postfix = '.pyd'
169 ksteube 1705 else:
170 phornby 1840 wrapper_postfix = '.so'
171    
172 phornby 1847 share_name = os.path.join(tmp_inst,py_wrapper_name+wrapper_postfix)
173 phornby 1840
174 phornby 1847 tmp4 = py_wrapper_local_env.InstallAs(target=share_name,
175     source=py_wrapper_lib[0])
176 phornby 1840
177 ksteube 1705 env.Alias('target_install_finleycpp_so', tmp4)
178 trankine 1428
179 robwdcock 682 # export the lib target since tests will depend on it
180     # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
181     # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
182 ksteube 1705 dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
183 robwdcock 682 Export('dep_lib')
184 jgs 277
185 robwdcock 682 # Call the python sconscript
186     env.SConscript(dirs = ['#/finley/py_src'], build_dir='py', duplicate=0)
187 jgs 277
188 robwdcock 682 # Call the unit tests SConscript
189     local_env.SConscript(dirs = ['#/finley/test'], build_dir='#/build/$PLATFORM/finley/test', duplicate=0)
190 jgs 481

  ViewVC Help
Powered by ViewVC 1.1.26