#!python

Import('env')

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

denv = env.Clone()

# Common object code
common_tgts = denv.SharedObject(['obj_class.c', 'obj_rpc.c'])

# generate server module
srv = denv.SharedLibrary('obj', common_tgts + ['srv_obj.c', 'srv_mod.c'])
denv.Install('$PREFIX/lib/daos_srv', srv)

# Object client library
dc_obj_tgts = denv.SharedObject(['cli_obj.c', 'cli_shard.c', 'cli_mod.c'])
dc_obj_tgts += common_tgts
Export('dc_obj_tgts')

# Build tests
SConscript('tests/SConscript', exports=['denv', 'common_tgts'])
