blob: 6a4dc243f0fd0b726203664adc11efa0a0da680e [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",
Huihong Luo498a44a2024-08-14 20:47:09 +000039 "android.hardware.drm.common-V1-ndk",
Robert Shihd3c1f7c2023-07-10 13:07:35 -070040 "android.hardware.drm-V1-ndk",
Seth Moorecd6e9182022-11-04 17:39:05 +000041 "android.hardware.security.rkp-V3-ndk",
Seth Moore59146252021-07-02 08:59:23 -070042 "libbase",
Shawn Willden387187d2024-03-28 20:42:37 -060043 "libcppbor",
Max Biresf60987e2021-04-16 13:35:20 -070044 "libcppcose_rkp",
Seth Moore59146252021-07-02 08:59:23 -070045 "libjsoncpp",
Seth Moore6dfb02a2021-06-18 15:43:09 -070046 "libkeymint_remote_prov_support",
Robert Shihd3c1f7c2023-07-10 13:07:35 -070047 "libmediadrmrkp",
Max Biresf60987e2021-04-16 13:35:20 -070048 ],
Max Biresf60987e2021-04-16 13:35:20 -070049}
Seth Moore708da932022-08-18 14:38:05 -070050
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",
Jerome Gaillardb6afaff2022-11-18 16:32:17 +000075 vendor: true,
Seth Moore708da932022-08-18 14:38:05 -070076 srcs: ["rkp_factory_extraction_tool.cpp"],
77 defaults: [
78 "rkp_factory_extraction_defaults",
79 ],
80 static_libs: [
81 "libgflags",
82 "librkp_factory_extraction",
83 ],
Robert Shih5b2d9832023-06-28 15:32:45 -070084 dist: {
85 targets: [
86 "dist_files",
87 "rkp_factory_extraction_tool",
88 ],
Aditya Choudharyd987e9b2024-02-02 14:02:09 +000089 dest: "rkp_factory_extraction_tool",
Robert Shih5b2d9832023-06-28 15:32:45 -070090 },
91 compile_multilib: "both",
92 multilib: {
93 lib64: {
94 suffix: "64",
95 },
96 },
Robert Shih5b2d9832023-06-28 15:32:45 -070097 target: {
98 android_arm: {
99 dist: {
Seth Mooreab493722023-08-02 13:00:53 -0700100 dir: "rkp/arm",
Robert Shih5b2d9832023-06-28 15:32:45 -0700101 },
102 },
103 android_arm64: {
104 dist: {
Seth Mooreab493722023-08-02 13:00:53 -0700105 dir: "rkp/arm64",
Robert Shih5b2d9832023-06-28 15:32:45 -0700106 },
107 },
108 android_x86: {
109 dist: {
Seth Mooreab493722023-08-02 13:00:53 -0700110 dir: "rkp/x86",
Robert Shih5b2d9832023-06-28 15:32:45 -0700111 },
112 },
113 android_x86_64: {
114 dist: {
Seth Mooreab493722023-08-02 13:00:53 -0700115 dir: "rkp/x86_64",
Robert Shih5b2d9832023-06-28 15:32:45 -0700116 },
117 },
118 },
Seth Moore708da932022-08-18 14:38:05 -0700119}