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 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_binary { 22 name: "gsi_tool", 23 shared_libs: [ 24 "gsi_aidl_interface-cpp", 25 "libbase", 26 "libbinder", 27 "libcutils", 28 "libgsi", 29 "liblog", 30 "libutils", 31 ], 32 static_libs: [ 33 "libgsid", 34 ], 35 srcs: [ 36 "gsi_tool.cpp", 37 ], 38} 39 40cc_library { 41 name: "libgsi", 42 recovery_available: true, 43 host_supported: true, 44 srcs: [ 45 "libgsi.cpp", 46 ], 47 shared_libs: [ 48 "libbase", 49 ], 50 export_include_dirs: ["include"], 51} 52 53cc_library_static { 54 name: "libgsid", 55 srcs: [ 56 "libgsid.cpp", 57 ], 58 shared_libs: [ 59 "gsi_aidl_interface-cpp", 60 "libbase", 61 "libbinder", 62 "libutils", 63 ], 64 export_include_dirs: ["include"], 65} 66 67cc_library_headers { 68 name: "libgsi_headers", 69 host_supported: true, 70 recovery_available: true, 71 vendor_available: true, 72 export_include_dirs: ["include"], 73} 74 75cc_binary { 76 name: "gsid", 77 srcs: [ 78 "daemon.cpp", 79 "gsi_service.cpp", 80 "partition_installer.cpp", 81 ], 82 required: [ 83 "mke2fs", 84 ], 85 init_rc: [ 86 "gsid.rc", 87 ], 88 shared_libs: [ 89 "libbase", 90 "libbinder", 91 "libcrypto", 92 "liblog", 93 ], 94 static_libs: [ 95 "gsi_aidl_interface-cpp", 96 "libavb", 97 "libcutils", 98 "libdm", 99 "libext4_utils", 100 "libfs_mgr", 101 "libgsi", 102 "libgsid", 103 "liblp", 104 "libselinux", 105 "libutils", 106 "libc++fs", 107 "libvold_binder", 108 ], 109 header_libs: [ 110 "libstorage_literals_headers", 111 ], 112 target: { 113 android: { 114 shared_libs: [ 115 "libprocessgroup", 116 "libvndksupport", 117 ], 118 }, 119 }, 120 local_include_dirs: ["include"], 121} 122 123aidl_interface { 124 name: "gsi_aidl_interface", 125 unstable: true, 126 srcs: [":gsiservice_aidl"], 127 local_include_dir: "aidl", 128 backend: { 129 ndk: { 130 enabled: false, 131 }, 132 }, 133} 134 135filegroup { 136 name: "gsiservice_aidl", 137 srcs: [ 138 "aidl/android/gsi/AvbPublicKey.aidl", 139 "aidl/android/gsi/GsiProgress.aidl", 140 "aidl/android/gsi/IGsiService.aidl", 141 "aidl/android/gsi/IGsiServiceCallback.aidl", 142 "aidl/android/gsi/IImageService.aidl", 143 "aidl/android/gsi/IProgressCallback.aidl", 144 "aidl/android/gsi/MappedImage.aidl", 145 ], 146 path: "aidl", 147} 148