import libtbx.load_env
import os

Import("env_base", "env_etc")
env = env_base.Clone()
env.Prepend(LIBS=["cctbx_sgtbx_asu", "cctbx"])
env.Append(LIBS=env_etc.libm)
env_etc.include_registry.append(
  env=env,
  paths=["."] + env_etc.cctbx_common_includes)
for source in ["getting_started",
               "sym_equiv_sites",
               "convert_ccp4_symop_lib",
               "lattice_symmetry",
               "find_distances",
               "sys_abs_equiv_space_groups"]:
  target = "cctbx." + source
  exe = env.Program(
    target="#exe_dev/"+env["PROGPREFIX"]+target+env["PROGSUFFIX"],
    source=source+".cpp")
  libtbx.env.write_dispatcher_in_bin(
    source_file=exe[0].get_abspath(),
    target_file=target)
