/[escript]/branches/schroedinger/escript/src/SConscript
ViewVC logotype

Annotation of /branches/schroedinger/escript/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1864 - (hide annotations)
Thu Oct 9 03:09:30 2008 UTC (11 years, 7 months ago) by jfenwick
File size: 3529 byte(s)
Branch commit
It compiles but doesn't do much.


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 1864 DataLazy.cpp
38 jfenwick 1796 DataMaths.cpp
39 jfenwick 1864 DataReady.cpp
40 ksteube 1705 DataTagged.cpp
41 jfenwick 1796 DataTypes.cpp
42 ksteube 1705 DataVector.cpp
43     DomainException.cpp
44     FunctionSpace.cpp
45     FunctionSpaceException.cpp
46     FunctionSpaceFactory.cpp
47     NullDomain.cpp
48     SystemMatrixException.cpp
49     Taipan.cpp
50     TransportProblemException.cpp
51     Utils.cpp
52     blocktimer.c
53     """.split()
54     headers = """
55     AbstractContinuousDomain.h
56     AbstractDomain.h
57     AbstractSystemMatrix.h
58     AbstractTransportProblem.h
59     BinaryOp.h
60     Data.h
61     DataAbstract.h
62     DataAlgorithm.h
63     DataBlocks2D.h
64     DataC.h
65     DataConstant.h
66     DataEmpty.h
67     DataException.h
68     DataExpanded.h
69     DataFactory.h
70 jfenwick 1864 DataLazy.h
71 jfenwick 1796 DataMaths.h
72 jfenwick 1864 DataReady.h
73 ksteube 1705 DataTagged.h
74 jfenwick 1796 DataTypes.h
75 ksteube 1705 DataVector.h
76     DomainException.h
77     FunctionSpace.h
78     FunctionSpaceException.h
79     FunctionSpaceFactory.h
80     LocalOps.h
81     NullDomain.h
82 jfenwick 1820 Pointers.h
83 ksteube 1705 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 jgs 277
95 ksteube 1705 local_env.Append(LIBS = [ 'esysUtils'] + env['sys_libs'] )
96     py_wrapper_local_env.Append(LIBS = [ 'escript', 'esysUtils'] + env['sys_libs'])
97 jgs 181
98 jfenwick 1850 module_name = 'escript'
99     py_wrapper_name = module_name + 'cpp'
100    
101     lib = local_env.SharedLibrary(module_name, sources)
102 ksteube 1705 env.Alias('target_escript_so', lib)
103 gross 700
104 jfenwick 1850 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'escriptcpp.cpp')
105 ksteube 1705 env.Alias('target_escriptcpp_so', py_wrapper_lib)
106 jgs 277
107 ksteube 1705 include_path = Dir('escript', local_env['incinstall'])
108 jgs 190
109 ksteube 1705 tmp1 = local_env.Install(include_path, headers )
110     env.Alias('target_install_escript_headers', [tmp1])
111 ksteube 1312
112 ksteube 1705 tmp3 = local_env.Install(local_env['libinstall'], lib)
113     env.Alias('target_install_escript_so', tmp3)
114 woo409 757
115 trankine 1428 #windows specific mod
116 jfenwick 1850 tmp_inst = os.path.join(local_env['pyinstall'],module_name)
117 trankine 1428 if os.name == 'nt':
118 jfenwick 1850 wrapper_postfix = '.pyd'
119 ksteube 1705 else:
120 jfenwick 1850 wrapper_postfix = '.so'
121    
122     share_name = os.path.join(tmp_inst,py_wrapper_name+wrapper_postfix)
123    
124     tmp4 = py_wrapper_local_env.InstallAs(target=share_name,
125     source=py_wrapper_lib[0])
126    
127 ksteube 1705 env.Alias('target_install_escriptcpp_so', tmp4)
128 trankine 1428
129 robwdcock 682 # export the lib target since tests will depend on it
130     # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
131     # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
132 ksteube 1705 dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
133 robwdcock 682 Export('dep_lib')
134 jgs 277
135 robwdcock 682 # Call the python sconscript
136     env.SConscript(dirs = ['#/escript/py_src'], build_dir='py', duplicate=0)
137 jgs 277
138 robwdcock 682 # Call the unit tests SConscript
139     local_env.SConscript(dirs = ['#/escript/test'], build_dir='#/build/$PLATFORM/escript/test', duplicate=0)
140 ksteube 1705

  ViewVC Help
Powered by ViewVC 1.1.26