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

Contents of /trunk/escript/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1847 - (show annotations)
Fri Oct 3 06:45:34 2008 UTC (11 years ago) by phornby
File size: 3463 byte(s)
OK, these get the blahcpp.so names correct now.


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 Data.cpp
29 DataAbstract.cpp
30 DataBlocks2D.cpp
31 DataC.cpp
32 DataConstant.cpp
33 DataEmpty.cpp
34 DataException.cpp
35 DataExpanded.cpp
36 DataFactory.cpp
37 DataMaths.cpp
38 DataTagged.cpp
39 DataTypes.cpp
40 DataVector.cpp
41 DomainException.cpp
42 FunctionSpace.cpp
43 FunctionSpaceException.cpp
44 FunctionSpaceFactory.cpp
45 NullDomain.cpp
46 SystemMatrixException.cpp
47 Taipan.cpp
48 TransportProblemException.cpp
49 Utils.cpp
50 blocktimer.c
51 """.split()
52 headers = """
53 AbstractContinuousDomain.h
54 AbstractDomain.h
55 AbstractSystemMatrix.h
56 AbstractTransportProblem.h
57 BinaryOp.h
58 Data.h
59 DataAbstract.h
60 DataAlgorithm.h
61 DataBlocks2D.h
62 DataC.h
63 DataConstant.h
64 DataEmpty.h
65 DataException.h
66 DataExpanded.h
67 DataFactory.h
68 DataMaths.h
69 DataTagged.h
70 DataTypes.h
71 DataVector.h
72 DomainException.h
73 FunctionSpace.h
74 FunctionSpaceException.h
75 FunctionSpaceFactory.h
76 LocalOps.h
77 NullDomain.h
78 SystemMatrixException.h
79 Taipan.h
80 TransportProblemException.h
81 UnaryFuncs.h
82 UnaryOp.h
83 UtilC.h
84 Utils.h
85 blocktimer.h
86 esysmpi.h
87 system_dep.h
88 """.split()
89
90 local_env.Append(LIBS = [ 'esysUtils'] + env['sys_libs'] )
91 py_wrapper_local_env.Append(LIBS = [ 'escript', 'esysUtils'] + env['sys_libs'])
92
93 module_name = 'escript'
94 py_wrapper_name = module_name + 'cpp'
95
96 lib = local_env.SharedLibrary(module_name, sources)
97 env.Alias('target_escript_so', lib)
98
99 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'escriptcpp.cpp')
100 env.Alias('target_escriptcpp_so', py_wrapper_lib)
101
102 include_path = Dir('escript', local_env['incinstall'])
103
104 tmp1 = local_env.Install(include_path, headers )
105 env.Alias('target_install_escript_headers', [tmp1])
106
107 tmp3 = local_env.Install(local_env['libinstall'], lib)
108 env.Alias('target_install_escript_so', tmp3)
109
110 #windows specific mod
111 tmp_inst = os.path.join(local_env['pyinstall'],module_name)
112 if os.name == 'nt':
113 wrapper_postfix = '.pyd'
114 else:
115 wrapper_postfix = '.so'
116
117 share_name = os.path.join(tmp_inst,py_wrapper_name+wrapper_postfix)
118
119 tmp4 = py_wrapper_local_env.InstallAs(target=share_name,
120 source=py_wrapper_lib[0])
121
122 env.Alias('target_install_escriptcpp_so', tmp4)
123
124 # export the lib target since tests will depend on it
125 # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
126 # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
127 dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
128 Export('dep_lib')
129
130 # Call the python sconscript
131 env.SConscript(dirs = ['#/escript/py_src'], build_dir='py', duplicate=0)
132
133 # Call the unit tests SConscript
134 local_env.SConscript(dirs = ['#/escript/test'], build_dir='#/build/$PLATFORM/escript/test', duplicate=0)
135

  ViewVC Help
Powered by ViewVC 1.1.26