# Copyright (c) 2020-2021 Project CHIP Authors
#
# 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.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/nlassert.gni")
import("//build_overrides/nlfaultinjection.gni")

import("${build_root}/config/compiler/compiler.gni")
import("${chip_root}/build/chip/buildconfig_header.gni")
import("${chip_root}/build/chip/tests.gni")
import("${chip_root}/src/platform/device.gni")
import("system.gni")

if (chip_system_config_use_lwip) {
  import("//build_overrides/lwip.gni")
}

declare_args() {
  # Extra header to include in CHIPConfig.h for project.
  # TODO - This should probably be in src/core but src/system also uses it.
  chip_project_config_include = "<CHIPProjectConfig.h>"

  # Extra header to include in SystemConfig.h for project.
  chip_system_project_config_include = "<SystemProjectConfig.h>"

  # Extra include dirs for project configs.
  chip_project_config_include_dirs = []

  # enable clang thread safety analysis in SystemMutex.h,
  # specifically attributes such as capability, guarded_by, acquire, ...
  #
  # see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
  chip_enable_thread_safety_checks = is_clang
}

if (chip_project_config_include_dirs == [] &&
    chip_project_config_include == "<CHIPProjectConfig.h>" &&
    chip_system_project_config_include == "<SystemProjectConfig.h>") {
  chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ]
}

if (chip_device_platform == "cc13x2_26x2") {
  import("//build_overrides/ti_simplelink_sdk.gni")
} else if (chip_device_platform == "efr32") {
  import("//build_overrides/efr32_sdk.gni")
} else if (chip_device_platform == "qpg") {
  import("//build_overrides/qpg_sdk.gni")
  import("${qpg_sdk_build_root}/qpg_sdk.gni")
} else if (chip_device_platform == "k32w0") {
  import("//build_overrides/k32w0_sdk.gni")
} else if (chip_device_platform == "k32w1") {
  import("//build_overrides/k32w1_sdk.gni")
} else if (chip_device_platform == "nxp") {
  import("//build_overrides/nxp_sdk.gni")
} else if (chip_device_platform == "psoc6") {
  import("//build_overrides/psoc6.gni")
} else if (chip_device_platform == "cyw30739") {
  import("//build_overrides/cyw30739_sdk.gni")
} else if (chip_device_platform == "mt793x") {
  import("//build_overrides/mt793x_sdk.gni")
} else if (chip_device_platform == "stm32") {
  import("//build_overrides/stm32_sdk.gni")
} else if (chip_device_platform == "bl702") {
  import("//build_overrides/bouffalolab_iot_sdk.gni")
} else if (chip_device_platform == "bl702l") {
  import("//build_overrides/bouffalolab_iot_sdk.gni")
}

buildconfig_header("system_buildconfig") {
  header = "SystemBuildConfig.h"
  header_dir = "system"

  config_device_layer = chip_device_platform != "none"
  chip_system_config_posix_locking = chip_system_config_locking == "posix"
  chip_system_config_freertos_locking = chip_system_config_locking == "freertos"
  chip_system_config_mbed_locking = chip_system_config_locking == "mbed"
  chip_system_config_cmsis_rtos_locking =
      chip_system_config_locking == "cmsis-rtos"
  chip_system_config_zephyr_locking = chip_system_config_locking == "zephyr"
  chip_system_config_no_locking = chip_system_config_locking == "none"
  have_clock_gettime = chip_system_config_clock == "clock_gettime"
  have_clock_settime = have_clock_gettime
  have_gettimeofday = chip_system_config_clock == "gettimeofday"

  defines = [
    "CONFIG_DEVICE_LAYER=${config_device_layer}",
    "CHIP_SYSTEM_CONFIG_TEST=${chip_build_tests}",
    "CHIP_WITH_NLFAULTINJECTION=${chip_with_nlfaultinjection}",
    "CHIP_SYSTEM_CONFIG_USE_DISPATCH=${chip_system_config_use_dispatch}",
    "CHIP_SYSTEM_CONFIG_USE_LIBEV=${chip_system_config_use_libev}",
    "CHIP_SYSTEM_CONFIG_USE_LWIP=${chip_system_config_use_lwip}",
    "CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT=${chip_system_config_use_open_thread_inet_endpoints}",
    "CHIP_SYSTEM_CONFIG_USE_SOCKETS=${chip_system_config_use_sockets}",
    "CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK=false",
    "CHIP_SYSTEM_CONFIG_POSIX_LOCKING=${chip_system_config_posix_locking}",
    "CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING=${chip_system_config_freertos_locking}",
    "CHIP_SYSTEM_CONFIG_MBED_LOCKING=${chip_system_config_mbed_locking}",
    "CHIP_SYSTEM_CONFIG_CMSIS_RTOS_LOCKING=${chip_system_config_cmsis_rtos_locking}",
    "CHIP_SYSTEM_CONFIG_ZEPHYR_LOCKING=${chip_system_config_zephyr_locking}",
    "CHIP_SYSTEM_CONFIG_NO_LOCKING=${chip_system_config_no_locking}",
    "CHIP_SYSTEM_CONFIG_PROVIDE_STATISTICS=${chip_system_config_provide_statistics}",
    "HAVE_CLOCK_GETTIME=${have_clock_gettime}",
    "HAVE_CLOCK_SETTIME=${have_clock_settime}",
    "HAVE_GETTIMEOFDAY=${have_gettimeofday}",
    "HAVE_SYS_TIME_H=true",
    "HAVE_NETINET_ICMP6_H=true",
    "HAVE_ICMP6_FILTER=true",
    "CONFIG_HAVE_VCBPRINTF=false",
    "CONFIG_HAVE_VSNPRINTF_EX=false",
    "HAVE_SYS_SOCKET_H=${chip_system_config_use_sockets}",
  ]

  if (chip_project_config_include != "") {
    defines += [ "CHIP_PROJECT_CONFIG_INCLUDE=${chip_project_config_include}" ]
  }
  if (chip_platform_config_include != "") {
    defines +=
        [ "CHIP_PLATFORM_CONFIG_INCLUDE=${chip_platform_config_include}" ]
  }
  if (chip_system_project_config_include != "") {
    defines += [
      "SYSTEM_PROJECT_CONFIG_INCLUDE=${chip_system_project_config_include}",
    ]
  }
  if (chip_system_platform_config_include != "") {
    defines += [
      "SYSTEM_PLATFORM_CONFIG_INCLUDE=${chip_system_platform_config_include}",
    ]
  }
  if (chip_enable_thread_safety_checks) {
    defines += [ "SYSTEM_ENABLE_CLANG_THREAD_SAFETY_ANALYSIS=1" ]
  }

  if (chip_system_layer_impl_config_file != "") {
    defines += [ "CHIP_SYSTEM_LAYER_IMPL_CONFIG_FILE=${chip_system_layer_impl_config_file}" ]
  } else {
    defines += [ "CHIP_SYSTEM_LAYER_IMPL_CONFIG_FILE=<system/SystemLayerImpl${chip_system_config_event_loop}.h>" ]
  }

  if (chip_system_config_use_sockets && current_os != "zephyr") {
    defines += [
      "CHIP_SYSTEM_CONFIG_MULTICAST_HOMING=${chip_system_config_use_sockets} ",
    ]
  } else {
    defines += [ "CHIP_SYSTEM_CONFIG_MULTICAST_HOMING=0 " ]
  }
}

