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

Contents of /trunk/finley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3737 - (show annotations)
Tue Dec 13 00:04:39 2011 UTC (7 years, 10 months ago) by caltinay
File size: 5024 byte(s)
Reordered and removed superfluous libraries from link lines. Hope W32 likes
that.

1
2 ########################################################
3 #
4 # Copyright (c) 2003-2010 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 import os
15 Import('*')
16
17 local_env = env.Clone()
18 py_wrapper_local_env = env.Clone()
19
20 # Remove the sharedlibrary prefix on all platform - we don't want 'lib'
21 # 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_Points.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_setCoordinates.c
87 Mesh_tagmaps.c
88 Mesh_addPoints.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 ReferenceElementSets.c
106 CPPAdapter/FinleyAdapterException.cpp
107 CPPAdapter/FinleyError.cpp
108 CPPAdapter/MeshAdapter.cpp
109 CPPAdapter/MeshAdapterFactory.cpp
110 """.split()
111
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 ReferenceElementSets.h
128 """.split()
129
130 cppadapter_headers = """
131 CPPAdapter/FinleyAdapterException.h
132 CPPAdapter/FinleyError.h
133 CPPAdapter/MeshAdapter.h
134 CPPAdapter/MeshAdapterFactory.h
135 CPPAdapter/system_dep.h
136 """.split()
137
138 local_env.Prepend(LIBS = ['pasowrap', 'escript', 'paso', 'esysUtils'])
139
140 if IS_WINDOWS:
141 local_env.Append(CPPDEFINES = ['FINLEY_EXPORTS'])
142
143 module_name = 'finley'
144
145 lib = local_env.SharedLibrary(module_name, sources)
146 env.Alias('build_finley_lib', lib)
147
148 include_path = Dir('finley', local_env['incinstall'])
149 cppadapter_include_path = Dir('CppAdapter', include_path)
150
151 hdr_inst1 = local_env.Install(include_path, headers)
152 hdr_inst2 = local_env.Install(cppadapter_include_path, cppadapter_headers)
153 env.Alias('install_finley_headers', [hdr_inst1, hdr_inst2])
154
155 lib_inst = local_env.Install(local_env['libinstall'], lib)
156 env.Alias('install_finley_lib', lib_inst)
157
158 ### Python wrapper ###
159 if not env['build_shared']:
160 py_wrapper_local_env.Prepend(LIBS = ['finley', 'pasowrap', 'escript'])
161 else:
162 py_wrapper_local_env.Prepend(LIBS = ['finley', 'pasowrap', 'escript', 'paso', 'esysUtils'])
163
164 py_wrapper_name = module_name + 'cpp'
165 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'CPPAdapter/finleycpp.cpp')
166 env.Alias('build_finleycpp_lib', py_wrapper_lib)
167
168 tmp_inst = os.path.join(local_env['pyinstall'], module_name)
169 if IS_WINDOWS:
170 wrapper_ext = '.pyd'
171 else:
172 wrapper_ext = '.so'
173
174 share_name = os.path.join(tmp_inst, py_wrapper_name+wrapper_ext)
175 mod_inst = py_wrapper_local_env.InstallAs(target=share_name,
176 source=py_wrapper_lib[0])
177 env.Alias('install_finleycpp_lib', mod_inst)
178
179 # configure python module
180 local_env.SConscript(dirs = ['#/finley/py_src'], variant_dir='py', duplicate=0)
181
182 # configure unit tests
183 local_env.SConscript(dirs = ['#/finley/test'], variant_dir='$BUILD_DIR/$PLATFORM/finley/test', duplicate=0, exports=['py_wrapper_lib'])
184

  ViewVC Help
Powered by ViewVC 1.1.26