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

Annotation of /trunk/finley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3349 - (hide annotations)
Mon Nov 15 05:09:56 2010 UTC (8 years, 7 months ago) by caltinay
File size: 5014 byte(s)
escript now supports out-of-tree builds.
All build and test files are now created under a user-definable build_dir
directory.
This also fixes issue 291.
Removed most svn:ignore props since they are no longer required.

1 ksteube 1811
2     ########################################################
3 gross 707 #
4 jfenwick 2881 # Copyright (c) 2003-2010 by University of Queensland
5 ksteube 1811 # Earth Systems Science Computational Center (ESSCC)
6     # http://www.uq.edu.au/esscc
7 ksteube 1705 #
8 ksteube 1811 # 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 ksteube 1705 #
12 ksteube 1811 ########################################################
13 ksteube 1705
14 gross 700 import os
15 jgs 182 Import('*')
16    
17 jfenwick 3259 local_env = env.Clone()
18     py_wrapper_local_env = env.Clone()
19 ksteube 1705
20 jfenwick 3259 # Remove the sharedlibrary prefix on all platform - we don't want 'lib'
21     # mucking with our python modules
22 robwdcock 682 del py_wrapper_local_env['SHLIBPREFIX']
23 jgs 182
24 ksteube 1705 sources = """
25 jfenwick 3259 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_setCoordinates.c
86     Mesh_tagmaps.c
87     Mesh_write.c
88     NodeFile.c
89     NodeFile_allocTable.c
90     NodeFile_copyTable.c
91     NodeFile_createDenseLabelings.c
92     NodeFile_gather.c
93     NodeFile_scatter.c
94     NodeFile_setCoordinates.c
95     NodeFile_setIdRange.c
96     NodeFile_setTags.c
97     NodeMapping.c
98     Quadrature.c
99     ReferenceElements.c
100     ShapeFunctions.c
101     TagMap.c
102     Util.c
103     ReferenceElementSets.c
104     CPPAdapter/FinleyAdapterException.cpp
105     CPPAdapter/FinleyError.cpp
106     CPPAdapter/MeshAdapter.cpp
107     CPPAdapter/MeshAdapterFactory.cpp
108     CPPAdapter/SystemMatrixAdapter.cpp
109     CPPAdapter/TransportProblemAdapter.cpp
110 ksteube 1705 """.split()
111 jfenwick 3259
112 ksteube 1705 headers = """
113 jfenwick 3259 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     vtkCellType.h
129 ksteube 1705 """.split()
130 jfenwick 3259
131 ksteube 1705 cppadapter_headers = """
132 jfenwick 3259 CPPAdapter/FinleyAdapterException.h
133     CPPAdapter/FinleyError.h
134     CPPAdapter/MeshAdapter.h
135     CPPAdapter/MeshAdapterFactory.h
136     CPPAdapter/SystemMatrixAdapter.h
137     CPPAdapter/TransportProblemAdapter.h
138     CPPAdapter/system_dep.h
139 ksteube 1705 """.split()
140 jgs 277
141 jfenwick 3259 local_env.Append(LIBS = ['escript', 'esysUtils', 'paso'])
142     if IS_WINDOWS:
143     local_env.Append(CPPDEFINES = ['FINLEY_EXPORTS'])
144 phornby 2027
145 phornby 1847 module_name = 'finley'
146    
147     lib = local_env.SharedLibrary(module_name, sources)
148 jfenwick 3259 env.Alias('build_finley_lib', lib)
149 jgs 277
150 ksteube 1705 include_path = Dir('finley', local_env['incinstall'])
151     cppadapter_include_path = Dir('CppAdapter', include_path)
152 jgs 190
153 jfenwick 3259 hdr_inst1 = local_env.Install(include_path, headers)
154     hdr_inst2 = local_env.Install(cppadapter_include_path, cppadapter_headers)
155     env.Alias('install_finley_headers', [hdr_inst1, hdr_inst2])
156 jgs 481
157 jfenwick 3259 lib_inst = local_env.Install(local_env['libinstall'], lib)
158     env.Alias('install_finley_lib', lib_inst)
159 gross 806
160 jfenwick 3259 ### Python wrapper ###
161     py_wrapper_local_env.Append(LIBS = ['finley', 'escript', 'esysUtils', 'paso'])
162     py_wrapper_name = module_name + 'cpp'
163     py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'CPPAdapter/finleycpp.cpp')
164     env.Alias('build_finleycpp_lib', py_wrapper_lib)
165    
166     tmp_inst = os.path.join(local_env['pyinstall'], module_name)
167     if IS_WINDOWS:
168     wrapper_ext = '.pyd'
169 ksteube 1705 else:
170 jfenwick 3259 wrapper_ext = '.so'
171 phornby 1840
172 jfenwick 3259 share_name = os.path.join(tmp_inst, py_wrapper_name+wrapper_ext)
173     mod_inst = py_wrapper_local_env.InstallAs(target=share_name,
174     source=py_wrapper_lib[0])
175     env.Alias('install_finleycpp_lib', mod_inst)
176 phornby 1840
177 jfenwick 3259 # configure python module
178     local_env.SConscript(dirs = ['#/finley/py_src'], variant_dir='py', duplicate=0)
179 phornby 1840
180 jfenwick 3259 # configure unit tests
181 caltinay 3349 local_env.SConscript(dirs = ['#/finley/test'], variant_dir='$BUILD_DIR/$PLATFORM/finley/test', duplicate=0, exports=['py_wrapper_lib'])
182 trankine 1428

  ViewVC Help
Powered by ViewVC 1.1.26