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

Contents of /trunk/paso/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 241 - (show annotations)
Mon Nov 28 06:14:47 2005 UTC (13 years, 6 months ago) by jgs
File size: 1844 byte(s)
if usegcc=1 is set on command line, load compiler options
fropm scons/gcc_options.py

1 # Scons configuration file for paso
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('*')
25
26 #
27 # 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"])
54
55 #
56 # set and export library directory
57
58 libdir = Dir(str(esysroot) + '/paso/lib')
59 Export(["libdir"])
60
61 #
62 # 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 usegcc==1:
71 from gcc_options import *
72
73 if dodebug==1:
74 cc_flags=cc_flags_debug
75
76 # add solver flags
77 cc_flags = cc_flags + ' -DSCSL'
78
79 Export(["python_path"])
80 Export(["boost_path"])
81 Export(["cc"])
82 Export(["cc_flags"])
83 Export(["ar_flags"])
84
85 #
86 # print out build configuration for this module
87
88 print "############################################"
89 print "Build configuration for module: paso"
90 print " dodebug: ", dodebug
91 print " usegcc: ", usegcc
92 print " cc: ", cc
93 print " platform: ", platform
94 print " hostname: ", hostname
95 print " libinstall: ", libinstall
96 print "############################################"
97
98 #
99 # call the SConscript to do the actual build
100
101 SConscript('src/SConscript', src_dir='src', build_dir='obj', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26