1// Copyright 2019 Google LLC 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// https://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 15package { 16 default_team: "trendy_team_android_hardware_backed_security", 17 default_applicable_licenses: ["libcppbor_license"], 18} 19 20// Added automatically by a large-scale-change 21// See: http://go/android-license-faq 22license { 23 name: "libcppbor_license", 24 visibility: [":__subpackages__"], 25 license_kinds: [ 26 "SPDX-license-identifier-Apache-2.0", 27 ], 28 license_text: [ 29 "LICENSE", 30 ], 31} 32 33cc_defaults { 34 name: "libcppbor_defaults", 35 cflags: [ 36 "-Wall", 37 "-Wextra", 38 "-Werror", 39 ], 40} 41 42cc_library { 43 name: "libcppbor", 44 defaults: [ 45 "libcppbor_defaults", 46 ], 47 vendor_available: true, 48 host_supported: true, 49 srcs: [ 50 "src/cppbor.cpp", 51 "src/cppbor_parse.cpp", 52 ], 53 export_include_dirs: [ 54 "include/cppbor", 55 ], 56 shared_libs: [ 57 "libbase", 58 "libcrypto", 59 ], 60 target: { 61 windows: { 62 enabled: true, 63 }, 64 }, 65} 66 67cc_library { 68 name: "libcppbor_external", 69 defaults: [ 70 "libcppbor_defaults", 71 ], 72 vendor_available: true, 73 host_supported: true, 74 srcs: [ 75 "src/cppbor.cpp", 76 "src/cppbor_parse.cpp", 77 ], 78 export_include_dirs: [ 79 "include/cppbor", 80 ], 81 shared_libs: [ 82 "libbase", 83 "libcrypto", 84 ], 85 target: { 86 windows: { 87 enabled: true, 88 }, 89 }, 90} 91 92cc_test { 93 name: "cppbor_test", 94 defaults: [ 95 "libcppbor_defaults", 96 ], 97 srcs: [ 98 "tests/cppbor_test.cpp", 99 ], 100 shared_libs: [ 101 "libcppbor", 102 "libbase", 103 ], 104 static_libs: [ 105 "libgmock", 106 ], 107 test_suites: ["general-tests"], 108} 109 110cc_test_host { 111 name: "cppbor_host_test", 112 defaults: [ 113 "libcppbor_defaults", 114 ], 115 srcs: [ 116 "tests/cppbor_test.cpp", 117 ], 118 shared_libs: [ 119 "libcppbor", 120 "libbase", 121 ], 122 static_libs: [ 123 "libgmock", 124 ], 125 test_suites: ["general-tests"], 126} 127