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

Annotation of /trunk/escript/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1845 - (hide annotations)
Fri Oct 3 05:23:47 2008 UTC (11 years ago) by gross
File size: 3410 byte(s)
some naming problem for the installation of escriptcpp and finleycpp. Apparently this came is trough some mofifications in windows
1 ksteube 1811
2     ########################################################
3 ksteube 1705 #
4 ksteube 1811 # Copyright (c) 2003-2008 by University of Queensland
5     # Earth Systems Science Computational Center (ESSCC)
6     # http://www.uq.edu.au/esscc
7 ksteube 1705 #
8 ksteube 1811 # Primary Business: Queensland, Australia
9     # Licensed under the Open Software License version 3.0
10     # http://www.opensource.org/licenses/osl-3.0.php
11 ksteube 1705 #
12 ksteube 1811 ########################################################
13 ksteube 1705
14 ksteube 1811
15 gross 700 import os
16 jgs 181 Import('*')
17    
18 ksteube 1705 local_env = clone_env(env_mpi)
19     py_wrapper_local_env = clone_env(env_mpi)
20    
21 robwdcock 682 # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules
22     del py_wrapper_local_env['SHLIBPREFIX']
23 jgs 181
24 ksteube 1705 sources = """
25     AbstractContinuousDomain.cpp
26     AbstractDomain.cpp
27     AbstractSystemMatrix.cpp
28     AbstractTransportProblem.cpp
29     Data.cpp
30     DataAbstract.cpp
31     DataBlocks2D.cpp
32     DataC.cpp
33     DataConstant.cpp
34     DataEmpty.cpp
35     DataException.cpp
36     DataExpanded.cpp
37     DataFactory.cpp
38 jfenwick 1796 DataMaths.cpp
39 ksteube 1705 DataTagged.cpp
40 jfenwick 1796 DataTypes.cpp
41 ksteube 1705 DataVector.cpp
42     DomainException.cpp
43     FunctionSpace.cpp
44     FunctionSpaceException.cpp
45     FunctionSpaceFactory.cpp
46     NullDomain.cpp
47     SystemMatrixException.cpp
48     Taipan.cpp
49     TransportProblemException.cpp
50     Utils.cpp
51     blocktimer.c
52     """.split()
53     headers = """
54     AbstractContinuousDomain.h
55     AbstractDomain.h
56     AbstractSystemMatrix.h
57     AbstractTransportProblem.h
58     BinaryOp.h
59     Data.h
60     DataAbstract.h
61     DataAlgorithm.h
62     DataBlocks2D.h
63     DataC.h
64     DataConstant.h
65     DataEmpty.h
66     DataException.h
67     DataExpanded.h
68     DataFactory.h
69 jfenwick 1796 DataMaths.h
70 ksteube 1705 DataTagged.h
71 jfenwick 1796 DataTypes.h
72 ksteube 1705 DataVector.h
73     DomainException.h
74     FunctionSpace.h
75     FunctionSpaceException.h
76     FunctionSpaceFactory.h
77     LocalOps.h
78     NullDomain.h
79     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 1840
95 gross 1845 lib = local_env.SharedLibrary('escript', sources)
96 ksteube 1705 env.Alias('target_escript_so', lib)
97 gross 700
98 ksteube 1705 py_wrapper_lib = py_wrapper_local_env.SharedLibrary('escriptcpp', 'escriptcpp.cpp')
99     env.Alias('target_escriptcpp_so', py_wrapper_lib)
100 jgs 277
101 ksteube 1705 include_path = Dir('escript', local_env['incinstall'])
102 jgs 190
103 ksteube 1705 tmp1 = local_env.Install(include_path, headers )
104     env.Alias('target_install_escript_headers', [tmp1])
105 ksteube 1312
106 ksteube 1705 tmp3 = local_env.Install(local_env['libinstall'], lib)
107     env.Alias('target_install_escript_so', tmp3)
108 woo409 757
109 trankine 1428 #windows specific mod
110 gross 1845 tmp_inst = os.path.join(local_env['pyinstall'],'escript')
111 trankine 1428 if os.name == 'nt':
112 phornby 1840 wrapper_postfix = '.pyd'
113     source_lib = py_wrapper_lib[0]
114 ksteube 1705 else:
115 phornby 1840 wrapper_postfix = '.so'
116     source_lib = py_wrapper_lib
117    
118 gross 1845 share_name = os.path.join(tmp_inst,'escriptcpp'+wrapper_postfix)
119 phornby 1840
120     tmp4 = py_wrapper_local_env.InstallAs(target=share_name, source=source_lib)
121    
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