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

Diff of /trunk/finley/SConstruct

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

revision 192 by jgs, Mon Nov 21 04:52:14 2005 UTC revision 246 by jgs, Tue Nov 29 04:27:00 2005 UTC
# Line 1  Line 1 
1  esysroot = None  # Scons configuration file for finley
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  libinstall = None
17    dodebug = 0
18    usegcc = 0
19    options = None
20    
21    #
22    # import configuration variables passed in from
23    # calling SConscript (if any)
24    
25  Import('*')  Import('*')
26    
27  if esysroot == None:  #
28    esysroot = Dir('#..')  # retreive command-line arguments if any
 Export(["esysroot"])  
29    
30    if ARGUMENTS.get('libinstall',0):
31      libinstall = ARGUMENTS.get('libinstall',0)
32  Export(["libinstall"])  Export(["libinstall"])
33    
34    if ARGUMENTS.get('debug',0):
35      dodebug = 1
36    
37    if ARGUMENTS.get('usegcc',0):
38      usegcc = 1
39    
40    if ARGUMENTS.get('options',0):
41      options = ARGUMENTS.get('options',0)
42    
43    #
44    # determine platform
45    
46    env = Environment(ENV = os.environ)
47    platform = env['PLATFORM']
48    
49    #
50    # determine hostname
51    
52    hostname = os.environ['HOSTNAME']
53    
54    #
55    # export esysroot
56    
57    Export(["esysroot"])
58    
59    #
60    # set and export library directory
61    
62  libdir = Dir(str(esysroot) + '/finley/lib')  libdir = Dir(str(esysroot) + '/finley/lib')
63  Export(["libdir"])  Export(["libdir"])
64    
65  python_path = '/raid2/tools/python-2.3.4/include/python2.3'  #
66  boost_path = '/raid2/tools/boost/include/boost-1_31'  # load and export configuration settings
67    
68  Export(["python_path"])  options_dir = str(esysroot) + '/scons'
69  Export(["boost_path"])  sys.path.append(options_dir)
70    
71  cxx_flags = '-O0 -openmp -openmp_report0 -tpp2 -ansi -ansi_alias -no-gcc -fpic -w1'  if hostname=='ess':
72      from ess_options import *
73    
74  Export(["cxx_flags"])  if usegcc==1:
75      from gcc_options import *
76    
77    if options!=None:
78      exec "from " + options + " import *"
79    
80  cc_flags = '-O0 -openmp -openmp_report0 -tpp2 -ansi -ansi_alias -no-gcc -fpic -w1'  if dodebug==1:
81      cxx_flags=cxx_flags_debug
82      cc_flags=cc_flags_debug
83    
84    # add solver flags
85    cxx_flags = cxx_flags + ' -DSCSL'
86    cc_flags  = cc_flags + ' -DSCSL'
87    
88    Export(["python_path"])
89    Export(["boost_path"])
90    Export(["cxx"])
91    Export(["cc"])
92    Export(["cxx_flags"])
93  Export(["cc_flags"])  Export(["cc_flags"])
94    
95  SConscript(['src/finleyC/SConscript','src/CPPAdapter/SConscript'], duplicate=0)  #
96    # print out build configuration for this module
97    
98    print "############################################"
99    print "Build configuration for module: finley"
100    print "         dodebug: ", dodebug
101    print "          usegcc: ", usegcc
102    print "              cc: ", cc
103    print "             cxx: ", cxx
104    print "        platform: ", platform
105    print "        hostname: ", hostname
106    print "      libinstall: ", libinstall
107    print "############################################"
108    
109    #
110    # call the SConscript to do the actual build
111    
112    SConscript('src/finley/SConscript', src_dir='src/finley', build_dir='obj', duplicate=0)

Legend:
Removed from v.192  
changed lines
  Added in v.246

  ViewVC Help
Powered by ViewVC 1.1.26