| # 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("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") |
| import("${chip_root}/src/app/common_flags.gni") |
| import("${chip_root}/src/lib/core/core.gni") |
| import("${chip_root}/src/lib/lib.gni") |
| |
| config("app-main-config") { |
| include_dirs = [ "." ] |
| } |
| |
| source_set("ota-test-event-trigger") { |
| sources = [ |
| "${chip_root}/src/app/clusters/ota-requestor/OTATestEventTriggerDelegate.h", |
| ] |
| } |
| |
| source_set("app-main") { |
| defines = [] |
| sources = [ |
| "AppMain.cpp", |
| "AppMain.h", |
| "CommissionableInit.cpp", |
| "CommissionableInit.h", |
| "CommissioneeShellCommands.cpp", |
| "CommissioneeShellCommands.h", |
| "CommissionerMain.cpp", |
| "CommissionerMain.h", |
| "ControllerShellCommands.cpp", |
| "ControllerShellCommands.h", |
| "LinuxCommissionableDataProvider.cpp", |
| "LinuxCommissionableDataProvider.h", |
| "NamedPipeCommands.cpp", |
| "NamedPipeCommands.h", |
| "Options.cpp", |
| "Options.h", |
| "testing/CustomCSRResponse.cpp", |
| "testing/CustomCSRResponse.h", |
| "testing/CustomCSRResponseOperationalKeyStore.cpp", |
| "testing/CustomCSRResponseOperationalKeyStore.h", |
| ] |
| |
| defines = [] |
| |
| if (chip_enable_pw_rpc) { |
| defines += [ "PW_RPC_ENABLED" ] |
| } |
| if (chip_build_libshell) { |
| defines += [ "ENABLE_CHIP_SHELL" ] |
| } |
| |
| public_deps = [ |
| ":ota-test-event-trigger", |
| "${chip_root}/examples/providers:device_info_provider", |
| "${chip_root}/src/app/server", |
| "${chip_root}/src/credentials:default_attestation_verifier", |
| "${chip_root}/src/lib", |
| "${chip_root}/src/lib/shell", |
| "${chip_root}/src/lib/shell:shell_core", |
| "${chip_root}/src/platform/logging:force_stdio", |
| ] |
| |
| if (chip_enable_transport_trace) { |
| public_deps += |
| [ "${chip_root}/examples/common/tracing:trace_handlers_decoder" ] |
| } |
| |
| public_configs = [ ":app-main-config" ] |
| } |
| |
| source_set("commissioner-main") { |
| defines = [] |
| sources = [ |
| "CommissionerMain.cpp", |
| "CommissionerMain.h", |
| ] |
| |
| defines = [] |
| |
| if (chip_enable_pw_rpc) { |
| defines += [ "PW_RPC_ENABLED" ] |
| } |
| if (chip_build_libshell) { |
| defines += [ "ENABLE_CHIP_SHELL" ] |
| } |
| |
| public_deps = [ |
| "${chip_root}/src/app/server", |
| "${chip_root}/src/credentials:default_attestation_verifier", |
| "${chip_root}/src/lib", |
| "${chip_root}/src/lib/shell", |
| "${chip_root}/src/lib/shell:shell_core", |
| ] |
| |
| if (chip_enable_transport_trace) { |
| public_deps += [ "${chip_root}/examples/common/tracing:trace_handlers" ] |
| } |
| |
| public_configs = [ ":app-main-config" ] |
| } |