from glob import glob

SConscript(dirs='graphlib')

Import('env')
env = env.Clone(OCAML_LIBS=['unix'], OCAML_PP='camlp4o.opt')
env.AppendUnique(OCAML_PATH=['ocaml', 'tools/cfg', 'tools/cfg/graphlib'])

sources = glob('*.ml') + glob('*.mli')
sources.remove('basics.ml')
sources = map(env.File, sources)

basics = env.OcamlObject('basics.ml')

env.OcamlObject(sources)
Default(
    env.OcamlProgram('orderSites.ml'),
    env.OcamlProgram('resolveCfg.ml'),
    env.OcamlProgram('toDot.ml'),
    )

Alias('install', env.Install('$DESTDIR$toolsdir', 'orderSites'))
