1 |
libinstall = None |
2 |
incinstall = None |
3 |
|
4 |
Import('*') |
5 |
|
6 |
import os |
7 |
import string |
8 |
|
9 |
libname = 'escriptcpp' |
10 |
|
11 |
escript_path = str(esysroot) + '/escript/src' |
12 |
esysUtils_path = str(esysroot) + '/esysUtils/src' |
13 |
|
14 |
esysUtils_lib_path = str(esysroot) + '/esysUtils/lib' |
15 |
|
16 |
esysUtils_lib = str(esysUtils_lib_path) + '/libesysUtils.a' |
17 |
|
18 |
cpp_path = [escript_path, |
19 |
esysUtils_path, |
20 |
python_path, |
21 |
boost_path] |
22 |
|
23 |
incs = ['AbstractContinuousDomain.h', |
24 |
'AbstractDomain.h', |
25 |
'AbstractSystemMatrix.h', |
26 |
'BinaryOp.h', |
27 |
'DataAbstract.h', |
28 |
'DataAlgorithm.h', |
29 |
'DataArray.h', |
30 |
'DataArrayView.h', |
31 |
'DataBlocks2D.h', |
32 |
'DataCached.h', |
33 |
'DataC.h', |
34 |
'DataConstant.h', |
35 |
'DataEmpty.h', |
36 |
'DataException.h', |
37 |
'DataExpanded.h', |
38 |
'DataFactory.h', |
39 |
'Data.h', |
40 |
'DataProf.h', |
41 |
'DataTagged.h', |
42 |
'DataVariable.h', |
43 |
'DataVector.h', |
44 |
'DomainException.h', |
45 |
'FunctionSpaceException.h', |
46 |
'FunctionSpaceFactory.h', |
47 |
'FunctionSpace.h', |
48 |
'NullDomain.h', |
49 |
'SystemMatrixException.h', |
50 |
'Taipan.h', |
51 |
'UnaryFuncs.h', |
52 |
'UnaryOp.h', |
53 |
'UtilC.h', |
54 |
'LocalOps.h', |
55 |
'Utils.h'] |
56 |
|
57 |
sources = ['AbstractContinuousDomain.cpp', |
58 |
'AbstractDomain.cpp', |
59 |
'AbstractSystemMatrix.cpp', |
60 |
'DataAbstract.cpp', |
61 |
'DataArray.cpp', |
62 |
'DataArrayView.cpp', |
63 |
'DataBlocks2D.cpp', |
64 |
'DataCached.cpp', |
65 |
'DataC.cpp', |
66 |
'DataConstant.cpp', |
67 |
'Data.cpp', |
68 |
'DataEmpty.cpp', |
69 |
'DataExpanded.cpp', |
70 |
'DataFactory.cpp', |
71 |
'DataProf.cpp', |
72 |
'DataTagged.cpp', |
73 |
'DataVariable.cpp', |
74 |
'DataVector.cpp', |
75 |
'FunctionSpace.cpp', |
76 |
'FunctionSpaceFactory.cpp', |
77 |
'NullDomain.cpp', |
78 |
'Taipan.cpp', |
79 |
'Utils.cpp', |
80 |
'escriptcpp.cpp'] |
81 |
|
82 |
lib_path = [esysUtils_lib_path, |
83 |
boost_lib_path] |
84 |
|
85 |
libs = ['esysUtils', |
86 |
str(boost_lib)] |
87 |
|
88 |
libs.extend(sys_libs) |
89 |
|
90 |
escript_env = Environment(ENV = os.environ) |
91 |
|
92 |
escript_env.Replace(CXX = cxx) |
93 |
escript_env.Replace(SHOBJSUFFIX = '.lo') |
94 |
escript_env.Replace(CXXFLAGS = cxx_flags) |
95 |
escript_env.Replace(CPPPATH = cpp_path) |
96 |
escript_env.Replace(LIBPATH = lib_path) |
97 |
escript_env.Replace(LIBS = libs) |
98 |
|
99 |
escript_lib = escript_env.SharedLibrary(libname, sources) |
100 |
|
101 |
Depends(escript_lib, esysUtils_lib) |
102 |
|
103 |
Default(escript_env.Install(incdir, incs)) |
104 |
Default(escript_env.Install(incdir2, incs)) |
105 |
if incinstall != None: |
106 |
Default(escript_env.Install(incinstall, incs)) |
107 |
|
108 |
Default(escript_env.Install(libdir, escript_lib)) |
109 |
Default(escript_env.Install(libdir2, escript_lib)) |
110 |
if libinstall != None: |
111 |
Default(escript_env.Install(libinstall, escript_lib)) |