27 lines
874 B
Python
27 lines
874 B
Python
from buildutils import *
|
|
|
|
Import('env', 'buildTargets', 'installTargets')
|
|
|
|
localenv = env.Clone()
|
|
|
|
f90_src = mglob(localenv, 'src', 'f90', 'cpp')
|
|
|
|
artifacts = localenv.Object(f90_src)
|
|
mods = [o for o in artifacts if o.path.endswith('.mod')]
|
|
objs = [o for o in artifacts if not o.path.endswith('.mod')]
|
|
|
|
lib = localenv.Library(target=pjoin('..','..','lib','fct'),
|
|
source=objs)
|
|
buildTargets.extend(lib)
|
|
inst = localenv.Install('$ct_libdir', lib)
|
|
installTargets.extend(inst)
|
|
|
|
installTargets.extend(localenv.Install('$ct_incdir', mods))
|
|
|
|
# Copy the mod files to the include directory
|
|
for mod in mods:
|
|
copy = localenv.Command(target=pjoin('..','..','include','cantera', mod.name),
|
|
source=mod,
|
|
action=Copy('$TARGET', '$SOURCE'))
|
|
localenv.AddPostAction(lib, copy)
|
|
buildTargets.extend(copy)
|