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

Contents of /trunk/finley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4492 - (show annotations)
Tue Jul 2 01:44:11 2013 UTC (5 years, 9 months ago) by caltinay
File size: 4606 byte(s)
Finley changes that were held back while in release mode - moved more stuff
into finley namespace.

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2013 by University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Open Software License version 3.0
9 # http://www.opensource.org/licenses/osl-3.0.php
10 #
11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development since 2012 by School of Earth Sciences
13 #
14 ##############################################################################
15
16 import os
17 Import('*')
18
19 local_env = env.Clone()
20 py_wrapper_local_env = env.Clone()
21
22 # Remove the sharedlibrary prefix on all platform - we don't want 'lib'
23 # mucking with our python modules
24 del py_wrapper_local_env['SHLIBPREFIX']
25
26 sources = """
27 Assemble_AverageElementData.cpp
28 Assemble_CopyElementData.cpp
29 Assemble_CopyNodalData.cpp
30 Assemble_LumpedSystem.cpp
31 Assemble_NodeCoordinates.cpp
32 Assemble_PDE.cpp
33 Assemble_PDE_Points.cpp
34 Assemble_PDE_Single2_1D.cpp
35 Assemble_PDE_Single2_2D.cpp
36 Assemble_PDE_Single2_3D.cpp
37 Assemble_PDE_Single2_C.cpp
38 Assemble_PDE_System2_1D.cpp
39 Assemble_PDE_System2_2D.cpp
40 Assemble_PDE_System2_3D.cpp
41 Assemble_PDE_System2_C.cpp
42 Assemble_addToSystemMatrix.cpp
43 Assemble_getAssembleParameters.cpp
44 Assemble_getSize.cpp
45 Assemble_gradient.cpp
46 Assemble_integrate.cpp
47 Assemble_interpolate.cpp
48 Assemble_jacobians.cpp
49 Assemble_setNormal.cpp
50 ElementFile.cpp
51 ElementFile_jacobians.cpp
52 Finley.cpp
53 IndexList.cpp
54 Mesh.cpp
55 Mesh_createNodeFileMappings.cpp
56 Mesh_distributeByRankOfDOF.cpp
57 Mesh_findMatchingFaces.cpp
58 Mesh_getPattern.cpp
59 Mesh_glueFaces.cpp
60 Mesh_hex20.cpp
61 Mesh_hex8.cpp
62 Mesh_joinFaces.cpp
63 Mesh_markNodes.cpp
64 Mesh_merge.cpp
65 Mesh_optimizeDOFDistribution.cpp
66 Mesh_optimizeDOFLabeling.cpp
67 Mesh_prepare.cpp
68 Mesh_print.cpp
69 Mesh_read.cpp
70 Mesh_readGmsh.cpp
71 Mesh_rec4.cpp
72 Mesh_rec8.cpp
73 Mesh_relableElementNodes.cpp
74 Mesh_resolveNodeIds.cpp
75 Mesh_setCoordinates.cpp
76 Mesh_tagmaps.cpp
77 Mesh_addPoints.cpp
78 Mesh_write.cpp
79 NodeFile.cpp
80 Quadrature.cpp
81 ReferenceElements.cpp
82 ShapeFunctions.cpp
83 Util.cpp
84 ReferenceElementSets.cpp
85 CPPAdapter/FinleyAdapterException.cpp
86 CPPAdapter/FinleyError.cpp
87 CPPAdapter/MeshAdapter.cpp
88 CPPAdapter/MeshAdapterFactory.cpp
89 """.split()
90
91 headers = """
92 Assemble.h
93 ElementFile.h
94 Finley.h
95 FinleyVersion.h
96 IndexList.h
97 Mesh.h
98 NodeFile.h
99 NodeMapping.h
100 Quadrature.h
101 RectangularMesh.h
102 ReferenceElements.h
103 ShapeFunctions.h
104 Util.h
105 ReferenceElementSets.h
106 """.split()
107
108 cppadapter_headers = """
109 CPPAdapter/FinleyAdapterException.h
110 CPPAdapter/FinleyError.h
111 CPPAdapter/MeshAdapter.h
112 CPPAdapter/MeshAdapterFactory.h
113 CPPAdapter/system_dep.h
114 """.split()
115
116 local_env.Prepend(LIBS = ['pasowrap', 'escript', 'paso', 'esysUtils'])
117
118 if IS_WINDOWS:
119 local_env.Append(CPPDEFINES = ['FINLEY_EXPORTS'])
120
121 module_name = 'finley'
122
123 lib = local_env.SharedLibrary(module_name, sources)
124 env.Alias('build_finley_lib', lib)
125
126 include_path = Dir('finley', local_env['incinstall'])
127 cppadapter_include_path = Dir('CppAdapter', include_path)
128
129 hdr_inst1 = local_env.Install(include_path, headers)
130 hdr_inst2 = local_env.Install(cppadapter_include_path, cppadapter_headers)
131 env.Alias('install_finley_headers', [hdr_inst1, hdr_inst2])
132
133 lib_inst = local_env.Install(local_env['libinstall'], lib)
134 env.Alias('install_finley_lib', lib_inst)
135
136 ### Python wrapper ###
137 if not env['build_shared']:
138 py_wrapper_local_env.Prepend(LIBS = ['finley', 'pasowrap', 'escript', 'esysUtils'])
139 else:
140 py_wrapper_local_env.Prepend(LIBS = ['finley', 'pasowrap', 'escript', 'paso', 'esysUtils'])
141
142 py_wrapper_name = module_name + 'cpp'
143 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'CPPAdapter/finleycpp.cpp')
144 env.Alias('build_finleycpp_lib', py_wrapper_lib)
145
146 tmp_inst = os.path.join(local_env['pyinstall'], module_name)
147 if IS_WINDOWS:
148 wrapper_ext = '.pyd'
149 else:
150 wrapper_ext = '.so'
151
152 share_name = os.path.join(tmp_inst, py_wrapper_name+wrapper_ext)
153 mod_inst = py_wrapper_local_env.InstallAs(target=share_name,
154 source=py_wrapper_lib[0])
155 env.Alias('install_finleycpp_lib', mod_inst)
156
157 # configure python module
158 local_env.SConscript(dirs = ['#/finley/py_src'], variant_dir='py', duplicate=0)
159
160 # configure unit tests
161 local_env.SConscript(dirs = ['#/finley/test'], variant_dir='test', duplicate=0, exports=['py_wrapper_lib'])
162

  ViewVC Help
Powered by ViewVC 1.1.26