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

Annotation of /trunk/finley/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 309 - (hide annotations)
Mon Dec 5 01:59:58 2005 UTC (13 years, 9 months ago) by jgs
File size: 2567 byte(s)
now load default options - by default!

1 jgs 214 # Scons configuration file for finley
2    
3     import os
4 jgs 217 import sys
5 jgs 214
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 jgs 192 libinstall = None
17 jgs 268 pyinstall = None
18 jgs 214 dodebug = 0
19     usegcc = 0
20 jgs 246 options = None
21 jgs 190
22 jgs 214 #
23     # import configuration variables passed in from
24     # calling SConscript (if any)
25    
26 jgs 190 Import('*')
27    
28 jgs 214 #
29     # retreive command-line arguments if any
30 jgs 190
31 jgs 214 if ARGUMENTS.get('libinstall',0):
32     libinstall = ARGUMENTS.get('libinstall',0)
33 jgs 192 Export(["libinstall"])
34    
35 jgs 268 if ARGUMENTS.get('pyinstall',0):
36     pyinstall = ARGUMENTS.get('pyinstall',0)
37     Export(["pyinstall"])
38    
39 jgs 214 if ARGUMENTS.get('debug',0):
40     dodebug = 1
41    
42     if ARGUMENTS.get('usegcc',0):
43     usegcc = 1
44    
45 jgs 246 if ARGUMENTS.get('options',0):
46     options = ARGUMENTS.get('options',0)
47    
48 jgs 214 #
49     # determine platform
50    
51     env = Environment(ENV = os.environ)
52     platform = env['PLATFORM']
53    
54     #
55     # determine hostname
56    
57     hostname = os.environ['HOSTNAME']
58    
59     #
60     # export esysroot
61    
62     Export(["esysroot"])
63    
64     #
65     # set and export library directory
66    
67 jgs 190 libdir = Dir(str(esysroot) + '/finley/lib')
68 jgs 182 Export(["libdir"])
69 jgs 288 libdir2 = Dir(str(esysroot) + '/lib')
70     Export(["libdir2"])
71 jgs 182
72 jgs 214 #
73 jgs 288 # set and export python directories
74 jgs 268
75     pydir = Dir(str(esysroot) + '/finley/lib/py_src')
76     Export(["pydir"])
77 jgs 288 pydir2 = Dir(str(esysroot) + '/esys/finley')
78     Export(["pydir2"])
79 jgs 268
80     #
81 jgs 214 # load and export configuration settings
82    
83 jgs 216 options_dir = str(esysroot) + '/scons'
84     sys.path.append(options_dir)
85 jgs 191
86 jgs 309 from default_options import *
87    
88 jgs 224 if hostname=='ess':
89 jgs 216 from ess_options import *
90 jgs 191
91 jgs 241 if usegcc==1:
92     from gcc_options import *
93    
94 jgs 246 if options!=None:
95     exec "from " + options + " import *"
96    
97 jgs 224 if dodebug==1:
98     cxx_flags=cxx_flags_debug
99     cc_flags=cc_flags_debug
100    
101 jgs 214 Export(["python_path"])
102     Export(["boost_path"])
103 jgs 223 Export(["cxx"])
104     Export(["cc"])
105 jgs 191 Export(["cxx_flags"])
106     Export(["cc_flags"])
107 jgs 277 Export(["boost_lib_path"])
108     Export(["boost_lib"])
109     Export(["sys_libs"])
110     Export(["solver_libs"])
111 jgs 191
112 jgs 214 #
113     # print out build configuration for this module
114    
115     print "Build configuration for module: finley"
116     print " dodebug: ", dodebug
117     print " usegcc: ", usegcc
118 jgs 223 print " cc: ", cc
119     print " cxx: ", cxx
120 jgs 214 print " platform: ", platform
121     print " hostname: ", hostname
122     print " libinstall: ", libinstall
123 jgs 268 print " pyinstall: ", pyinstall
124 jgs 214
125     #
126     # call the SConscript to do the actual build
127    
128 jgs 268 SConscript(dirs=['src/finley'], build_dir='obj/finley', duplicate=0)
129     SConscript(dirs=['py_src'], build_dir='obj/py_src', duplicate=0)
130 jgs 288 SConscript(dirs=['test/MeshAdapter'], build_dir='obj/test/MeshAdapter', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26