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

Contents of /trunk/base/generic/solver/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 913 - (show annotations) (download)
Sat Oct 28 03:55:19 2006 UTC (13 years, 8 months ago) by johnpye
File size: 2133 byte(s)
Added test for SUNDIALS version (2.2.1 and 2.3.0-pre are preferred)
Fixed silly warning message about ignored return values from CONSOLE_DEBUG on GCC.
1 Import('libascend_env')
2
3 csrcs = Split("""
4
5 analyze.c bnd.c bndman.c calc.c cond_config.c
6 conditional.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 integrator.c lsode.c samplelist.c
15 """)
16
17 solver_env = libascend_env.Copy()
18
19 defs = []
20 for i in libascend_env.get('WITH_SOLVERS'):
21 solver_env.Append(CPPDEFINES=["STATIC_"+i])
22
23 objs = []
24
25 if solver_env.get('WITH_CONOPT'):
26 solver_env.AppendUnique(CPPPATH=[solver_env.get('CONOPT_CPPPATH')])
27
28 if solver_env.get('LINKED_CONOPT'):
29 libascend_env.AppendUnique(
30 LIBPATH=[solver_env.get('CONOPT_LIBPATH')]
31 , LIBS=[solver_env.get('CONOPT_LIB')]
32 )
33
34 objs += solver_env.SharedObject('conopt.c')
35 # print "BUILDING CONOPT.OS"
36
37 for c in csrcs:
38 objs += solver_env.SharedObject(c)
39
40 if solver_env.get('WITH_IDA'):
41 sundials_env = solver_env.Copy()
42 sundials_env.Append(
43 CPPPATH=[solver_env.get('IDA_CPPPATH')]
44 ,CPPDEFINES=[
45 'SUNDIALS_VERSION_MAJOR=$SUNDIALS_VERSION_MAJOR'
46 ,'SUNDIALS_VERSION_MINOR=$SUNDIALS_VERSION_MINOR'
47 ]
48 )
49
50 if solver_env.get('IDA_CPPPATH_EXTRA'):
51 sundials_env.AppendUnique(
52 CPPPATH=solver_env.get('IDA_CPPPATH_EXTRA')
53 )
54
55 libascend_env.AppendUnique(
56 LIBPATH=[solver_env.get('IDA_LIBPATH')]
57 , LIBS=[solver_env.get('IDA_LIB')]
58 )
59
60 objs += sundials_env.SharedObject('ida.c');
61 else:
62 pass
63 # print "NO IDA REQUESTED!"
64
65 if 'LSOD' in solver_env.get('WITH_SOLVERS'):
66 if solver_env.get('F2C_LIBPATH'):
67 libascend_env.AppendUnique(LIBPATH=[solver_env.get('F2C_LIBPATH')])
68 if solver_env.get('F2C_LIB'):
69 libascend_env.AppendUnique(LIBS=[solver_env.get('F2C_LIB')])
70
71 #--------------------
72 # INSTALL
73
74 import glob
75
76 if libascend_env.get('CAN_INSTALL'):
77 installdir = libascend_env['INSTALL_ROOT']+libascend_env['INSTALL_INCLUDE']+'/solver'
78
79 headers = glob.glob("*.h")
80 libascend_env.InstallHeader(installdir,headers)
81
82 Return('objs')
83
84 # vim: set syntax=python:
85

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