#!python

Import('env', 'DAOS_VERSION')

env.AppendUnique(LIBPATH=[Dir('.')])
denv = env.Clone()

dc_tgts = denv.SharedObject(Glob('*.c'))

Import('dc_pool_tgts', 'dc_co_tgts', 'dc_obj_tgts', 'dc_placement_tgts')
Import('dc_mgmt_tgts', 'addons_tgts')
dc_tgts += dc_pool_tgts + dc_co_tgts + dc_placement_tgts + dc_obj_tgts
dc_tgts += dc_mgmt_tgts + addons_tgts
libdaos = env.SharedLibrary('libdaos', dc_tgts, SHLIBVERSION=DAOS_VERSION)
if hasattr(env, 'InstallVersionedLib'):
	env.InstallVersionedLib('$PREFIX/lib/', libdaos,
				SHLIBVERSION=DAOS_VERSION)
else:
	env.Install('$PREFIX/lib/', libdaos)

denv.Append(CPPPATH = ['#/src/client'])
SConscript('tests/SConscript', exports='denv')
