/[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 1653 - (show annotations)
Wed Jul 16 00:31:11 2008 UTC (11 years, 10 months ago) by ksteube
File size: 3740 byte(s)
New scons scripts now work with scons-98 as well as scons-96...only
had to use env.Clone() instead of env.Copy().

Added copyright to each scons file.

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

  ViewVC Help
Powered by ViewVC 1.1.26