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

Diff of /branches/domexper/dudley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/finley/src/SConscript revision 2031 by phornby, Wed Nov 12 08:02:33 2008 UTC branches/domexper/dudley/src/SConscript revision 3196 by jfenwick, Wed Sep 22 01:18:52 2010 UTC
# Line 2  Line 2 
2    
3  ########################################################  ########################################################
4  #  #
5  # Copyright (c) 2003-2008 by University of Queensland  # Copyright (c) 2003-2010 by University of Queensland
6  # Earth Systems Science Computational Center (ESSCC)  # Earth Systems Science Computational Center (ESSCC)
7  # http://www.uq.edu.au/esscc  # http://www.uq.edu.au/esscc
8  #  #
# Line 18  Import('*') Line 18  Import('*')
18    
19  local_env = clone_env(env_mpi)  local_env = clone_env(env_mpi)
20  py_wrapper_local_env = clone_env(env_mpi)  py_wrapper_local_env = clone_env(env_mpi)
21    local_unroll_env = clone_env(env_mpi)
22    local_unroll_env.Append(CFLAGS = env_mpi['dudley_assemble_flags'])
23    
24    
25  # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules  # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules
26  del py_wrapper_local_env['SHLIBPREFIX']  del py_wrapper_local_env['SHLIBPREFIX']
# Line 29  sources = """ Line 32  sources = """
32      Assemble_LumpedSystem.c      Assemble_LumpedSystem.c
33      Assemble_NodeCoordinates.c      Assemble_NodeCoordinates.c
34      Assemble_PDE.c      Assemble_PDE.c
     Assemble_PDE_Single2_1D.c  
35      Assemble_PDE_Single2_2D.c      Assemble_PDE_Single2_2D.c
36      Assemble_PDE_Single2_3D.c      Assemble_PDE_Single2_3D.c
     Assemble_PDE_Single2_C.c  
     Assemble_PDE_System2_1D.c  
37      Assemble_PDE_System2_2D.c      Assemble_PDE_System2_2D.c
38      Assemble_PDE_System2_3D.c      Assemble_PDE_System2_3D.c
     Assemble_PDE_System2_C.c  
39      Assemble_addToSystemMatrix.c      Assemble_addToSystemMatrix.c
40      Assemble_getAssembleParameters.c      Assemble_getAssembleParameters.c
41      Assemble_getSize.c      Assemble_getSize.c
     Assemble_gradient.c  
42      Assemble_integrate.c      Assemble_integrate.c
43      Assemble_interpolate.c      Assemble_interpolate.c
     Assemble_jacobeans.c  
44      Assemble_setNormal.c      Assemble_setNormal.c
45      ElementFile.c      ElementFile.c
46      ElementFile_allocTable.c      ElementFile_allocTable.c
# Line 59  sources = """ Line 56  sources = """
56      ElementFile_setCoordinates.c      ElementFile_setCoordinates.c
57      ElementFile_setNodeRange.c      ElementFile_setNodeRange.c
58      ElementFile_setTags.c      ElementFile_setTags.c
59      Finley.c      Dudley.c
60      IndexList.c      IndexList.c
61      Mesh.c      Mesh.c
62      Mesh_createNodeFileMappings.c      Mesh_createNodeFileMappings.c
# Line 67  sources = """ Line 64  sources = """
64      Mesh_findMatchingFaces.c      Mesh_findMatchingFaces.c
65      Mesh_getPattern.c      Mesh_getPattern.c
66      Mesh_glueFaces.c      Mesh_glueFaces.c
     Mesh_hex20.c  
     Mesh_hex8.c  
67      Mesh_joinFaces.c      Mesh_joinFaces.c
68      Mesh_markNodes.c      Mesh_markNodes.c
69      Mesh_merge.c      Mesh_merge.c
# Line 78  sources = """ Line 73  sources = """
73      Mesh_print.c      Mesh_print.c
74      Mesh_read.c      Mesh_read.c
75      Mesh_readGmsh.c      Mesh_readGmsh.c
     Mesh_rec4.c  
     Mesh_rec8.c  
