# Copyright 2021 The Cobalt Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# The "common" target contains facilities provided by Starboard that are common
# to all platforms.

# This must be a static_library, not a source_set. When using a source_set, we
# see duplicate definition errors when compiling new.cc because of our
# overloaded operators.
source_set("common_headers_only") {
  sources = [ "log.h" ]
  deps = [ "//starboard:starboard_headers_only" ]
}

static_library("common") {
  check_includes = false

  public_deps = [
    ":common_headers_only",
    "//starboard:starboard_headers_only",
  ]

  sources = [
    "//starboard/shared/media_session/playback_state.cc",
    "//starboard/shared/media_session/playback_state.h",
    "allocator.cc",
    "allocator.h",
    "common.cc",
    "condition_variable.cc",
    "condition_variable.h",
    "configuration_defaults.cc",
    "configuration_defaults.h",
    "device_type.cc",
    "device_type.h",
    "experimental/concurrency_debug.cc",
    "experimental/concurrency_debug.h",
    "file.cc",
    "file.h",
    "fixed_no_free_allocator.cc",
    "fixed_no_free_allocator.h",
    "flat_map.h",
    "locked_ptr.h",
    "log.cc",
    "media.cc",
    "media.h",
    "metrics/stats_tracker.cc",
    "metrics/stats_tracker.h",
    "move.h",
    "murmurhash2.cc",
    "murmurhash2.h",
    "mutex.cc",
    "mutex.h",
    "new.cc",
    "optional.cc",
    "optional.h",
    "paths.cc",
    "paths.h",
    "player.cc",
    "player.h",
    "pointer_arithmetic.h",
    "process.cc",
    "process.h",
    "queue.h",
    "recursive_mutex.cc",
    "recursive_mutex.h",
    "ref_counted.cc",
    "ref_counted.h",
    "reset_and_return.h",
    "reuse_allocator_base.cc",
    "reuse_allocator_base.h",
    "rwlock.cc",
    "rwlock.h",
    "scoped_ptr.h",
    "semaphore.cc",
    "semaphore.h",
    "socket.cc",
    "socket.h",
    "spin_lock.cc",
    "spin_lock.h",
    "state_machine.cc",
    "state_machine.h",
    "storage.cc",
    "storage.h",
    "string.h",
    "system_property.h",
    "thread.cc",
    "thread.h",
    "thread_collision_warner.cc",
    "thread_collision_warner.h",
    "time.cc",
    "time.h",
  ]
}

target(gtest_target_type, "common_test") {
  testonly = true
  sources = [
    "fixed_no_free_allocator_test.cc",
    "media_test.cc",
    "memory_test.cc",
    "player_test.cc",
    "socket_test.cc",
    "test_main.cc",
  ]
  deps = [
    ":common",
    "//testing/gmock",
    "//testing/gtest",
  ]
}
