# -*- 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',
    ],
    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',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/storage/key_string',
        '$BUILD_DIR/mongo/db/snapshot_window_options',
        '$BUILD_DIR/mongo/db/storage/write_unit_of_work',
    ],
)

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

# Testing
env.CppUnitTest(
    target='storage_biggie_store_test',
    source=[
        'store_test.cpp',
    ],
)

env.CppUnitTest(
    target='biggie_record_store_test',
    source=['biggie_record_store_test.cpp'
            ],
    LIBDEPS=[
        'storage_biggie_core',
        '$BUILD_DIR/mongo/db/storage/key_string',
        '$BUILD_DIR/mongo/db/storage/record_store_test_harness'
        ],
)

env.CppUnitTest(
   target='biggie_sorted_data_interface_test',
   source=['biggie_sorted_impl_test.cpp'
           ],
   LIBDEPS=[
        'storage_biggie_core', 
        '$BUILD_DIR/mongo/db/storage/key_string',
        '$BUILD_DIR/mongo/db/storage/sorted_data_interface_test_harness'
        ],
)

