Import("env_base", "env_etc")

env = env_base.Clone(
  SHLINKFLAGS=env_etc.shlinkflags)
env_etc.enable_more_warnings(env=env)
env_etc.include_registry.append(
  env=env,
  paths=env_etc.scitbx_common_includes)
env.Append(LIBS=env_etc.libm)
if (env_etc.static_libraries): builder = env.StaticLibrary
else:                          builder = env.SharedLibrary
builder(target='#lib/scitbx_minpack', source=["raw.cpp"])

if (not env_etc.no_boost_python):
  Import("env_scitbx_boost_python_ext")
  env = env_scitbx_boost_python_ext.Clone()
  env_etc.enable_more_warnings(env=env)
  env.Prepend(LIBS="scitbx_minpack")
  env.SharedLibrary(
    target="#lib/scitbx_minpack_ext",
    source=["ext.cpp"])
