/[ascend]/trunk/base/generic/solver/SConscript
ViewVC logotype

Annotation of /trunk/base/generic/solver/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 721 - (hide annotations) (download)
Mon Jul 3 06:22:42 2006 UTC (14 years, 3 months ago) by johnpye
File size: 1633 byte(s)
Added '--models' option to ascend-config.
Fixed a bug with packages.c wrt generating absolute paths to library files.
Added SCons directives to install header files in INSTALL_INCLUDE subdirs.
Changed rel.c so that init function is only run if provided in the package.
Added 'ospath_getabs' to convert relative paths into absolute paths by adding prefix of fully-resolved '.'
1 johnpye 669 Import('libascend_env')
2 johnpye 385
3 johnpye 463 csrcs = Split("""
4 johnpye 385
5     analyze.c bnd.c bndman.c calc.c cond_config.c
6     conditional.c conopt.c discrete.c incidence.c linsol.c
7     linsolqr.c linutils.c logrel.c logrelman.c model_reorder.c
8     mps.c mtx_basic.c mtx_linal.c mtx_perms.c mtx_query.c
9     mtx_reorder.c mtx_use_only.c rel.c relman.c
10     slv.c slv0.c slv1.c slv2.c slv3.c slv6.c slv7.c
11     slv8.c slv9.c slv9a.c slvDOF.c slv_common.c
12     slv_interface.c slv_stdcalls.c system.c var.c
13    
14 johnpye 669 integrator.c lsode.c samplelist.c
15 johnpye 392 """)
16 johnpye 385
17 johnpye 669 solver_env = libascend_env.Copy()
18 johnpye 507
19 johnpye 392 defs = []
20 johnpye 669 for i in libascend_env.get('WITH_SOLVERS'):
21 johnpye 507 solver_env.Append(CPPDEFINES=["STATIC_"+i])
22 johnpye 392
23 johnpye 463 objs = []
24     for c in csrcs:
25 johnpye 507 objs += solver_env.SharedObject(c)
26 johnpye 669
27     if solver_env.get('WITH_IDA'):
28     sundials_env = solver_env.Copy()
29     sundials_env.Append(
30     CPPPATH=([solver_env.get('IDA_CPPPATH')])
31     )
32     if solver_env.get('IDA_CPPPATH_EXTRA'):
33     sundials_env.Append(
34     CPPPATH=solver_env.get('IDA_CPPPATH_EXTRA')
35     )
36    
37     libascend_env.Append(
38     LIBPATH=[solver_env.get('IDA_LIBPPATH')]
39     , LIBS=[solver_env.get('IDA_LIB')]
40     )
41    
42     objs += sundials_env.SharedObject('ida.c');
43     else:
44     print "NO IDA REQUESTED!"
45    
46     if 'LSOD' in solver_env.get('WITH_SOLVERS'):
47     if solver_env.get('F2C_LIBPATH'):
48     libascend_env.AppendUnique(LIBPATH=[solver_env.get('F2C_LIBPATH')])
49     if solver_env.get('F2C_LIB'):
50     libascend_env.AppendUnique(LIBS=[solver_env.get('F2C_LIB')])
51    
52 johnpye 721 #--------------------
53     # INSTALL
54    
55     import glob
56    
57     if libascend_env.get('CAN_INSTALL'):
58     installdir = libascend_env['INSTALL_ROOT']+libascend_env['INSTALL_INCLUDE']+'/solver'
59    
60     headers = glob.glob("*.h")
61     libascend_env.InstallHeader(installdir,headers)
62    
63 johnpye 463 Return('objs')

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