From 96fe3dd59fa667df4b91338d49f1c0f5ec73d4f2 Mon Sep 17 00:00:00 2001 From: Zhanglong Xia Date: Fri, 12 Mar 2021 04:05:55 +0800 Subject: [PATCH] [android] remove Android.bp (#6266) Android.bp is unable to be checked by github actions. This commit removes the Android.bp. The Android.bp will be added to the Android repo. --- Android.bp | 726 ------------------ .../openthread-config-android-version.h.in | 35 - script/config-android-version-gen.sh | 52 -- script/update-makefiles.py | 13 - 4 files changed, 826 deletions(-) delete mode 100644 Android.bp delete mode 100644 etc/android/openthread-config-android-version.h.in delete mode 100755 script/config-android-version-gen.sh diff --git a/Android.bp b/Android.bp deleted file mode 100644 index 6a55ad15e..000000000 --- a/Android.bp +++ /dev/null @@ -1,726 +0,0 @@ -// -// Copyright (c) 2021, The OpenThread Authors. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. Neither the name of the copyright holder nor the -// names of its contributors may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -// - -cc_defaults { - name : "ot_cflags_defaults", - cflags: [ - "-DOPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1", - "-DOPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1", - "-DOPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1", - "-DOPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1", - "-DOPENTHREAD_POSIX_CONFIG_RCP_PTY_ENABLE=1", - "-DOPENTHREAD_FTD=1", - "-DOPENTHREAD_POSIX=1", - "-DOPENTHREAD_SPINEL_CONFIG_OPENTHREAD_MESSAGE_ENABLE=1", - "-DOPENTHREAD_CONFIG_ANDROID_VERSION_HEADER_ENABLE=1", - "-DPACKAGE=\"openthread\"", - "-DPACKAGE_BUGREPORT=\"openthread-devel@googlegroups.com\"", - "-DPACKAGE_NAME=\"OPENTHREAD\"", - "-DPACKAGE_TARNAME=\"openthread\"", - "-DPACKAGE_URL=\"http://github.com/openthread/openthread\"", - "-DMBEDTLS_CONFIG_FILE=\"mbedtls-config.h\"", - "-DSPINEL_PLATFORM_HEADER=\"spinel_platform.h\"", - ], -} - -soong_config_module_type { - name: "ot_android_bp_cc_defaults", - module_type: "cc_defaults", - config_namespace: "openthread", - bool_variables: ["enable_android_bp", "disable_android_bp"], - properties: ["enabled"], -} - -ot_android_bp_cc_defaults { - name: "ot_android_bp_defaults", - soong_config_variables: { - enable_android_bp: { - enabled: true, - }, - disable_android_bp: { - enabled: false, - }, - }, -} - -genrule { - name: "ot_version_header", - cmd: "$(location script/config-android-version-gen.sh) $(location .default-version) < $(in) > $(out)", - srcs: ["etc/android/openthread-config-android-version.h.in"], - out: ["openthread-config-android-version.h"], - tool_files: [ - "script/config-android-version-gen.sh", - ".default-version", - ], -} - -soong_config_module_type { - name: "ot_config_cc_defaults", - module_type: "cc_defaults", - config_namespace: "openthread", - bool_variables: ["daemon", "diag", "default_config_file"], - value_variables: ["project_core_config_file", "config_file", "config_file_local_include_dir"], - variables: ["rcp_bus"], - properties: ["cflags", "local_include_dirs"], -} - -soong_config_string_variable { - name: "rcp_bus", - values: ["spi", "uart"], -} - -ot_config_cc_defaults { - name: "ot_config_defaults", - soong_config_variables: { - daemon: { - cflags: [ - "-DOPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE=1", - "-DOPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=1", - "-DOPENTHREAD_CONFIG_UNSECURE_TRAFFIC_MANAGED_BY_STACK_ENABLE=1", - "-DOPENTHREAD_POSIX_CONFIG_DAEMON_ENABLE=1" - ], - }, - diag: { - cflags: ["-DOPENTHREAD_CONFIG_DIAG_ENABLE=1"], - }, - rcp_bus: { - spi: { - cflags: ["-DOPENTHREAD_POSIX_CONFIG_RCP_BUS=OT_POSIX_RCP_BUS_SPI"], - }, - uart: { - cflags: ["-DOPENTHREAD_POSIX_CONFIG_RCP_BUS=OT_POSIX_RCP_BUS_UART"], - }, - }, - project_core_config_file: { - cflags: ["-DOPENTHREAD_PROJECT_CORE_CONFIG_FILE=%s"], - }, - config_file: { - cflags: ["-DOPENTHREAD_CONFIG_FILE=%s"], - }, - config_file_local_include_dir: { - local_include_dirs: ["%s"], - }, - default_config_file: { - cflags: [ - "-DOPENTHREAD_PROJECT_CORE_CONFIG_FILE=\"openthread-core-posix-config.h\"", - "-DOPENTHREAD_CONFIG_FILE=\"openthread-config-android.h\"", - ], - }, - }, -} - -soong_config_module_type { - name: "ot_vendor_extension_cc_defaults", - module_type: "cc_defaults", - config_namespace: "openthread", - bool_variables: ["enable_vendor_extension"], - value_variables: ["vendor_extension_local_include_dir", "vendor_extension_src"], - properties: ["cflags", "srcs", "local_include_dirs"], -} - -ot_vendor_extension_cc_defaults { - name: "ot_vendor_extension_defaults", - soong_config_variables: { - enable_vendor_extension: { - cflags: ["-DOPENTHREAD_ENABLE_VENDOR_EXTENSION=1"], - }, - vendor_extension_local_include_dir: { - local_include_dirs: ["%s"], - }, - vendor_extension_src: { - srcs: ["%s"], - }, - }, -} - -cc_library_static { - name: "ot-core", - vendor_available: true, - host_supported: true, - defaults: ["ot_android_bp_defaults", "ot_cflags_defaults", "ot_config_defaults", "ot_vendor_extension_defaults"], - generated_headers: ["ot_version_header"], - - local_include_dirs: [ - "include", - "src", - "src/cli", - "src/core", - "src/ncp", - "src/posix/platform", - "src/posix/platform/include", - "third_party", - "third_party/mbedtls", - "third_party/mbedtls/repo/include", - ], - - export_include_dirs: [ - "include", - "src", - ], - - cppflags: [ - "-std=c++11", - "-pedantic-errors", - ], - - shared_libs: [ - "libcutils", - ], - - srcs: [ - "src/core/api/backbone_router_api.cpp", - "src/core/api/backbone_router_ftd_api.cpp", - "src/core/api/border_agent_api.cpp", - "src/core/api/border_router_api.cpp", - "src/core/api/channel_manager_api.cpp", - "src/core/api/channel_monitor_api.cpp", - "src/core/api/child_supervision_api.cpp", - "src/core/api/coap_api.cpp", - "src/core/api/coap_secure_api.cpp", - "src/core/api/commissioner_api.cpp", - "src/core/api/crypto_api.cpp", - "src/core/api/dataset_api.cpp", - "src/core/api/dataset_ftd_api.cpp", - "src/core/api/dataset_updater_api.cpp", - "src/core/api/diags_api.cpp", - "src/core/api/dns_api.cpp", - "src/core/api/entropy_api.cpp", - "src/core/api/heap_api.cpp", - "src/core/api/icmp6_api.cpp", - "src/core/api/instance_api.cpp", - "src/core/api/ip6_api.cpp", - "src/core/api/jam_detection_api.cpp", - "src/core/api/joiner_api.cpp", - "src/core/api/link_api.cpp", - "src/core/api/link_metrics_api.cpp", - "src/core/api/link_raw_api.cpp", - "src/core/api/logging_api.cpp", - "src/core/api/message_api.cpp", - "src/core/api/multi_radio_api.cpp", - "src/core/api/netdata_api.cpp", - "src/core/api/netdiag_api.cpp", - "src/core/api/network_time_api.cpp", - "src/core/api/random_crypto_api.cpp", - "src/core/api/random_noncrypto_api.cpp", - "src/core/api/server_api.cpp", - "src/core/api/sntp_api.cpp", - "src/core/api/srp_client_api.cpp", - "src/core/api/srp_server_api.cpp", - "src/core/api/tasklet_api.cpp", - "src/core/api/thread_api.cpp", - "src/core/api/thread_ftd_api.cpp", - "src/core/api/udp_api.cpp", - "src/core/backbone_router/backbone_tmf.cpp", - "src/core/backbone_router/bbr_leader.cpp", - "src/core/backbone_router/bbr_local.cpp", - "src/core/backbone_router/bbr_manager.cpp", - "src/core/backbone_router/multicast_listeners_table.cpp", - "src/core/backbone_router/ndproxy_table.cpp", - "src/core/border_router/infra_if_platform.cpp", - "src/core/border_router/router_advertisement.cpp", - "src/core/border_router/routing_manager.cpp", - "src/core/coap/coap.cpp", - "src/core/coap/coap_message.cpp", - "src/core/coap/coap_secure.cpp", - "src/core/common/crc16.cpp", - "src/core/common/instance.cpp", - "src/core/common/logging.cpp", - "src/core/common/message.cpp", - "src/core/common/notifier.cpp", - "src/core/common/random_manager.cpp", - "src/core/common/settings.cpp", - "src/core/common/string.cpp", - "src/core/common/tasklet.cpp", - "src/core/common/time_ticker.cpp", - "src/core/common/timer.cpp", - "src/core/common/tlvs.cpp", - "src/core/common/trickle_timer.cpp", - "src/core/crypto/aes_ccm.cpp", - "src/core/crypto/aes_ecb.cpp", - "src/core/crypto/ecdsa.cpp", - "src/core/crypto/hkdf_sha256.cpp", - "src/core/crypto/hmac_sha256.cpp", - "src/core/crypto/mbedtls.cpp", - "src/core/crypto/pbkdf2_cmac.cpp", - "src/core/crypto/sha256.cpp", - "src/core/diags/factory_diags.cpp", - "src/core/mac/channel_mask.cpp", - "src/core/mac/data_poll_handler.cpp", - "src/core/mac/data_poll_sender.cpp", - "src/core/mac/link_raw.cpp", - "src/core/mac/mac.cpp", - "src/core/mac/mac_filter.cpp", - "src/core/mac/mac_frame.cpp", - "src/core/mac/mac_links.cpp", - "src/core/mac/mac_types.cpp", - "src/core/mac/sub_mac.cpp", - "src/core/mac/sub_mac_callbacks.cpp", - "src/core/meshcop/announce_begin_client.cpp", - "src/core/meshcop/border_agent.cpp", - "src/core/meshcop/commissioner.cpp", - "src/core/meshcop/dataset.cpp", - "src/core/meshcop/dataset_local.cpp", - "src/core/meshcop/dataset_manager.cpp", - "src/core/meshcop/dataset_manager_ftd.cpp", - "src/core/meshcop/dataset_updater.cpp", - "src/core/meshcop/dtls.cpp", - "src/core/meshcop/energy_scan_client.cpp", - "src/core/meshcop/joiner.cpp", - "src/core/meshcop/joiner_router.cpp", - "src/core/meshcop/meshcop.cpp", - "src/core/meshcop/meshcop_leader.cpp", - "src/core/meshcop/meshcop_tlvs.cpp", - "src/core/meshcop/panid_query_client.cpp", - "src/core/meshcop/timestamp.cpp", - "src/core/net/checksum.cpp", - "src/core/net/dhcp6_client.cpp", - "src/core/net/dhcp6_server.cpp", - "src/core/net/dns_client.cpp", - "src/core/net/dns_types.cpp", - "src/core/net/dnssd_server.cpp", - "src/core/net/icmp6.cpp", - "src/core/net/ip6.cpp", - "src/core/net/ip6_address.cpp", - "src/core/net/ip6_filter.cpp", - "src/core/net/ip6_headers.cpp", - "src/core/net/ip6_mpl.cpp", - "src/core/net/netif.cpp", - "src/core/net/sntp_client.cpp", - "src/core/net/socket.cpp", - "src/core/net/srp_client.cpp", - "src/core/net/srp_server.cpp", - "src/core/net/udp6.cpp", - "src/core/radio/radio.cpp", - "src/core/radio/radio_callbacks.cpp", - "src/core/radio/radio_platform.cpp", - "src/core/radio/trel_interface.cpp", - "src/core/radio/trel_link.cpp", - "src/core/radio/trel_packet.cpp", - "src/core/thread/address_resolver.cpp", - "src/core/thread/announce_begin_server.cpp", - "src/core/thread/announce_sender.cpp", - "src/core/thread/child_table.cpp", - "src/core/thread/csl_tx_scheduler.cpp", - "src/core/thread/discover_scanner.cpp", - "src/core/thread/dua_manager.cpp", - "src/core/thread/energy_scan_server.cpp", - "src/core/thread/indirect_sender.cpp", - "src/core/thread/key_manager.cpp", - "src/core/thread/link_metrics.cpp", - "src/core/thread/link_quality.cpp", - "src/core/thread/lowpan.cpp", - "src/core/thread/mesh_forwarder.cpp", - "src/core/thread/mesh_forwarder_ftd.cpp", - "src/core/thread/mesh_forwarder_mtd.cpp", - "src/core/thread/mle.cpp", - "src/core/thread/mle_router.cpp", - "src/core/thread/mle_types.cpp", - "src/core/thread/mlr_manager.cpp", - "src/core/thread/neighbor_table.cpp", - "src/core/thread/network_data.cpp", - "src/core/thread/network_data_leader.cpp", - "src/core/thread/network_data_leader_ftd.cpp", - "src/core/thread/network_data_local.cpp", - "src/core/thread/network_data_notifier.cpp", - "src/core/thread/network_data_service.cpp", - "src/core/thread/network_diagnostic.cpp", - "src/core/thread/panid_query_server.cpp", - "src/core/thread/radio_selector.cpp", - "src/core/thread/router_table.cpp", - "src/core/thread/src_match_controller.cpp", - "src/core/thread/thread_netif.cpp", - "src/core/thread/time_sync_service.cpp", - "src/core/thread/tmf.cpp", - "src/core/thread/topology.cpp", - "src/core/thread/uri_paths.cpp", - "src/core/utils/channel_manager.cpp", - "src/core/utils/channel_monitor.cpp", - "src/core/utils/child_supervision.cpp", - "src/core/utils/flash.cpp", - "src/core/utils/heap.cpp", - "src/core/utils/jam_detector.cpp", - "src/core/utils/lookup_table.cpp", - "src/core/utils/otns.cpp", - "src/core/utils/parse_cmdline.cpp", - "src/core/utils/slaac_address.cpp", - "src/lib/hdlc/hdlc.cpp", - "src/lib/platform/exit_code.c", - "src/lib/spinel/spinel.c", - "src/lib/spinel/spinel_decoder.cpp", - "src/lib/spinel/spinel_encoder.cpp", - "src/lib/url/url.cpp", - "src/posix/platform/alarm.cpp", - "src/posix/platform/backbone.cpp", - "src/posix/platform/entropy.cpp", - "src/posix/platform/hdlc_interface.cpp", - "src/posix/platform/logging.cpp", - "src/posix/platform/memory.cpp", - "src/posix/platform/misc.cpp", - "src/posix/platform/multicast_routing.cpp", - "src/posix/platform/netif.cpp", - "src/posix/platform/radio.cpp", - "src/posix/platform/radio_url.cpp", - "src/posix/platform/settings.cpp", - "src/posix/platform/spi_interface.cpp", - "src/posix/platform/system.cpp", - "src/posix/platform/uart.cpp", - "src/posix/platform/udp.cpp", - "third_party/mbedtls/repo/library/aes.c", - "third_party/mbedtls/repo/library/asn1parse.c", - "third_party/mbedtls/repo/library/asn1write.c", - "third_party/mbedtls/repo/library/base64.c", - "third_party/mbedtls/repo/library/bignum.c", - "third_party/mbedtls/repo/library/ccm.c", - "third_party/mbedtls/repo/library/cipher.c", - "third_party/mbedtls/repo/library/cipher_wrap.c", - "third_party/mbedtls/repo/library/cmac.c", - "third_party/mbedtls/repo/library/ctr_drbg.c", - "third_party/mbedtls/repo/library/debug.c", - "third_party/mbedtls/repo/library/ecdh.c", - "third_party/mbedtls/repo/library/ecdsa.c", - "third_party/mbedtls/repo/library/ecjpake.c", - "third_party/mbedtls/repo/library/ecp.c", - "third_party/mbedtls/repo/library/ecp_curves.c", - "third_party/mbedtls/repo/library/entropy.c", - "third_party/mbedtls/repo/library/entropy_poll.c", - "third_party/mbedtls/repo/library/hmac_drbg.c", - "third_party/mbedtls/repo/library/md.c", - "third_party/mbedtls/repo/library/md_wrap.c", - "third_party/mbedtls/repo/library/memory_buffer_alloc.c", - "third_party/mbedtls/repo/library/oid.c", - "third_party/mbedtls/repo/library/pem.c", - "third_party/mbedtls/repo/library/pk.c", - "third_party/mbedtls/repo/library/pk_wrap.c", - "third_party/mbedtls/repo/library/pkparse.c", - "third_party/mbedtls/repo/library/pkwrite.c", - "third_party/mbedtls/repo/library/platform.c", - "third_party/mbedtls/repo/library/platform_util.c", - "third_party/mbedtls/repo/library/sha256.c", - "third_party/mbedtls/repo/library/ssl_ciphersuites.c", - "third_party/mbedtls/repo/library/ssl_cli.c", - "third_party/mbedtls/repo/library/ssl_cookie.c", - "third_party/mbedtls/repo/library/ssl_srv.c", - "third_party/mbedtls/repo/library/ssl_ticket.c", - "third_party/mbedtls/repo/library/ssl_tls.c", - "third_party/mbedtls/repo/library/threading.c", - "third_party/mbedtls/repo/library/x509.c", - "third_party/mbedtls/repo/library/x509_crt.c", - ], -} - -cc_library_static { - name: "libopenthread-cli", - vendor_available: true, - host_supported: true, - - defaults: ["ot_android_bp_defaults", "ot_cflags_defaults", "ot_config_defaults"], - generated_headers: ["ot_version_header"], - - local_include_dirs: [ - "include", - "src", - "src/cli", - "src/core", - "src/posix/platform", - "src/posix/platform/include", - "third_party/mbedtls", - "third_party/mbedtls/repo/include", - ], - - cflags: ["-DOPENTHREAD_CONFIG_UART_CLI_RAW=1"], - - cppflags: [ - "-std=c++11", - "-pedantic-errors", - ], - - srcs: [ - "src/cli/cli.cpp", - "src/cli/cli_coap.cpp", - "src/cli/cli_coap_secure.cpp", - "src/cli/cli_commissioner.cpp", - "src/cli/cli_console.cpp", - "src/cli/cli_dataset.cpp", - "src/cli/cli_joiner.cpp", - "src/cli/cli_network_data.cpp", - "src/cli/cli_uart.cpp", - "src/cli/cli_udp.cpp", - ], -} - -cc_binary { - name: "ot-cli", - vendor: true, - - defaults: ["ot_android_bp_defaults", "ot_cflags_defaults", "ot_config_defaults"], - generated_headers: ["ot_version_header"], - - local_include_dirs: [ - "include", - "src", - "src/cli", - "src/core", - "src/posix/platform", - "src/posix/platform/include", - "third_party/mbedtls", - "third_party/mbedtls/repo/include", - ], - - cflags: ["-DOPENTHREAD_POSIX_APP_TYPE=OT_POSIX_APP_TYPE_CLI"], - - cppflags: [ - "-std=c++11", - "-pedantic-errors", - ], - - host_ldlibs: [ - "-lrt", - "-lutil", - ], - - srcs: ["src/posix/main.c"], - - static_libs: [ - "libopenthread-cli", - "ot-core", - ], -} - -cc_library_static { - name: "libopenthread-ncp", - vendor_available: true, - host_supported: true, - - defaults: ["ot_android_bp_defaults", "ot_cflags_defaults", "ot_config_defaults"], - generated_headers: ["ot_version_header"], - - local_include_dirs: [ - "include", - "src", - "src/core", - "src/ncp", - "src/posix/platform", - "src/posix/platform/include", - "third_party/mbedtls", - "third_party/mbedtls/repo/include", - ], - - cppflags: [ - "-std=c++11", - "-pedantic-errors", - ], - - srcs: [ - "src/lib/spinel/spinel_buffer.cpp", - "src/ncp/changed_props_set.cpp", - "src/ncp/ncp_base.cpp", - "src/ncp/ncp_base_mtd.cpp", - "src/ncp/ncp_base_ftd.cpp", - "src/ncp/ncp_base_dispatcher.cpp", - "src/ncp/ncp_uart.cpp", - ], -} - -cc_binary { - name: "ot-ncp", - vendor: true, - - defaults: ["ot_android_bp_defaults", "ot_cflags_defaults", "ot_config_defaults"], - generated_headers: ["ot_version_header"], - - local_include_dirs: [ - "include", - "src", - "src/core", - "src/ncp", - "src/posix/platform", - "src/posix/platform/include", - "third_party/mbedtls", - "third_party/mbedtls/repo/include", - ], - - cflags: ["-DOPENTHREAD_POSIX_APP_TYPE=OT_POSIX_APP_TYPE_NCP"], - - cppflags: [ - "-std=c++11", - "-pedantic-errors", - ], - - srcs: [ - "src/posix/main.c"], - - host_ldlibs: [ - "-lrt", - "-lutil", - ], - - static_libs: [ - "libopenthread-ncp", - "ot-core", - ], -} - -cc_binary { - name: "ot-ctl", - vendor: true, - - defaults: ["ot_android_bp_defaults", "ot_cflags_defaults", "ot_config_defaults"], - generated_headers: ["ot_version_header"], - - cppflags: [ - "-std=c++11", - "-pedantic-errors", - ], - - local_include_dirs: [ - "include", - "src/", - "src/core", - "src/posix/platform", - "src/posix/platform/include", - ], - - srcs: ["src/posix/client.cpp"], -} - -cc_binary { - name: "ot-rcp", - vendor: true, - - defaults: ["ot_android_bp_defaults"], - generated_headers: ["ot_version_header"], - - local_include_dirs: [ - "include", - "src", - "src/core", - "src/ncp", - "src/lib/hdlc", - "src/lib/platform", - "src/lib/spinel", - "examples/platforms", - "examples/platforms/simulation", - "third_party", - "third_party/mbedtls", - "third_party/mbedtls/repo/include", - ], - - cflags: [ - "-DOPENTHREAD_MTD=0", - "-DOPENTHREAD_FTD=0", - "-DOPENTHREAD_RADIO=1", - "-DOPENTHREAD_SPINEL_CONFIG_OPENTHREAD_MESSAGE_ENABLE=0", - "-DOPENTHREAD_EXAMPLES_SIMULATION=1", - "-D_GNU_SOURCE", - "-DSPINEL_PLATFORM_HEADER=\"spinel_platform.h\"", - "-DOPENTHREAD_PROJECT_CORE_CONFIG_FILE=\"openthread-core-simulation-config.h\"", - "-DOPENTHREAD_CONFIG_ANDROID_VERSION_HEADER_ENABLE=1", - "-DOPENTHREAD_CONFIG_FILE=", - "-DPACKAGE=\"openthread\"", - "-DPACKAGE_BUGREPORT=\"openthread-devel@googlegroups.com\"", - "-DPACKAGE_NAME=\"OPENTHREAD\"", - "-DPACKAGE_TARNAME=\"openthread\"", - "-DPACKAGE_URL=\"http://github.com/openthread/openthread\"", - ], - - cppflags: [ - "-std=c++11", - "-pedantic-errors", - ], - - host_ldlibs: [ - "-lrt", - "-lutil", - ], - - shared_libs: [ - "libcutils", - ], - - srcs: [ - "examples/apps/ncp/main.c", - "examples/platforms/utils/debug_uart.c", - "examples/platforms/utils/mac_frame.cpp", - "examples/platforms/utils/settings_ram.c", - "examples/platforms/utils/soft_source_match_table.c", - "examples/platforms/simulation/alarm.c", - "examples/platforms/simulation/diag.c", - "examples/platforms/simulation/entropy.c", - "examples/platforms/simulation/flash.c", - "examples/platforms/simulation/logging.c", - "examples/platforms/simulation/misc.c", - "examples/platforms/simulation/radio.c", - "examples/platforms/simulation/spi-stubs.c", - "examples/platforms/simulation/system.c", - "examples/platforms/simulation/uart.c", - "examples/platforms/simulation/virtual_time/alarm-sim.c", - "examples/platforms/simulation/virtual_time/platform-sim.c", - "src/core/api/diags_api.cpp", - "src/core/api/heap_api.cpp", - "src/core/api/instance_api.cpp", - "src/core/api/link_raw_api.cpp", - "src/core/api/logging_api.cpp", - "src/core/api/random_noncrypto_api.cpp", - "src/core/api/tasklet_api.cpp", - "src/core/common/instance.cpp", - "src/core/common/logging.cpp", - "src/core/common/random_manager.cpp", - "src/core/common/string.cpp", - "src/core/common/tasklet.cpp", - "src/core/common/timer.cpp", - "src/core/crypto/aes_ccm.cpp", - "src/core/crypto/aes_ecb.cpp", - "src/core/diags/factory_diags.cpp", - "src/core/mac/link_raw.cpp", - "src/core/mac/mac_frame.cpp", - "src/core/mac/mac_types.cpp", - "src/core/mac/sub_mac.cpp", - "src/core/mac/sub_mac_callbacks.cpp", - "src/core/radio/radio.cpp", - "src/core/radio/radio_callbacks.cpp", - "src/core/radio/radio_platform.cpp", - "src/core/thread/link_quality.cpp", - "src/core/utils/lookup_table.cpp", - "src/core/utils/parse_cmdline.cpp", - "src/lib/hdlc/hdlc.cpp", - "src/lib/platform/exit_code.c", - "src/lib/spinel/spinel.c", - "src/lib/spinel/spinel_buffer.cpp", - "src/lib/spinel/spinel_decoder.cpp", - "src/lib/spinel/spinel_encoder.cpp", - "src/ncp/changed_props_set.cpp", - "src/ncp/ncp_base.cpp", - "src/ncp/ncp_base_ftd.cpp", - "src/ncp/ncp_base_mtd.cpp", - "src/ncp/ncp_base_radio.cpp", - "src/ncp/ncp_base_dispatcher.cpp", - "src/ncp/ncp_spi.cpp", - "src/ncp/ncp_uart.cpp", - ], -} - diff --git a/etc/android/openthread-config-android-version.h.in b/etc/android/openthread-config-android-version.h.in deleted file mode 100644 index e96beddd5..000000000 --- a/etc/android/openthread-config-android-version.h.in +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2021, The OpenThread Authors. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holder nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * @def PACKAGE_VERSION - * - * The source code version string to insert into the OpenThread version string. - * - */ -#define PACKAGE_VERSION "@OPENTHREAD_SOURCE_VERSION@" diff --git a/script/config-android-version-gen.sh b/script/config-android-version-gen.sh deleted file mode 100755 index 4d19459d7..000000000 --- a/script/config-android-version-gen.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2021, The OpenThread Authors. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -# Description: -# This script generates the openthread version header file needed by Android.bp. -# - -set -euo pipefail - -main() -{ - if [[ $# -ne 1 ]]; then - echo >&2 "Usage: $0 .default-version " \ - "< etc/android/openthread-config-android-version.h.in > openthread-config-android-version.h" - exit 1 - fi - - OPENTHREAD_DEFAULT_VERSION_FILE="$1" - OPENTHREAD_SRC_PATH=$(dirname "${OPENTHREAD_DEFAULT_VERSION_FILE}") - OPENTHREAD_DEFAULT_VERSION=$(cat "${OPENTHREAD_DEFAULT_VERSION_FILE}") - OPENTHREAD_SOURCE_VERSION=$("${OPENTHREAD_SRC_PATH}"/third_party/nlbuild-autotools/repo/scripts/mkversion -b "${OPENTHREAD_DEFAULT_VERSION}" "${OPENTHREAD_SRC_PATH}") - - sed -e s/@OPENTHREAD_SOURCE_VERSION@/"${OPENTHREAD_SOURCE_VERSION}"/ -} - -main "$@" diff --git a/script/update-makefiles.py b/script/update-makefiles.py index 82a2bbec3..4d0c4d78b 100755 --- a/script/update-makefiles.py +++ b/script/update-makefiles.py @@ -159,19 +159,6 @@ update_build_file(android_mk_file, start_string, end_string, formatted_list) print("Updated " + android_mk_file) -#---------------------------------------------------------------------------------------------- -# Update Android.bp file - -android_bp_file = "./Android.bp" - -formatted_list = [" \"{}\",\n".format(file_name) for file_name in core_cpp_files] -search_string = " name: \"ot-core\"," -start_string = " srcs: [\n" -end_string = " \"src/lib/hdlc/hdlc.cpp\"," -update_build_file(android_bp_file, start_string, end_string, formatted_list, search_string) - -print("Updated " + android_bp_file) - #---------------------------------------------------------------------------------------------- # Update Makefile.am files