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

Diff of /trunk/escript/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/escript/src/Data/SConscript revision 191 by jgs, Mon Nov 21 04:10:12 2005 UTC trunk/escript/src/SConscript revision 1705 by ksteube, Thu Aug 14 05:56:40 2008 UTC
# Line 1  Line 1 
1  Import('*')  #
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  import os  import os
18  import string  Import('*')
19    
20    local_env = clone_env(env_mpi)
21    py_wrapper_local_env = clone_env(env_mpi)
22    
23    # 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    
26    sources = """
27        AbstractContinuousDomain.cpp
28        AbstractDomain.cpp
29        AbstractSystemMatrix.cpp
30        AbstractTransportProblem.cpp
31        Data.cpp
32        DataAbstract.cpp
33        DataArrayView.cpp
34        DataBlocks2D.cpp
35        DataC.cpp
36        DataConstant.cpp
37        DataEmpty.cpp
38        DataException.cpp
39        DataExpanded.cpp
40        DataFactory.cpp
41        DataTagged.cpp
42        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        DataArrayView.h
64        DataBlocks2D.h
65        DataC.h
66        DataConstant.h
67        DataEmpty.h
68        DataException.h
69        DataExpanded.h
70        DataFactory.h
71        DataTagged.h
72        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    
91    local_env.Append(LIBS = [ 'esysUtils'] + env['sys_libs'] )
92    py_wrapper_local_env.Append(LIBS = [ 'escript', 'esysUtils'] + env['sys_libs'])
93    
94    lib = local_env.SharedLibrary('escript', sources)
95    env.Alias('target_escript_so', lib)
96    
97    py_wrapper_lib = py_wrapper_local_env.SharedLibrary('escriptcpp', 'escriptcpp.cpp')
98    env.Alias('target_escriptcpp_so', py_wrapper_lib)
99    
100    include_path = Dir('escript', local_env['incinstall'])
101    
102    tmp1 = local_env.Install(include_path, headers )
103    env.Alias('target_install_escript_headers', [tmp1])
104    
105    tmp3 = local_env.Install(local_env['libinstall'], lib)
106    env.Alias('target_install_escript_so', tmp3)
107    
108    #windows specific mod
109    if os.name == 'nt':
110      tmp4 = py_wrapper_local_env.Install(local_env['pyinstall']+'/escript', ['escriptcpp.pyd', 'escriptcpp.lib', 'escriptcpp.exp'])
111    else:
112      tmp4 = py_wrapper_local_env.InstallAs(local_env['pyinstall']+'/escript/escriptcpp.so', py_wrapper_lib)
113    env.Alias('target_install_escriptcpp_so', tmp4)
114    
115    # export the lib target since tests will depend on it
116    # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
117    # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
118    dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
119    Export('dep_lib')
120    
121  escript_path = str(esysroot) + '/escript/inc'  # Call the python sconscript
122  esysUtils_path = str(esysroot) + '/esysUtils/inc'  env.SConscript(dirs = ['#/escript/py_src'], build_dir='py', duplicate=0)
123    
124  cpp_path = [escript_path,  # Call the unit tests SConscript
125              esysUtils_path,  local_env.SConscript(dirs = ['#/escript/test'], build_dir='#/build/$PLATFORM/escript/test', duplicate=0)
             python_path,  
             boost_path]  
   
 lib = 'escriptcpp'  
 sources = ['AbstractContinuousDomain.cpp',  
            'AbstractDomain.cpp',  
            'AbstractSystemMatrix.cpp',  
            'DataAbstract.cpp',  
            'DataArray.cpp',  
            'DataArrayView.cpp',  
            'DataBlocks2D.cpp',  
            'DataCached.cpp',  
            'DataC.cpp',  
            'DataConstant.cpp',  
            'Data.cpp',  
            'DataEmpty.cpp',  
            'DataExpanded.cpp',  
            'DataFactory.cpp',  
            'DataProf.cpp',  
            'DataTagged.cpp',  
            'DataVariable.cpp',  
            'DataVector.cpp',  
            'FunctionSpace.cpp',  
            'FunctionSpaceFactory.cpp',  
            'NullDomain.cpp',  
            'Taipan.cpp',  
            'escriptcpp.cpp']  
   
 escript_env = Environment(ENV = os.environ)  
   
 escript_env.Replace(CXX = 'icc')  
 escript_env.Replace(SHOBJSUFFIX = '.lo')  
 escript_env.Replace(CXXFLAGS = cxx_flags)  
 escript_env.Replace(CPPPATH = cpp_path)  
126    
 escript_lib = escript_env.SharedLibrary(lib, sources)  
 escript_env.Install(libdir, escript_lib)  

Legend:
Removed from v.191  
changed lines
  Added in v.1705

  ViewVC Help
Powered by ViewVC 1.1.26