76      Mesh_relableElementNodes.c      Mesh_relableElementNodes.c
77      Mesh_resolveNodeIds.c      Mesh_resolveNodeIds.c
78      Mesh_saveDX.c      Mesh_saveDX.c
79      Mesh_saveVTK.c      Mesh_saveVTK.c
80      Mesh_setCoordinates.c      Mesh_setCoordinates.c
81      Mesh_tagmaps.c      Mesh_tagmaps.c
82        Mesh_tet4.c
83        Mesh_tri3.c
84      Mesh_write.c      Mesh_write.c
85      NodeFile.c      NodeFile.c
86      NodeFile_allocTable.c      NodeFile_allocTable.c
# Line 100  sources = """ Line 95  sources = """
95      Quadrature.c      Quadrature.c
96      ReferenceElements.c      ReferenceElements.c
97      ShapeFunctions.c      ShapeFunctions.c
98        ShapeTable.c
99      TagMap.c      TagMap.c
100      Util.c      Util.c
101      CPPAdapter/FinleAdapterException.cpp      ReferenceElementSets.c
102      CPPAdapter/FinleyError.cpp      CPPAdapter/DudleyAdapterException.cpp
103        CPPAdapter/DudleyError.cpp
104      CPPAdapter/MeshAdapter.cpp      CPPAdapter/MeshAdapter.cpp
105      CPPAdapter/MeshAdapterFactory.cpp      CPPAdapter/MeshAdapterFactory.cpp
106      CPPAdapter/SystemMatrixAdapter.cpp      CPPAdapter/SystemMatrixAdapter.cpp
107      CPPAdapter/TransportProblemAdapter.cpp      CPPAdapter/TransportProblemAdapter.cpp
108  """.split()  """.split()
109    unroll_sources= """
110        Assemble_gradient.c
111        Assemble_jacobeans.c
112    """.split()
113    
114    
115  headers = """  headers = """
116      Assemble.h      Assemble.h
117      ElementFile.h      ElementFile.h
118      Finley.h      Dudley.h
119      FinleyVersion.h      DudleyVersion.h
120      IndexList.h      IndexList.h
121      Mesh.h      Mesh.h
122      NodeFile.h      NodeFile.h
123      NodeMapping.h      NodeMapping.h
124      Quadrature.h      Quadrature.h
125      RectangularMesh.h      TriangularMesh.h
126      ReferenceElements.h      ReferenceElements.h
127      ShapeFunctions.h      ShapeFunctions.h
128        ShapeTable.h
129      TagMap.h      TagMap.h
130      Util.h      Util.h
131        ReferenceElementSets.h
132      vtkCellType.h      vtkCellType.h
133  """.split()  """.split()
134  cppadapter_headers = """  cppadapter_headers = """
135      CPPAdapter/FinleyAdapterException.h      CPPAdapter/DudleyAdapterException.h
136      CPPAdapter/FinleyError.h      CPPAdapter/DudleyError.h
137      CPPAdapter/MeshAdapter.h      CPPAdapter/MeshAdapter.h
138      CPPAdapter/MeshAdapterFactory.h      CPPAdapter/MeshAdapterFactory.h
139      CPPAdapter/SystemMatrixAdapter.h      CPPAdapter/SystemMatrixAdapter.h
# Line 139  cppadapter_headers = """ Line 144  cppadapter_headers = """
144  local_env.Append(LIBS = ['escript', 'esysUtils', 'paso'] + env['sys_libs'] )  local_env.Append(LIBS = ['escript', 'esysUtils', 'paso'] + env['sys_libs'] )
145    
146  if IS_WINDOWS_PLATFORM :  if IS_WINDOWS_PLATFORM :
147    local_env.Append(CPPDEFINES = ['FINLEY_EXPORTS',    local_env.Append(CPPDEFINES = ['DUDLEY_EXPORTS'])
                                  'ESYSUTILS_STATIC_LIB'])  
