# -*- mode: python -*-

Import("env")

env.StaticLibrary('serverauth', ['mongo_authentication_session.cpp'])

env.Command(['action_type.h', 'action_type.cpp'], ['generate_action_types.py', 'action_types.txt'],
            '$PYTHON $SOURCES $TARGETS')

# Just the data structures used
env.StaticLibrary('authcore', ['action_set.cpp',
                               'action_type.cpp',
                               'authorization_manager.cpp',
                               'principal.cpp',
                               'principal_set.cpp',
                               'privilege.cpp',
                               'privilege_set.cpp'],
                  LIBDEPS=['$BUILD_DIR/mongo/base/base', '$BUILD_DIR/mongo/stringutils'])

env.StaticLibrary('auth', ['auth_external_state.cpp'], LIBDEPS=['authcore'])

env.CppUnitTest('action_set_test', 'action_set_test.cpp', LIBDEPS=['authcore'])
env.CppUnitTest('principal_set_test', 'principal_set_test.cpp', LIBDEPS=['authcore'])
env.CppUnitTest('privilege_set_test', 'privilege_set_test.cpp', LIBDEPS=['authcore'])
env.CppUnitTest('authorization_manager_test', 'authorization_manager_test.cpp',
                LIBDEPS=['authcore'])
