# 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/chip.gni")
import("//build_overrides/nrf5_sdk.gni")

import("${nrf5_sdk_build_root}/nrf5_sdk.gni")

assert(current_os == "freertos")

nrf5_platform_dir = "${chip_root}/examples/platform/nrf528xx"

nrf5_sdk("sdk") {
  include_dirs = [
    "main/include",
    "main",
    "${nrf5_platform_dir}/app/project_include",
    "${nrf5_platform_dir}/util/include",
    "${nrf5_platform_dir}/app/include",
    "${chip_root}/src/app/util",
  ]

  sources = [
    "${nrf5_platform_dir}/app/project_include/CHIPProjectConfig.h",
    "${nrf5_platform_dir}/app/project_include/FreeRTOSConfig.h",
    "${nrf5_platform_dir}/app/project_include/OpenThreadConfig.h",
    "${nrf5_platform_dir}/app/project_include/freertos_tasks_c_additions.h",
    "${nrf5_platform_dir}/app/project_include/nrf_log_ctrl_internal.h",
    "main/include/app_config.h",
  ]

  defines = []
  if (is_debug) {
    defines += [ "BUILD_RELEASE=0" ]
  } else {
    defines += [ "BUILD_RELEASE=1" ]
  }

  defines += [ "USE_APP_CONFIG" ]
}

executable("lighting_app") {
  output_name = "chip-nrf52840-lighting-example"

  sources = [
    "${chip_root}/src/app/clusters/on-off-server/on-off.c",
    "${chip_root}/src/app/util/attribute-size.c",
    "${chip_root}/src/app/util/attribute-storage.c",
    "${chip_root}/src/app/util/attribute-table.c",
    "${chip_root}/src/app/util/chip-response.cpp",
    "${chip_root}/src/app/util/client-api.c",
    "${chip_root}/src/app/util/ember-print.cpp",
    "${chip_root}/src/app/util/message.c",
    "${chip_root}/src/app/util/process-cluster-message.c",
    "${chip_root}/src/app/util/process-global-message.c",
    "${chip_root}/src/app/util/util.c",
    "${nrf5_platform_dir}/app/Server.cpp",
    "${nrf5_platform_dir}/app/chipinit.cpp",
    "${nrf5_platform_dir}/app/include/Server.h",
    "${nrf5_platform_dir}/app/include/chipinit.h",
    "${nrf5_platform_dir}/app/support/CXXExceptionStubs.cpp",
    "${nrf5_platform_dir}/app/support/nRF5Sbrk.c",
    "${nrf5_platform_dir}/util/LEDWidget.cpp",
    "${nrf5_platform_dir}/util/include/LEDWidget.h",
    "main/AppTask.cpp",
    "main/DataModelHandler.cpp",
    "main/LightingManager.cpp",
    "main/gen/call-command-handler.c",
    "main/gen/callback-stub.c",
    "main/gen/znet-bookkeeping.c",
    "main/include/AppEvent.h",
    "main/include/AppTask.h",
    "main/include/DataModelHandler.h",
    "main/include/LightingManager.h",
    "main/main.cpp",
  ]

  deps = [
    ":sdk",
    "${chip_root}/src/lib",
    "${chip_root}/src/setup_payload",
    "${chip_root}/third_party/openthread/platforms/nrf528xx:libnordicsemi_nrf52840_radio_driver_softdevice",
    "${chip_root}/third_party/openthread/platforms/nrf528xx:libopenthread-nrf52840-softdevice-sdk",
    "${nrf5_platform_dir}/app/support:freertos_debugging_hooks",
    "${nrf5_platform_dir}/app/support:freertos_newlib_lock_support",
    "${nrf5_platform_dir}/app/support:freertos_newlib_lock_support_test",
    "${openthread_root}:libopenthread-cli-ftd",
    "${openthread_root}:libopenthread-ftd",
  ]

  output_dir = root_out_dir

  ldscript = "${nrf5_platform_dir}/app/ldscripts/chip-nrf52840-example.ld"

  ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ]
}

group("nrf5") {
  deps = [ ":lighting_app" ]
}
