# Copyright (c) 2022 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("${chip_root}/build/chip/tools.gni")
import("${chip_root}/build/config/compiler/compiler.gni")
import("${chip_root}/build/config/mac/mac_sdk.gni")
import("${chip_root}/examples//chip-tool/chip-tool.gni")

if (config_use_interactive_mode) {
  import("//build_overrides/editline.gni")
}

assert(chip_build_tools)

declare_args() {
  chip_codesign = current_os == "ios"

  # When config_enable_yaml_tests is false, the Matter SDK options are not available.
  if (!config_enable_yaml_tests) {
    chip_inet_config_enable_ipv4 = true
    if (!defined(chip_config_network_layer_ble)) {
      chip_config_network_layer_ble = true
    }
    if (!defined(is_clang)) {
      is_clang = false
    }
  }

  enable_provisional_features = config_enable_yaml_tests
}

sdk = "macosx"
sdk_build_dir_suffix = ""
if (getenv("SDKROOT") != "") {
  sdk = getenv("SDKROOT")
  sdk_root_parts = string_split(getenv("SDKROOT"), ".")
  sdk_build_dir_suffix = "-${sdk_root_parts[0]}"
}
output_sdk_type = "Debug${sdk_build_dir_suffix}"

action("build-darwin-framework") {
  script = "${chip_root}/scripts/build/build_darwin_framework.py"

  inputs = [
    "${chip_root}/src/darwin/Framework/CHIP",
    "${chip_root}/src/darwin/Framework/CHIP/zap-generated",
    "${chip_root}/src/darwin/Framework/Matter.xcodeproj",
  ]

  args = [
    "--project_path",
    rebase_path("${chip_root}/src/darwin/Framework/Matter.xcodeproj",
                root_build_dir),
    "--out_path",
    "macos_framework_output",
    "--target",
    "Matter Framework",
    "--log_path",
    rebase_path("${root_build_dir}/darwin_framework_build.log", root_build_dir),
    "--target_arch",
    mac_target_arch,
  ]

  if (sdk != "macosx") {
    args += [
      "--target_sdk",
      sdk,
    ]
  }

  if (defined(chip_inet_config_enable_ipv4) && chip_inet_config_enable_ipv4) {
    args += [ "--ipv4" ]
  } else {
    args += [ "--no-ipv4" ]
  }

  if (defined(is_asan) && is_asan) {
    args += [ "--asan" ]
  } else {
    args += [ "--no-asan" ]
  }

  if (defined(chip_config_network_layer_ble) && chip_config_network_layer_ble) {
    args += [ "--ble" ]
  } else {
    args += [ "--no-ble" ]
  }

  if (defined(is_clang) && is_clang) {
    args += [ "--clang" ]
  } else {
    args += [ "--no-clang" ]
  }

  if (config_enable_yaml_tests) {
    args += [ "--enable-encoding-sentinel-enum-values" ]
  } else {
    args += [ "--no-enable-encoding-sentinel-enum-values" ]
  }

  if (enable_provisional_features) {
    args += [ "--enable-provisional-framework-features" ]
  } else {
    args += [ "--no-enable-provisional-framework-features" ]
  }

  output_name = "Matter.framework"
  outputs = [
    "${root_out_dir}/macos_framework_output/Build/Products/${output_sdk_type}/${output_name}",
    "${root_build_dir}/darwin_framework_build.log",
    "${root_out_dir}/macos_framework_output/ModuleCache.noindex/",
    "${root_out_dir}/macos_framework_output/Logs",
    "${root_out_dir}/macos_framework_output/Index",
    "${root_out_dir}/macos_framework_output/Build",
  ]
}

config("config") {
  include_dirs = [
    ".",
    "${chip_root}/examples/darwin-framework-tool/commands/common",
    "${chip_root}/zzz_generated/darwin-framework-tool",
    "${chip_root}/zzz_generated/controller-clusters",
    "${chip_root}/examples/chip-tool",
    "${chip_root}/zzz_generated/chip-tool",
    "${root_out_dir}/macos_framework_output/Build/Products/${output_sdk_type}/",
  ]

  framework_dirs = [
    "${root_out_dir}/macos_framework_output/Build/Products/${output_sdk_type}/",
  ]

  defines = [
    "CONFIG_ENABLE_YAML_TESTS=${config_enable_yaml_tests}",
    "CONFIG_USE_INTERACTIVE_MODE=${config_use_interactive_mode}",
  ]

  cflags = [
    "-Wconversion",
    "-fobjc-arc",

    # For now disable unguarded-availability-new warnings because we
    # are not building against a system Matter.framework here anyway.
    "-Wno-unguarded-availability-new",
  ]
}

