Fixes to allow building the Matlab toolbox with MinGW
This commit is contained in:
parent
6f306dbc1c
commit
559163d2ca
2 changed files with 7 additions and 0 deletions
|
|
@ -59,6 +59,9 @@ if localenv['OS'] == 'Darwin' and localenv['use_sundials'] == 'y':
|
|||
localenv.Append(LIBS=localenv['sundials_libs'],
|
||||
LIBPATH=localenv['sundials_libdir'])
|
||||
|
||||
if localenv['toolchain'] == 'mingw':
|
||||
localenv.Append(LINKFLAGS=['-static-libgcc', '-static-libstdc++'])
|
||||
|
||||
# Build the Cantera shared library
|
||||
lib = build(localenv.SharedLibrary('../lib/cantera_shared', libraryTargets,
|
||||
SPAWN=getSpawn(localenv)))
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ if localenv['OS'] == 'Windows':
|
|||
if localenv['CC'] == 'cl':
|
||||
linkflags.append('/export:mexFunction')
|
||||
linkflags.append('/MACHINE:X%i' % localenv['OS_BITS'])
|
||||
elif localenv['CC'] == 'gcc':
|
||||
linkflags.append('-Wl,--export-all-symbols')
|
||||
linkflags.extend(['-static-libgcc', '-static-libstdc++'])
|
||||
|
||||
elif localenv['OS'] == 'Darwin':
|
||||
linklibs = ['cantera']
|
||||
|
|
@ -55,6 +58,7 @@ linklibs += localenv['blas_lapack_libs']
|
|||
|
||||
ctmethods = build(localenv.SharedLibrary('#interfaces/matlab/toolbox/ctmethods',
|
||||
mglob(localenv, '.', 'cpp'),
|
||||
LIBPREFIX='',
|
||||
SHLIBPREFIX='',
|
||||
SHLIBSUFFIX=mexSuffix,
|
||||
LIBS=linklibs,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue