blob: 96283487e83d80e3596ce9362197e7130a5565a9 [file] [log] [blame]
Joshua Duong090c8072019-12-19 16:36:30 -08001// Copyright (C) 2019 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badour4a6774b2021-02-12 19:46:09 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "packages_modules_adb_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["packages_modules_adb_license"],
22}
23
Joshua Duong090c8072019-12-19 16:36:30 -080024cc_defaults {
25 name: "libadb_crypto_defaults",
26 cflags: [
27 "-Wall",
28 "-Wextra",
29 "-Wthread-safety",
30 "-Werror",
31 ],
32
33 compile_multilib: "both",
34
35 srcs: [
36 "key.cpp",
37 "rsa_2048_key.cpp",
38 "x509_generator.cpp",
39 ],
40
41 target: {
42 windows: {
43 compile_multilib: "first",
44 enabled: true,
45 },
46 },
47
48 export_include_dirs: ["include"],
49
50 visibility: [
Josh Gaodc20c2f2020-03-27 19:41:59 -070051 "//bootable/recovery/minadbd:__subpackages__",
Baligh Uddin95e03672020-10-18 15:09:52 +000052 "//packages/modules/adb:__subpackages__",
Joshua Duong090c8072019-12-19 16:36:30 -080053 ],
54
55 host_supported: true,
56 recovery_available: true,
57
Joshua Duong090c8072019-12-19 16:36:30 -080058 shared_libs: [
59 "libadb_protos",
Joshua Duong93b407c2020-07-30 16:34:29 -070060 "libadb_sysdeps",
Joshua Duong090c8072019-12-19 16:36:30 -080061 "libbase",
62 "liblog",
63 "libcrypto",
64 "libcrypto_utils",
65 ],
66}
67
68cc_library {
69 name: "libadb_crypto",
70 defaults: ["libadb_crypto_defaults"],
71
Jooyung Han9864dad2021-11-22 10:15:19 +090072 min_sdk_version: "30",
Joshua Duong090c8072019-12-19 16:36:30 -080073 apex_available: [
74 "com.android.adbd",
75 "test_com.android.adbd",
76 ],
Joshua Duong090c8072019-12-19 16:36:30 -080077}
78
79// For running atest (b/147158681)
80cc_library_static {
81 name: "libadb_crypto_static",
82 defaults: ["libadb_crypto_defaults"],
83
84 apex_available: [
85 "//apex_available:platform",
86 ],
87
88 static_libs: [
89 "libadb_protos_static",
Joshua Duong93b407c2020-07-30 16:34:29 -070090 "libadb_sysdeps",
Joshua Duong090c8072019-12-19 16:36:30 -080091 ],
92}