1 |
Import('*') |
Import('*') |
2 |
|
|
3 |
paso_env=env.Copy() |
paso_env=env.Copy() |
4 |
|
|
5 |
src_dir = paso_env.Dir('.').srcnode().abspath |
src_dir = paso_env.Dir('.').srcnode().abspath |
6 |
|
|
7 |
import os |
import os |
8 |
filenames = os.listdir(src_dir) |
filenames = os.listdir(src_dir) |
9 |
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']] |
10 |
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']] |
11 |
|
|
12 |
# Paso has additional source in the Solvers sub-directory. Append these to the list |
# Paso has additional source in the Solvers sub-directory. Append these to the list |
13 |
solver_filenames = os.listdir(src_dir+'/Solvers'); |
solver_filenames = os.listdir(src_dir+'/Solvers'); |
14 |
sources += ['Solvers/'+x for x in solver_filenames if os.path.splitext(x)[1] in ['.cpp', '.c']] |
sources += ['Solvers/'+x for x in solver_filenames if os.path.splitext(x)[1] in ['.cpp', '.c']] |
15 |
headers += ['Solvers/'+x for x in solver_filenames if os.path.splitext(x)[1] in ['.h']] |
headers += ['Solvers/'+x for x in solver_filenames if os.path.splitext(x)[1] in ['.h']] |
16 |
|
|
17 |
# TODO: if building with SCSL then the appropriate sources need to be appended to the above. |
# TODO: if building with SCSL then the appropriate sources need to be appended to the above. |
18 |
|
|
19 |
if env['PLATFORM'] == "win32": |
if env['PLATFORM'] == "win32": |
20 |
paso_env.Append(CPPDEFINES=['_WINDOWS', '_USRDLL', 'PASO_EXPORTS']) |
paso_env.Append(CPPDEFINES=['_WINDOWS', '_USRDLL', 'PASO_EXPORTS']) |
21 |
paso_env.Append(LIBS='mmio') |
paso_env.Append(LIBS='mmio') |
22 |
paso_env['PDB'] = 'paso.pdb' |
paso_env['PDB'] = 'paso.pdb' |
23 |
|
|
24 |
paso_lib = paso_env.SharedLibrary( 'paso', sources) |
paso_lib = paso_env.SharedLibrary( 'paso', sources) |
25 |
|
|
26 |
include = Dir('paso', esys_inc) |
include = Dir('Paso', esys_inc) |
27 |
|
|
28 |
paso_env.Install( include, headers) |
paso_env.Install( include, headers) |
|
paso_env.Install( esys_lib, paso_lib) |
|
29 |
|
paso_env.Install( esys_lib, paso_lib) |