148    
149  py_wrapper_local_env.Append(LIBS = ['finley', 'escript', 'esysUtils', 'paso'] + env['sys_libs'] )  py_wrapper_local_env.Append(LIBS = ['dudley', 'escript', 'esysUtils', 'paso'] + env['sys_libs'] )
150    
151  module_name = 'finley'  module_name = 'dudley'
152  py_wrapper_name = module_name + 'cpp'  py_wrapper_name = module_name + 'cpp'
153    
154  lib = local_env.SharedLibrary(module_name, sources)  un = [ local_unroll_env.SharedObject(x) for x in unroll_sources]
155  env.Alias('target_finley_so', lib)  
156    lib = local_env.SharedLibrary(module_name, sources+un)
157    env.Alias('target_dudley_so', lib)
158    
159  py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'CPPAdapter/finleycpp.cpp')  py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'CPPAdapter/dudleycpp.cpp')
160  env.Alias('target_finleycpp_so', py_wrapper_lib)  env.Alias('target_dudleycpp_so', py_wrapper_lib)
161    
162  include_path = Dir('finley', local_env['incinstall'])  include_path = Dir('dudley', local_env['incinstall'])
163  cppadapter_include_path = Dir('CppAdapter', include_path)  cppadapter_include_path = Dir('CppAdapter', include_path)
164    
165  tmp1 = local_env.Install(include_path, headers )  tmp1 = local_env.Install(include_path, headers )
166  tmp2 = local_env.Install(cppadapter_include_path, cppadapter_headers )  tmp2 = local_env.Install(cppadapter_include_path, cppadapter_headers )
167  env.Alias('target_install_finley_headers', [tmp1, tmp2])  env.Alias('target_install_dudley_headers', [tmp1, tmp2])
168    
169  tmp3 = local_env.Install(local_env['libinstall'], lib)  tmp3 = local_env.Install(local_env['libinstall'], lib)
170  env.Alias('target_install_finley_so', tmp3)  env.Alias('target_install_dudley_so', tmp3)
171    
172  #windows specific mod  #windows specific mod
173  tmp_inst = os.path.join(local_env['pyinstall'],module_name)  tmp_inst = os.path.join(local_env['pyinstall'],module_name)
# Line 175  share_name = os.path.join(tmp_inst,py_wr Line 181  share_name = os.path.join(tmp_inst,py_wr
181  tmp4 = py_wrapper_local_env.InstallAs(target=share_name,  tmp4 = py_wrapper_local_env.InstallAs(target=share_name,
182                                        source=py_wrapper_lib[0])                                        source=py_wrapper_lib[0])
183    
184  env.Alias('target_install_finleycpp_so', tmp4)  env.Alias('target_install_dudleycpp_so', tmp4)
185    
186  # export the lib target since tests will depend on it  # export the lib target since tests will depend on it
187  # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)  # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
# Line 184  dep_lib = [local_env['libinstall']+'/'+s Line 190  dep_lib = [local_env['libinstall']+'/'+s
190  Export('dep_lib')  Export('dep_lib')
191    
192  # Call the python sconscript  # Call the python sconscript
193  env.SConscript(dirs = ['#/finley/py_src'], build_dir='py', duplicate=0)  CallSConscript(env,dirs = ['#/dudley/py_src'], variant_dir='py', duplicate=0)
194    
195  # Call the unit tests SConscript  # Call the unit tests SConscript
196  local_env.SConscript(dirs = ['#/finley/test'], build_dir='#/build/$PLATFORM/finley/test', duplicate=0)  CallSConscript(local_env,dirs = ['#/dudley/test'], variant_dir='#/build/$PLATFORM/dudley/test', duplicate=0)
197    

Legend:
Removed from v.2031  
changed lines
  Added in v.3196

  ViewVC Help
Powered by ViewVC 1.1.26