/[escript]/branches/refine/buckley/src/SConscript
ViewVC logotype

Annotation of /branches/refine/buckley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3745 - (hide annotations)
Tue Dec 13 07:14:22 2011 UTC (9 years, 11 months ago) by jfenwick
File size: 2600 byte(s)
Fixed missing params

1 jfenwick 3658
2    
3     ########################################################
4     #
5     # Copyright (c) 2003-2010 by University of Queensland
6     # Earth Systems Science Computational Center (ESSCC)
7     # http://www.uq.edu.au/esscc
8     #
9     # Primary Business: Queensland, Australia
10     # Licensed under the Open Software License version 3.0
11     # http://www.opensource.org/licenses/osl-3.0.php
12     #
13     ########################################################
14    
15    
16     import os
17     Import('*')
18    
19     local_env = env.Clone()
20     py_wrapper_local_env = env.Clone()
21     local_unroll_env = env.Clone()
22 jfenwick 3668 local_unroll_env.Append(CFLAGS = env['buckley_assemble_flags'])
23 jfenwick 3658
24    
25     # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules
26     del py_wrapper_local_env['SHLIBPREFIX']
27    
28     sources = """
29     OctTree.cc
30 jfenwick 3671 BuckleyDomain.cc
31     BuckleyException.cc
32 jfenwick 3658 """.split()
33     unroll_sources= """
34     OctCell.cc
35     LeafInfo.cc
36     """.split()
37    
38    
39     headers = """
40     FaceConsts.h
41     OctTree.h
42 jfenwick 3671 BuckleyDomain.h
43 jfenwick 3658 LeafInfo.h
44     OctCell.h
45 jfenwick 3671 BuckleyException.h
46 jfenwick 3658 system_dep.h
47     """.split()
48    
49 jfenwick 3706 local_env.Prepend(LIBS = ['escript', 'esysUtils', 'paso', 'pasowrap'])
50 jfenwick 3658
51     if IS_WINDOWS :
52     local_env.Append(CPPDEFINES = ['REFINE_EXPORTS'])
53    
54 jfenwick 3668 module_name = 'buckley'
55 jfenwick 3658
56     un = [ local_unroll_env.SharedObject(x) for x in unroll_sources]
57    
58     lib = local_env.SharedLibrary(module_name, sources+un)
59 jfenwick 3668 env.Alias('build_buckley_lib', lib)
60 jfenwick 3658
61 jfenwick 3668 include_path = Dir('buckley', local_env['incinstall'])
62 jfenwick 3658
63     hdr_inst1 = local_env.Install(include_path, headers )
64 jfenwick 3668 env.Alias('install_buckley_headers', hdr_inst1)
65 jfenwick 3658
66     lib_inst = local_env.Install(local_env['libinstall'], lib)
67 jfenwick 3668 env.Alias('install_buckley_lib', lib_inst)
68 jfenwick 3658
69     ### Python wrapper ###
70 jfenwick 3668 py_wrapper_local_env.Prepend(LIBS = ['buckley', 'escript', 'esysUtils', 'paso'])
71 jfenwick 3658 py_wrapper_name = module_name + 'cpp'
72 jfenwick 3668 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'buckleycpp.cpp')
73     env.Alias('build_buckleycpp_lib', py_wrapper_lib)
74 jfenwick 3658
75     tmp_inst = os.path.join(local_env['pyinstall'], module_name)
76     if IS_WINDOWS:
77     wrapper_ext = '.pyd'
78     else:
79     wrapper_ext = '.so'
80    
81     share_name = os.path.join(tmp_inst, py_wrapper_name+wrapper_ext)
82     mod_inst = py_wrapper_local_env.InstallAs(target=share_name,
83     source=py_wrapper_lib[0])
84 jfenwick 3668 env.Alias('install_buckleycpp_lib', mod_inst)
85 jfenwick 3658
86     # configure python module
87 jfenwick 3668 local_env.SConscript(dirs = ['#/buckley/py_src'], variant_dir='py', duplicate=0)
88 jfenwick 3658
89     # configure unit tests
90 jfenwick 3745 #local_env.SConscript(dirs = ['#/buckley/test/python'], variant_dir='$BUILD_DIR/$PLATFORM/buckley/test/python', duplicate=0, exports=['py_wrapper_lib'])
91 jfenwick 3658

  ViewVC Help
Powered by ViewVC 1.1.26