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

Annotation of /trunk/solvers/lsode/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2523 - (hide annotations) (download)
Wed Jan 18 23:41:37 2012 UTC (12 years, 5 months ago) by jpye
File size: 1222 byte(s)
Working on building on MinGW-64. Test suite compiles, but some questionable cahnges to assertimpl.c were made (bug 524).
Removed support for solver 'tron' (never completed).

1 jpye 1508 Import('env')
2    
3 jpye 1509 if 'LSODE' in env.get('WITH_SOLVERS'):
4    
5 jpye 1787 solver_env = env.Clone()
6 jpye 1635
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 jpye 1635 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 2442
20     import platform
21     if platform.system()=="Windows":
22     # needed for latest gfortran with Mingw GCC 4.x
23     solver_env.AppendUnique(LINKFLAGS = ['-static-libgfortran','-static-libgcc'])
24    
25 jpye 1511 solver_env.AppendUnique(
26     LIBS=['ascend']
27     ,LIBPATH=['#']
28 jpye 2032 ,SHLINKFLAGS=['-fPIC']
29 jpye 1511 )
30 jpye 1508
31 jose 2071 fflags = env['SHFORTRANFLAGS']
32     fflags.append('-w')
33     # print "SHFORTRAN flags for lsode;"
34     # for k in fflags:
35     # print k
36    
37 jpye 1597 lib = solver_env.SharedLibrary('lsode',srcs + env['blasobjs']
38     ,SHLIBSUFFIX = env['EXTLIB_SUFFIX']
39 jpye 1635 ,SHLIBPREFIX = env['EXTLIB_PREFIX']
40 jpye 2523 ,SHFORTRAN = env['FORTRAN']
41 jose 2071 ,SHFORTRANFLAGS = fflags
42 jpye 1597 )
43 jpye 1509
44 jpye 1597 env.Depends(lib,env['libascend'])
45 jpye 1510
46 jpye 1597 env['extfns'] += [lib]
47    
48 jpye 1635 if env.get('CAN_INSTALL'):
49     dir = Dir(env.subst("$INSTALL_ROOT$INSTALL_SOLVERS"))
50     env.InstallShared(dir,lib)
51    
52     # vim: set syntax=python:

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