# Copyright (c) 2020 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/mbedtls.gni")
import("//build_overrides/nlassert.gni")
import("//build_overrides/nlio.gni")
import("//build_overrides/nlunit_test.gni")
import("//build_overrides/pigweed.gni")

import("//src/lwip/lwip.gni")
import("//src/platform/device.gni")
import("$dir_pw_build/python.gni")

# This build file should not be used in superproject builds.
assert(chip_root == "//")

import("${chip_root}/build/chip/tests.gni")
import("${chip_root}/build/chip/tools.gni")

import("//src/crypto/crypto.gni")

if (current_toolchain != "${dir_pw_toolchain}/default:default") {
  declare_args() {
    chip_enable_python_modules =
        (current_os == "mac" || current_os == "linux") &&
        (host_cpu == "x64" || host_cpu == "arm64")
  }

  # Python packages for supporting specific targets.
  pw_python_group("python_packages") {
    python_deps = [
      "$dir_pw_build/py",
      "$dir_pw_doctor/py",
      "$dir_pw_env_setup/py",
      "$dir_pw_hdlc/py",
      "$dir_pw_module/py",
      "$dir_pw_protobuf/py",
      "$dir_pw_protobuf_compiler/py",
      "$dir_pw_rpc/py",
      "$dir_pw_status/py",
      "$dir_pw_toolchain/py",
      "$dir_pw_unit_test/py",
      "$dir_pw_watch/py",
      "integrations/mobly:chip_mobly",
      "scripts:requirements",
      "third_party/happy",
    ]
  }

  # This is a real toolchain. Build CHIP.
  group("default") {
    deps = [
      "${chip_root}/src/app",
      "${chip_root}/src/ble",
      "${chip_root}/src/channel",
      "${chip_root}/src/controller",
      "${chip_root}/src/credentials",
      "${chip_root}/src/crypto",
      "${chip_root}/src/inet",
      "${chip_root}/src/lib",
      "${chip_root}/src/lib/asn1",
      "${chip_root}/src/lib/core",
      "${chip_root}/src/lib/shell",
      "${chip_root}/src/lib/support",
      "${chip_root}/src/messaging",
      "${chip_root}/src/protocols",
      "${chip_root}/src/setup_payload",
      "${chip_root}/src/system",
      "${chip_root}/src/transport",
      "${mbedtls_root}:mbedtls",
      "${nlassert_root}:nlassert",
      "${nlio_root}:nlio",
      "${nlunit_test_root}:nlunit-test",
    ]

    if (chip_device_platform != "none") {
      deps += [ "${chip_root}/src/app/server" ]
    }

    if (chip_build_tests) {
      deps += [ "//src:tests" ]
    }

    if (chip_with_lwip) {
      deps += [ "${chip_root}/src/lwip:all" ]
    }

    if (chip_build_tools) {
      deps += [
        ":certification",
        "${chip_root}/examples/shell/standalone:chip-shell",
        "${chip_root}/src/app/tests/integration:chip-im-initiator",
        "${chip_root}/src/app/tests/integration:chip-im-responder",
        "${chip_root}/src/messaging/tests/echo:chip-echo-requester",
        "${chip_root}/src/messaging/tests/echo:chip-echo-responder",
        "${chip_root}/src/qrcodetool",
        "${chip_root}/src/setup_payload",
      ]
      if (chip_crypto == "openssl") {
        deps += [ "${chip_root}/src/tools/chip-cert" ]
      }
      if (chip_enable_python_modules) {
        deps += [ "${chip_root}/src/controller/python" ]
      }
    }

    if (current_os == "android") {
      deps += [
        "${chip_root}/src/controller/java",
        "${chip_root}/src/setup_payload/java",
      ]
    }
  }

  if (chip_build_tools) {
    group("certification") {
      data_deps = [ "${chip_root}/examples/chip-tool" ]

      if (chip_enable_python_modules) {
        data_deps += [ "${chip_root}/src/controller/python" ]
      }

      write_runtime_deps = "${root_out_dir}/certification.runtime_deps"
    }
  }

  group("check") {
    if (chip_link_tests) {
      deps = [ "//src:tests_run" ]
    }
  }

  # We don't always want to run happy tests, make them a seperate group.
  if (chip_enable_happy_tests) {
    group("happy_tests") {
      if (chip_link_tests) {
        deps = [ "//src:happy_tests" ]
      }
    }
  }
} else {
  # This is the unified build. Configure various real toolchains.
  import("${chip_root}/build/chip/chip_build.gni")
  declare_args() {
    # Set this to false to disable all builds by default.
    enable_default_builds = true

    # Enable building for Android.
    enable_android_builds = false

    # Set this to true to enable TI builds by default.
    enable_ti_simplelink_builds = false

    # Set this to true to enable efr32 builds by default.
    enable_efr32_builds = false

    # Set this to true to enable qpg6100 builds by default.
    enable_qpg6100_builds = false

    # Set this to true to enable k32w builds by default.
    enable_k32w_builds = false
  }

  declare_args() {
    # Enable building chip with clang.
    enable_host_clang_build = enable_default_builds && host_os != "win"

    # Enable building chip with gcc.
    enable_host_gcc_build = enable_default_builds && host_os != "win"

    # Enable building chip with gcc & mbedtls.
    enable_host_gcc_mbedtls_build = enable_default_builds && host_os != "win"

    # Build the chip-tool example.
    enable_standalone_chip_tool_build =
        enable_default_builds && host_os != "win"

    # Build the chip-tool-darwin example.
    enable_standalone_chip_tool_darwin_build =
        enable_default_builds && host_os == "mac"

    # Build the shell example.
    enable_standalone_shell_build = enable_default_builds && host_os != "win"

    # Build the Linux all clusters app example.
    enable_linux_all_clusters_app_build =
        enable_default_builds && (host_os == "linux" || host_os == "mac")

    # Build the Linux tv app example.
    enable_linux_tv_app_build =
        enable_default_builds && (host_os == "linux" || host_os == "mac")

    # Build the Linux bridge app example.
    enable_linux_bridge_app_build =
        enable_default_builds && (host_os == "linux" || host_os == "mac")

    # Build the Linux lighting app example.
    enable_linux_lighting_app_build =
        enable_default_builds && (host_os == "linux" || host_os == "mac")

    # Build the cc13x2x7_26x2x7 lock app example.
    enable_cc13x2x7_26x2x7_lock_app_build = enable_ti_simplelink_builds

    # Build the efr32 lock app example.
    enable_efr32_lock_app_build = enable_efr32_builds

    # Build the qpg6100 lock app example.
    enable_qpg6100_lock_app_build = enable_qpg6100_builds

    # Build the efr32 lighting app example.
    enable_efr32_lighting_app_build = enable_efr32_builds

    # Build the efr32 window app example.
    enable_efr32_window_app_build = enable_efr32_builds

    # Build the k32w lock app example.
    enable_k32w_lock_app_build = enable_k32w_builds
  }

  if (enable_host_clang_build) {
    chip_build("host_clang") {
      toolchain = "${build_root}/toolchain/host:${host_os}_${host_cpu}_clang"
    }
  }

  if (enable_host_gcc_build) {
    chip_build("host_gcc") {
      toolchain = "${build_root}/toolchain/host:${host_os}_${host_cpu}_gcc"
    }
  }

  if (enable_host_gcc_mbedtls_build) {
    chip_build("host_gcc_mbedtls") {
      toolchain = "${chip_root}/config/mbedtls/toolchain:${host_os}_${host_cpu}_gcc_mbedtls"
    }
  }

  if (enable_android_builds) {
    chip_build("android_arm") {
      toolchain = "${build_root}/toolchain/android:android_arm"
    }

    chip_build("android_arm64") {
      toolchain = "${build_root}/toolchain/android:android_arm64"
    }

    chip_build("android_x64") {
      toolchain = "${build_root}/toolchain/android:android_x64"
    }

    chip_build("android_x86") {
      toolchain = "${build_root}/toolchain/android:android_x86"
    }
  }

  standalone_toolchain = "${chip_root}/config/standalone/toolchain:standalone"
  not_needed([ "standalone_toolchain" ])  # Might not be needed.

  if (enable_standalone_chip_tool_build) {
    group("standalone_chip_tool") {
      deps = [ "${chip_root}/examples/chip-tool(${standalone_toolchain})" ]
    }
  }

  if (enable_standalone_chip_tool_darwin_build) {
    group("standalone_chip_tool_darwin") {
      deps =
          [ "${chip_root}/examples/chip-tool-darwin(${standalone_toolchain})" ]
    }
  }

  if (enable_cc13x2x7_26x2x7_lock_app_build) {
    group("cc13x2x7_26x2x7_lock_app") {
      deps = [ "${chip_root}/examples/lock-app/cc13x2x7_26x2x7(${chip_root}/config/cc13x2_26x2/toolchain:cc13x2x7_26x2x7_lock_app)" ]
    }
  }

  if (enable_standalone_shell_build) {
    group("standalone_shell") {
      deps =
          [ "${chip_root}/examples/shell/standalone(${standalone_toolchain})" ]
    }
  }

  if (enable_linux_all_clusters_app_build) {
    group("linux_all_clusters_app") {
      deps = [
        "${chip_root}/examples/all-clusters-app/linux(${standalone_toolchain})",
      ]
    }
  }

  if (enable_linux_tv_app_build) {
    group("linux_tv_app") {
      deps = [ "${chip_root}/examples/tv-app/linux(${standalone_toolchain})" ]
    }
  }

  if (enable_linux_bridge_app_build) {
    group("linux_bridge_app") {
      deps =
          [ "${chip_root}/examples/bridge-app/linux(${standalone_toolchain})" ]
    }
  }

  if (enable_linux_lighting_app_build) {
    group("linux_lighting_app") {
      deps = [
        "${chip_root}/examples/lighting-app/linux(${standalone_toolchain})",
      ]
    }
  }

  if (enable_efr32_lock_app_build) {
    group("efr32_lock_app") {
      deps = [ "${chip_root}/examples/lock-app/efr32(${chip_root}/config/efr32/toolchain:efr32_lock_app)" ]
    }
  }

  if (enable_qpg6100_lock_app_build) {
    group("qpg6100_lock_app") {
      deps = [ "${chip_root}/examples/lock-app/qpg6100(${chip_root}/config/qpg6100/toolchain:qpg6100_lock_app)" ]
    }
  }

  if (enable_efr32_lighting_app_build) {
    group("efr32_lighting_app") {
      deps = [ "${chip_root}/examples/lighting-app/efr32(${chip_root}/config/efr32/toolchain:efr32_lighting_app)" ]
    }
  }

  if (enable_efr32_window_app_build) {
    group("efr32_window_app") {
      deps = [ "${chip_root}/examples/window-app/efr32(${chip_root}/config/efr32/toolchain:efr32_window_app)" ]
    }
  }

  if (enable_k32w_lock_app_build) {
    group("k32w_lock_app") {
      deps = [ "${chip_root}/examples/lock-app/k32w(${chip_root}/config/k32w/toolchain:k32w_lock_app)" ]
    }
  }

  group("default") {
    deps = []
    if (enable_host_clang_build) {
      deps += [ ":host_clang" ]
    }
    if (enable_host_gcc_build) {
      deps += [ ":host_gcc" ]
    }
    if (enable_host_gcc_mbedtls_build) {
      deps += [ ":host_gcc_mbedtls" ]
    }
    if (enable_android_builds) {
      deps += [
        ":android_arm",
        ":android_arm64",
        ":android_x64",
        ":android_x86",
      ]
    }
    if (enable_standalone_chip_tool_build) {
      deps += [ ":standalone_chip_tool" ]
    }
    if (enable_standalone_chip_tool_darwin_build) {
      deps += [ ":standalone_chip_tool_darwin" ]
    }
    if (enable_standalone_shell_build) {
      deps += [ ":standalone_shell" ]
    }
    if (enable_linux_all_clusters_app_build) {
      deps += [ ":linux_all_clusters_app" ]
    }
    if (enable_linux_tv_app_build) {
      deps += [ ":linux_tv_app" ]
    }
    if (enable_linux_bridge_app_build) {
      deps += [ ":linux_bridge_app" ]
    }
    if (enable_linux_lighting_app_build) {
      deps += [ ":linux_lighting_app" ]
    }
    if (enable_efr32_lock_app_build) {
      deps += [ ":efr32_lock_app" ]
    }
    if (enable_efr32_lighting_app_build) {
      deps += [ ":efr32_lighting_app" ]
    }
    if (enable_efr32_window_app_build) {
      deps += [ ":efr32_window_app" ]
    }
    if (enable_k32w_lock_app_build) {
      deps += [ ":k32w_lock_app" ]
    }
    if (enable_qpg6100_lock_app_build) {
      deps += [ ":qpg6100_lock_app" ]
    }
    if (enable_cc13x2x7_26x2x7_lock_app_build) {
      deps += [ ":cc13x2x7_26x2x7_lock_app" ]
    }
  }

  group("check") {
    deps = []
    if (enable_host_clang_build) {
      deps += [ ":check_host_clang" ]
    }
    if (enable_host_gcc_build) {
      deps += [ ":check_host_gcc" ]
    }
    if (enable_host_gcc_mbedtls_build) {
      deps += [ ":check_host_gcc_mbedtls" ]
    }
  }
}
