1// 2// Copyright (C) 2020 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_team: "trendy_team_foundation_security_rust_pkvm_", 19 // See: http://go/android-license-faq 20 // A large-scale-change added 'default_applicable_licenses' to import 21 // all of the 'license_kinds' from "system_security_license" 22 // to get the below license kinds: 23 // SPDX-license-identifier-Apache-2.0 24 default_applicable_licenses: ["system_security_license"], 25} 26 27cc_defaults { 28 name: "rkp_factory_extraction_defaults", 29 defaults: [ 30 "keymint_use_latest_hal_aidl_ndk_static", 31 ], 32 shared_libs: [ 33 "libbinder_ndk", 34 "libcrypto", 35 "liblog", 36 ], 37 static_libs: [ 38 "android.hardware.common-V2-ndk", 39 "android.hardware.drm.common-V1-ndk", 40 "android.hardware.drm-V1-ndk", 41 "android.hardware.security.rkp-V3-ndk", 42 "libbase", 43 "libcppbor", 44 "libcppcose_rkp", 45 "libjsoncpp", 46 "libkeymint_remote_prov_support", 47 "libmediadrmrkp", 48 ], 49} 50 51cc_library_static { 52 name: "librkp_factory_extraction", 53 defaults: [ 54 "rkp_factory_extraction_defaults", 55 ], 56 srcs: ["rkp_factory_extraction_lib.cpp"], 57 vendor_available: true, 58} 59 60cc_test { 61 name: "librkp_factory_extraction_test", 62 defaults: [ 63 "rkp_factory_extraction_defaults", 64 ], 65 srcs: ["rkp_factory_extraction_lib_test.cpp"], 66 test_suites: ["device-tests"], 67 static_libs: [ 68 "libgmock", 69 "librkp_factory_extraction", 70 ], 71} 72 73cc_binary { 74 name: "rkp_factory_extraction_tool", 75 vendor: true, 76 srcs: ["rkp_factory_extraction_tool.cpp"], 77 defaults: [ 78 "rkp_factory_extraction_defaults", 79 ], 80 static_libs: [ 81 "libgflags", 82 "librkp_factory_extraction", 83 ], 84 dist: { 85 targets: [ 86 "dist_files", 87 "rkp_factory_extraction_tool", 88 ], 89 dest: "rkp_factory_extraction_tool", 90 }, 91 compile_multilib: "both", 92 multilib: { 93 lib64: { 94 suffix: "64", 95 }, 96 }, 97 target: { 98 android_arm: { 99 dist: { 100 dir: "rkp/arm", 101 }, 102 }, 103 android_arm64: { 104 dist: { 105 dir: "rkp/arm64", 106 }, 107 }, 108 android_x86: { 109 dist: { 110 dir: "rkp/x86", 111 }, 112 }, 113 android_x86_64: { 114 dist: { 115 dir: "rkp/x86_64", 116 }, 117 }, 118 }, 119} 120