blob: d0c934da1b9ddadea115ce74b4f4d0b84c2ce819 [file] [log] [blame]
Wedson Almeida Filhoba42dac2020-08-13 17:11:18 +01001//
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
Bob Badour4c7858c2021-02-12 15:40:29 -080017package {
Aditya Choudharyd987e9b2024-02-02 14:02:09 +000018 default_team: "trendy_team_foundation_security_rust_pkvm_",
Bob Badour4c7858c2021-02-12 15:40:29 -080019 // 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
Seth Moore708da932022-08-18 14:38:05 -070027cc_defaults {
28 name: "rkp_factory_extraction_defaults",
Max Biresd0f7b352022-01-27 18:30:46 -080029 defaults: [
Seth Moore708da932022-08-18 14:38:05 -070030 "keymint_use_latest_hal_aidl_ndk_static",
Max Biresd0f7b352022-01-27 18:30:46 -080031 ],
Max Biresf60987e2021-04-16 13:35:20 -070032 shared_libs: [
Max Biresf60987e2021-04-16 13:35:20 -070033 "libbinder_ndk",
Seth Moore891d4c52023-11-08 19:42:44 +000034 "libcrypto",
Seth Moore59146252021-07-02 08:59:23 -070035 "liblog",
36 ],
37 static_libs: [
Robert Shihd3c1f7c2023-07-10 13:07:35 -070038 "android.hardware.common-V2-ndk",
39 "android.hardware.drm-V1-ndk",
Seth Moorecd6e9182022-11-04 17:39:05 +000040 "android.hardware.security.rkp-V3-ndk",
Seth Moore59146252021-07-02 08:59:23 -070041 "libbase",
Max Biresf60987e2021-04-16 13:35:20 -070042 "libcppbor_external",
43 "libcppcose_rkp",
Seth Moore59146252021-07-02 08:59:23 -070044 "libjsoncpp",
Seth Moore6dfb02a2021-06-18 15:43:09 -070045 "libkeymint_remote_prov_support",
Robert Shihd3c1f7c2023-07-10 13:07:35 -070046 "libmediadrmrkp",
Max Biresf60987e2021-04-16 13:35:20 -070047 ],
Max Biresf60987e2021-04-16 13:35:20 -070048}
Seth Moore708da932022-08-18 14:38:05 -070049
50cc_library_static {
51 name: "librkp_factory_extraction",
52 defaults: [
53 "rkp_factory_extraction_defaults",
54 ],
55 srcs: ["rkp_factory_extraction_lib.cpp"],
56 vendor_available: true,
57}
58
59cc_test {
60 name: "librkp_factory_extraction_test",
61 defaults: [
62 "rkp_factory_extraction_defaults",
63 ],
64 srcs: ["rkp_factory_extraction_lib_test.cpp"],
65 test_suites: ["device-tests"],
66 static_libs: [
67 "libgmock",
68 "librkp_factory_extraction",
69 ],
70}
71
72cc_binary {
73 name: "rkp_factory_extraction_tool",
Jerome Gaillardb6afaff2022-11-18 16:32:17 +000074 vendor: true,
Seth Moore708da932022-08-18 14:38:05 -070075 srcs: ["rkp_factory_extraction_tool.cpp"],
76 defaults: [
77 "rkp_factory_extraction_defaults",
78 ],
79 static_libs: [
80 "libgflags",
81 "librkp_factory_extraction",
82 ],
Robert Shih5b2d9832023-06-28 15:32:45 -070083 dist: {
84 targets: [
85 "dist_files",
86 "rkp_factory_extraction_tool",
87 ],
Aditya Choudharyd987e9b2024-02-02 14:02:09 +000088 dest: "rkp_factory_extraction_tool",
Robert Shih5b2d9832023-06-28 15:32:45 -070089 },
90 compile_multilib: "both",
91 multilib: {
92 lib64: {
93 suffix: "64",
94 },
95 },
Robert Shih5b2d9832023-06-28 15:32:45 -070096 target: {
97 android_arm: {
98 dist: {
Seth Mooreab493722023-08-02 13:00:53 -070099 dir: "rkp/arm",
Robert Shih5b2d9832023-06-28 15:32:45 -0700100 },
101 },
102 android_arm64: {
103 dist: {
Seth Mooreab493722023-08-02 13:00:53 -0700104 dir: "rkp/arm64",
Robert Shih5b2d9832023-06-28 15:32:45 -0700105 },
106 },
107 android_x86: {
108 dist: {
Seth Mooreab493722023-08-02 13:00:53 -0700109 dir: "rkp/x86",
Robert Shih5b2d9832023-06-28 15:32:45 -0700110 },
111 },
112 android_x86_64: {
113 dist: {
Seth Mooreab493722023-08-02 13:00:53 -0700114 dir: "rkp/x86_64",
Robert Shih5b2d9832023-06-28 15:32:45 -0700115 },
116 },
117 },
Seth Moore708da932022-08-18 14:38:05 -0700118}