/[ascend]/trunk/models/johnpye/fprops/SConstruct
ViewVC logotype

Contents of /trunk/models/johnpye/fprops/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2695 - (show annotations) (download)
Wed Mar 6 23:37:54 2013 UTC (7 years, 4 months ago) by jpye
File size: 1040 byte(s)
Add support for 'scons CC=clang' with FPROPS.
Remove unused #defines in ASCEND CUnit test suits
1 #!/usr/bin/env python
2 # Standalone 'SConstruct' to demonstrate how you can build
3 # this ASCEND external library against an existing copy of
4 # ASCEND installed on your system.
5
6 import os, platform, sys
7
8 deft = "default"
9 if platform.system()=="Windows":
10 deft = "mingw"
11
12 vars = Variables()
13
14 vars.Add(
15 'CC'
16 ,'C Compiler command'
17 ,"${HOST_PREFIX}gcc"
18 )
19
20 env = Environment(
21 toolpath=['scons']
22 ,tools = [deft ,'substinfile','swig']
23 ,ENV={"TERM":os.environ.get('TERM'), "PATH":os.environ.get('PATH')}
24 ,HOST_PREFIX=os.environ.get('HOST_PREFIX')
25 )
26
27 Help(vars.GenerateHelpText(env))
28 vars.Update(env)
29
30 if WhereIs('ascend-config'):
31 env.ParseConfig(['ascend-config','--libs','--cppflags'])
32 env['WITH_ASCEND'] = 1
33 else:
34 print "WARNING: no ascend-config in path, won't build ASCEND wrapper"
35 env['WITH_ASCEND'] = 0
36
37 env.Append(
38 CFLAGS=['-g','-Wall']
39 )
40
41 env['EXTLIB_SUFFIX'] = "_ascend" + env.subst("$SHLIBSUFFIX")
42 env['EXTLIB_PREFIX'] = env.subst("$SHLIBPREFIX")
43 env['extfns'] = []
44 env['WITH_PYTHON'] = 1
45
46 env.SConscript("SConscript",["env"])
47

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