cantera/platform/posix/SConscript

48 lines
1.9 KiB
Python

import sys
from buildutils import *
Import('env', 'build', 'install')
localenv = env.Clone()
### Generate customized scripts ###
# 'setup_cantera'
v = sys.version_info
localenv['python_module_loc'] = pjoin(localenv['prefix'], 'lib', 'python%i.%i' % v[:2], 'site-packages')
target = build(localenv.SubstFile('setup_cantera', 'setup_cantera.in'))
install('$inst_bindir', target)
# 'mixmaster'
if env['python_package'] == 'full':
target = build(localenv.SubstFile('mixmaster', 'mixmaster.in'))
inst = install('$inst_bindir', target)
install(localenv.AddPostAction, inst, Chmod('$TARGET', 0755))
# Cantera.mak include file for Makefile projects
localenv['mak_sundials_libs'] = ' '.join('-l%s' % s
for s in localenv['sundials_libs'])
localenv['mak_sundials_libdir'] = ('-L' + localenv['sundials_libdir']
if localenv['sundials_libdir'] else '')
localenv['mak_sundials_include'] = ('-I' + localenv['sundials_include']
if localenv['sundials_include'] else '')
localenv['mak_boost_include'] = ('-I' + localenv['boost_inc_dir']
if localenv['boost_inc_dir'] else '')
localenv['mak_boost_libdir'] = ('-L' + localenv['boost_lib_dir']
if localenv['boost_inc_dir'] and
localenv['use_boost_libs'] else '')
localenv['mak_boost_libs'] = ' '.join('-l%s' % s
for s in localenv['boost_libs'])
localenv['mak_have_blas_lapack_dir'] = '1' if localenv['blas_lapack_dir'] else '0'
localenv['mak_blas_lapack_libs'] = ' '.join('-l%s' % s
for s in localenv['blas_lapack_libs'])
localenv['mak_threadflags'] = localenv['thread_flags']
if '-pthread' in localenv['thread_flags']:
localenv['mak_fort_threadflags'] = '-lpthread'
mak = build(localenv.SubstFile('Cantera.mak', 'Cantera.mak.in'))
install('$inst_sampledir', mak)