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

Contents of /trunk/solvers/ida/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1507 - (show annotations) (download)
Wed Jun 27 11:25:37 2007 UTC (15 years, 7 months ago) by jpye
File size: 1530 byte(s)
Moving integrators to own directory, about to make them self-contained shared libraries.
1 Import('libascend_env')
2
3 objs = []
4
5 csrcs = Split("""
6 integrator.c lsode.c samplelist.c aww.c
7 """)
8
9 solver_env = libascend_env.Copy()
10 if solver_env.get('WITH_MMIO'):
11 solver_env.Append(CPPPATH=["#/mmio"])
12
13
14 for c in csrcs:
15 objs += solver_env.SharedObject(c)
16
17 if solver_env.get('WITH_IDA'):
18 sundials_env = solver_env.Copy()
19
20 if solver_env.get('SUNDIALS_CPPPATH'):
21 sundials_env.Append(CPPPATH=[solver_env.get('SUNDIALS_CPPPATH')])
22
23 if solver_env.get('SUNDIALS_CPPPATH_EXTRA'):
24 sundials_env.AppendUnique(
25 CPPPATH=solver_env.get('SUNDIALS_CPPPATH_EXTRA')
26 )
27
28 sundials_env.Append(CPPDEFINES=[('SUNDIALS_VERSION_MAJOR',"$SUNDIALS_VERSION_MAJOR"),('SUNDIALS_VERSION_MINOR',"$SUNDIALS_VERSION_MINOR")])
29
30 libascend_env.Append(
31 LIBPATH=[solver_env.get('SUNDIALS_LIBPATH')]
32 , LIBS=[solver_env.get('SUNDIALS_LIBS')]
33 )
34
35 idasrcs = ['ida.c','idalinear.c', 'idaanalyse.c']
36 for s in idasrcs:
37 objs += sundials_env.SharedObject(s)
38 else:
39 pass
40 # print "NO IDA REQUESTED!"
41
42 if 'LSOD' in solver_env.get('WITH_SOLVERS'):
43 if solver_env.get('F2C_LIBPATH'):
44 libascend_env.AppendUnique(LIBPATH=[solver_env.get('F2C_LIBPATH')])
45 if solver_env.get('F2C_LIB'):
46 libascend_env.AppendUnique(LIBS=[solver_env.get('F2C_LIB')])
47
48 #--------------------
49 # INSTALL
50
51 import glob
52
53 if libascend_env.get('CAN_INSTALL'):
54 installdir = Dir(libascend_env.subst("$INSTALL_ROOT$INSTALL_INCLUDE/integrator"))
55
56 headers = glob.glob("*.h")
57 libascend_env.InstallHeader(installdir,headers)
58
59 print "OBJS =",objs
60 Return('objs')
61
62 # vim: set syntax=python:
63

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