blob: b2510a3040df9506423233cde552e2857eee7c23 [file] [log] [blame]
# Copyright (c) 2021-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_root}/config/linux/pkg_config.gni")
import("${chip_root}/src/platform/device.gni")
assert(chip_device_platform == "webos")
declare_args() {
# Support syslog along instead of stdout(printf)
enable_syslog = true
}
if (chip_enable_openthread) {
import("//build_overrides/openthread.gni")
import("//build_overrides/ot_br_posix.gni")
}
if (chip_mdns == "platform") {
pkg_config("avahi_client_config") {
packages = [ "avahi-client" ]
}
}
pkg_config("glib") {
packages = [
"glib-2.0",
"gio-unix-2.0",
]
}
pkg_config("luna-service") {
packages = [
"luna-service2",
"PmLogLib",
"pbnjson_cpp",
]
}
static_library("webos") {
if (enable_syslog) {
defines = [ "USE_SYSLOG=1" ]
}
sources = [
"../DeviceSafeQueue.cpp",
"../DeviceSafeQueue.h",
"../GLibTypeDeleter.h",
"../SingletonConfigurationManager.cpp",
"BLEManagerImpl.cpp",
"BLEManagerImpl.h",
"BlePlatformConfig.h",
"CHIPDevicePlatformConfig.h",
"CHIPDevicePlatformEvent.h",
"CHIPPlatformConfig.h",
"CHIPWebOSStorage.cpp",
"CHIPWebOSStorage.h",
"CHIPWebOSStorageIni.cpp",
"CHIPWebOSStorageIni.h",
"ChipDeviceScanner.cpp",
"ChipDeviceScanner.h",
"ConfigurationManagerImpl.cpp",
"ConfigurationManagerImpl.h",
"ConnectivityManagerImpl.cpp",
"ConnectivityManagerImpl.h",
"ConnectivityUtils.cpp",
"ConnectivityUtils.h",
"DeviceInstanceInfoProviderImpl.cpp",
"DeviceInstanceInfoProviderImpl.h",
"DiagnosticDataProviderImpl.cpp",
"DiagnosticDataProviderImpl.h",
"InetPlatformConfig.h",
"KeyValueStoreManagerImpl.cpp",
"KeyValueStoreManagerImpl.h",
"Logging.cpp",
"MainLoop.cpp",
"MainLoop.h",
"NetworkCommissioningDriver.h",
"NetworkCommissioningThreadDriver.cpp",
"NetworkCommissioningWiFiDriver.cpp",
"PlatformManagerImpl.cpp",
"PlatformManagerImpl.h",
"PosixConfig.cpp",
"PosixConfig.h",
"SystemPlatformConfig.h",
"SystemTimeSupport.cpp",
]
deps = [
"${chip_root}/src/platform/logging:headers",
"${chip_root}/src/setup_payload",
]
public_deps = [
"${chip_root}/src/app/common:cluster-objects",
"${chip_root}/src/platform:platform_base",
"${chip_root}/third_party/inipp",
]
public_configs = []
if (chip_mdns == "platform") {
sources += [
"DnssdImpl.cpp",
"DnssdImpl.h",
]
deps += [ "${chip_root}/src/lib/dnssd:platform_header" ]
public_configs += [
":avahi_client_config",
":glib",
":luna-service",
]
}
if (chip_enable_openthread) {
sources += [
"ThreadStackManagerImpl.cpp",
"ThreadStackManagerImpl.h",
]
public_deps += [ "dbus/openthread" ]
}
if (chip_enable_wifi) {
# TBD: Use webOS specific Wi-Fi resource
#public_deps += [ "dbus/wpa" ]
}
if (chip_enable_ble) {
# TBD: Use webOS specific Bluetooth resource
#public_deps += [ "dbus/bluez" ]
}
libs = [
"luna-service2",
"pbnjson_c",
"pbnjson_cpp",
]
}