"""Build Per-server Metadata"""

FILES = ['smd_device.c', 'smd_pool.c', 'smd_store.c']


def scons():
    """Execute build"""
    Import('env', 'prereqs')

    denv = env.Clone()
    denv.Append(CPPDEFINES=['-DDAOS_PMEM_BUILD'])
    denv.require('pmdk', 'argobots', 'protobufc')

    denv.d_static_library('smd', FILES, LIBS=[])

    if prereqs.test_requested():
        SConscript('tests/SConscript', exports='denv')


if __name__ == "SCons.Script":
    scons()
