/[ascend]/branches/pallav/models/johnpye/fprops/SConstruct
ViewVC logotype

Annotation of /branches/pallav/models/johnpye/fprops/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2823 - (hide annotations) (download)
Tue Feb 17 06:38:36 2015 UTC (4 years, 9 months ago) by jpye
File size: 1040 byte(s)
restored files from non-svn backup

1 jpye 2654 #!/usr/bin/env python
2 jpye 1811 # 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 jpye 2654 import os, platform, sys
7 jpye 2299
8 jpye 2654 deft = "default"
9     if platform.system()=="Windows":
10     deft = "mingw"
11    
12 jpye 2695 vars = Variables()
13    
14     vars.Add(
15     'CC'
16     ,'C Compiler command'
17     ,"${HOST_PREFIX}gcc"
18     )
19    
20 jpye 2662 env = Environment(
21 jpye 2297 toolpath=['scons']
22 jpye 2654 ,tools = [deft ,'substinfile','swig']
23 jpye 2695 ,ENV={"TERM":os.environ.get('TERM'), "PATH":os.environ.get('PATH')}
24 jpye 2654 ,HOST_PREFIX=os.environ.get('HOST_PREFIX')
25 jpye 2297 )
26 jpye 1811
27 jpye 2695 Help(vars.GenerateHelpText(env))
28     vars.Update(env)
29 jpye 2654
30 jpye 2117 if WhereIs('ascend-config'):
31 jpye 2662 env.ParseConfig(['ascend-config','--libs','--cppflags'])
32     env['WITH_ASCEND'] = 1
33 jpye 2117 else:
34 jpye 2654 print "WARNING: no ascend-config in path, won't build ASCEND wrapper"
35 jpye 2662 env['WITH_ASCEND'] = 0
36 jpye 1811
37 jpye 2662 env.Append(
38 jpye 2664 CFLAGS=['-g','-Wall']
39 jpye 2236 )
40    
41 jpye 2662 env['EXTLIB_SUFFIX'] = "_ascend" + env.subst("$SHLIBSUFFIX")
42     env['EXTLIB_PREFIX'] = env.subst("$SHLIBPREFIX")
43     env['extfns'] = []
44     env['WITH_PYTHON'] = 1
45 jpye 2215
46 jpye 2662 env.SConscript("SConscript",["env"])
47 jpye 1811

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