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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 832 - (show annotations) (download)
Wed Aug 23 07:06:47 2006 UTC (13 years, 5 months ago) by johnpye
File size: 2009 byte(s)
Renamed testTrig to testfunc.a4c.
Removed some buildtime messages.
Added self-test to testfunc model.
Some windows-specific changes to SConstruct (need testing?)
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 )
45 if solver_env.get('IDA_CPPPATH_EXTRA'):
46 sundials_env.AppendUnique(
47 CPPPATH=solver_env.get('IDA_CPPPATH_EXTRA')
48 )
49
50 libascend_env.AppendUnique(
51 LIBPATH=[solver_env.get('IDA_LIBPATH')]
52 , LIBS=[solver_env.get('IDA_LIB')]
53 )
54
55 objs += sundials_env.SharedObject('ida.c');
56 else:
57 pass
58 # print "NO IDA REQUESTED!"
59
60 if 'LSOD' in solver_env.get('WITH_SOLVERS'):
61 if solver_env.get('F2C_LIBPATH'):
62 libascend_env.AppendUnique(LIBPATH=[solver_env.get('F2C_LIBPATH')])
63 if solver_env.get('F2C_LIB'):
64 libascend_env.AppendUnique(LIBS=[solver_env.get('F2C_LIB')])
65
66 #--------------------
67 # INSTALL
68
69 import glob
70
71 if libascend_env.get('CAN_INSTALL'):
72 installdir = libascend_env['INSTALL_ROOT']+libascend_env['INSTALL_INCLUDE']+'/solver'
73
74 headers = glob.glob("*.h")
75 libascend_env.InstallHeader(installdir,headers)
76
77 Return('objs')
78
79 # vim: set syntax=python:
80

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