mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
SCons now builds the Cantera kernel
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
from buildutils import *
|
||||
|
||||
Import('env', 'build', 'config_h')
|
||||
Import('env', 'build')
|
||||
localenv = env.Clone()
|
||||
|
||||
# (subdir, library name, (file extensions))
|
||||
libs = [('tpx','tpx',('cpp')),
|
||||
('math', 'ctmath', ('cpp','c','f'))]
|
||||
|
||||
libs = [('tpx','tpx',['cpp']),
|
||||
('math', 'ctmath', ['cpp','c','f'])]
|
||||
|
||||
print os.getcwd()
|
||||
if env['build_with_f2c']:
|
||||
# Create arith.h using the arithchk program
|
||||
arithenv = env.Clone()
|
||||
arithenv.Append(LINKFLAGS='-lm', CPPFLAGS='-DNO_FPINIT') # TODO: make link flag more general
|
||||
arithenv.Program('f2c_libs/arithchk/arithchk', source='f2c_libs/arithchk/arithchk.c')
|
||||
arithenv.Command('arith.h', 'f2c_libs/arithchk/arithchk', '$SOURCE > $TARGET')
|
||||
arithenv.Command('f2c_libs/arith.h', 'arith.h', CopyNoPrefix(build))
|
||||
if not os.path.exists('arith.h'):
|
||||
arithenv = env.Clone()
|
||||
# TODO: make link flag more general
|
||||
arithenv.Append(LINKFLAGS='-lm', CPPFLAGS='-DNO_FPINIT')
|
||||
arithenv.Program('f2c_libs/arithchk/arithchk', source='f2c_libs/arithchk/arithchk.c')
|
||||
arithenv.Command('arith.h', 'f2c_libs/arithchk/arithchk', '$SOURCE > $TARGET')
|
||||
arithenv.Command('f2c_libs/arith.h', 'arith.h', CopyNoPrefix(build))
|
||||
|
||||
# Possibly system-depenent headers
|
||||
localenv.Command('f2c_libs/signal1.h', 'f2c_libs/signal1.h0', CopyNoPrefix(build))
|
||||
|
||||
Reference in New Issue
Block a user