import os, os.path
Import("env_base", "env_etc")
env = env_base.Clone()
env_etc.enable_more_warnings(env=env)
env_etc.include_registry.append(
  env=env,
  paths=env_etc.scitbx_common_includes)
envlm = env.Clone()
envlm.Append(LIBS=["omptbx", env_etc.libm])
envlm.Program(target="test0", source="test0.cpp")
envlm.Program(target="fftpack_timer", source="fftpack_timer.cpp")
fftw_build = os.environ.get("FFTW_BUILD")
if (fftw_build is not None):
  for fftw_lib in ("rfftw", "fftw"):
    env_etc.include_registry.append(
      env=env,
      paths=[os.path.join(fftw_build, fftw_lib)])
    env.Append(LIBS=[fftw_lib])
    env.Append(LIBPATH=[os.path.join(fftw_build, fftw_lib, ".libs")])
  envlm = env.Clone()
  envlm.Append(LIBS=env_etc.libm)
  envlm.Program(target="tst3d", source="tst3d.cpp")
  envlm.Program(target="fftw_timer", source="fftw_timer.cpp")
