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

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

  ViewVC Help
Powered by ViewVC 1.1.26