# 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("//build_overrides/jsoncpp.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/common",
    "${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}",

    # Disable availability annotations in Matter.framework headers because we
    # are not building against a system Matter.framework here anyway.
    "MTR_NO_AVAILABILITY=1",
  ]

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

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/common/RemoteDataModelLogger.h",
    "commands/common/RemoteDataModelLogger.mm",
    "commands/delay/Commands.h",
    "commands/delay/SleepCommand.h",
    "commands/delay/SleepCommand.mm",
    "commands/delay/WaitForCommissioneeCommand.h",
    "commands/delay/WaitForCommissioneeCommand.mm",
    "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",
    jsoncpp_root,
  ]

  if (config_use_interactive_mode) {
    sources += [ "commands/interactive/InteractiveCommands.mm" ]

    deps += [
      "${chip_root}/examples/common/websocket-server",
      "${chip_root}/src/platform/logging:headers",
      "${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",
      "${chip_root}/src/protocols:im_status",
    ]

    defines = []
  } else {
    include_dirs = [
      "${chip_root}/config/standalone/",
      "${chip_root}/src/",
      "${chip_root}/src/include/",
      "${chip_root}/src/protocols/",
      "${chip_root}/src/protocols/interaction_model",
      "${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" ]
}
