1 |
jgs |
192 |
libinstall = None |
2 |
jgs |
481 |
incinstall = None |
3 |
jgs |
192 |
|
4 |
jgs |
181 |
Import('*') |
5 |
|
|
|
6 |
|
|
import os |
7 |
jgs |
190 |
import string |
8 |
jgs |
181 |
|
9 |
jgs |
277 |
libname = 'escriptcpp' |
10 |
|
|
|
11 |
jgs |
474 |
escript_path = str(esysroot) + '/escript/src' |
12 |
jgs |
468 |
esysUtils_path = str(esysroot) + '/esysUtils/src' |
13 |
jgs |
181 |
|
14 |
jgs |
277 |
esysUtils_lib_path = str(esysroot) + '/esysUtils/lib' |
15 |
|
|
|
16 |
|
|
esysUtils_lib = str(esysUtils_lib_path) + '/libesysUtils.a' |
17 |
|
|
|
18 |
jgs |
190 |
cpp_path = [escript_path, |
19 |
|
|
esysUtils_path, |
20 |
|
|
python_path, |
21 |
|
|
boost_path] |
22 |
|
|
|
23 |
jgs |
484 |
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 |
|
|
'Utils.h'] |
55 |
jgs |
481 |
|
56 |
jgs |
181 |
sources = ['AbstractContinuousDomain.cpp', |
57 |
|
|
'AbstractDomain.cpp', |
58 |
|
|
'AbstractSystemMatrix.cpp', |
59 |
|
|
'DataAbstract.cpp', |
60 |
|
|
'DataArray.cpp', |
61 |
|
|
'DataArrayView.cpp', |
62 |
|
|
'DataBlocks2D.cpp', |
63 |
|
|
'DataCached.cpp', |
64 |
|
|
'DataC.cpp', |
65 |
|
|
'DataConstant.cpp', |
66 |
|
|
'Data.cpp', |
67 |
|
|
'DataEmpty.cpp', |
68 |
|
|
'DataExpanded.cpp', |
69 |
|
|
'DataFactory.cpp', |
70 |
|
|
'DataProf.cpp', |
71 |
|
|
'DataTagged.cpp', |
72 |
|
|
'DataVariable.cpp', |
73 |
|
|
'DataVector.cpp', |
74 |
|
|
'FunctionSpace.cpp', |
75 |
|
|
'FunctionSpaceFactory.cpp', |
76 |
|
|
'NullDomain.cpp', |
77 |
|
|
'Taipan.cpp', |
78 |
gross |
392 |
'Utils.cpp', |
79 |
jgs |
181 |
'escriptcpp.cpp'] |
80 |
|
|
|
81 |
jgs |
277 |
lib_path = [esysUtils_lib_path, |
82 |
|
|
boost_lib_path] |
83 |
|
|
|
84 |
|
|
libs = ['esysUtils', |
85 |
|
|
str(boost_lib)] |
86 |
|
|
|
87 |
|
|
libs.extend(sys_libs) |
88 |
|
|
|
89 |
jgs |
181 |
escript_env = Environment(ENV = os.environ) |
90 |
|
|
|
91 |
jgs |
223 |
escript_env.Replace(CXX = cxx) |
92 |
jgs |
181 |
escript_env.Replace(SHOBJSUFFIX = '.lo') |
93 |
|
|
escript_env.Replace(CXXFLAGS = cxx_flags) |
94 |
|
|
escript_env.Replace(CPPPATH = cpp_path) |
95 |
jgs |
277 |
escript_env.Replace(LIBPATH = lib_path) |
96 |
|
|
escript_env.Replace(LIBS = libs) |
97 |
jgs |
181 |
|
98 |
jgs |
277 |
escript_lib = escript_env.SharedLibrary(libname, sources) |
99 |
|
|
|
100 |
|
|
Depends(escript_lib, esysUtils_lib) |
101 |
|
|
|
102 |
jgs |
481 |
Default(escript_env.Install(incdir, incs)) |
103 |
|
|
Default(escript_env.Install(incdir2, incs)) |
104 |
|
|
if incinstall != None: |
105 |
|
|
Default(escript_env.Install(incinstall, incs)) |
106 |
|
|
|
107 |
jgs |
352 |
Default(escript_env.Install(libdir, escript_lib)) |
108 |
|
|
Default(escript_env.Install(libdir2, escript_lib)) |
109 |
jgs |
192 |
if libinstall != None: |
110 |
jgs |
352 |
Default(escript_env.Install(libinstall, escript_lib)) |