Build clib as a shared library

This commit is contained in:
Ray Speth 2011-12-14 19:34:36 +00:00
parent 96f93bbac7
commit b78fa7c9de
4 changed files with 6 additions and 4 deletions

View file

@ -3,8 +3,9 @@ from buildutils import *
Import('env', 'buildTargets', 'installTargets')
localenv = env.Clone()
lib = localenv.Library(pjoin('../../lib', 'clib'),
source=mglob(localenv, 'src', 'cpp'))
lib = localenv.SharedLibrary(pjoin('../../lib', 'clib'),
source=mglob(localenv, 'src', 'cpp'),
LIBS=env['cantera_libs'])
inst = localenv.Install('$ct_libdir', lib)
buildTargets.extend(lib)
installTargets.extend(inst)

View file

@ -9,6 +9,7 @@
#ifndef CTC_DEFS_H
#define CTC_DEFS_H
#include "ct_defs.h"
#ifdef WIN32
// Either build as a DLL under Windows or not.

View file

@ -15,7 +15,7 @@ make_setup = localenv.SubstFile('setup.py', 'setup.py.in')
if env['python_package'] == 'full':
pymodule = localenv.SharedLibrary('Cantera/_cantera', ['src/pycantera.cpp'],
LIBS=localenv['cantera_libs'],
LIBS='clib',
SHLIBPREFIX='',
SHLIBSUFFIX=gcv('SO'))
buildTargets.extend(pymodule)

View file

@ -626,7 +626,7 @@ for header in mglob(env, 'Cantera/clib/src', 'h'):
installTargets.extend(inst)
### List of libraries needed to link to Cantera ###
linkLibs = ['clib','oneD','zeroD','equil','kinetics','transport',
linkLibs = ['oneD','zeroD','equil','kinetics','transport',
'thermo','ctnumerics','ctmath','tpx',
'ctspectra','converters','ctbase']