blob: 605abb491f7a150f7cbc70f5c5dc55d2024590b1 [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 {
18 // See: http://go/android-license-faq
19 // A large-scale-change added 'default_applicable_licenses' to import
20 // all of the 'license_kinds' from "system_security_license"
21 // to get the below license kinds:
22 // SPDX-license-identifier-Apache-2.0
23 default_applicable_licenses: ["system_security_license"],
24}
25
Seth Moore708da932022-08-18 14:38:05 -070026cc_defaults {
27 name: "rkp_factory_extraction_defaults",
Max Biresd0f7b352022-01-27 18:30:46 -080028 defaults: [
Seth Moore708da932022-08-18 14:38:05 -070029 "keymint_use_latest_hal_aidl_ndk_static",
Max Biresd0f7b352022-01-27 18:30:46 -080030 ],
Max Biresf60987e2021-04-16 13:35:20 -070031 shared_libs: [
Max Biresf60987e2021-04-16 13:35:20 -070032 "libbinder_ndk",
Seth Moore59146252021-07-02 08:59:23 -070033 "libcrypto",
34 "liblog",
35 ],
36 static_libs: [
Robert Shihd3c1f7c2023-07-10 13:07:35 -070037 "android.hardware.common-V2-ndk",
38 "android.hardware.drm-V1-ndk",
Seth Moorecd6e9182022-11-04 17:39:05 +000039 "android.hardware.security.rkp-V3-ndk",
Seth Moore59146252021-07-02 08:59:23 -070040 "libbase",
Max Biresf60987e2021-04-16 13:35:20 -070041 "libcppbor_external",
42 "libcppcose_rkp",
Seth Moore59146252021-07-02 08:59:23 -070043 "libjsoncpp",
Seth Moore6dfb02a2021-06-18 15:43:09 -070044 "libkeymint_remote_prov_support",
Robert Shihd3c1f7c2023-07-10 13:07:35 -070045 "libmediadrmrkp",
Max Biresf60987e2021-04-16 13:35:20 -070046 ],
Max Biresf60987e2021-04-16 13:35:20 -070047}
Seth Moore708da932022-08-18 14:38:05 -070048
49cc_library_static {
50 name: "librkp_factory_extraction",
51 defaults: [
52 "rkp_factory_extraction_defaults",
53 ],
54 srcs: ["rkp_factory_extraction_lib.cpp"],
55 vendor_available: true,
56}
57
58cc_test {
59 name: "librkp_factory_extraction_test",
60 defaults: [
61 "rkp_factory_extraction_defaults",
62 ],
63 srcs: ["rkp_factory_extraction_lib_test.cpp"],
64 test_suites: ["device-tests"],
65 static_libs: [
66 "libgmock",
67 "librkp_factory_extraction",
68 ],
69}
70
71cc_binary {
72 name: "rkp_factory_extraction_tool",
Jerome Gaillardb6afaff2022-11-18 16:32:17 +000073 vendor: true,
Seth Moore708da932022-08-18 14:38:05 -070074 srcs: ["rkp_factory_extraction_tool.cpp"],
75 defaults: [
76 "rkp_factory_extraction_defaults",
77 ],
78 static_libs: [
79 "libgflags",
80 "librkp_factory_extraction",
81 ],
Robert Shih5b2d9832023-06-28 15:32:45 -070082 dist: {
83 targets: [
84 "dist_files",
85 "rkp_factory_extraction_tool",
86 ],
87 dest: "rkp_factory_extraction_tool"
88 },
89 compile_multilib: "both",
90 multilib: {
91 lib64: {
92 suffix: "64",
93 },
94 },
Robert Shih5b2d9832023-06-28 15:32:45 -070095 target: {
96 android_arm: {
97 dist: {
Seth Mooreab493722023-08-02 13:00:53 -070098 dir: "rkp/arm",
Robert Shih5b2d9832023-06-28 15:32:45 -070099 },
100 },
101 android_arm64: {
102 dist: {
Seth Mooreab493722023-08-02 13:00:53 -0700103 dir: "rkp/arm64",
Robert Shih5b2d9832023-06-28 15:32:45 -0700104 },
105 },
106 android_x86: {
107 dist: {
Seth Mooreab493722023-08-02 13:00:53 -0700108 dir: "rkp/x86",
Robert Shih5b2d9832023-06-28 15:32:45 -0700109 },
110 },
111 android_x86_64: {
112 dist: {
Seth Mooreab493722023-08-02 13:00:53 -0700113 dir: "rkp/x86_64",
Robert Shih5b2d9832023-06-28 15:32:45 -0700114 },
115 },
116 },
Seth Moore708da932022-08-18 14:38:05 -0700117}