1# Copyright (c) 2020, The OpenThread Authors. 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are met: 6# 1. Redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer. 8# 2. Redistributions in binary form must reproduce the above copyright 9# notice, this list of conditions and the following disclaimer in the 10# documentation and/or other materials provided with the distribution. 11# 3. Neither the name of the copyright holder nor the 12# names of its contributors may be used to endorse or promote products 13# derived from this software without specific prior written permission. 14# 15# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 19# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25# POSSIBILITY OF SUCH DAMAGE. 26# 27 28import("../../etc/gn/openthread.gni") 29 30visibility = [ "../../*" ] 31 32if (openthread_enable_core_config_args) { 33 config("core_config_args") { 34 defines = [] 35 36 if (openthread_config_thread_version == "1.1") { 37 defines += [ "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_1" ] 38 } else if (openthread_config_thread_version == "1.2") { 39 defines += [ "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_2" ] 40 } else if (openthread_config_thread_version != "") { 41 assert(false, 42 "Unrecognized Thread version: ${openthread_config_thread_version}") 43 } 44 45 if (openthread_config_log_output == "none") { 46 defines += 47 [ "OPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_NONE" ] 48 } else if (openthread_config_log_output == "debug_uart") { 49 defines += [ 50 "OPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART", 51 ] 52 } else if (openthread_config_log_output == "app") { 53 defines += 54 [ "OPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_APP" ] 55 } else if (openthread_config_log_output == "platform_defined") { 56 defines += [ "OPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED" ] 57 } else if (openthread_config_log_output != "") { 58 assert(false, "Unrecognized log output: ${openthread_config_log_output}") 59 } 60 61 if (!openthread_config_assert_enable) { 62 defines += [ "OPENTHREAD_CONFIG_ASSERT_ENABLE=0" ] 63 } 64 65 if (openthread_config_backbone_router_enable) { 66 defines += [ "OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE=1" ] 67 } 68 69 if (openthread_config_border_agent_enable) { 70 defines += [ "OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1" ] 71 } 72 73 if (openthread_config_border_router_enable) { 74 defines += [ "OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1" ] 75 } 76 77 if (openthread_config_border_routing_enable) { 78 defines += [ "OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE=1" ] 79 } 80 81 if (openthread_external_mbedtls != "") { 82 defines += [ "OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0" ] 83 } else if (!openthread_config_enable_builtin_mbedtls_management) { 84 defines += [ "OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0" ] 85 } 86 87 if (openthread_config_channel_manager_enable) { 88 defines += [ "OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=1" ] 89 } 90 91 if (openthread_config_channel_monitor_enable) { 92 defines += [ "OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=1" ] 93 } 94 95 if (openthread_config_child_supervision_enable) { 96 defines += [ "OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1" ] 97 } 98 99 if (openthread_config_coap_api_enable) { 100 defines += [ "OPENTHREAD_CONFIG_COAP_API_ENABLE=1" ] 101 } 102 103 if (openthread_config_coap_secure_api_enable) { 104 defines += [ "OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=1" ] 105 } 106 107 if (openthread_config_coap_observe_api_enable) { 108 defines += [ "OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=1" ] 109 } 110 111 if (openthread_config_commissioner_enable) { 112 defines += [ "OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1" ] 113 } 114 115 if (openthread_config_mac_csl_receiver_enable) { 116 defines += [ "OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1" ] 117 } 118 119 if (openthread_config_dhcp6_client_enable) { 120 defines += [ "OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1" ] 121 } 122 123 if (openthread_config_dhcp6_server_enable) { 124 defines += [ "OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1" ] 125 } 126 127 if (openthread_config_diag_enable) { 128 defines += [ "OPENTHREAD_CONFIG_DIAG_ENABLE=1" ] 129 } 130 131 if (openthread_config_dns_client_enable) { 132 defines += [ "OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1" ] 133 } 134 135 if (openthread_config_dnssd_server_enable) { 136 defines += [ "OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE=1" ] 137 } 138 139 if (openthread_config_ecdsa_enable) { 140 defines += [ "OPENTHREAD_CONFIG_ECDSA_ENABLE=1" ] 141 } 142 143 if (openthread_config_dua_enable) { 144 defines += [ "OPENTHREAD_CONFIG_DUA_ENABLE=1" ] 145 } 146 147 if (openthread_config_mlr_enable) { 148 defines += [ "OPENTHREAD_CONFIG_MLR_ENABLE=1" ] 149 } 150 151 if (openthread_config_heap_external_enable) { 152 defines += [ "OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1" ] 153 } 154 155 if (openthread_config_ip6_fragmentation_enable) { 156 defines += [ "OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1" ] 157 } 158 159 if (openthread_config_jam_detection_enable) { 160 defines += [ "OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1" ] 161 } 162 163 if (openthread_config_joiner_enable) { 164 defines += [ "OPENTHREAD_CONFIG_JOINER_ENABLE=1" ] 165 } 166 167 if (openthread_config_legacy_enable) { 168 defines += [ "OPENTHREAD_CONFIG_LEGACY_ENABLE=1" ] 169 } 170 171 if (openthread_config_link_metrics_initiator_enable) { 172 defines += [ "DOPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=1" ] 173 } 174 175 if (openthread_config_link_metrics_subject_enable) { 176 defines += [ "DOPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=1" ] 177 } 178 179 if (openthread_config_link_raw_enable) { 180 defines += [ "OPENTHREAD_CONFIG_LINK_RAW_ENABLE=1" ] 181 } 182 183 if (openthread_config_log_level_dynamic_enable) { 184 defines += [ "OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1" ] 185 } 186 187 if (openthread_config_mac_filter_enable) { 188 defines += [ "OPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1" ] 189 } 190 191 if (openthread_config_message_use_heap) { 192 defines += [ "OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE=1" ] 193 } 194 195 if (openthread_config_mle_long_routes_enable) { 196 defines += [ "OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE=1" ] 197 } 198 199 if (openthread_config_tmf_network_diag_mtd_enable) { 200 defines += [ "OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1" ] 201 } 202 203 if (openthread_config_multiple_instance_enable) { 204 defines += [ "OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE=1" ] 205 } 206 207 if (openthread_config_platform_netif_enable) { 208 defines += [ "OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE=1" ] 209 } 210 211 if (openthread_config_platform_udp_enable) { 212 defines += [ "OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=1" ] 213 } 214 215 if (openthread_config_reference_device_enable) { 216 defines += [ "OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE=1" ] 217 } 218 219 if (openthread_config_tmf_netdata_service_enable) { 220 defines += [ "OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1" ] 221 } 222 223 if (openthread_settings_ram) { 224 defines += [ "OPENTHREAD_SETTINGS_RAM=1" ] 225 } 226 227 if (openthread_config_ip6_slaac_enable) { 228 defines += [ "OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1" ] 229 } 230 231 if (openthread_config_sntp_client_enable) { 232 defines += [ "OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1" ] 233 } 234 235 if (openthread_config_srp_client_enable) { 236 defines += [ "OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1" ] 237 } 238 239 if (openthread_config_srp_server_enable) { 240 defines += [ "OPENTHREAD_CONFIG_SRP_SERVER_ENABLE=1" ] 241 } 242 243 if (openthread_config_ping_sender) { 244 defines += [ "OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1" ] 245 } 246 247 if (openthread_config_time_sync_enable) { 248 defines += [ "OPENTHREAD_CONFIG_TIME_SYNC_ENABLE=1" ] 249 } 250 251 if (openthread_config_udp_forward_enable) { 252 defines += [ "OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1" ] 253 } 254 255 if (openthread_config_full_logs) { 256 defines += [ "OPENTHREAD_CONFIG_LOG_LEVEL=OT_LOG_LEVEL_DEBG" ] 257 defines += [ "OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL=1" ] 258 defines += [ "OPENTHREAD_CONFIG_LOG_PREPEND_REGION=1" ] 259 } 260 261 if (openthread_config_otns_enable) { 262 defines += [ "OPENTHREAD_CONFIG_OTNS_ENABLE=1" ] 263 } 264 } 265} 266 267config("core_config") { 268 defines = [] 269 configs = [] 270 271 if (openthread_project_core_config_file != "") { 272 defines += [ "OPENTHREAD_PROJECT_CORE_CONFIG_FILE=\"${openthread_project_core_config_file}\"" ] 273 } 274 275 if (openthread_core_config_platform_check_file != "") { 276 defines += [ "OPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE=\"${openthread_core_config_platform_check_file}\"" ] 277 } 278 279 if (openthread_package_name != "") { 280 defines += [ "PACKAGE_NAME=\"${openthread_package_name}\"" ] 281 } 282 283 if (openthread_package_version != "") { 284 defines += [ "PACKAGE_VERSION=\"${openthread_package_version}\"" ] 285 } 286 287 if (openthread_enable_core_config_args) { 288 configs += [ ":core_config_args" ] 289 } 290 291 include_dirs = [ 292 "..", 293 ".", 294 ] 295} 296 297openthread_core_files = [ 298 "api/backbone_router_api.cpp", 299 "api/backbone_router_ftd_api.cpp", 300 "api/border_agent_api.cpp", 301 "api/border_router_api.cpp", 302 "api/channel_manager_api.cpp", 303 "api/channel_monitor_api.cpp", 304 "api/child_supervision_api.cpp", 305 "api/coap_api.cpp", 306 "api/coap_secure_api.cpp", 307 "api/commissioner_api.cpp", 308 "api/crypto_api.cpp", 309 "api/dataset_api.cpp", 310 "api/dataset_ftd_api.cpp", 311 "api/dataset_updater_api.cpp", 312 "api/diags_api.cpp", 313 "api/dns_api.cpp", 314 "api/dns_server_api.cpp", 315 "api/entropy_api.cpp", 316 "api/error_api.cpp", 317 "api/heap_api.cpp", 318 "api/history_tracker_api.cpp", 319 "api/icmp6_api.cpp", 320 "api/instance_api.cpp", 321 "api/ip6_api.cpp", 322 "api/jam_detection_api.cpp", 323 "api/joiner_api.cpp", 324 "api/link_api.cpp", 325 "api/link_metrics_api.cpp", 326 "api/link_raw_api.cpp", 327 "api/logging_api.cpp", 328 "api/message_api.cpp", 329 "api/multi_radio_api.cpp", 330 "api/netdata_api.cpp", 331 "api/netdata_publisher_api.cpp", 332 "api/netdiag_api.cpp", 333 "api/network_time_api.cpp", 334 "api/ping_sender_api.cpp", 335 "api/random_crypto_api.cpp", 336 "api/random_noncrypto_api.cpp", 337 "api/server_api.cpp", 338 "api/sntp_api.cpp", 339 "api/srp_client_api.cpp", 340 "api/srp_client_buffers_api.cpp", 341 "api/srp_server_api.cpp", 342 "api/tasklet_api.cpp", 343 "api/tcp_api.cpp", 344 "api/thread_api.cpp", 345 "api/thread_ftd_api.cpp", 346 "api/udp_api.cpp", 347 "backbone_router/backbone_tmf.cpp", 348 "backbone_router/backbone_tmf.hpp", 349 "backbone_router/bbr_leader.cpp", 350 "backbone_router/bbr_leader.hpp", 351 "backbone_router/bbr_local.cpp", 352 "backbone_router/bbr_local.hpp", 353 "backbone_router/bbr_manager.cpp", 354 "backbone_router/bbr_manager.hpp", 355 "backbone_router/multicast_listeners_table.cpp", 356 "backbone_router/multicast_listeners_table.hpp", 357 "backbone_router/ndproxy_table.cpp", 358 "backbone_router/ndproxy_table.hpp", 359 "border_router/infra_if_platform.cpp", 360 "border_router/router_advertisement.cpp", 361 "border_router/router_advertisement.hpp", 362 "border_router/routing_manager.cpp", 363 "border_router/routing_manager.hpp", 364 "coap/coap.cpp", 365 "coap/coap.hpp", 366 "coap/coap_message.cpp", 367 "coap/coap_message.hpp", 368 "coap/coap_secure.cpp", 369 "coap/coap_secure.hpp", 370 "common/arg_macros.hpp", 371 "common/array.hpp", 372 "common/bit_vector.hpp", 373 "common/clearable.hpp", 374 "common/code_utils.hpp", 375 "common/crc16.cpp", 376 "common/crc16.hpp", 377 "common/debug.hpp", 378 "common/encoding.hpp", 379 "common/equatable.hpp", 380 "common/error.cpp", 381 "common/error.hpp", 382 "common/extension.hpp", 383 "common/heap_string.cpp", 384 "common/heap_string.hpp", 385 "common/instance.cpp", 386 "common/instance.hpp", 387 "common/iterator_utils.hpp", 388 "common/linked_list.hpp", 389 "common/locator.hpp", 390 "common/locator_getters.hpp", 391 "common/logging.cpp", 392 "common/logging.hpp", 393 "common/message.cpp", 394 "common/message.hpp", 395 "common/new.hpp", 396 "common/non_copyable.hpp", 397 "common/notifier.cpp", 398 "common/notifier.hpp", 399 "common/numeric_limits.hpp", 400 "common/pool.hpp", 401 "common/random.hpp", 402 "common/random_manager.cpp", 403 "common/random_manager.hpp", 404 "common/settings.cpp", 405 "common/settings.hpp", 406 "common/settings_driver.hpp", 407 "common/string.cpp", 408 "common/string.hpp", 409 "common/tasklet.cpp", 410 "common/tasklet.hpp", 411 "common/time.hpp", 412 "common/time_ticker.cpp", 413 "common/time_ticker.hpp", 414 "common/timer.cpp", 415 "common/timer.hpp", 416 "common/tlvs.cpp", 417 "common/tlvs.hpp", 418 "common/trickle_timer.cpp", 419 "common/trickle_timer.hpp", 420 "common/type_traits.hpp", 421 "crypto/aes_ccm.cpp", 422 "crypto/aes_ccm.hpp", 423 "crypto/aes_ecb.cpp", 424 "crypto/aes_ecb.hpp", 425 "crypto/ecdsa.cpp", 426 "crypto/ecdsa.hpp", 427 "crypto/hkdf_sha256.cpp", 428 "crypto/hkdf_sha256.hpp", 429 "crypto/hmac_sha256.cpp", 430 "crypto/hmac_sha256.hpp", 431 "crypto/mbedtls.cpp", 432 "crypto/mbedtls.hpp", 433 "crypto/pbkdf2_cmac.cpp", 434 "crypto/pbkdf2_cmac.hpp", 435 "crypto/sha256.cpp", 436 "crypto/sha256.hpp", 437 "diags/factory_diags.cpp", 438 "diags/factory_diags.hpp", 439 "mac/channel_mask.cpp", 440 "mac/channel_mask.hpp", 441 "mac/data_poll_handler.cpp", 442 "mac/data_poll_handler.hpp", 443 "mac/data_poll_sender.cpp", 444 "mac/data_poll_sender.hpp", 445 "mac/link_raw.cpp", 446 "mac/link_raw.hpp", 447 "mac/mac.cpp", 448 "mac/mac.hpp", 449 "mac/mac_filter.cpp", 450 "mac/mac_filter.hpp", 451 "mac/mac_frame.cpp", 452 "mac/mac_frame.hpp", 453 "mac/mac_links.cpp", 454 "mac/mac_links.hpp", 455 "mac/mac_types.cpp", 456 "mac/mac_types.hpp", 457 "mac/sub_mac.cpp", 458 "mac/sub_mac.hpp", 459 "mac/sub_mac_callbacks.cpp", 460 "meshcop/announce_begin_client.cpp", 461 "meshcop/announce_begin_client.hpp", 462 "meshcop/border_agent.cpp", 463 "meshcop/border_agent.hpp", 464 "meshcop/commissioner.cpp", 465 "meshcop/commissioner.hpp", 466 "meshcop/dataset.cpp", 467 "meshcop/dataset.hpp", 468 "meshcop/dataset_local.cpp", 469 "meshcop/dataset_local.hpp", 470 "meshcop/dataset_manager.cpp", 471 "meshcop/dataset_manager.hpp", 472 "meshcop/dataset_manager_ftd.cpp", 473 "meshcop/dataset_updater.cpp", 474 "meshcop/dataset_updater.hpp", 475 "meshcop/dtls.cpp", 476 "meshcop/dtls.hpp", 477 "meshcop/energy_scan_client.cpp", 478 "meshcop/energy_scan_client.hpp", 479 "meshcop/joiner.cpp", 480 "meshcop/joiner.hpp", 481 "meshcop/joiner_router.cpp", 482 "meshcop/joiner_router.hpp", 483 "meshcop/meshcop.cpp", 484 "meshcop/meshcop.hpp", 485 "meshcop/meshcop_leader.cpp", 486 "meshcop/meshcop_leader.hpp", 487 "meshcop/meshcop_tlvs.cpp", 488 "meshcop/meshcop_tlvs.hpp", 489 "meshcop/panid_query_client.cpp", 490 "meshcop/panid_query_client.hpp", 491 "meshcop/timestamp.cpp", 492 "meshcop/timestamp.hpp", 493 "net/checksum.cpp", 494 "net/checksum.hpp", 495 "net/dhcp6.hpp", 496 "net/dhcp6_client.cpp", 497 "net/dhcp6_client.hpp", 498 "net/dhcp6_server.cpp", 499 "net/dhcp6_server.hpp", 500 "net/dns_client.cpp", 501 "net/dns_client.hpp", 502 "net/dns_types.cpp", 503 "net/dns_types.hpp", 504 "net/dnssd_server.cpp", 505 "net/dnssd_server.hpp", 506 "net/icmp6.cpp", 507 "net/icmp6.hpp", 508 "net/ip4_address.cpp", 509 "net/ip4_address.hpp", 510 "net/ip6.cpp", 511 "net/ip6.hpp", 512 "net/ip6_address.cpp", 513 "net/ip6_address.hpp", 514 "net/ip6_filter.cpp", 515 "net/ip6_filter.hpp", 516 "net/ip6_headers.cpp", 517 "net/ip6_headers.hpp", 518 "net/ip6_mpl.cpp", 519 "net/ip6_mpl.hpp", 520 "net/nd_agent.cpp", 521 "net/nd_agent.hpp", 522 "net/netif.cpp", 523 "net/netif.hpp", 524 "net/sntp_client.cpp", 525 "net/sntp_client.hpp", 526 "net/socket.cpp", 527 "net/socket.hpp", 528 "net/srp_client.cpp", 529 "net/srp_client.hpp", 530 "net/srp_server.cpp", 531 "net/srp_server.hpp", 532 "net/tcp6.cpp", 533 "net/tcp6.hpp", 534 "net/udp6.cpp", 535 "net/udp6.hpp", 536 "radio/max_power_table.hpp", 537 "radio/radio.cpp", 538 "radio/radio.hpp", 539 "radio/radio_callbacks.cpp", 540 "radio/radio_platform.cpp", 541 "radio/trel_interface.cpp", 542 "radio/trel_interface.hpp", 543 "radio/trel_link.cpp", 544 "radio/trel_link.hpp", 545 "radio/trel_packet.cpp", 546 "radio/trel_packet.hpp", 547 "thread/address_resolver.cpp", 548 "thread/address_resolver.hpp", 549 "thread/announce_begin_server.cpp", 550 "thread/announce_begin_server.hpp", 551 "thread/announce_sender.cpp", 552 "thread/announce_sender.hpp", 553 "thread/child_mask.hpp", 554 "thread/child_table.cpp", 555 "thread/child_table.hpp", 556 "thread/csl_tx_scheduler.cpp", 557 "thread/csl_tx_scheduler.hpp", 558 "thread/discover_scanner.cpp", 559 "thread/discover_scanner.hpp", 560 "thread/dua_manager.cpp", 561 "thread/dua_manager.hpp", 562 "thread/energy_scan_server.cpp", 563 "thread/energy_scan_server.hpp", 564 "thread/indirect_sender.cpp", 565 "thread/indirect_sender.hpp", 566 "thread/indirect_sender_frame_context.hpp", 567 "thread/key_manager.cpp", 568 "thread/key_manager.hpp", 569 "thread/link_metrics.cpp", 570 "thread/link_metrics.hpp", 571 "thread/link_metrics_tlvs.hpp", 572 "thread/link_quality.cpp", 573 "thread/link_quality.hpp", 574 "thread/lowpan.cpp", 575 "thread/lowpan.hpp", 576 "thread/mesh_forwarder.cpp", 577 "thread/mesh_forwarder.hpp", 578 "thread/mesh_forwarder_ftd.cpp", 579 "thread/mesh_forwarder_mtd.cpp", 580 "thread/mle.cpp", 581 "thread/mle.hpp", 582 "thread/mle_router.cpp", 583 "thread/mle_router.hpp", 584 "thread/mle_tlvs.hpp", 585 "thread/mle_types.cpp", 586 "thread/mle_types.hpp", 587 "thread/mlr_manager.cpp", 588 "thread/mlr_manager.hpp", 589 "thread/mlr_types.hpp", 590 "thread/neighbor_table.cpp", 591 "thread/neighbor_table.hpp", 592 "thread/network_data.cpp", 593 "thread/network_data.hpp", 594 "thread/network_data_leader.cpp", 595 "thread/network_data_leader.hpp", 596 "thread/network_data_leader_ftd.cpp", 597 "thread/network_data_leader_ftd.hpp", 598 "thread/network_data_local.cpp", 599 "thread/network_data_local.hpp", 600 "thread/network_data_notifier.cpp", 601 "thread/network_data_notifier.hpp", 602 "thread/network_data_publisher.cpp", 603 "thread/network_data_publisher.hpp", 604 "thread/network_data_service.cpp", 605 "thread/network_data_service.hpp", 606 "thread/network_data_tlvs.cpp", 607 "thread/network_data_tlvs.hpp", 608 "thread/network_data_types.cpp", 609 "thread/network_data_types.hpp", 610 "thread/network_diagnostic.cpp", 611 "thread/network_diagnostic.hpp", 612 "thread/network_diagnostic_tlvs.hpp", 613 "thread/panid_query_server.cpp", 614 "thread/panid_query_server.hpp", 615 "thread/radio_selector.cpp", 616 "thread/radio_selector.hpp", 617 "thread/router_table.cpp", 618 "thread/router_table.hpp", 619 "thread/src_match_controller.cpp", 620 "thread/src_match_controller.hpp", 621 "thread/thread_netif.cpp", 622 "thread/thread_netif.hpp", 623 "thread/thread_tlvs.hpp", 624 "thread/time_sync_service.cpp", 625 "thread/time_sync_service.hpp", 626 "thread/tmf.cpp", 627 "thread/tmf.hpp", 628 "thread/topology.cpp", 629 "thread/topology.hpp", 630 "thread/uri_paths.cpp", 631 "thread/uri_paths.hpp", 632 "utils/channel_manager.cpp", 633 "utils/channel_manager.hpp", 634 "utils/channel_monitor.cpp", 635 "utils/channel_monitor.hpp", 636 "utils/child_supervision.cpp", 637 "utils/child_supervision.hpp", 638 "utils/flash.cpp", 639 "utils/flash.hpp", 640 "utils/heap.cpp", 641 "utils/heap.hpp", 642 "utils/history_tracker.cpp", 643 "utils/history_tracker.hpp", 644 "utils/jam_detector.cpp", 645 "utils/jam_detector.hpp", 646 "utils/lookup_table.cpp", 647 "utils/lookup_table.hpp", 648 "utils/otns.cpp", 649 "utils/otns.hpp", 650 "utils/parse_cmdline.cpp", 651 "utils/parse_cmdline.hpp", 652 "utils/ping_sender.cpp", 653 "utils/ping_sender.hpp", 654 "utils/slaac_address.cpp", 655 "utils/slaac_address.hpp", 656 "utils/srp_client_buffers.cpp", 657 "utils/srp_client_buffers.hpp", 658] 659 660openthread_radio_sources = [ 661 "api/diags_api.cpp", 662 "api/error_api.cpp", 663 "api/instance_api.cpp", 664 "api/link_raw_api.cpp", 665 "api/logging_api.cpp", 666 "api/random_noncrypto_api.cpp", 667 "api/tasklet_api.cpp", 668 "common/error.hpp", 669 "common/instance.cpp", 670 "common/logging.cpp", 671 "common/random_manager.cpp", 672 "common/string.cpp", 673 "common/tasklet.cpp", 674 "common/timer.cpp", 675 "crypto/aes_ccm.cpp", 676 "crypto/aes_ecb.cpp", 677 "diags/factory_diags.cpp", 678 "mac/link_raw.cpp", 679 "mac/mac_frame.cpp", 680 "mac/mac_types.cpp", 681 "mac/sub_mac.cpp", 682 "mac/sub_mac_callbacks.cpp", 683 "radio/radio.cpp", 684 "radio/radio_callbacks.cpp", 685 "radio/radio_platform.cpp", 686 "thread/link_quality.cpp", 687 "utils/lookup_table.cpp", 688 "utils/parse_cmdline.cpp", 689] 690 691header_pattern = [ 692 "*.h", 693 "*.hpp", 694] 695 696openthread_core_headers = filter_include(openthread_core_files, header_pattern) 697openthread_core_sources = filter_exclude(openthread_core_files, header_pattern) 698 699source_set("libopenthread_core_config") { 700 public = [ 701 "config/announce_sender.h", 702 "config/backbone_router.h", 703 "config/border_router.h", 704 "config/channel_manager.h", 705 "config/channel_monitor.h", 706 "config/child_supervision.h", 707 "config/coap.h", 708 "config/commissioner.h", 709 "config/dataset_updater.h", 710 "config/dhcp6_client.h", 711 "config/dhcp6_server.h", 712 "config/diag.h", 713 "config/dns_client.h", 714 "config/dnssd_server.h", 715 "config/dtls.h", 716 "config/history_tracker.h", 717 "config/ip6.h", 718 "config/joiner.h", 719 "config/link_quality.h", 720 "config/link_raw.h", 721 "config/logging.h", 722 "config/mac.h", 723 "config/mle.h", 724 "config/netdata_publisher.h", 725 "config/openthread-core-config-check.h", 726 "config/openthread-core-default-config.h", 727 "config/parent_search.h", 728 "config/ping_sender.h", 729 "config/platform.h", 730 "config/radio_link.h", 731 "config/sntp_client.h", 732 "config/srp_client.h", 733 "config/srp_server.h", 734 "config/time_sync.h", 735 "config/tmf.h", 736 "openthread-core-config.h", 737 ] 738 public_configs = [ 739 ":core_config", 740 "../..:openthread_config", 741 ] 742 public_deps = [ "../../include/openthread:openthread_config" ] 743 public_deps += openthread_core_config_deps 744} 745 746source_set("libopenthread_core_headers") { 747 public = openthread_core_headers 748 public_deps = [ 749 ":libopenthread_core_config", 750 "../../include/openthread", 751 ] 752 visibility += [ "*" ] 753} 754 755group("libopenthread_platform") { 756 public_deps = [] 757 if (openthread_external_platform != "") { 758 public_deps += [ openthread_external_platform ] 759 } 760 public_deps += [ 761 ":libopenthread_core_headers", 762 "${mbedtls_target}", 763 ] 764} 765 766static_library("libopenthread-ftd") { 767 sources = openthread_core_sources 768 public_deps = [ ":libopenthread_platform" ] 769 public_configs = [ "../..:openthread_ftd_config" ] 770} 771 772static_library("libopenthread-mtd") { 773 sources = openthread_core_sources 774 public_deps = [ ":libopenthread_platform" ] 775 public_configs = [ "../..:openthread_mtd_config" ] 776} 777 778static_library("libopenthread-radio") { 779 sources = openthread_radio_sources 780 public_deps = [ ":libopenthread_platform" ] 781 public_configs = [ "../..:openthread_radio_config" ] 782} 783