/[escript]/branches/scons-dev/escript/src/SConscript
ViewVC logotype

Contents of /branches/scons-dev/escript/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1671 - (show annotations)
Thu Jul 24 04:33:41 2008 UTC (14 years ago) by ksteube
File size: 3714 byte(s)
Now detecting and using UMFPACK, MKL

1 #
2 # $Id$
3 #
4 #######################################################
5 #
6 # Copyright 2003-2007 by ACceSS MNRF
7 # Copyright 2007 by University of Queensland
8 #
9 # http://esscc.uq.edu.au
10 # Primary Business: Queensland, Australia
11 # Licensed under the Open Software License version 3.0
12 # http://www.opensource.org/licenses/osl-3.0.php
13 #
14 #######################################################
15 #
16
17 import os
18 Import('*')
19
20 if 'Clone' in dir(env): local_env = env_mpi.Clone() # scons-0.98
21 else: local_env = env_mpi.Copy() # scons-0.96
22
23 if 'Clone' in dir(env): py_wrapper_local_env = env_mpi.Clone() # scons-0.98
24 else: py_wrapper_local_env = env_mpi.Copy() # scons-0.96
25
26 # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules
27 del py_wrapper_local_env['SHLIBPREFIX']
28
29 sources = """
30 AbstractContinuousDomain.cpp
31 AbstractDomain.cpp
32 AbstractSystemMatrix.cpp
33 AbstractTransportProblem.cpp
34 Data.cpp
35 DataAbstract.cpp
36 DataArrayView.cpp
37 DataBlocks2D.cpp
38 DataC.cpp
39 DataConstant.cpp
40 DataEmpty.cpp
41 DataException.cpp
42 DataExpanded.cpp
43 DataFactory.cpp
44 DataTagged.cpp
45 DataVector.cpp
46 DomainException.cpp
47 FunctionSpace.cpp
48 FunctionSpaceException.cpp
49 FunctionSpaceFactory.cpp
50 NullDomain.cpp
51 SystemMatrixException.cpp
52 Taipan.cpp
53 TransportProblemException.cpp
54 Utils.cpp
55 blocktimer.c
56 """.split()
57 headers = """
58 AbstractContinuousDomain.h
59 AbstractDomain.h
60 AbstractSystemMatrix.h
61 AbstractTransportProblem.h
62 BinaryOp.h
63 Data.h
64 DataAbstract.h
65 DataAlgorithm.h
66 DataArrayView.h
67 DataBlocks2D.h
68 DataC.h
69 DataConstant.h
70 DataEmpty.h
71 DataException.h
72 DataExpanded.h
73 DataFactory.h
74 DataTagged.h
75 DataVector.h
76 DomainException.h
77 FunctionSpace.h
78 FunctionSpaceException.h
79 FunctionSpaceFactory.h
80 LocalOps.h
81 NullDomain.h
82 SystemMatrixException.h
83 Taipan.h
84 TransportProblemException.h
85 UnaryFuncs.h
86 UnaryOp.h
87 UtilC.h
88 Utils.h
89 blocktimer.h
90 esysmpi.h
91 system_dep.h
92 """.split()
93
94 local_env.Append(LIBS = [ 'esysUtils'] + env['sys_libs'] )
95 py_wrapper_local_env.Append(LIBS = [ 'escript', 'esysUtils'] + env['sys_libs'])
96
97 lib = local_env.SharedLibrary('escript', sources)
98 env.Alias('target_escript_so', lib)
99
100 py_wrapper_lib = py_wrapper_local_env.SharedLibrary('escriptcpp', '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 tmp4 = py_wrapper_local_env.Install(local_env['pyinstall']+'/escript', py_wrapper_lib)
112 env.Alias('target_install_escriptcpp_so', tmp4)
113
114 #windows specific mod
115 if os.name == 'nt':
116 py_wrapper_local_env.InstallAs(target = [ local_env['pyinstall']+'/escript/escriptcpp.pyd', \
117 local_env['pyinstall']+'/escript/escriptcpp.lib', \
118 local_env['pyinstall']+'/escript/escriptcpp.exp' ], \
119 source = py_wrapper_lib)
120
121 # export the lib target since tests will depend on it
122 # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
123 # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
124 dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
125 Export('dep_lib')
126
127 # Call the python sconscript
128 env.SConscript(dirs = ['#/escript/py_src'], build_dir='py', duplicate=0)
129
130 # Call the unit tests SConscript
131 local_env.SConscript(dirs = ['#/escript/test'], build_dir='#/build/$PLATFORM/escript/test', duplicate=0)
132

  ViewVC Help
Powered by ViewVC 1.1.26