/[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 325 by jgs, Wed Dec 7 02:08:17 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    Export(["pyinstall"])
38    
39    if ARGUMENTS.get('debug',0):
40      dodebug = 1
41    
42    if ARGUMENTS.get('usegcc',0):
43      usegcc = 1
44    
45    if ARGUMENTS.get('options',0):
46      options = ARGUMENTS.get('options',0)
47    
48    #
49    # determine platform
50    
51    env = Environment(ENV = os.environ)
52    platform = env['PLATFORM']
53    
54    #
55    # determine hostname
56    
57    import socket
58    hostname = socket.gethostname()
59    
60    #
61    # export esysroot
62    
63    Export(["esysroot"])
64    
65    #
66    # set and export library directory
67    
68  libdir = Dir(str(esysroot) + '/finley/lib')  libdir = Dir(str(esysroot) + '/finley/lib')
69  Export(["libdir"])  Export(["libdir"])
70    libdir2 = Dir(str(esysroot) + '/lib')
71    Export(["libdir2"])
72    
73  python_path = '/raid2/tools/python-2.3.4/include/python2.3'  #
74  boost_path = '/raid2/tools/boost/include/boost-1_31'  # set and export python directories
75    
76  Export(["python_path"])  pydir = Dir(str(esysroot) + '/finley/lib/py_src')
77  Export(["boost_path"])  Export(["pydir"])
78    pydir2 = Dir(str(esysroot) + '/esys/finley')
79    Export(["pydir2"])
80    
81  cxx_flags = '-O0 -openmp -openmp_report0 -tpp2 -ansi -ansi_alias -no-gcc -fpic -w1'  #
82    # load and export configuration settings
83    
84  Export(["cxx_flags"])  options_dir = str(esysroot) + '/scons'
85    sys.path.append(options_dir)
86    
87  cc_flags = '-O0 -openmp -openmp_report0 -tpp2 -ansi -ansi_alias -no-gcc -fpic -w1'  from default_options import *
88    
89  Export(["cc_flags"])  if hostname=='ess':
90      from ess_options import *
91    
92  SConscript(['src/finleyC/SConscript','src/CPPAdapter/SConscript'], duplicate=0)  if usegcc==1:
93      from gcc_options import *
94    
95    if options!=None:
96      exec "from " + options + " import *"
97    
98    if dodebug==1:
99      cxx_flags=cxx_flags_debug
100      cc_flags=cc_flags_debug
101    
102    Export(["python_path"])
103    Export(["boost_path"])
104    Export(["cxx"])
105    Export(["cc"])
106    Export(["cxx_flags"])
107    Export(["cc_flags"])
108    Export(["boost_lib_path"])
109    Export(["boost_lib"])
110    Export(["sys_libs"])
111    Export(["solver_libs"])
112    
113    #
114    # print out build configuration for this module
115    
116    print "Build configuration for module: finley"
117    print "         dodebug: ", dodebug
118    print "          usegcc: ", usegcc
119    print "              cc: ", cc
120    print "             cxx: ", cxx
121    print "        platform: ", platform
122    print "        hostname: ", hostname
123    print "      libinstall: ", libinstall
124    print "       pyinstall: ", pyinstall
125    
126    #
127    # call the SConscript to do the actual build
128    
129    SConscript(dirs=['src/finley'], build_dir='obj/finley', duplicate=0)
130    SConscript(dirs=['py_src'], build_dir='obj/py_src', duplicate=0)
131    SConscript(dirs=['test/MeshAdapter'], build_dir='obj/test/MeshAdapter', duplicate=0)

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

  ViewVC Help
Powered by ViewVC 1.1.26