Tianjie Xu | a0a12cf | 2019-12-05 21:50:22 -0800 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2019 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
Bob Badour | b224b36 | 2021-02-12 20:13:01 -0800 | [diff] [blame] | 17 | package { |
| 18 | // See: http://go/android-license-faq |
| 19 | // A large-scale-change added 'default_applicable_licenses' to import |
| 20 | // all of the 'license_kinds' from "hardware_interfaces_license" |
| 21 | // to get the below license kinds: |
| 22 | // SPDX-license-identifier-Apache-2.0 |
| 23 | default_applicable_licenses: ["hardware_interfaces_license"], |
| 24 | } |
| 25 | |
Tianjie Xu | a0a12cf | 2019-12-05 21:50:22 -0800 | [diff] [blame] | 26 | cc_library_static { |
Kenny Root | d0c4f2b | 2019-12-04 07:54:20 -0800 | [diff] [blame] | 27 | name: "librebootescrowdefaultimpl", |
| 28 | vendor: true, |
| 29 | shared_libs: [ |
| 30 | "libbase", |
| 31 | "libbinder_ndk", |
Jiyong Park | 27f77fe | 2021-07-27 12:16:52 +0900 | [diff] [blame] | 32 | "android.hardware.rebootescrow-V1-ndk", |
Kenny Root | d0c4f2b | 2019-12-04 07:54:20 -0800 | [diff] [blame] | 33 | ], |
| 34 | export_include_dirs: ["include"], |
| 35 | srcs: [ |
| 36 | "RebootEscrow.cpp", |
| 37 | ], |
| 38 | visibility: [ |
| 39 | ":__subpackages__", |
| 40 | ], |
| 41 | } |
| 42 | |
| 43 | cc_binary { |
| 44 | name: "android.hardware.rebootescrow-service.default", |
Kenny Root | d0c4f2b | 2019-12-04 07:54:20 -0800 | [diff] [blame] | 45 | relative_install_path: "hw", |
Kenny Root | d0c4f2b | 2019-12-04 07:54:20 -0800 | [diff] [blame] | 46 | vendor: true, |
Jooyung Han | b1233e8 | 2023-10-23 14:50:23 +0900 | [diff] [blame] | 47 | installable: false, // installed in APEX |
| 48 | |
Kenny Root | d0c4f2b | 2019-12-04 07:54:20 -0800 | [diff] [blame] | 49 | srcs: [ |
| 50 | "service.cpp", |
| 51 | ], |
| 52 | cflags: [ |
| 53 | "-Wall", |
| 54 | "-Werror", |
| 55 | ], |
Jooyung Han | b1233e8 | 2023-10-23 14:50:23 +0900 | [diff] [blame] | 56 | stl: "c++_static", |
Kenny Root | d0c4f2b | 2019-12-04 07:54:20 -0800 | [diff] [blame] | 57 | shared_libs: [ |
Kenny Root | d0c4f2b | 2019-12-04 07:54:20 -0800 | [diff] [blame] | 58 | "libbinder_ndk", |
Jooyung Han | b1233e8 | 2023-10-23 14:50:23 +0900 | [diff] [blame] | 59 | "liblog", |
Kenny Root | d0c4f2b | 2019-12-04 07:54:20 -0800 | [diff] [blame] | 60 | ], |
| 61 | static_libs: [ |
Jooyung Han | b1233e8 | 2023-10-23 14:50:23 +0900 | [diff] [blame] | 62 | "android.hardware.rebootescrow-V1-ndk", |
| 63 | "libbase", |
Kenny Root | d0c4f2b | 2019-12-04 07:54:20 -0800 | [diff] [blame] | 64 | "libhadamardutils", |
| 65 | "librebootescrowdefaultimpl", |
| 66 | ], |
| 67 | } |
| 68 | |
| 69 | cc_library_static { |
Tianjie Xu | a0a12cf | 2019-12-05 21:50:22 -0800 | [diff] [blame] | 70 | name: "libhadamardutils", |
| 71 | vendor_available: true, |
| 72 | host_supported: true, |
| 73 | shared_libs: [ |
| 74 | "libbase", |
| 75 | ], |
| 76 | srcs: [ |
| 77 | "HadamardUtils.cpp", |
| 78 | ], |
| 79 | visibility: [ |
| 80 | ":__subpackages__", |
| 81 | ], |
| 82 | } |
| 83 | |
| 84 | cc_test { |
| 85 | name: "HadamardUtilsTest", |
| 86 | host_supported: true, |
| 87 | srcs: [ |
| 88 | "HadamardUtilsTest.cpp", |
| 89 | ], |
| 90 | static_libs: [ |
| 91 | "libhadamardutils", |
Yifan Hong | 5cd5a17 | 2021-04-22 17:03:38 -0700 | [diff] [blame] | 92 | ], |
| 93 | header_libs: [ |
| 94 | "libgtest_prod_headers", |
Tianjie Xu | a0a12cf | 2019-12-05 21:50:22 -0800 | [diff] [blame] | 95 | ], |
| 96 | shared_libs: [ |
| 97 | "liblog", |
| 98 | "libbase", |
| 99 | ], |
| 100 | test_suites: ["device-tests"], |
| 101 | } |
Jooyung Han | b1233e8 | 2023-10-23 14:50:23 +0900 | [diff] [blame] | 102 | |
| 103 | prebuilt_etc { |
| 104 | name: "rebootescrow-default.rc", |
| 105 | src: "rebootescrow-default.rc", |
| 106 | installable: false, |
| 107 | } |
| 108 | |
| 109 | prebuilt_etc { |
| 110 | name: "rebootescrow-default.xml", |
| 111 | src: "rebootescrow-default.xml", |
| 112 | sub_dir: "vintf", |
| 113 | installable: false, |
| 114 | } |
| 115 | |
| 116 | apex { |
| 117 | name: "com.android.hardware.rebootescrow", |
| 118 | manifest: "apex_manifest.json", |
| 119 | file_contexts: "apex_file_contexts", |
| 120 | key: "com.android.hardware.key", |
| 121 | certificate: ":com.android.hardware.certificate", |
| 122 | vendor: true, |
| 123 | updatable: false, |
| 124 | |
| 125 | binaries: [ |
| 126 | "android.hardware.rebootescrow-service.default", |
| 127 | ], |
| 128 | prebuilts: [ |
| 129 | "rebootescrow-default.rc", |
| 130 | "rebootescrow-default.xml", |
| 131 | "android.hardware.reboot_escrow.prebuilt.xml", // <feature> |
| 132 | ], |
| 133 | } |