/[escript]/branches/symbolic_from_3470/dudley/src/SConscript
ViewVC logotype

Annotation of /branches/symbolic_from_3470/dudley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3789 - (hide annotations)
Tue Jan 31 04:55:05 2012 UTC (7 years, 3 months ago) by caltinay
File size: 4627 byte(s)
Fast forward to latest trunk revision 3788.

1 ksteube 1811
2 phornby 1847
3 ksteube 1811 ########################################################
4 gross 707 #
5 jfenwick 2881 # Copyright (c) 2003-2010 by University of Queensland
6 ksteube 1811 # Earth Systems Science Computational Center (ESSCC)
7     # http://www.uq.edu.au/esscc
8 ksteube 1705 #
9 ksteube 1811 # Primary Business: Queensland, Australia
10     # Licensed under the Open Software License version 3.0
11     # http://www.opensource.org/licenses/osl-3.0.php
12 ksteube 1705 #
13 ksteube 1811 ########################################################
14 ksteube 1705
15 ksteube 1811
16 gross 700 import os
17 jgs 182 Import('*')
18    
19 caltinay 3253 local_env = env.Clone()
20     py_wrapper_local_env = env.Clone()
21     local_unroll_env = env.Clone()
22     local_unroll_env.Append(CFLAGS = env['dudley_assemble_flags'])
23 ksteube 1705
24 jfenwick 3189
25 robwdcock 682 # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules
26     del py_wrapper_local_env['SHLIBPREFIX']
27 jgs 182
28 ksteube 1705 sources = """
29     Assemble_AverageElementData.c
30     Assemble_CopyElementData.c
31     Assemble_CopyNodalData.c
32     Assemble_LumpedSystem.c
33     Assemble_NodeCoordinates.c
34     Assemble_PDE.c
35 caltinay 3609 Assemble_PDE_Points.c
36 ksteube 1705 Assemble_PDE_Single2_2D.c
37     Assemble_PDE_Single2_3D.c
38     Assemble_PDE_System2_2D.c
39     Assemble_PDE_System2_3D.c
40     Assemble_addToSystemMatrix.c
41     Assemble_getAssembleParameters.c
42     Assemble_getSize.c
43     Assemble_integrate.c
44     Assemble_interpolate.c
45     Assemble_setNormal.c
46     ElementFile.c
47     ElementFile_allocTable.c
48     ElementFile_copyTable.c
49     ElementFile_createColoring.c
50     ElementFile_distributeByRankOfDOF.c
51     ElementFile_gather.c
52     ElementFile_jacobeans.c
53     ElementFile_markNodes.c
54     ElementFile_optimizeOrdering.c
55     ElementFile_relableNodes.c
56     ElementFile_scatter.c
57     ElementFile_setCoordinates.c
58     ElementFile_setNodeRange.c
59     ElementFile_setTags.c
60 jfenwick 3220 ElementType.c
61 jfenwick 3082 Dudley.c
62 ksteube 1705 IndexList.c
63     Mesh.c
64     Mesh_createNodeFileMappings.c
65     Mesh_distributeByRankOfDOF.c
66     Mesh_findMatchingFaces.c
67     Mesh_getPattern.c
68     Mesh_markNodes.c
69     Mesh_optimizeDOFDistribution.c
70     Mesh_optimizeDOFLabeling.c
71     Mesh_prepare.c
72     Mesh_print.c
73     Mesh_read.c
74     Mesh_readGmsh.c
75     Mesh_relableElementNodes.c
76     Mesh_resolveNodeIds.c
77     Mesh_saveDX.c
78     Mesh_setCoordinates.c
79     Mesh_tagmaps.c
80 jfenwick 3114 Mesh_tet4.c
81     Mesh_tri3.c
82 ksteube 1705 Mesh_write.c
83     NodeFile.c
84     NodeFile_allocTable.c
85     NodeFile_copyTable.c
86     NodeFile_createDenseLabelings.c
87     NodeFile_gather.c
88     NodeFile_scatter.c
89     NodeFile_setCoordinates.c
90     NodeFile_setIdRange.c
91     NodeFile_setTags.c
92     NodeMapping.c
93 jfenwick 3196 ShapeTable.c
94 ksteube 1705 TagMap.c
95     Util.c
96 jfenwick 3086 CPPAdapter/DudleyAdapterException.cpp
97     CPPAdapter/DudleyError.cpp
98 ksteube 1705 CPPAdapter/MeshAdapter.cpp
99     CPPAdapter/MeshAdapterFactory.cpp
100     """.split()
101 jfenwick 3189 unroll_sources= """
102     Assemble_gradient.c
103     Assemble_jacobeans.c
104     """.split()
105    
106    
107 ksteube 1705 headers = """
108     Assemble.h
109 jfenwick 3082 Dudley.h
110     DudleyVersion.h
111 jfenwick 3220 ElementFile.h
112     ElementType.h
113 ksteube 1705 IndexList.h
114     Mesh.h
115     NodeFile.h
116     NodeMapping.h
117 jfenwick 3114 TriangularMesh.h
118 jfenwick 3184 ShapeTable.h
119 ksteube 1705 TagMap.h
120     Util.h
121     """.split()
122     cppadapter_headers = """
123 jfenwick 3086 CPPAdapter/DudleyAdapterException.h
124     CPPAdapter/DudleyError.h
125 ksteube 1705 CPPAdapter/MeshAdapter.h
126     CPPAdapter/MeshAdapterFactory.h
127 caltinay 2898 CPPAdapter/system_dep.h
128 ksteube 1705 """.split()
129 jgs 277
130 caltinay 3789 local_env.Prepend(LIBS = ['pasowrap', 'escript', 'paso', 'esysUtils'])
131 phornby 2027
132 jfenwick 3251 if IS_WINDOWS :
133 jfenwick 3082 local_env.Append(CPPDEFINES = ['DUDLEY_EXPORTS'])
134 phornby 2027
135 jfenwick 3082 module_name = 'dudley'
136 phornby 1847
137 jfenwick 3189 un = [ local_unroll_env.SharedObject(x) for x in unroll_sources]
138    
139     lib = local_env.SharedLibrary(module_name, sources+un)
140 jfenwick 3251 env.Alias('build_dudley_lib', lib)
141 jgs 277
142 jfenwick 3082 include_path = Dir('dudley', local_env['incinstall'])
143 ksteube 1705 cppadapter_include_path = Dir('CppAdapter', include_path)
144 jgs 190
145 jfenwick 3251 hdr_inst1 = local_env.Install(include_path, headers )
146     hdr_inst2 = local_env.Install(cppadapter_include_path, cppadapter_headers )
147     env.Alias('install_dudley_headers', [hdr_inst1, hdr_inst2])
148 jgs 481
149 jfenwick 3251 lib_inst = local_env.Install(local_env['libinstall'], lib)
150     env.Alias('install_dudley_lib', lib_inst)
151 gross 806
152 jfenwick 3251 ### Python wrapper ###
153 caltinay 3789 if not env['build_shared']:
154     py_wrapper_local_env.Prepend(LIBS = ['dudley', 'pasowrap', 'escript', 'esysUtils'])
155     else:
156     py_wrapper_local_env.Prepend(LIBS = ['dudley', 'pasowrap', 'escript', 'paso', 'esysUtils'])
157 jfenwick 3251 py_wrapper_name = module_name + 'cpp'
158     py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'CPPAdapter/dudleycpp.cpp')
159     env.Alias('build_dudleycpp_lib', py_wrapper_lib)
160    
161     tmp_inst = os.path.join(local_env['pyinstall'], module_name)
162     if IS_WINDOWS:
163     wrapper_ext = '.pyd'
164 ksteube 1705 else:
165 jfenwick 3251 wrapper_ext = '.so'
166 phornby 1840
167 jfenwick 3251 share_name = os.path.join(tmp_inst, py_wrapper_name+wrapper_ext)
168     mod_inst = py_wrapper_local_env.InstallAs(target=share_name,
169     source=py_wrapper_lib[0])
170     env.Alias('install_dudleycpp_lib', mod_inst)
171 phornby 1840
172 jfenwick 3251 # configure python module
173     local_env.SConscript(dirs = ['#/dudley/py_src'], variant_dir='py', duplicate=0)
174 phornby 1840
175 jfenwick 3251 # configure unit tests
176 caltinay 3349 local_env.SConscript(dirs = ['#/dudley/test'], variant_dir='$BUILD_DIR/$PLATFORM/dudley/test', duplicate=0, exports=['py_wrapper_lib'])
177 caltinay 3253

  ViewVC Help
Powered by ViewVC 1.1.26