/[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 483 by jgs, Thu Feb 2 02:10:15 2006 UTC revision 1133 by gross, Tue May 8 07:19:33 2007 UTC
# Line 1  Line 1 
1  libinstall = None  import os
 incinstall = None  
   
2  Import('*')  Import('*')
3    
4  import os  local_env=env.Copy()
5  import string  
 paso_env = Environment(ENV = os.environ)  
6    
7  paso_path = str(esysroot) + '/paso/src'  # get the relevant file names:
8  solvers_path = str(esysroot) + '/paso/src/Solvers'  src_dir = local_env.Dir('.').srcnode().abspath
9  mmio_path = str(esysroot) + '/tools/mmio/inc'  filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
10    
11  cpp_path = [paso_path,  sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
12              solvers_path,  headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]
13              mmio_path,  
14              python_path,  if mkl_libs:
15              boost_path]     local_env.Append(CPPDEFINES=['MKL',])
16       local_env.Append(LIBS = mkl_libs)
17  paso_env.Replace(CC = cc)  if scsl_libs:
18  paso_env.Replace(CCFLAGS = cc_flags)     local_env.Append(CPPDEFINES=['SCSL',])
19  if len(mkl_libs) >0: paso_env.Append(CCFLAGS=' -DMKL')     local_env.Append(LIBS = scsl_libs)
20  if len(mkl_path) >0: cpp_path.append(mkl_path)  if umf_libs:
21  if len(scsl_libs)>0 : paso_env.Append(CCFLAGS=' -DSCSL')     local_env.Append(CPPDEFINES=['UMFPACK',])
22  if len(scsl_path)>0: cpp_path.append(scsl_path)     local_env.Append(LIBS = umf_libs)
23  if len(umfpack_libs)>0 : paso_env.Append(CCFLAGS=' -DUMFPACK')  if papi_libs:
24  if len(umfpack_path)>0: cpp_path.append(umfpack_path)     local_env.Append(CPPDEFINES=['PAPI',])
25  paso_env.Replace(CPPPATH = cpp_path)     local_env.Append(LIBS = papi_libs)
26  paso_env.Replace(ARFLAGS = ar_flags)  
27    lib_name = 'paso'
28  lib = 'paso'  
29    lib = local_env.StaticLibrary(lib_name, sources)
30  incs = ['Common.h',  
31          'MKL.h',  include_path = Dir(lib_name, incinstall)
32          'Options.h',  solvers_include_path = Dir('Solvers', include_path)
33          'Paso.h',  
34          'SCSL.h',  local_env.Install(include_path, headers )
35          'SystemMatrix.h',  local_env.Install(libinstall, lib)
36          'SystemMatrixPattern.h',  
37          'PasoUtil.h',  release_srcfiles = [ env.File(x) for x in filenames ]  + [env.File("SConscript"), ]
38          'Solvers/Solver.h']  env.Zip(src_zipfile, release_srcfiles)
39    try:
40  sources = ['Options_getPackage.c',    env.Tar(src_tarfile, release_srcfiles)
41             'Options_getSolver.c',  except AttributeError:
42             'Options_setDefaults.c',    pass
            'Paso.c',  
            'solve.c',  
            'SystemMatrix_borrowNormalization.c',  
            'SystemMatrix.c',  
            'SystemMatrix_copy.c',  
            'SystemMatrix_getSubmatrix.c',  
            'SystemMatrix_getSystemMatrixTypeId.c',  
            'SystemMatrix_loadMM.c',  
            'SystemMatrix_MatrixVector.c',  
            'SystemMatrix_nullifyRowsAndCols.c',  
            'SystemMatrixPattern.c',  
            'SystemMatrixPattern_getSubpattern.c',  
            'SystemMatrixPattern_mis.c',  
            'SystemMatrixPattern_unrollBlocks.c',  
            'SystemMatrix_saveHB.c',  
            'SystemMatrix_saveMM.c',  
            'SystemMatrix_setValues.c',  
            'PasoUtil.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_RILU.c',  
            'Solvers/Solver_jacobi.c',  
            'Solvers/Solver_preconditioner.c',  
            'Solvers/Solver_SchurComplement.c']  
   
 paso_lib = paso_env.StaticLibrary(lib, sources)  
   
 Default(paso_env.Install(incdir, incs))  
 Default(paso_env.Install(incdir2, incs))  
 if incinstall != None:  
   Default(paso_env.Install(incinstall, incs))  
   
 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.483  
changed lines
  Added in v.1133

  ViewVC Help
Powered by ViewVC 1.1.26