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

Contents of /trunk/finley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1845 - (show annotations)
Fri Oct 3 05:23:47 2008 UTC (11 years ago) by gross
File size: 4893 byte(s)
some naming problem for the installation of escriptcpp and finleycpp. Apparently this came is trough some mofifications in windows
1
2 ########################################################
3 #
4 # Copyright (c) 2003-2008 by University of Queensland
5 # Earth Systems Science Computational Center (ESSCC)
6 # http://www.uq.edu.au/esscc
7 #
8 # Primary Business: Queensland, Australia
9 # Licensed under the Open Software License version 3.0
10 # http://www.opensource.org/licenses/osl-3.0.php
11 #
12 ########################################################
13
14
15 import os
16 Import('*')
17
18 local_env = clone_env(env_mpi)
19 py_wrapper_local_env = clone_env(env_mpi)
20
21 # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules
22 del py_wrapper_local_env['SHLIBPREFIX']
23
24 sources = """
25 Assemble_AverageElementData.c
26 Assemble_CopyElementData.c
27 Assemble_CopyNodalData.c
28 Assemble_LumpedSystem.c
29 Assemble_NodeCoordinates.c
30 Assemble_PDE.c
31 Assemble_PDE_Single2_1D.c
32 Assemble_PDE_Single2_2D.c
33 Assemble_PDE_Single2_3D.c
34 Assemble_PDE_Single2_C.c
35 Assemble_PDE_System2_1D.c
36 Assemble_PDE_System2_2D.c
37 Assemble_PDE_System2_3D.c
38 Assemble_PDE_System2_C.c
39 Assemble_addToSystemMatrix.c
40 Assemble_getAssembleParameters.c
41 Assemble_getSize.c
42 Assemble_gradient.c
43 Assemble_integrate.c
44 Assemble_interpolate.c
45 Assemble_jacobeans.c
46 Assemble_setNormal.c
47 ElementFile.c
48 ElementFile_allocTable.c
49 ElementFile_copyTable.c
50 ElementFile_createColoring.c
51 ElementFile_distributeByRankOfDOF.c
52 ElementFile_gather.c
53 ElementFile_jacobeans.c
54 ElementFile_markNodes.c
55 ElementFile_optimizeOrdering.c
56 ElementFile_relableNodes.c
57 ElementFile_scatter.c
58 ElementFile_setCoordinates.c
59 ElementFile_setNodeRange.c
60 ElementFile_setTags.c
61 Finley.c
62 IndexList.c
63 Mesh.c
64 Mesh_createNodeFileMappings.c
65 Mesh_distributeByRankOfDOF.c
66 Mesh_findMatchingFaces.c
67 Mesh_getPattern.c
68 Mesh_glueFaces.c
69 Mesh_hex20.c
70 Mesh_hex8.c
71 Mesh_joinFaces.c
72 Mesh_markNodes.c
73 Mesh_merge.c
74 Mesh_optimizeDOFDistribution.c
75 Mesh_optimizeDOFLabeling.c
76 Mesh_prepare.c
77 Mesh_print.c
78 Mesh_read.c
79 Mesh_readGmsh.c
80 Mesh_rec4.c
81 Mesh_rec8.c
82 Mesh_relableElementNodes.c
83 Mesh_resolveNodeIds.c
84 Mesh_saveDX.c
85 Mesh_saveVTK.c
86 Mesh_setCoordinates.c
87 Mesh_tagmaps.c
88 Mesh_write.c
89 NodeFile.c
90 NodeFile_allocTable.c
91 NodeFile_copyTable.c
92 NodeFile_createDenseLabelings.c
93 NodeFile_gather.c
94 NodeFile_scatter.c
95 NodeFile_setCoordinates.c
96 NodeFile_setIdRange.c
97 NodeFile_setTags.c
98 NodeMapping.c
99 Quadrature.c
100 ReferenceElements.c
101 ShapeFunctions.c
102 TagMap.c
103 Util.c
104 CPPAdapter/FinleAdapterException.cpp
105 CPPAdapter/FinleyError.cpp
106 CPPAdapter/MeshAdapter.cpp
107 CPPAdapter/MeshAdapterFactory.cpp
108 CPPAdapter/SystemMatrixAdapter.cpp
109 CPPAdapter/TransportProblemAdapter.cpp
110 """.split()
111 headers = """
112 Assemble.h
113 ElementFile.h
114 Finley.h
115 FinleyVersion.h
116 IndexList.h
117 Mesh.h
118 NodeFile.h
119 NodeMapping.h
120 Quadrature.h
121 RectangularMesh.h
122 ReferenceElements.h
123 ShapeFunctions.h
124 TagMap.h
125 Util.h
126 vtkCellType.h
127 """.split()
128 cppadapter_headers = """
129 CPPAdapter/FinleyAdapterException.h
130 CPPAdapter/FinleyError.h
131 CPPAdapter/MeshAdapter.h
132 CPPAdapter/MeshAdapterFactory.h
133 CPPAdapter/SystemMatrixAdapter.h
134 CPPAdapter/TransportProblemAdapter.h
135 CPPAdapter/system_dep.h
136 """.split()
137
138 local_env.Append(LIBS = ['escript', 'esysUtils', 'paso'] + env['sys_libs'] )
139 py_wrapper_local_env.Append(LIBS = ['finley', 'escript', 'esysUtils', 'paso'] + env['sys_libs'] )
140
141 lib = local_env.SharedLibrary('finley', sources)
142 env.Alias('target_finley_so', lib)
143
144 py_wrapper_lib = py_wrapper_local_env.SharedLibrary('finleycpp', 'CPPAdapter/finleycpp.cpp')
145 env.Alias('target_finleycpp_so', py_wrapper_lib)
146
147 include_path = Dir('finley', local_env['incinstall'])
148 cppadapter_include_path = Dir('CppAdapter', include_path)
149
150 tmp1 = local_env.Install(include_path, headers )
151 tmp2 = local_env.Install(cppadapter_include_path, cppadapter_headers )
152 env.Alias('target_install_finley_headers', [tmp1, tmp2])
153
154 tmp3 = local_env.Install(local_env['libinstall'], lib)
155 env.Alias('target_install_finley_so', tmp3)
156
157 #windows specific mod
158 tmp_inst = os.path.join(local_env['pyinstall'],'finley')
159 if os.name == 'nt':
160 wrapper_postfix = '.pyd'
161 source_lib = py_wrapper_lib[0]
162 else:
163 wrapper_postfix = '.so'
164 source_lib = py_wrapper_lib
165
166 share_name = os.path.join(tmp_inst,'finleycpp'+wrapper_postfix)
167
168 tmp4 = py_wrapper_local_env.InstallAs(target=share_name, source=source_lib)
169
170 env.Alias('target_install_finleycpp_so', tmp4)
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