/[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 199 by jgs, Tue Nov 22 04:57:00 2005 UTC revision 1133 by gross, Tue May 8 07:19:33 2007 UTC
# Line 1  Line 1 
 libinstall = None  
   
 Import('*')  
   
1  import os  import os
2  import string  Import('*')
3    
4  paso_path = str(esysroot) + '/paso/src'  local_env=env.Copy()
 scsl_path = str(esysroot) + '/paso/src/SCSL'  
 solvers_path = str(esysroot) + '/paso/src/Solvers'  
 mmio_path = str(esysroot) + '/tools/mmio/inc'  
   
 cpp_path = [paso_path,  
             scsl_path,  
             solvers_path,  
             mmio_path,  
             python_path,  
             boost_path]  
   
 lib = 'paso'  
 sources = ['Options_getPackage.c',  
            'Options_getSolver.c',  
            'Options_setDefaults.c',  
            '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',  
            'Util.c',  
            'SCSL/SCSL.c',  
            'SCSL/SCSL_direct.c',  
            'SCSL/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_env = Environment(ENV = os.environ)  
   
 paso_env.Replace(CC = 'icc')  
 paso_env.Replace(CCFLAGS = cc_flags)  
 paso_env.Replace(ARFLAGS = ar_flags)  
 paso_env.Replace(CPPPATH = cpp_path)  
5    
 paso_lib = paso_env.StaticLibrary(lib, sources)  
 paso_env.Install(libdir, paso_lib)  
6    
7  if libinstall != None:  # get the relevant file names:
8    paso_env.Install(libinstall, paso_lib)  src_dir = local_env.Dir('.').srcnode().abspath
9    filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
10    
11    sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
12    headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]
13    
14    if mkl_libs:
15       local_env.Append(CPPDEFINES=['MKL',])
16       local_env.Append(LIBS = mkl_libs)
17    if scsl_libs:
18       local_env.Append(CPPDEFINES=['SCSL',])
19       local_env.Append(LIBS = scsl_libs)
20    if umf_libs:
21       local_env.Append(CPPDEFINES=['UMFPACK',])
22       local_env.Append(LIBS = umf_libs)
23    if papi_libs:
24       local_env.Append(CPPDEFINES=['PAPI',])
25       local_env.Append(LIBS = papi_libs)
26    
27    lib_name = 'paso'
28    
29    lib = local_env.StaticLibrary(lib_name, sources)
30    
31    include_path = Dir(lib_name, incinstall)
32    solvers_include_path = Dir('Solvers', include_path)
33    
34    local_env.Install(include_path, headers )
35    local_env.Install(libinstall, lib)
36    
37    release_srcfiles = [ env.File(x) for x in filenames ]  + [env.File("SConscript"), ]
38    env.Zip(src_zipfile, release_srcfiles)
39    try:
40      env.Tar(src_tarfile, release_srcfiles)
41    except AttributeError:
42      pass

Legend:
Removed from v.199  
changed lines
  Added in v.1133

  ViewVC Help
Powered by ViewVC 1.1.26