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 *
Import('env','buildTargets','installTargets')
localenv = env.Clone()
# (subdir, library name, (file extensions))
libs = [('base', 'ctbase', ['cpp']),
('thermo', 'thermo', ['cpp']),
('equil', 'equil', ['cpp','c']),
('converters', 'converters', ['cpp']),
('numerics', 'ctnumerics', ['cpp']),
('kinetics', 'kinetics', ['cpp']),
('transport', 'transport', ['cpp']),
('spectra', 'ctspectra', ['cpp']),
('oneD', 'oneD', ['cpp']),
('zeroD', 'zeroD', ['cpp']),
def empty(env):
pass
def equilSetup(env):
env.Append(CPPPATH=['#ext/f2c_libs'])
# (subdir, library name, (file extensions), (extra setup(env)))
libs = [('base', 'ctbase', ['cpp'], empty),
('thermo', 'thermo', ['cpp'], empty),
('equil', 'equil', ['cpp','c'], equilSetup),
('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'):
h = localenv.Command('../include/cantera/kernel/%s' % header.name, header,
Copy('$TARGET', '$SOURCE'))

View File

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