# -*- mode: python; -*-

Import("env")

env = env.Clone()

env.Library(
    target='storage_biggie_core',
    source=[
        'biggie_kv_engine.cpp',
        'biggie_record_store.cpp',
        'biggie_recovery_unit.cpp',
        'biggie_sorted_impl.cpp',
        'biggie_visibility_manager.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/concurrency/write_conflict_exception',
        '$BUILD_DIR/mongo/db/storage/index_entry_comparison',
        '$BUILD_DIR/mongo/db/storage/kv/kv_prefix',
        '$BUILD_DIR/mongo/db/storage/recovery_unit_base',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/storage/key_string',
        '$BUILD_DIR/mongo/db/snapshot_window_options',
        '$BUILD_DIR/mongo/db/storage/oplog_hack',
        '$BUILD_DIR/mongo/db/storage/write_unit_of_work',
    ],
)

env.Library(
    target='storage_biggie',
    source=[
        'biggie_init.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/storage/durable_catalog_impl',
        '$BUILD_DIR/mongo/db/storage/storage_engine_impl',
        'storage_biggie_core',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/storage/storage_engine_common',
    ],
)

# Testing
env.CppUnitTest(
    target='storage_biggie_test',
    source=[
        'biggie_kv_engine_test.cpp',
        'biggie_record_store_test.cpp',
        'biggie_recovery_unit_test.cpp',
        'biggie_sorted_impl_test.cpp',
        'store_test.cpp',
    ],
    LIBDEPS=[
        'storage_biggie_core',
        '$BUILD_DIR/mongo/db/common',
        '$BUILD_DIR/mongo/db/index/index_descriptor',
        '$BUILD_DIR/mongo/db/storage/key_string',
        '$BUILD_DIR/mongo/db/storage/kv/kv_engine_test_harness',
        '$BUILD_DIR/mongo/db/storage/record_store_test_harness',
        '$BUILD_DIR/mongo/db/storage/recovery_unit_test_harness',
        '$BUILD_DIR/mongo/db/storage/sorted_data_interface_test_harness',
    ],
)
