1 |
import os |
2 |
Import('*') |
3 |
|
4 |
local_env=env.Copy() |
5 |
# get the relevant file names: |
6 |
src_dir = local_env.Dir('.').srcnode().abspath |
7 |
filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ] |
8 |
|
9 |
sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']] |
10 |
headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']] |
11 |
|
12 |
if useMPI: |
13 |
local_env.Append(LIBS = [ "paso" ] + mpi_libs + [python_lib] + sys_libs) |
14 |
lib_name = 'pythonMPI' |
15 |
lib = local_env.Program(lib_name, sources) |
16 |
include_path = Dir(lib_name, incinstall) |
17 |
local_env.Install(include_path, headers ) |
18 |
local_env.Install(libinstall, lib) |
19 |
|
20 |
release_srcfiles = [ env.File(x) for x in filenames ] + [env.File("SConscript"), ] |
21 |
env.Zip(src_zipfile, release_srcfiles) |
22 |
env.Tar(src_tarfile, release_srcfiles) |