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

Annotation of /trunk/escript/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1847 - (hide annotations)
Fri Oct 3 06:45:34 2008 UTC (11 years ago) by phornby
File size: 3463 byte(s)
OK, these get the blahcpp.so names correct now.


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

  ViewVC Help
Powered by ViewVC 1.1.26