/[ascend]/trunk/solvers/ida/SConscript
ViewVC logotype

Diff of /trunk/solvers/ida/SConscript

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

revision 1507 by jpye, Wed Jun 27 11:25:37 2007 UTC revision 1509 by jpye, Wed Jun 27 13:08:47 2007 UTC
# Line 1  Line 1 
1  Import('libascend_env')  Import('env')
2    
3  objs = []  if 'IDA' in env['WITH_SOLVERS']:
4    
5  csrcs = Split("""      solver_env = env.Copy()
     integrator.c lsode.c samplelist.c aww.c  
 """)  
6    
7  solver_env = libascend_env.Copy()      if env.get('WITH_MMIO'):
8  if solver_env.get('WITH_MMIO'):          solver_env.Append(CPPPATH=["#/mmio"])
     solver_env.Append(CPPPATH=["#/mmio"])  
9    
10        if env.get('SUNDIALS_CPPPATH'):
11            solver_env.Append(CPPPATH=[env.get('SUNDIALS_CPPPATH')])
12    
13  for c in csrcs:      if env.get('SUNDIALS_CPPPATH_EXTRA'):
14      objs += solver_env.SharedObject(c)          solver_env.AppendUnique(
15                CPPPATH=env.get('SUNDIALS_CPPPATH_EXTRA')
 if solver_env.get('WITH_IDA'):  
     sundials_env = solver_env.Copy()  
   
     if solver_env.get('SUNDIALS_CPPPATH'):  
         sundials_env.Append(CPPPATH=[solver_env.get('SUNDIALS_CPPPATH')])  
   
     if solver_env.get('SUNDIALS_CPPPATH_EXTRA'):  
         sundials_env.AppendUnique(  
             CPPPATH=solver_env.get('SUNDIALS_CPPPATH_EXTRA')  
16          )          )
17    
18      sundials_env.Append(CPPDEFINES=[('SUNDIALS_VERSION_MAJOR',"$SUNDIALS_VERSION_MAJOR"),('SUNDIALS_VERSION_MINOR',"$SUNDIALS_VERSION_MINOR")])      solver_env.Append(
19            CPPDEFINES=[
20      libascend_env.Append(              ('SUNDIALS_VERSION_MAJOR',"$SUNDIALS_VERSION_MAJOR")
21          LIBPATH=[solver_env.get('SUNDIALS_LIBPATH')]              ,('SUNDIALS_VERSION_MINOR',"$SUNDIALS_VERSION_MINOR")
22          , LIBS=[solver_env.get('SUNDIALS_LIBS')]              ,'ASC_WITH_IDA'
23            ]
24      )      )
25    
26      idasrcs = ['ida.c','idalinear.c', 'idaanalyse.c']      solver_env.Append(
27      for s in idasrcs:          LIBPATH=[env.get('SUNDIALS_LIBPATH')]
28          objs += sundials_env.SharedObject(s)          , LIBS=[env.get('SUNDIALS_LIBS'),"ascend"]
29  else:      )
     pass  
 #   print "NO IDA REQUESTED!"  
   
 if 'LSOD' in solver_env.get('WITH_SOLVERS'):  
     if solver_env.get('F2C_LIBPATH'):  
         libascend_env.AppendUnique(LIBPATH=[solver_env.get('F2C_LIBPATH')])  
     if solver_env.get('F2C_LIB'):  
         libascend_env.AppendUnique(LIBS=[solver_env.get('F2C_LIB')])  
   
 #--------------------  
 # INSTALL  
   
 import glob  
30    
31  if libascend_env.get('CAN_INSTALL'):      srcs = ['ida.c','idalinear.c', 'idaanalyse.c']
32      installdir = Dir(libascend_env.subst("$INSTALL_ROOT$INSTALL_INCLUDE/integrator"))      libida = solver_env.SharedLibrary("ida",srcs)
33    
34      headers = glob.glob("*.h")      env['extfns'] += libida
     libascend_env.InstallHeader(installdir,headers)  
35    
36  print "OBJS =",objs      if env.get('CAN_INSTALL'):
37  Return('objs')          dir = Dir(env.subst("$INSTALL_ROOT$INSTALL_SOLVERS"))
38            env.InstallShared(dir,libida)
39    
40  # vim: set syntax=python:  # vim: set syntax=python:
   

Legend:
Removed from v.1507  
changed lines
  Added in v.1509

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