/[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 425 by gross, Tue Jan 10 04:10:39 2006 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  
 paso_env = Environment(ENV = os.environ)  
4    
5  paso_path = str(esysroot) + '/paso/src'  src_dir = local_env.Dir('.').srcnode().abspath
6  solvers_path = str(esysroot) + '/paso/src/Solvers'  
7  mmio_path = str(esysroot) + '/tools/mmio/inc'  import os
8    filenames = os.listdir(src_dir)
9  cpp_path = [paso_path,  sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
10              solvers_path,  headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]
11              mmio_path,  # Filter unused sources
12              python_path,  sources.remove('SystemMatrixPattern_reduceBandwidth.c') # FIXME: Should this file be removed?
13              boost_path]  
14    # Paso has additional source in the Solvers sub-directory. Append these to the list
15  paso_env.Replace(CC = cc)  solver_filenames = os.listdir(src_dir+'/Solvers');
16  paso_env.Replace(CCFLAGS = cc_flags)  sources += ['Solvers/'+x for x in solver_filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
17  if len(mkl_libs) >0: paso_env.Append(CCFLAGS=' -DMKL')  solver_headers = ['Solvers/'+x for x in solver_filenames if os.path.splitext(x)[1] in ['.h']]
18  if len(mkl_path) >0: cpp_path.append(mkl_path)  
19  if len(scsl_libs)>0 : paso_env.Append(CCFLAGS=' -DSCSL')  if mkl_libs:
20  if len(scsl_path)>0: cpp_path.append(scsl_path)     local_env.Append(CPPDEFINES=['MKL',])
21  if len(umfpack_libs)>0 : paso_env.Append(CCFLAGS=' -DUMFPACK')     local_env.Append(LIBS = mkl_libs)
22  if len(umfpack_path)>0: cpp_path.append(umfpack_path)  if scsl_libs:
23  paso_env.Replace(CPPPATH = cpp_path)     local_env.Append(CPPDEFINES=['SCSL',])
24  paso_env.Replace(ARFLAGS = ar_flags)     local_env.Append(LIBS = scsl_libs)
25    if umf_libs:
26  lib = 'paso'     local_env.Append(CPPDEFINES=['UMFPACK',])
27  sources = ['Options_getPackage.c',     local_env.Append(LIBS = umf_libs)
28             'Options_getSolver.c',  if papi_libs:
29             'Options_setDefaults.c',     local_env.Append(CPPDEFINES=['PAPI',])
30             'Paso.c',     local_env.Append(LIBS = papi_libs)
31             'solve.c',  
32             'SystemMatrix_borrowNormalization.c',  lib_name = 'paso'
33             'SystemMatrix.c',  
34             'SystemMatrix_copy.c',  lib = local_env.StaticLibrary(lib_name, sources)
35             'SystemMatrix_getSubmatrix.c',  
36             'SystemMatrix_getSystemMatrixTypeId.c',  include_path = Dir(lib_name, incinstall)
37             'SystemMatrix_loadMM.c',  solvers_include_path = Dir('Solvers', include_path)
38             'SystemMatrix_MatrixVector.c',  
39             'SystemMatrix_nullifyRowsAndCols.c',  local_env.Install(include_path, headers )
40             'SystemMatrixPattern.c',  local_env.Install(solvers_include_path, solver_headers )
41             'SystemMatrixPattern_getSubpattern.c',  local_env.Install(libinstall, lib)
42             'SystemMatrixPattern_mis.c',  
            'SystemMatrixPattern_unrollBlocks.c',  
            'SystemMatrix_saveHB.c',  
            'SystemMatrix_saveMM.c',  
            'SystemMatrix_setValues.c',  
            'Util.c',  
            'MKL.c',  
            'SCSL.c',  
            'SCSL_direct.c',  
            'SCSL_iterative.c',  
            '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_lib = paso_env.StaticLibrary(lib, sources)  
   
 Default(paso_env.Install(libdir, paso_lib))  
 Default(paso_env.Install(libdir2, paso_lib))  
 if libinstall != None:  
   Default(paso_env.Install(libinstall, paso_lib))  

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

  ViewVC Help
Powered by ViewVC 1.1.26