Added include directory for f2c code

Most f2c code needs the "f2c.h" file, which is only in the
ext/f2c_libs directory, but this error doesn't usually show up
because it is also in /usr/include on most Unix systems.
This commit is contained in:
Ray Speth 2011-12-14 19:34:04 +00:00
parent 098501cbe4
commit 60a00546dc
2 changed files with 21 additions and 13 deletions

View file

@ -1,22 +1,29 @@
from buildutils import * from buildutils import *
Import('env','buildTargets','installTargets') Import('env','buildTargets','installTargets')
localenv = env.Clone()
# (subdir, library name, (file extensions)) def empty(env):
libs = [('base', 'ctbase', ['cpp']), pass
('thermo', 'thermo', ['cpp']),
('equil', 'equil', ['cpp','c']), def equilSetup(env):
('converters', 'converters', ['cpp']), env.Append(CPPPATH=['#ext/f2c_libs'])
('numerics', 'ctnumerics', ['cpp']),
('kinetics', 'kinetics', ['cpp']), # (subdir, library name, (file extensions), (extra setup(env)))
('transport', 'transport', ['cpp']), libs = [('base', 'ctbase', ['cpp'], empty),
('spectra', 'ctspectra', ['cpp']), ('thermo', 'thermo', ['cpp'], empty),
('oneD', 'oneD', ['cpp']), ('equil', 'equil', ['cpp','c'], equilSetup),
('zeroD', 'zeroD', ['cpp']), ('converters', 'converters', ['cpp'], empty),
('numerics', 'ctnumerics', ['cpp'], empty),
('kinetics', 'kinetics', ['cpp'], empty),
('transport', 'transport', ['cpp'], empty),
('spectra', 'ctspectra', ['cpp'], empty),
('oneD', 'oneD', ['cpp'], empty),
('zeroD', 'zeroD', ['cpp'], empty),
] ]
for subdir, libname, extensions in libs: for subdir, libname, extensions, setup in libs:
localenv = env.Clone()
setup(localenv)
for header in mglob(localenv, subdir, 'h'): for header in mglob(localenv, subdir, 'h'):
h = localenv.Command('../include/cantera/kernel/%s' % header.name, header, h = localenv.Command('../include/cantera/kernel/%s' % header.name, header,
Copy('$TARGET', '$SOURCE')) Copy('$TARGET', '$SOURCE'))

View file

@ -9,6 +9,7 @@ libs = [('tpx','tpx',['cpp'])]
if env['build_with_f2c']: if env['build_with_f2c']:
libs.append(('f2c_math', 'ctmath', ['cpp','c'])) libs.append(('f2c_math', 'ctmath', ['cpp','c']))
localenv.Append(CPPPATH=Dir('#ext/f2c_libs'))
if not localenv['HAS_TIMES_H']: if not localenv['HAS_TIMES_H']:
localenv.Append(CPPDEFINES=['USE_CLOCK']) localenv.Append(CPPDEFINES=['USE_CLOCK'])
if not localenv['HAS_UNISTD_H']: if not localenv['HAS_UNISTD_H']: