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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2661 by jpye, Thu Jan 17 00:15:12 2013 UTC revision 2662 by jpye, Fri Jan 18 00:34:51 2013 UTC
# Line 9  deft = "default" Line 9  deft = "default"
9  if platform.system()=="Windows":  if platform.system()=="Windows":
10      deft = "mingw"      deft = "mingw"
11    
12  fprops_env = Environment(  env = Environment(
13      toolpath=['scons']      toolpath=['scons']
14      ,tools = [deft ,'substinfile','swig']      ,tools = [deft ,'substinfile','swig']
15      ,ENV={"PATH":os.environ.get('PATH')}      ,ENV={"PATH":os.environ.get('PATH')}
16      ,HOST_PREFIX=os.environ.get('HOST_PREFIX')      ,HOST_PREFIX=os.environ.get('HOST_PREFIX')
17  )  )
18    
19  if fprops_env['HOST_PREFIX']:  if env['HOST_PREFIX']:
20      fprops_env['CC'] = "${HOST_PREFIX}-gcc"      env['CC'] = "${HOST_PREFIX}-gcc"
21      print "CC =",fprops_env['CC']      print "CC =",env['CC']
22    
23  if WhereIs('ascend-config'):  if WhereIs('ascend-config'):
24      fprops_env.ParseConfig(['ascend-config','--libs','--cppflags'])      env.ParseConfig(['ascend-config','--libs','--cppflags'])
25      fprops_env['WITH_ASCEND'] = 1      env['WITH_ASCEND'] = 1
26  else:  else:
27      print "WARNING: no ascend-config in path, won't build ASCEND wrapper"      print "WARNING: no ascend-config in path, won't build ASCEND wrapper"
28      fprops_env['WITH_ASCEND'] = 0      env['WITH_ASCEND'] = 0
29    
30  fprops_env.Append(  env.Append(
31      CFLAGS=['-g','-Wall','-O2']      CFLAGS=['-g','-Wall','-O2']
32  )  )
33    
34  #if WhereIs('gsl-config'):  env['EXTLIB_SUFFIX'] = "_ascend" + env.subst("$SHLIBSUFFIX")
35  #   fprops_env.ParseConfig(['gsl-config','--libs','--cflags'])  env['EXTLIB_PREFIX'] = env.subst("$SHLIBPREFIX")
36    env['extfns'] = []
37    env['WITH_PYTHON'] = 1
38    
39  #srcs = ['mbwr.c','asc_mbwr.c']  env.SConscript("SConscript",["env"])
 #fprops_env.SharedLibrary('mbwr_ascend',srcs)  
   
 fprops_env.SConscript("fluids/SConscript",['fprops_env'])  
   
 fprops_env.Depends('fluids.c','fluids/fluids_list.h')  
   
 coresrcs = ['fprops.c', 'color.c', 'refstate.c', 'ideal.c', 'helmholtz.c', 'pengrob.c'  
     , 'sat.c', 'derivs.c', 'solve_ph.c', 'solve_Tx.c', 'solve_px.c', 'fluids.c','cp0.c'  
     , 'zeroin.c','cubicroots.c'  
 ]  
   
 srcs = coresrcs + fprops_env['fluids'] + ['fluids/_rpp.c']  
   
 fprops_env['shobjs'] = [fprops_env.SharedObject(s) for s in srcs]  
   
 if fprops_env['WITH_ASCEND']:  
     fprops_env.SharedLibrary('fprops_ascend',fprops_env['shobjs'] + ['asc_fprops.c'])  
   
 fprops_env.SConscript('python/SConscript',['fprops_env'])  
40    

Legend:
Removed from v.2661  
changed lines
  Added in v.2662

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