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

Contents of /trunk/escript/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1872 - (show annotations)
Mon Oct 13 00:18:55 2008 UTC (10 years, 10 months ago) by jfenwick
File size: 3475 byte(s)
Closing the moreshared branch

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 Pointers.h
79 SystemMatrixException.h
80 Taipan.h
81 TransportProblemException.h
82 UnaryFuncs.h
83 UnaryOp.h
84 UtilC.h
85 Utils.h
86 blocktimer.h
87 esysmpi.h
88 system_dep.h
89 """.split()
90
91 local_env.Append(LIBS = [ 'esysUtils'] + env['sys_libs'] )
92 py_wrapper_local_env.Append(LIBS = [ 'escript', 'esysUtils'] + env['sys_libs'])
93
94 module_name = 'escript'
95 py_wrapper_name = module_name + 'cpp'
96
97 lib = local_env.SharedLibrary(module_name, sources)
98 env.Alias('target_escript_so', lib)
99
100 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'escriptcpp.cpp')
101 env.Alias('target_escriptcpp_so', py_wrapper_lib)
102
103 include_path = Dir('escript', local_env['incinstall'])
104
105 tmp1 = local_env.Install(include_path, headers )
106 env.Alias('target_install_escript_headers', [tmp1])
107
108 tmp3 = local_env.Install(local_env['libinstall'], lib)
109 env.Alias('target_install_escript_so', tmp3)
110
111 #windows specific mod
112 tmp_inst = os.path.join(local_env['pyinstall'],module_name)
113 if os.name == 'nt':
114 wrapper_postfix = '.pyd'
115 else:
116 wrapper_postfix = '.so'
117
118 share_name = os.path.join(tmp_inst,py_wrapper_name+wrapper_postfix)
119
120 tmp4 = py_wrapper_local_env.InstallAs(target=share_name,
121 source=py_wrapper_lib[0])
122
123 env.Alias('target_install_escriptcpp_so', tmp4)
124
125 # export the lib target since tests will depend on it
126 # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
127 # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
128 dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
129 Export('dep_lib')
130
131 # Call the python sconscript
132 env.SConscript(dirs = ['#/escript/py_src'], build_dir='py', duplicate=0)
133
134 # Call the unit tests SConscript
135 local_env.SConscript(dirs = ['#/escript/test'], build_dir='#/build/$PLATFORM/escript/test', duplicate=0)
136

  ViewVC Help
Powered by ViewVC 1.1.26