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

Diff of /trunk/escript/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 224 by jgs, Fri Nov 25 00:33:27 2005 UTC
# Line 1  Line 1 
1  esysroot = None  # Scons configuration file for escript
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    libinstall = None
17    dodebug = 0
18    usegcc = 0
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('libinstall',0):
30      libinstall = ARGUMENTS.get('libinstall',0)
31    Export(["libinstall"])
32    
33    if ARGUMENTS.get('debug',0):
34      dodebug = 1
35    
36    if ARGUMENTS.get('usegcc',0):
37      usegcc = 1
38    
39    #
40    # determine platform
41    
42    env = Environment(ENV = os.environ)
43    platform = env['PLATFORM']
44    
45    #
46    # determine hostname
47    
48    hostname = os.environ['HOSTNAME']
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) + '/escript/lib')  libdir = Dir(str(esysroot) + '/escript/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    if hostname=='ess':
68      from ess_options import *
69    
70    if dodebug==1:
71      cxx_flags=cxx_flags_debug
72    
73  Export(["python_path"])  Export(["python_path"])
74  Export(["boost_path"])  Export(["boost_path"])
75    Export(["cxx"])
76    Export(["cxx_flags"])
77    
78  cxx_flags = '-O0 -openmp -openmp_report0 -tpp2 -ansi -ansi_alias -no-gcc -fpic -w1'  #
79    # print out build configuration for this module
80    
81  Export(["cxx_flags"])  print "############################################"
82    print "Build configuration for module: escript"
83    print "         dodebug: ", dodebug
84    print "          usegcc: ", usegcc
85    print "             cxx: ", cxx
86    print "        platform: ", platform
87    print "        hostname: ", hostname
88    print "      libinstall: ", libinstall
89    print "############################################"
90    
91    #
92    # call the SConscript to do the actual build
93    
94  SConscript('src/Data/SConscript', src_dir='src/Data', build_dir='obj', duplicate=0)  SConscript('src/Data/SConscript', src_dir='src/Data', build_dir='obj', duplicate=0)

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

  ViewVC Help
Powered by ViewVC 1.1.26