Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 1 | // Copyright (C) 2018 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | cc_defaults { |
| 16 | name: "recovery_defaults", |
| 17 | |
| 18 | cflags: [ |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 19 | "-D_FILE_OFFSET_BITS=64", |
| 20 | |
| 21 | // Must be the same as RECOVERY_API_VERSION. |
| 22 | "-DRECOVERY_API_VERSION=3", |
| 23 | |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 24 | "-Wall", |
| 25 | "-Werror", |
| 26 | ], |
| 27 | } |
| 28 | |
| 29 | // Generic device that uses ScreenRecoveryUI. |
| 30 | cc_library_static { |
| 31 | name: "librecovery_ui_default", |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 32 | recovery_available: true, |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 33 | |
| 34 | defaults: [ |
| 35 | "recovery_defaults", |
| 36 | ], |
| 37 | |
| 38 | srcs: [ |
| 39 | "default_device.cpp", |
| 40 | ], |
| 41 | } |
| 42 | |
| 43 | // The default wear device that uses WearRecoveryUI. |
| 44 | cc_library_static { |
| 45 | name: "librecovery_ui_wear", |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 46 | recovery_available: true, |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 47 | |
| 48 | defaults: [ |
| 49 | "recovery_defaults", |
| 50 | ], |
| 51 | |
| 52 | srcs: [ |
| 53 | "wear_device.cpp", |
| 54 | ], |
| 55 | } |
| 56 | |
| 57 | // The default VR device that uses VrRecoveryUI. |
| 58 | cc_library_static { |
| 59 | name: "librecovery_ui_vr", |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 60 | recovery_available: true, |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 61 | |
| 62 | defaults: [ |
| 63 | "recovery_defaults", |
| 64 | ], |
| 65 | |
| 66 | srcs: [ |
| 67 | "vr_device.cpp", |
| 68 | ], |
| 69 | } |
| 70 | |
| 71 | cc_library_static { |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 72 | name: "libverifier", |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 73 | recovery_available: true, |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 74 | |
| 75 | defaults: [ |
| 76 | "recovery_defaults", |
| 77 | ], |
| 78 | |
| 79 | srcs: [ |
| 80 | "asn1_decoder.cpp", |
| 81 | "verifier.cpp", |
| 82 | ], |
| 83 | |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 84 | shared_libs: [ |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 85 | "libbase", |
| 86 | "libcrypto", |
| 87 | "libcrypto_utils", |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 88 | ], |
| 89 | |
| 90 | static_libs: [ |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 91 | "libotautil", |
| 92 | ], |
| 93 | } |
| 94 | |
| 95 | // The dynamic executable that runs after /data mounts. |
| 96 | cc_binary { |
| 97 | name: "recovery-persist", |
| 98 | |
| 99 | defaults: [ |
| 100 | "recovery_defaults", |
| 101 | ], |
| 102 | |
| 103 | srcs: [ |
Jerry Zhang | 152933a | 2018-05-02 16:56:00 -0700 | [diff] [blame] | 104 | "logging.cpp", |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 105 | "recovery-persist.cpp", |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 106 | ], |
| 107 | |
| 108 | shared_libs: [ |
| 109 | "libbase", |
| 110 | "liblog", |
| 111 | ], |
| 112 | |
Jerry Zhang | 152933a | 2018-05-02 16:56:00 -0700 | [diff] [blame] | 113 | static_libs: [ |
| 114 | "libotautil", |
| 115 | ], |
| 116 | |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 117 | init_rc: [ |
| 118 | "recovery-persist.rc", |
| 119 | ], |
| 120 | } |
| 121 | |
| 122 | // The dynamic executable that runs at init. |
| 123 | cc_binary { |
| 124 | name: "recovery-refresh", |
| 125 | |
| 126 | defaults: [ |
| 127 | "recovery_defaults", |
| 128 | ], |
| 129 | |
| 130 | srcs: [ |
Jerry Zhang | 152933a | 2018-05-02 16:56:00 -0700 | [diff] [blame] | 131 | "logging.cpp", |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 132 | "recovery-refresh.cpp", |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 133 | ], |
| 134 | |
| 135 | shared_libs: [ |
| 136 | "libbase", |
| 137 | "liblog", |
| 138 | ], |
| 139 | |
Jerry Zhang | 152933a | 2018-05-02 16:56:00 -0700 | [diff] [blame] | 140 | static_libs: [ |
| 141 | "libotautil", |
| 142 | ], |
| 143 | |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 144 | init_rc: [ |
| 145 | "recovery-refresh.rc", |
| 146 | ], |
| 147 | } |