executable("darwin-framework-tool") {
  sources = [
    "${chip_root}/examples/chip-tool/commands/common/Command.cpp",
    "${chip_root}/examples/chip-tool/commands/common/Command.h",
    "${chip_root}/examples/chip-tool/commands/common/Commands.cpp",
    "${chip_root}/examples/chip-tool/commands/common/Commands.h",
    "${chip_root}/examples/chip-tool/commands/common/HexConversion.h",
    "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp",
    "commands/clusters/ClusterCommandBridge.h",
    "commands/clusters/ModelCommandBridge.mm",
    "commands/clusters/ReportCommandBridge.h",
    "commands/clusters/WriteAttributeCommandBridge.h",
    "commands/common/CHIPCommandBridge.mm",
    "commands/common/CHIPCommandStorageDelegate.mm",
    "commands/common/CHIPToolKeypair.mm",
    "commands/common/MTRDevice_Externs.h",
    "commands/common/MTRError.mm",
    "commands/common/MTRError_Utils.h",
    "commands/common/MTRLogging.h",
    "commands/discover/Commands.h",
    "commands/discover/DiscoverCommissionablesCommand.h",
    "commands/discover/DiscoverCommissionablesCommand.mm",
    "commands/pairing/Commands.h",
    "commands/pairing/DeviceControllerDelegateBridge.mm",
    "commands/pairing/GetCommissionerNodeIdCommand.h",
    "commands/pairing/GetCommissionerNodeIdCommand.mm",
    "commands/pairing/OpenCommissioningWindowCommand.h",
    "commands/pairing/OpenCommissioningWindowCommand.mm",
    "commands/pairing/PairingCommandBridge.mm",
    "commands/payload/SetupPayloadParseCommand.mm",
    "commands/provider/Commands.h",
    "commands/provider/OTAProviderDelegate.mm",
    "commands/provider/OTASoftwareUpdateInteractive.mm",
    "commands/storage/Commands.h",
    "commands/storage/StorageManagementCommand.mm",
    "logging/logging.mm",
    "main.mm",
  ]

  deps = [
    ":build-darwin-framework",
    "${chip_root}/third_party/jsoncpp",
  ]

  if (config_use_interactive_mode) {
    sources += [ "commands/interactive/InteractiveCommands.mm" ]
    deps += [ "${editline_root}:editline" ]
  }

  ldflags = [
    "-rpath",
    "@executable_path/macos_framework_output/Build/Products/${output_sdk_type}/",
  ]

  frameworks = [
    "Matter.framework",
    "Security.framework",
  ]

  # When config_enable_yaml_tests=true the Matter SDK is pulled in as a dependency because the code of the test suite
  # uses some helpers from the Matter SDK. As a result, the SDK is built twice. Once because of this dependency and once
  # when the Matter.framework is built.
  # It may results in different versions of the Matter SDK between the output binary and the linked Matter.framework.
  #
  # When config_enable_yaml_tests=false the Matter SDK is built once when the Matter.framework is built and the resulting
  # libCHIP.a library is linked statically to the output binary.
  if (config_enable_yaml_tests) {
    deps += [
      "${chip_root}/src/app/tests/suites/commands/delay",

      # IM is needed for MTRError
      "${chip_root}/src/app/tests/suites/commands/interaction_model",

      # Log is needed by tests UserPrompt and Log
      "${chip_root}/src/app/tests/suites/commands/log",

      # System is needed by tests FactoryReset etc..
      "${chip_root}/src/app/tests/suites/commands/system",

      # pics is needed by tests
      "${chip_root}/src/app/tests/suites/pics",
    ]

    defines = []
  } else {
    include_dirs = [
      "${chip_root}/config/standalone/",
      "${chip_root}/src/",
      "${chip_root}/src/include/",
      "${chip_root}/third_party/nlassert/repo/include/",
      "${chip_root}/third_party/nlio/repo/include/",
      "${chip_root}/zzz_generated/app-common/",
      "${root_gen_dir}/include",
      "${root_out_dir}/macos_framework_output/Build/Intermediates.noindex/Matter.build/${output_sdk_type}/Matter.build/out/gen/include",
    ]

    defines = [
      "CHIP_HAVE_CONFIG_H=1",
      "CHIP_SYSTEM_CONFIG_USE_SOCKETS=1",
    ]

    frameworks += [
      "CoreFoundation.framework",
      "Foundation.framework",
      "CoreBluetooth.framework",
      "Network.framework",
    ]

    # Other SDKs are linked statically to Matter.framework but the macosx SDK is linked dynamically but needs some symbols that are
    # not exposed by the dylib.
    if (sdk == "macosx") {
      libs = [ "${root_out_dir}/macos_framework_output/Build/Intermediates.noindex/Matter.build/${output_sdk_type}/Matter.build/out/lib/libCHIP.a" ]
    }
  }

  if (enable_provisional_features) {
    defines += [ "MTR_ENABLE_PROVISIONAL=1" ]
  }

  public_configs = [ ":config" ]

  output_dir = root_out_dir
}

if (chip_codesign) {
  action("codesign") {
    script = "entitlements/codesign.py"
    public_deps = [ ":darwin-framework-tool" ]

    args = [
      "--target_path",
      rebase_path("${root_build_dir}/darwin-framework-tool", root_build_dir),
      "--log_path",
      rebase_path("${root_build_dir}/codesign_log.txt", root_build_dir),
    ]

    output_name = "codesign_log.txt"
    outputs = [ "${root_build_dir}/${output_name}" ]
  }
}

# Make sure we only build darwin-framework-tool, and not extraneous
# things like address-resolve, by default.
group("default") {
  deps = [ ":darwin-framework-tool" ]
}
