SCons now builds the Cantera kernel

This commit is contained in:
Ray Speth
2011-12-14 03:03:57 +00:00
parent 2c4623e336
commit b6bfca8e94
23 changed files with 47 additions and 3958 deletions

View File

@@ -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))