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

Annotation of /trunk/escript/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


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

1 ksteube 1811 ########################################################
2 ksteube 1705 #
3 ksteube 1811 # Copyright (c) 2003-2008 by University of Queensland
4     # Earth Systems Science Computational Center (ESSCC)
5     # http://www.uq.edu.au/esscc
6 ksteube 1705 #
7 ksteube 1811 # 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 ksteube 1705 #
11 ksteube 1811 ########################################################
12 ksteube 1705
13 ksteube 1811
14 gross 700 import os
15 jgs 181 Import('*')
16    
17 ksteube 1705 local_env = clone_env(env_mpi)
18     py_wrapper_local_env = clone_env(env_mpi)
19    
20 robwdcock 682 # 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 jgs 181
23 ksteube 1705 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 jfenwick 1796 DataMaths.cpp
38 ksteube 1705 DataTagged.cpp
39 jfenwick 1796 DataTypes.cpp
40 ksteube 1705 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 jfenwick 1796 DataMaths.h
69 ksteube 1705 DataTagged.h
70 jfenwick 1796 DataTypes.h
71 ksteube 1705 DataVector.h
72     DomainException.h
73     FunctionSpace.h
74     FunctionSpaceException.h
75     FunctionSpaceFactory.h
76     LocalOps.h
77     NullDomain.h
78 jfenwick 1872 Pointers.h
79 ksteube 1705 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 jgs 277
91 ksteube 1705 local_env.Append(LIBS = [ 'esysUtils'] + env['sys_libs'] )
92     py_wrapper_local_env.Append(LIBS = [ 'escript', 'esysUtils'] + env['sys_libs'])
93 jgs 181
94 phornby 1847 module_name = 'escript'
95     py_wrapper_name = module_name + 'cpp'
96 phornby 1840
97 phornby 1847 lib = local_env.SharedLibrary(module_name, sources)
98 ksteube 1705 env.Alias('target_escript_so', lib)
99 gross 700
100 phornby 1847 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'escriptcpp.cpp')
101 ksteube 1705 env.Alias('target_escriptcpp_so', py_wrapper_lib)
102 jgs 277
103 ksteube 1705 include_path = Dir('escript', local_env['incinstall'])
104 jgs 190
105 ksteube 1705 tmp1 = local_env.Install(include_path, headers )
106     env.Alias('target_install_escript_headers', [tmp1])
107 ksteube 1312
108 ksteube 1705 tmp3 = local_env.Install(local_env['libinstall'], lib)
109     env.Alias('target_install_escript_so', tmp3)
110 woo409 757
111 trankine 1428 #windows specific mod
112 phornby 1847 tmp_inst = os.path.join(local_env['pyinstall'],module_name)
113 trankine 1428 if os.name == 'nt':
114 phornby 1840 wrapper_postfix = '.pyd'
115 ksteube 1705 else:
116 phornby 1840 wrapper_postfix = '.so'
117    
118 phornby 1847 share_name = os.path.join(tmp_inst,py_wrapper_name+wrapper_postfix)
119 phornby 1840
120 phornby 1847 tmp4 = py_wrapper_local_env.InstallAs(target=share_name,
121     source=py_wrapper_lib[0])
122 phornby 1840
123 ksteube 1705 env.Alias('target_install_escriptcpp_so', tmp4)
124 trankine 1428
125 robwdcock 682 # 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 ksteube 1705 dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
129 robwdcock 682 Export('dep_lib')
130 jgs 277
131 robwdcock 682 # Call the python sconscript
132     env.SConscript(dirs = ['#/escript/py_src'], build_dir='py', duplicate=0)
133 jgs 277
134 robwdcock 682 # Call the unit tests SConscript
135     local_env.SConscript(dirs = ['#/escript/test'], build_dir='#/build/$PLATFORM/escript/test', duplicate=0)
136 ksteube 1705

  ViewVC Help
Powered by ViewVC 1.1.26