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

Diff of /trunk/paso/src/SConscript

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

revision 288 by jgs, Fri Dec 2 01:55:04 2005 UTC revision 682 by robwdcock, Mon Mar 27 02:43:09 2006 UTC
# Line 1  Line 1 
 libinstall = None  
   
1  Import('*')  Import('*')
2    
3  import os  local_env=env.Copy()
 import string  
4    
5  paso_path = str(esysroot) + '/paso/src'  src_dir = local_env.Dir('.').srcnode().abspath
6  scsl_path = str(esysroot) + '/paso/src/SCSL'  
7  solvers_path = str(esysroot) + '/paso/src/Solvers'  import os
8  mmio_path = str(esysroot) + '/tools/mmio/inc'  filenames = os.listdir(src_dir)
9    sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
10  cpp_path = [paso_path,  headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]
11              scsl_path,  # Filter unused sources
12              solvers_path,  sources.remove('SystemMatrixPattern_reduceBandwidth.c') # FIXME: Should this file be removed?
13              mmio_path,  
14              python_path,  # Paso has additional source in the Solvers sub-directory. Append these to the list
15              boost_path]  solver_filenames = os.listdir(src_dir+'/Solvers');
16    sources += ['Solvers/'+x for x in solver_filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
17  lib = 'paso'  solver_headers = ['Solvers/'+x for x in solver_filenames if os.path.splitext(x)[1] in ['.h']]
18  sources = ['Options_getPackage.c',  
19             'Options_getSolver.c',  if mkl_libs:
20             'Options_setDefaults.c',     local_env.Append(CPPDEFINES=['MKL',])
21             'Paso.c',     local_env.Append(LIBS = mkl_libs)
22             'solve.c',  if scsl_libs:
23             'SystemMatrix_borrowNormalization.c',     local_env.Append(CPPDEFINES=['SCSL',])
24             'SystemMatrix.c',     local_env.Append(LIBS = scsl_libs)
25             'SystemMatrix_copy.c',  if umf_libs:
26             'SystemMatrix_getSubmatrix.c',     local_env.Append(CPPDEFINES=['UMFPACK',])
27             'SystemMatrix_getSystemMatrixTypeId.c',     local_env.Append(LIBS = umf_libs)
28             'SystemMatrix_loadMM.c',  if papi_libs:
29             'SystemMatrix_MatrixVector.c',     local_env.Append(CPPDEFINES=['PAPI',])
30             'SystemMatrix_nullifyRowsAndCols.c',     local_env.Append(LIBS = papi_libs)
31             'SystemMatrixPattern.c',  
32             'SystemMatrixPattern_getSubpattern.c',  lib_name = 'paso'
33             'SystemMatrixPattern_mis.c',  
34             'SystemMatrixPattern_unrollBlocks.c',  lib = local_env.StaticLibrary(lib_name, sources)
35             'SystemMatrix_saveHB.c',  
36             'SystemMatrix_saveMM.c',  include_path = Dir(lib_name, incinstall)
37             'SystemMatrix_setValues.c',  solvers_include_path = Dir('Solvers', include_path)
38             'Util.c',  
39             'SCSL/SCSL.c',  local_env.Install(include_path, headers )
40             'SCSL/SCSL_direct.c',  local_env.Install(solvers_include_path, solver_headers )
41             'SCSL/SCSL_iterative.c',  local_env.Install(libinstall, lib)
42             'Solvers/BiCGStab.c',  
            'Solvers/GMRES.c',  
            'Solvers/PCG.c',  
            'Solvers/Solver_applyBlockDiagonalMatrix.c',  
            'Solvers/Solver.c',  
            'Solvers/Solver_ILU.c',  
            'Solvers/Solver_jacobi.c',  
            'Solvers/Solver_preconditioner.c',  
            'Solvers/Solver_SchurComplement.c']  
   
 paso_env = Environment(ENV = os.environ)  
   
 paso_env.Replace(CC = cc)  
 paso_env.Replace(CCFLAGS = cc_flags)  
 paso_env.Replace(ARFLAGS = ar_flags)  
 paso_env.Replace(CPPPATH = cpp_path)  
   
 paso_lib = paso_env.StaticLibrary(lib, sources)  
   
 paso_env.Install(libdir, paso_lib)  
 paso_env.Install(libdir2, paso_lib)  
 if libinstall != None:  
   paso_env.Install(libinstall, paso_lib)  

Legend:
Removed from v.288  
changed lines
  Added in v.682

  ViewVC Help
Powered by ViewVC 1.1.26