/[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/finley/SConscript revision 204 by jgs, Wed Nov 23 04:43:51 2005 UTC trunk/finley/src/SConscript revision 1139 by ksteube, Mon May 14 05:12:53 2007 UTC
# Line 1  Line 1 
1  libinstall = None  #          Copyright 2006 by ACcESS MNRF
2    #
3  Import('*')  #              http://www.access.edu.au
4    #       Primary Business: Queensland, Australia
5    #  Licensed under the Open Software License version 3.0
6    #     http://www.opensource.org/licenses/osl-3.0.php
7    #
8  import os  import os
9  import string  Import('*')
10    
11  finley_path = str(esysroot) + '/finley/src/finley'  local_env=env.Copy()
12  finley_cppadapter_path = str(esysroot) + '/finley/src/finley/CPPAdapter'  py_wrapper_local_env=env.Copy()
13  paso_path = str(esysroot) + '/paso/inc'  # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules
14  escript_path = str(esysroot) + '/escript/inc'  del py_wrapper_local_env['SHLIBPREFIX']
15  esysUtils_path = str(esysroot) + '/esysUtils/inc'  
16    lib_name = 'finley'
17  cpp_path = [finley_path,  py_wrapper_name = lib_name+'cpp'
18              finley_cppadapter_path,  py_wrapper_source = 'CPPAdapter/'+py_wrapper_name+'.cpp' # FIXME: In need of a source tree refactor
19              paso_path,  py_wrapper_lib_name = py_wrapper_name
20              escript_path,  
21              esysUtils_path,  src_dir = local_env.Dir('.').srcnode().abspath
22              python_path,  filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
23              boost_path]  
24    sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
25  lib = 'finleycpp'  headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]
26    
27  sources = ['Assemble_addToSystemMatrix.c',  
28             'Assemble_CopyElementData.c',  # finleycpp has additional source in the CPPAdapter sub-directory. Append these to the list
29             'Assemble_CopyNodalData.c',  cppadapter_filenames = [ 'CPPAdapter/'+x for x in os.listdir(src_dir+'/CPPAdapter')  if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
30             'Assemble_getAssembleParameters.c',  sources += [ x for x in cppadapter_filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
31             'Assemble_getSize.c',  cppadapter_headers = [x for x in cppadapter_filenames if os.path.splitext(x)[1] in ['.h']]
32             'Assemble_gradient.c',  
33             'Assemble_handelShapeMissMatch.c',  sources.remove(py_wrapper_source) # FIXME: should probably refactor the source tree so the python wrapper isn't colocated with c++ sources
34             'Assemble_integrate.c',  local_env.Append(LIBS = [boost_libs] +  python_libs + sys_libs + ['escript', 'esysUtils', 'paso'])
35             'Assemble_interpolate.c',  py_wrapper_local_env.Append(LIBS = [boost_libs] + python_libs + sys_libs + [lib_name, 'escript', 'esysUtils', 'paso'])
36             'Assemble_NodeCoordinates.c',  
37             'Assemble_PDE.c',  if mkl_libs:
38             'Assemble_PDEMatrix_Single2.c',     local_env.Append(CPPDEFINES=['MKL',])
39             'Assemble_PDEMatrix_System2.c',     local_env.Append(LIBS = mkl_libs)
40             'Assemble_PDE_RHS.c',  if scsl_libs:
41             'Assemble_RHSMatrix_Single.c',     local_env.Append(CPPDEFINES=['SCSL',])
42             'Assemble_RHSMatrix_System.c',     local_env.Append(LIBS = scsl_libs)
43             'Assemble_RobinCondition.c',  if umf_libs and amd_libs:
44             'Assemble_RobinCondition_RHS.c',     local_env.Append(CPPDEFINES=['UMFPACK',])
45             'Assemble_setNormal.c',     local_env.Append(LIBS = umf_libs)
46             'ElementFile_allocTable.c',     local_env.Append(LIBS = amd_libs)
47             'ElementFile.c',  
48             'ElementFile_copyTable.c',  if blas_libs:
49             'ElementFile_gather.c',     local_env.Append(LIBS = blas_libs)
50             'ElementFile_improveColoring.c',  
51             'ElementFile_markNodes.c',  if papi_libs:
52             'ElementFile_optimizeDistribution.c',     local_env.Append(CPPDEFINES=['PAPI',])
53             'ElementFile_prepare.c',     local_env.Append(LIBS = papi_libs)
54             'ElementFile_relableNodes.c',  
55             'ElementFile_scatter.c',  local_env.Append(CPPDEFINES = 'FINLEY_EXPORTS')
56             'ElementFile_setNodeRange.c',  
57             'Finley.c',  lib = local_env.SharedLibrary(lib_name, sources)
58             'IndexList.c',  py_wrapper_lib = py_wrapper_local_env.SharedLibrary( py_wrapper_lib_name, py_wrapper_source)
59             'Mesh.c',  
60             'Mesh_findMatchingFaces.c',  include_path = Dir(lib_name, incinstall)
61             'Mesh_getPattern.c',  cppadapter_include_path = Dir('CppAdapter', include_path)
62             'Mesh_glueFaces.c',  
63             'Mesh_hex20.c',  local_env.Install(include_path, headers )
64             'Mesh_hex8.c',  local_env.Install(cppadapter_include_path, cppadapter_headers )
65             'Mesh_joinFaces.c',  local_env.Install(libinstall, lib)
66             'Mesh_line2.c',  py_wrapper_local_env.Install(pyinstall+'/finley', py_wrapper_lib)
67             'Mesh_line3.c',  
68             'Mesh_markNodes.c',  # export the lib target since tests will depend on it
69             'Mesh_merge.c',  # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
70             'Mesh_prepare.c',  # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
71             'Mesh_prepareNodes.c',  dep_lib = [libinstall+'/'+str(x) for x in lib]
72             'Mesh_print.c',  Export('dep_lib')
73             'Mesh_read.c',  
74             'Mesh_rec4.c',  # add source files to release
75             'Mesh_rec8.c',  release_srcfiles = [ env.File(x) for x in filenames + cppadapter_filenames ] + [env.File("SConscript"), ]
76             'Mesh_relabelElementNodes.c',  env.Zip(src_zipfile, release_srcfiles)
77             'Mesh_resolveNodeIds.c',  try:
78             'Mesh_saveDX.c',    env.Tar(src_tarfile, release_srcfiles)
79             'Mesh_saveVTK.c',  except AttributeError:
80             'Mesh_write.c',    pass
81             'NodeFile_allocTable.c',  # Call the python sconscript
82             'NodeFile.c',  env.SConscript(dirs = ['#/finley/py_src'], build_dir='py', duplicate=0)
            'NodeFile_copyTable.c',  
            'NodeFile_gatter.c',  
            'NodeFile_scatter.c',  
            'NodeFile_setCoordinates.c',  
            'NodeFile_setIdRange.c',  
            'Quadrature.c',  
            'ReferenceElements.c',  
            'ShapeFunctions.c',  
            'Util.c',  
            'CPPAdapter/FinleyError.cpp',  
            'CPPAdapter/MeshAdapter.cpp',  
            'CPPAdapter/MeshAdapterFactory.cpp',  
            'CPPAdapter/SystemMatrixAdapter.cpp',  
            'CPPAdapter/finleycpp.cpp']  
   
 finley_env = Environment(ENV = os.environ)  
   
 finley_env.Replace(CC = 'icc')  
 finley_env.Replace(CXX = 'icc')  
 finley_env.Replace(CCFLAGS = cc_flags)  
 finley_env.Replace(CXXFLAGS = cxx_flags)  
 finley_env.Replace(SHOBJSUFFIX = '.lo')  
 finley_env.Replace(CPPPATH = cpp_path)  
83    
84  finley_lib = finley_env.SharedLibrary(lib, sources)  # Call the unit tests SConscript
85  finley_env.Install(libdir, finley_lib)  local_env.SConscript(dirs = ['#/finley/test'], build_dir='#/build/$PLATFORM/finley/test', duplicate=0)
86    
 if libinstall != None:  
   finley_env.Install(libinstall, finley_lib)  

Legend:
Removed from v.204  
changed lines
  Added in v.1139

  ViewVC Help
Powered by ViewVC 1.1.26