1 |
jpye |
1508 |
Import('env') |
2 |
|
|
|
3 |
jpye |
1509 |
if 'LSODE' in env.get('WITH_SOLVERS'): |
4 |
|
|
|
5 |
|
|
solver_env = env.Copy() |
6 |
johnpye |
427 |
|
7 |
jpye |
1509 |
srcs = ['lsode.f','asc_lsode.c'] |
8 |
johnpye |
674 |
|
9 |
jpye |
1509 |
linpack_srcs = ['d1mach.c','dgbfa.f','dgbsl.f','dgefa.f','dgesl.f'] |
10 |
jpye |
1508 |
|
11 |
jpye |
1509 |
for s in linpack_srcs: |
12 |
|
|
srcs.append( "linpack/%s" % s ) |
13 |
jpye |
1508 |
|
14 |
jpye |
1509 |
if env.get('F2C_LIBPATH'): |
15 |
|
|
solver_env.AppendUnique(LIBPATH=[env.get('F2C_LIBPATH')]) |
16 |
jpye |
1508 |
|
17 |
jpye |
1509 |
if solver_env.get('F2C_LIB'): |
18 |
|
|
solver_env.AppendUnique(LIBS=[env.get('F2C_LIB')]) |
19 |
jpye |
1508 |
|
20 |
jpye |
1511 |
solver_env.AppendUnique( |
21 |
|
|
LIBS=['ascend'] |
22 |
|
|
,LIBPATH=['#'] |
23 |
|
|
) |
24 |
jpye |
1508 |
|
25 |
jpye |
1597 |
lib = solver_env.SharedLibrary('lsode',srcs + env['blasobjs'] |
26 |
|
|
,SHLIBSUFFIX = env['EXTLIB_SUFFIX'] |
27 |
|
|
,SHLIBPREFIX = env['EXTLIB_PREFIX'] |
28 |
|
|
) |
29 |
jpye |
1509 |
|
30 |
jpye |
1597 |
env.Depends(lib,env['libascend']) |
31 |
jpye |
1510 |
|
32 |
jpye |
1597 |
env['extfns'] += [lib] |
33 |
|
|
|
34 |
|
|
#TODO install the file? |
35 |
|
|
|
36 |
jpye |
1509 |
# vim: set syntax=python: |