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

Contents of /trunk/escript/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2271 - (show annotations)
Mon Feb 16 05:08:29 2009 UTC (10 years, 8 months ago) by jfenwick
File size: 3715 byte(s)
Merging version 2269 to trunk

1 ########################################################
2 #
3 # Copyright (c) 2003-2008 by University of Queensland
4 # Earth Systems Science Computational Center (ESSCC)
5 # http://www.uq.edu.au/esscc
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Open Software License version 3.0
9 # http://www.opensource.org/licenses/osl-3.0.php
10 #
11 ########################################################
12
13
14 import os
15 Import('*')
16
17 local_env = clone_env(env_mpi)
18 py_wrapper_local_env = clone_env(env_mpi)
19
20 # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules
21 del py_wrapper_local_env['SHLIBPREFIX']
22
23 sources = """
24 AbstractContinuousDomain.cpp
25 AbstractDomain.cpp
26 AbstractSystemMatrix.cpp
27 AbstractTransportProblem.cpp
28 BufferGroup.cpp
29 Data.cpp
30 DataAbstract.cpp
31 DataBlocks2D.cpp
32 DataC.cpp
33 DataConstant.cpp
34 DataEmpty.cpp
35 DataException.cpp
36 DataExpanded.cpp
37 DataFactory.cpp
38 DataLazy.cpp
39 DataMaths.cpp
40 DataReady.cpp
41 DataTagged.cpp
42 DataTypes.cpp
43 DataVector.cpp
44 DomainException.cpp
45 EscriptParams.cpp
46 FunctionSpace.cpp
47 FunctionSpaceException.cpp
48 FunctionSpaceFactory.cpp
49 NullDomain.cpp
50 SystemMatrixException.cpp
51 Taipan.cpp
52 TransportProblemException.cpp
53 Utils.cpp
54 WrappedArray.cpp
55 """.split()
56 # blocktimer.c
57 headers = """
58 AbstractContinuousDomain.h
59 AbstractDomain.h
60 AbstractSystemMatrix.h
61 AbstractTransportProblem.h
62 BinaryOp.h
63 BufferGroup.h
64 Data.h
65 DataAbstract.h
66 DataAlgorithm.h
67 DataBlocks2D.h
68 DataC.h
69 DataConstant.h
70 DataEmpty.h
71 DataException.h
72 DataExpanded.h
73 DataFactory.h
74 DataLazy.h
75 DataMaths.h
76 DataReady.h
77 DataTagged.h
78 DataTypes.h
79 DataVector.h
80 DomainException.h
81 EscriptParams.h
82 FunctionSpace.h
83 FunctionSpaceException.h
84 FunctionSpaceFactory.h
85 LocalOps.h
86 NullDomain.h
87 Pointers.h
88 SystemMatrixException.h
89 Taipan.h
90 TransportProblemException.h
91 UnaryFuncs.h
92 UnaryOp.h
93 UtilC.h
94 Utils.h
95 WrappedArray.h
96 esysmpi.h
97 system_dep.h
98 """.split()
99 # blocktimer.h
100
101 local_env.Append(LIBS = [ 'esysUtils'] + env['sys_libs'] )
102
103 if IS_WINDOWS_PLATFORM :
104 local_env.Append(CPPDEFINES = ['ESCRIPT_EXPORTS'])
105
106 py_wrapper_local_env.Append(LIBS = [ 'escript', 'esysUtils'] + env['sys_libs'])
107
108 module_name = 'escript'
109 py_wrapper_name = module_name + 'cpp'
110
111 lib = local_env.SharedLibrary(module_name, sources)
112 env.Alias('target_escript_so', lib)
113
114 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'escriptcpp.cpp')
115 env.Alias('target_escriptcpp_so', py_wrapper_lib)
116
117 include_path = Dir('escript', local_env['incinstall'])
118
119 tmp1 = local_env.Install(include_path, headers )
120 env.Alias('target_install_escript_headers', [tmp1])
121
122 tmp3 = local_env.Install(local_env['libinstall'], lib)
123 env.Alias('target_install_escript_so', tmp3)
124
125 #windows specific mod
126 tmp_inst = os.path.join(local_env['pyinstall'],module_name)
127 if os.name == 'nt':
128 wrapper_postfix = '.pyd'
129 else:
130 wrapper_postfix = '.so'
131
132 share_name = os.path.join(tmp_inst,py_wrapper_name+wrapper_postfix)
133
134 tmp4 = py_wrapper_local_env.InstallAs(target=share_name,
135 source=py_wrapper_lib[0])
136
137 env.Alias('target_install_escriptcpp_so', tmp4)
138
139 # export the lib target since tests will depend on it
140 # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
141 # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
142 dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
143 Export('dep_lib')
144
145 # Call the python sconscript
146 env.SConscript(dirs = ['#/escript/py_src'], build_dir='py', duplicate=0)
147
148 # Call the unit tests SConscript
149 local_env.SConscript(dirs = ['#/escript/test'], build_dir='#/build/$PLATFORM/escript/test', duplicate=0)
150

  ViewVC Help
Powered by ViewVC 1.1.26