/[escript]/trunk/esysUtils/SConstruct
ViewVC logotype

Diff of /trunk/esysUtils/SConstruct

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

revision 191 by jgs, Mon Nov 21 04:10:12 2005 UTC revision 325 by jgs, Wed Dec 7 02:08:17 2005 UTC
# Line 1  Line 1 
1  esysroot = None  # Scons configuration file for esysUtils
2    
3    import os
4    import sys
5    
6    #
7    # ensure correct versions of python and scons
8    
9    EnsurePythonVersion(2,3)
10    EnsureSConsVersion(0,96)
11    
12    #
13    # set appropriate defaults for configuration variables
14    
15    esysroot = Dir('#..')
16    dodebug = 0
17    usegcc = 0
18    options = None
19    
20    #
21    # import configuration variables passed in from
22    # calling SConscript (if any)
23    
24  Import('*')  Import('*')
25    
26  if esysroot == None:  #
27    esysroot = Dir('#..')  # retreive command-line arguments if any
28    
29    if ARGUMENTS.get('debug',0):
30      dodebug = 1
31    
32    if ARGUMENTS.get('usegcc',0):
33      usegcc = 1
34    
35    if ARGUMENTS.get('options',0):
36      options = ARGUMENTS.get('options',0)
37    
38    #
39    # determine platform
40    
41    env = Environment(ENV = os.environ)
42    platform = env['PLATFORM']
43    
44    #
45    # determine hostname
46    
47    import socket
48    hostname = socket.gethostname()
49    
50    #
51    # export esysroot
52    
53  Export(["esysroot"])  Export(["esysroot"])
54    
55    #
56    # set and export library directory
57    
58  libdir = Dir(str(esysroot) + '/esysUtils/lib')  libdir = Dir(str(esysroot) + '/esysUtils/lib')
59  Export(["libdir"])  Export(["libdir"])
60    
61  python_path = '/raid2/tools/python-2.3.4/include/python2.3'  #
62  boost_path = '/raid2/tools/boost/include/boost-1_31'  # load and export configuration settings
63    
64    options_dir = str(esysroot) + '/scons'
65    sys.path.append(options_dir)
66    
67    from default_options import *
68    
69    if hostname=='ess':
70      from ess_options import *
71    
72    if usegcc==1:
73      from gcc_options import *
74    
75    if options!=None:
76      exec "from " + options + " import *"
77    
78    if dodebug==1:
79      cxx_flags=cxx_flags_debug
80    
81  Export(["python_path"])  Export(["python_path"])
82  Export(["boost_path"])  Export(["boost_path"])
83    Export(["cxx"])
84    Export(["cxx_flags"])
85    Export(["ar_flags"])
86    
87  cxx_flags = '-O0 -openmp -openmp_report0 -tpp2 -ansi -ansi_alias -no-gcc -fpic -w1'  #
88    # print out build configuration for this module
89    
90  Export(["cxx_flags"])  print "Build configuration for module: esysUtils"
91    print "         dodebug: ", dodebug
92    print "          usegcc: ", usegcc
93    print "             cxx: ", cxx
94    print "        platform: ", platform
95    print "        hostname: ", hostname
96    
97    #
98    # call the SConscript to do the actual build
99    
100  SConscript('src/SConscript', src_dir='src', build_dir='obj', duplicate=0)  SConscript(dirs=['src'], build_dir='obj/src', duplicate=0)
101    SConscript(dirs=['test/EsysException'], build_dir='obj/test/EsysException', duplicate=0)

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

  ViewVC Help
Powered by ViewVC 1.1.26