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

Contents of /trunk/finley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6145 - (show annotations)
Wed Apr 6 06:28:57 2016 UTC (2 years, 2 months ago) by caltinay
File size: 3559 byte(s)
now refraining from adding all libraries to all targets. So we don't link
unnecessary libraries, e.g. escript does not need parmetis etc...

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2016 by The University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Apache License, version 2.0
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development 2012-2013 by School of Earth Sciences
13 # Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 #
15 ##############################################################################
16
17 Import('*')
18
19 module_name = 'finley'
20
21 sources = """
22 Assemble_AverageElementData.cpp
23 Assemble_CopyElementData.cpp
24 Assemble_CopyNodalData.cpp
25 Assemble_LumpedSystem.cpp
26 Assemble_NodeCoordinates.cpp
27 Assemble_PDE.cpp
28 Assemble_PDE_Points.cpp
29 Assemble_PDE_Single_1D.cpp
30 Assemble_PDE_Single_2D.cpp
31 Assemble_PDE_Single_3D.cpp
32 Assemble_PDE_Single_C.cpp
33 Assemble_PDE_System_1D.cpp
34 Assemble_PDE_System_2D.cpp
35 Assemble_PDE_System_3D.cpp
36 Assemble_PDE_System_C.cpp
37 Assemble_addToSystemMatrix.cpp
38 Assemble_getAssembleParameters.cpp
39 Assemble_getNormal.cpp
40 Assemble_getSize.cpp
41 Assemble_gradient.cpp
42 Assemble_integrate.cpp
43 Assemble_interpolate.cpp
44 Assemble_jacobians.cpp
45 ElementFile.cpp
46 ElementFile_jacobians.cpp
47 IndexList.cpp
48 Mesh.cpp
49 Mesh_addPoints.cpp
50 Mesh_createTrilinosGraph.cpp
51 Mesh_findMatchingFaces.cpp
52 Mesh_getPattern.cpp
53 Mesh_glueFaces.cpp
54 Mesh_hex20.cpp
55 Mesh_hex8.cpp
56 Mesh_joinFaces.cpp
57 Mesh_merge.cpp
58 Mesh_optimizeDOFDistribution.cpp
59 Mesh_read.cpp
60 Mesh_readGmsh.cpp
61 Mesh_rec4.cpp
62 Mesh_rec8.cpp
63 Mesh_write.cpp
64 NodeFile.cpp
65 Quadrature.cpp
66 ReferenceElements.cpp
67 ShapeFunctions.cpp
68 Util.cpp
69 CPPAdapter/MeshAdapter.cpp
70 CPPAdapter/MeshAdapterFactory.cpp
71 """.split()
72
73 headers = """
74 Assemble.h
75 ElementFile.h
76 Finley.h
77 FinleyException.h
78 FinleyVersion.h
79 IndexList.h
80 Mesh.h
81 NodeFile.h
82 NodeMapping.h
83 Quadrature.h
84 RectangularMesh.h
85 ReferenceElements.h
86 ShapeFunctions.h
87 Util.h
88 ReferenceElementSets.h
89 """.split()
90
91 cppadapter_headers = """
92 CPPAdapter/MeshAdapter.h
93 CPPAdapter/MeshAdapterFactory.h
94 CPPAdapter/system_dep.h
95 """.split()
96
97 local_env = env.Clone()
98
99 if IS_WINDOWS:
100 local_env.Append(CPPDEFINES = ['FINLEY_EXPORTS'])
101
102 # collect dependencies for other modules
103 finleylibs = env['escript_libs']
104 if env['parmetis']:
105 finleylibs += env['parmetis_libs']
106 if env['paso']:
107 finleylibs += env['paso_libs']
108 if env['trilinos']:
109 finleylibs += env['trilinoswrap_libs']
110
111 local_env.PrependUnique(LIBS = finleylibs)
112
113 env['finley_libs'] = [module_name] + finleylibs
114
115 include_path = Dir(module_name, local_env['incinstall'])
116 cppadapter_include_path = Dir('CppAdapter', include_path)
117 hdr_inst = local_env.Install(include_path, headers)
118 hdr_inst += local_env.Install(cppadapter_include_path, cppadapter_headers)
119
120 lib = local_env.SharedLibrary(module_name, sources)
121 lib_inst = local_env.Install(local_env['libinstall'], lib)
122
123 ### Python wrapper ###
124 py_env = env.Clone()
125 py_env.Prepend(LIBS = env['finley_libs'])
126 py_lib_name = module_name + 'cpp'
127 py_lib = py_env.PythonModule(py_lib_name, 'CPPAdapter/finleycpp.cpp')
128
129 mod_path = Dir(module_name, local_env['pyinstall'])
130 mod_inst = py_env.Install(mod_path, py_lib)
131
132 build = env.Alias('build_finley', [hdr_inst, lib, py_lib])
133 env.Alias('install_finley', [build, lib_inst, mod_inst])
134

  ViewVC Help
Powered by ViewVC 1.1.26