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

Annotation of /trunk/escript/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1796 - (hide annotations)
Wed Sep 17 01:45:46 2008 UTC (11 years, 1 month ago) by jfenwick
File size: 3348 byte(s)
Merged noarrayview branch onto trunk.


1 ksteube 1705 #
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 1705 local_env = clone_env(env_mpi)
21     py_wrapper_local_env = clone_env(env_mpi)
22    
23 robwdcock 682 # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules
24     del py_wrapper_local_env['SHLIBPREFIX']
25 jgs 181
26 ksteube 1705 sources = """
27     AbstractContinuousDomain.cpp
28     AbstractDomain.cpp
29     AbstractSystemMatrix.cpp
30     AbstractTransportProblem.cpp
31     Data.cpp
32     DataAbstract.cpp
33     DataBlocks2D.cpp
34     DataC.cpp
35     DataConstant.cpp
36     DataEmpty.cpp
37     DataException.cpp
38     DataExpanded.cpp
39     DataFactory.cpp
40 jfenwick 1796 DataMaths.cpp
41 ksteube 1705 DataTagged.cpp
42 jfenwick 1796 DataTypes.cpp
43 ksteube 1705 DataVector.cpp
44     DomainException.cpp
45     FunctionSpace.cpp
46     FunctionSpaceException.cpp
47     FunctionSpaceFactory.cpp
48     NullDomain.cpp
49     SystemMatrixException.cpp
50     Taipan.cpp
51     TransportProblemException.cpp
52     Utils.cpp
53     blocktimer.c
54     """.split()
55     headers = """
56     AbstractContinuousDomain.h
57     AbstractDomain.h
58     AbstractSystemMatrix.h
59     AbstractTransportProblem.h
60     BinaryOp.h
61     Data.h
62     DataAbstract.h
63     DataAlgorithm.h
64     DataBlocks2D.h
65     DataC.h
66     DataConstant.h
67     DataEmpty.h
68     DataException.h
69     DataExpanded.h
70     DataFactory.h
71 jfenwick 1796 DataMaths.h
72 ksteube 1705 DataTagged.h
73 jfenwick 1796 DataTypes.h
74 ksteube 1705 DataVector.h
75     DomainException.h
76     FunctionSpace.h
77     FunctionSpaceException.h
78     FunctionSpaceFactory.h
79     LocalOps.h
80     NullDomain.h
81     SystemMatrixException.h
82     Taipan.h
83     TransportProblemException.h
84     UnaryFuncs.h
85     UnaryOp.h
86     UtilC.h
87     Utils.h
88     blocktimer.h
89     esysmpi.h
90     system_dep.h
91     """.split()
92 jgs 277
93 ksteube 1705 local_env.Append(LIBS = [ 'esysUtils'] + env['sys_libs'] )
94     py_wrapper_local_env.Append(LIBS = [ 'escript', 'esysUtils'] + env['sys_libs'])
95 jgs 181
96 ksteube 1705 lib = local_env.SharedLibrary('escript', sources)
97     env.Alias('target_escript_so', lib)
98 gross 700
99 ksteube 1705 py_wrapper_lib = py_wrapper_local_env.SharedLibrary('escriptcpp', 'escriptcpp.cpp')
100     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     if os.name == 'nt':
112 ksteube 1705 tmp4 = py_wrapper_local_env.Install(local_env['pyinstall']+'/escript', ['escriptcpp.pyd', 'escriptcpp.lib', 'escriptcpp.exp'])
113     else:
114     tmp4 = py_wrapper_local_env.InstallAs(local_env['pyinstall']+'/escript/escriptcpp.so', py_wrapper_lib)
115     env.Alias('target_install_escriptcpp_so', tmp4)
116 trankine 1428
117 robwdcock 682 # export the lib target since tests will depend on it
118     # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
119     # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
120 ksteube 1705 dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
121 robwdcock 682 Export('dep_lib')
122 jgs 277
123 robwdcock 682 # Call the python sconscript
124     env.SConscript(dirs = ['#/escript/py_src'], build_dir='py', duplicate=0)
125 jgs 277
126 robwdcock 682 # Call the unit tests SConscript
127     local_env.SConscript(dirs = ['#/escript/test'], build_dir='#/build/$PLATFORM/escript/test', duplicate=0)
128 ksteube 1705

  ViewVC Help
Powered by ViewVC 1.1.26