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

Contents of /trunk/solvers/lsode/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2523 - (show annotations) (download)
Wed Jan 18 23:41:37 2012 UTC (12 years, 4 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 Import('env')
2
3 if 'LSODE' in env.get('WITH_SOLVERS'):
4
5 solver_env = env.Clone()
6
7 srcs = ['lsode.f','asc_lsode.c']
8
9 linpack_srcs = ['d1mach.c','dgbfa.f','dgbsl.f','dgefa.f','dgesl.f']
10
11 for s in linpack_srcs:
12 srcs.append( "linpack/%s" % s )
13
14 if env.get('F2C_LIBPATH'):
15 solver_env.AppendUnique(LIBPATH=[env.get('F2C_LIBPATH')])
16
17 if solver_env.get('F2C_LIB'):
18 solver_env.AppendUnique(LIBS=[env.get('F2C_LIB')])
19
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 solver_env.AppendUnique(
26 LIBS=['ascend']
27 ,LIBPATH=['#']
28 ,SHLINKFLAGS=['-fPIC']
29 )
30
31 fflags = env['SHFORTRANFLAGS']
32 fflags.append('-w')
33 # print "SHFORTRAN flags for lsode;"
34 # for k in fflags:
35 # print k
36
37 lib = solver_env.SharedLibrary('lsode',srcs + env['blasobjs']
38 ,SHLIBSUFFIX = env['EXTLIB_SUFFIX']
39 ,SHLIBPREFIX = env['EXTLIB_PREFIX']
40 ,SHFORTRAN = env['FORTRAN']
41 ,SHFORTRANFLAGS = fflags
42 )
43
44 env.Depends(lib,env['libascend'])
45
46 env['extfns'] += [lib]
47
48 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