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

Diff of /trunk/finley/src/SConscript

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

revision 682 by robwdcock, Mon Mar 27 02:43:09 2006 UTC revision 757 by woo409, Mon Jun 26 13:12:56 2006 UTC
# Line 1  Line 1 
1    #          Copyright 2006 by ACcESS MNRF
2    #
3    #              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
9  Import('*')  Import('*')
10    
11  local_env=env.Copy()  local_env=env.Copy()
# Line 11  py_wrapper_source = 'CPPAdapter/'+py_wra Line 19  py_wrapper_source = 'CPPAdapter/'+py_wra
19  py_wrapper_lib_name = py_wrapper_name  py_wrapper_lib_name = py_wrapper_name
20    
21  src_dir = local_env.Dir('.').srcnode().abspath  src_dir = local_env.Dir('.').srcnode().abspath
22    filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
23    
 import os  
 filenames = os.listdir(src_dir)  
24  sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]  sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
25  headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]  headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]
 # Filter unused sources  
 sources.remove('ElementFile_borrowLocalVolume.c') # FIXME: Should this file be removed?  
26    
27    
28  # finleycpp has additional source in the CPPAdapter sub-directory. Append these to the list  # finleycpp has additional source in the CPPAdapter sub-directory. Append these to the list
29  cppadapter_filenames = os.listdir(src_dir+'/CPPAdapter');  cppadapter_filenames = [ 'CPPAdapter/'+x for x in os.listdir(src_dir+'/CPPAdapter')  if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
30  sources += ['CPPAdapter/'+x for x in cppadapter_filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]  sources += [ x for x in cppadapter_filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
31  cppadapter_headers = ['CPPAdapter/'+x for x in cppadapter_filenames if os.path.splitext(x)[1] in ['.h']]  cppadapter_headers = [x for x in cppadapter_filenames if os.path.splitext(x)[1] in ['.h']]
32    
33  sources.remove(py_wrapper_source) # FIXME: should probably refactor the source tree so the python wrapper isn't colocated with c++ sources  sources.remove(py_wrapper_source) # FIXME: should probably refactor the source tree so the python wrapper isn't colocated with c++ sources
34  local_env.Append(LIBS = [boost_lib, python_lib, sys_libs, 'escript', 'esysUtils', 'paso'])  local_env.Append(LIBS = [boost_lib, python_lib, sys_libs, 'escript', 'esysUtils', 'paso'])
# Line 42  if papi_libs: Line 47  if papi_libs:
47     local_env.Append(CPPDEFINES=['PAPI',])     local_env.Append(CPPDEFINES=['PAPI',])
48     local_env.Append(LIBS = papi_libs)     local_env.Append(LIBS = papi_libs)
49    
50    local_env.Append(CPPDEFINES = 'FINLEY_EXPORTS')
51    
52  lib = local_env.SharedLibrary(lib_name, sources)  lib = local_env.SharedLibrary(lib_name, sources)
53  py_wrapper_lib = py_wrapper_local_env.SharedLibrary( py_wrapper_lib_name, py_wrapper_source)  py_wrapper_lib = py_wrapper_local_env.SharedLibrary( py_wrapper_lib_name, py_wrapper_source)
# Line 60  py_wrapper_local_env.Install(pyinstall+' Line 66  py_wrapper_local_env.Install(pyinstall+'
66  dep_lib = [libinstall+'/'+str(x) for x in lib]  dep_lib = [libinstall+'/'+str(x) for x in lib]
67  Export('dep_lib')  Export('dep_lib')
68    
69    # add source files to release
70    release_srcfiles = [ env.File(x) for x in filenames + cppadapter_filenames ] + [env.File("SConscript"), ]
71    env.Zip(src_zipfile, release_srcfiles)
72    env.Tar(src_tarfile, release_srcfiles)
73    
74  # Call the python sconscript  # Call the python sconscript
75  env.SConscript(dirs = ['#/finley/py_src'], build_dir='py', duplicate=0)  env.SConscript(dirs = ['#/finley/py_src'], build_dir='py', duplicate=0)
76    

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

  ViewVC Help
Powered by ViewVC 1.1.26