config("system_config") {
  include_dirs = chip_project_config_include_dirs
}

source_set("system_config_header") {
  sources = [ "SystemConfig.h" ]

  public_configs = [
    ":system_config",
    "${chip_root}/src:includes",
  ]

  deps = [
    ":system_buildconfig",
    "${chip_root}/src/platform:platform_buildconfig",
  ]

  public_deps = []

  if (target_cpu != "esp32") {
    if (chip_system_config_use_lwip) {
      public_deps += [ "${lwip_root}:lwip" ]
    } else {
      if (chip_device_platform == "efr32") {
        public_deps += [ "${efr32_sdk_build_root}:efr32_sdk" ]
      }
      if (chip_device_platform == "qpg") {
        public_deps += [ "${qpg_sdk_build_root}:qpg_sdk" ]
      }
      if (chip_device_platform == "k32w0") {
        public_deps += [ "${k32w0_sdk_build_root}:k32w0_sdk" ]
      }
      if (chip_device_platform == "k32w1") {
        public_deps += [ "${k32w1_sdk_build_root}:k32w1_sdk" ]
      }
      if (chip_device_platform == "nxp") {
        public_deps += [ "${nxp_sdk_build_root}:nxp_sdk" ]
      }
      if (chip_device_platform == "cyw30739") {
        public_deps += [ "${cyw30739_sdk_build_root}:cyw30739_sdk" ]
      }
      if (chip_device_platform == "stm32") {
        public_deps += [ "${stm32_sdk_build_root}:stm32_sdk" ]
      }
      if (chip_device_platform == "bl702") {
        public_deps += [ "${bouffalolab_iot_sdk_build_root}/bl702:bl_iot_sdk" ]
      }
      if (chip_device_platform == "bl702l") {
        public_deps += [ "${bouffalolab_iot_sdk_build_root}/bl702l:bl_iot_sdk" ]
      }

      # Add platform here as needed.
    }
  }

  if (chip_device_platform == "mt793x") {
    public_deps += [ "${mt793x_sdk_build_root}:mt793x_sdk" ]
  }
}

static_library("system") {
  output_name = "libSystemLayer"

  sources = [
    "PlatformEventSupport.h",
    "SystemAlignSize.h",
    "SystemClock.cpp",
    "SystemClock.h",
    "SystemError.cpp",
    "SystemError.h",
    "SystemEvent.h",
    "SystemLayer.cpp",
    "SystemLayer.h",
    "SystemLayerImpl.h",
    "SystemMutex.cpp",
    "SystemMutex.h",
    "SystemPacketBuffer.cpp",
    "SystemPacketBuffer.h",
    "SystemPacketBufferInternal.h",
    "SystemStats.cpp",
    "SystemStats.h",
    "SystemTimer.cpp",
    "SystemTimer.h",
    "TLVPacketBufferBackingStore.cpp",
    "TLVPacketBufferBackingStore.h",
    "TimeSource.h",
    "WakeEvent.cpp",
    "WakeEvent.h",
  ]

  if (chip_system_layer_impl_config_file == "") {
    sources += [
      "SystemLayerImpl${chip_system_config_event_loop}.cpp",
      "SystemLayerImpl${chip_system_config_event_loop}.h",
    ]
  }

  cflags = [ "-Wconversion" ]

  public_deps = [
    ":system_config_header",
    "${chip_root}/src/lib/core:error",
    "${chip_root}/src/lib/support",
    "${chip_root}/src/platform:platform_config_header",
    "${nlassert_root}:nlassert",
  ]

  allow_circular_includes_from = [ "${chip_root}/src/lib/support" ]

  if (chip_system_config_use_sockets) {
    sources += [ "SocketEvents.h" ]
  }

  if (chip_with_nlfaultinjection) {
    sources += [
      "SystemFaultInjection.cpp",
      "SystemFaultInjection.h",
    ]
    public_deps += [ "${nlfaultinjection_root}:nlfaultinjection" ]
  }
}
