/[ascend]/trunk/SConstruct
ViewVC logotype

Annotation of /trunk/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 385 - (hide annotations) (download)
Thu Mar 30 04:14:29 2006 UTC (14 years, 6 months ago) by johnpye
File size: 1544 byte(s)
First attempt at SCons build. This will build the static libraries
for me on Linux with GCC 4.0.2. Will work now on getting it to 
build the Tcl/Tk GUI.
1 johnpye 385 import os, commands, platform
2    
3     #------------------------------------------------------
4     # OPTIONS
5    
6     env = Environment(ENV=os.environ)
7     opts = Options(['options.cache', 'config.py'])
8     print "PLATFORM = ",platform.system()
9    
10     # TODO: add install options
11    
12     # TODO: OTHER OPTIONS?
13    
14     # TODO: flags for optimisation
15    
16     # Package linking option
17     opts.Add(EnumOption('PACKAGE_LINKING'
18     , 'Style of linking for external libraries'
19     , 'DYNAMIC_PACKAGES'
20     , ['DYNAMIC_PACKAGES', 'STATIC_PACKAGES', 'NO_PACKAGES'])
21     )
22    
23     opts.Update(env)
24     opts.Save('options.cache',env)
25    
26     Help(opts.GenerateHelpText(env))
27    
28     env.Append(CPPDEFINES=env['PACKAGE_LINKING'])
29    
30     #------------------------------------------------------
31     # CONFIGURATION
32    
33     conf = Configure(env
34     , custom_tests = {
35     # 'CheckIsNan' : CheckIsNan
36     # ,'CheckCppUnitConfig' : CheckCppUnitConfig
37     }
38     , config_h = "config.h"
39     )
40    
41     # Math library
42     if not conf.CheckLibWithHeader(['m','c','libc'], 'math.h', 'C'):
43     print 'Did not find libm.a or m.lib, exiting!'
44     Exit(1)
45    
46     # Where is 'isnan'?
47    
48     if not conf.CheckFunc('isnan'):
49     print "Didn't find isnan"
50     Exit(1)
51    
52     # TODO: -D_HPUX_SOURCE is needed
53    
54     # TODO: check size of void*
55    
56     #------------------------------------------------------
57     # SUBDIRECTORIES....
58    
59     env.Append(CPPPATH=['..'])
60    
61     env.SConscript(['base/generic/general/SConscript'],'env')
62    
63     env.SConscript(['base/generic/utilities/SConscript'],'env')
64    
65     env.SConscript(['base/generic/compiler/SConscript'],'env')
66    
67     env.SConscript(['base/generic/solver/SConscript'],'env')
68    
69     env.SConscript(['base/generic/packages/SConscript'],'env')

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22