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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 ksteube 1653 #
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 gross 700 import os
18 jgs 181 Import('*')
19    
20 ksteube 1658 if 'Clone' in dir(env): local_env = env_mpi.Clone() # scons-0.98
21     else: local_env = env_mpi.Copy() # scons-0.96
22 ksteube 1653
23 ksteube 1658 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 ksteube 1641
26 robwdcock 682 # 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 jgs 181
29 ksteube 1641 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 jgs 277
94 ksteube 1656 local_env.Append(LIBS = [ 'esysUtils'] + env['sys_libs'] )
95     py_wrapper_local_env.Append(LIBS = [ 'escript', 'esysUtils'] + env['sys_libs'])
96 jgs 181
97 ksteube 1641 lib = local_env.SharedLibrary('escript', sources)
98     env.Alias('target_escript_so', lib)
99 jgs 481
100 ksteube 1641 py_wrapper_lib = py_wrapper_local_env.SharedLibrary('escriptcpp', 'escriptcpp.cpp')
101     env.Alias('target_escriptcpp_so', py_wrapper_lib)
102 jgs 181
103 ksteube 1656 include_path = Dir('escript', local_env['incinstall'])
104 jgs 277
105 ksteube 1641 tmp1 = local_env.Install(include_path, headers )
106     env.Alias('target_install_escript_headers', [tmp1])
107    
108 ksteube 1656 tmp3 = local_env.Install(local_env['libinstall'], lib)
109 ksteube 1641 env.Alias('target_install_escript_so', tmp3)
110    
111 ksteube 1656 tmp4 = py_wrapper_local_env.Install(local_env['pyinstall']+'/escript', py_wrapper_lib)
112 ksteube 1641 env.Alias('target_install_escriptcpp_so', tmp4)
113    
114 trankine 1428 #windows specific mod
115     if os.name == 'nt':
116 ksteube 1656 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 ksteube 1641 source = py_wrapper_lib)
120 trankine 1428
121 robwdcock 682 # 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 ksteube 1656 dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
125 robwdcock 682 Export('dep_lib')
126 jgs 277
127 robwdcock 682 # Call the python sconscript
128     env.SConscript(dirs = ['#/escript/py_src'], build_dir='py', duplicate=0)
129 jgs 277
130 robwdcock 682 # Call the unit tests SConscript
131     local_env.SConscript(dirs = ['#/escript/test'], build_dir='#/build/$PLATFORM/escript/test', duplicate=0)
132 ksteube 1641

  ViewVC Help
Powered by ViewVC 1.1.26