1// 2// Copyright (C) 2018-2019, 2023 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/****************************************************************************** 17 * 18 * Copyright 2021-2024 NXP 19 * 20 * Licensed under the Apache License, Version 2.0 (the "License"); 21 * you may not use this file except in compliance with the License. 22 * You may obtain a copy of the License at 23 * 24 * http://www.apache.org/licenses/LICENSE-2.0 25 * 26 * Unless required by applicable law or agreed to in writing, software 27 * distributed under the License is distributed on an "AS IS" BASIS, 28 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 29 * See the License for the specific language governing permissions and 30 * limitations under the License. 31 * 32 ******************************************************************************/ 33 34package { 35 // See: http://go/android-license-faq 36 // A large-scale-change added 'default_applicable_licenses' to import 37 // all of the 'license_kinds' from "hardware_nxp_nfc_license" 38 // to get the below license kinds: 39 // SPDX-license-identifier-Apache-2.0 40 default_applicable_licenses: ["hardware_nxp_nfc_license"], 41} 42 43cc_library_shared { 44 name: "nfc_nci_nxp_snxxx", 45 defaults: ["hidl_defaults"], 46 proprietary: true, 47 48 cflags: [ 49 "-Wall", 50 "-Werror", 51 "-Wextra", 52 "-DNXP_HW_SELF_TEST=TRUE", 53 "-DNXP_SRD=TRUE", 54 "-DNXP_NFC_RECOVERY=TRUE", 55 "-DNXP_QTAG=TRUE", 56 "-DNXP_FORCE_FW_DOWNLOAD=1", 57 ], 58 srcs: [ 59 "halimpl/dnld/phDnldNfc.cc", 60 "halimpl/dnld/phDnldNfc_Internal.cc", 61 "halimpl/dnld/phDnldNfc_Utils.cc", 62 "halimpl/dnld/phNxpNciHal_Dnld.cc", 63 "halimpl/hal/phNxpNciHal.cc", 64 "halimpl/hal/phNxpNciHal_VendorProp.cc", 65 "halimpl/hal/phNxpNciHal_ext.cc", 66 "halimpl/log/phNxpLog.cc", 67 "halimpl/src/adaptation/EseAdaptation.cc", 68 "halimpl/tml/phDal4Nfc_messageQueueLib.cc", 69 "halimpl/tml/phOsalNfc_Timer.cc", 70 "halimpl/tml/phTmlNfc.cc", 71 "halimpl/tml/NfccTransportFactory.cc", 72 "halimpl/tml/transport/*.cc", 73 "halimpl/utils/NxpNfcCapability.cc", 74 "halimpl/utils/NxpNfcThreadMutex.cc", 75 "halimpl/utils/phNxpConfig.cc", 76 "halimpl/utils/phNxpNciHal_utils.cc", 77 "halimpl/utils/phNxpEventLogger.cc", 78 "halimpl/utils/phNxpTempMgr.cc", 79 "halimpl/utils/sparse_crc32.cc", 80 "halimpl/utils/IntervalTimer.cpp", 81 "halimpl/eseclients_extns/src/*.cc", 82 "halimpl/hal/phNxpNciHal_IoctlOperations.cc", 83 "halimpl/hal/phNxpNciHal_extOperations.cc", 84 "halimpl/hal/phNxpNciHal_ULPDet.cc", 85 "halimpl/observe_mode/NciDiscoveryCommandBuilder.cc", 86 "halimpl/observe_mode/ReaderPollConfigParser.cc", 87 "halimpl/observe_mode/ObserveMode.cc", 88 "halimpl/mifare/NxpMfcReader.cc", 89 "halimpl/recovery/phNxpNciHal_Recovery.cc", 90 "halimpl/hal/phNxpNciHal_PowerTrackerIface.cc", 91 "halimpl/hal/phNxpNciHal_WiredSeIface.cc", 92 ], 93 94 local_include_dirs: [ 95 "halimpl/common", 96 "halimpl/dnld", 97 "halimpl/hal", 98 "halimpl/inc", 99 "halimpl/log", 100 "halimpl/tml/transport", 101 "halimpl/tml", 102 "halimpl/utils", 103 "halimpl/eseclients_extns/inc", 104 "halimpl/src/include", 105 "halimpl/mifare", 106 "halimpl/recovery", 107 "halimpl/observe_mode", 108 ], 109 110 include_dirs: [ 111 "hardware/nxp/secure_element/snxxx/extns/impl", 112 ], 113 114 shared_libs: [ 115 "libbase", 116 "libcutils", 117 "libdl", 118 "libhardware", 119 "libhardware_legacy", 120 "libhidlbase", 121 "liblog", 122 "libutils", 123 "libbinder_ndk", 124 "[email protected]", 125 ], 126 header_libs: [ 127 "power_tracker_headers", 128 ], 129} 130 131cc_library_headers { 132 name: "nfc_nci_nxp_snxxx_headers", 133 vendor: true, 134 export_include_dirs: [ 135 "halimpl/common", 136 "halimpl/dnld", 137 "halimpl/hal", 138 "halimpl/inc", 139 "halimpl/log", 140 "halimpl/tml/transport", 141 "halimpl/tml", 142 "halimpl/utils", 143 "halimpl/eseclients_extns/inc", 144 "halimpl/src/include", 145 "halimpl/mifare", 146 "extns/impl/nxpnfc/2.0", 147 "halimpl/recovery", 148 "halimpl/observe_mode", 149 ], 150} 151 152cc_binary { 153 name: "android.hardware.nfc2-service.nxp", 154 relative_install_path: "hw", 155 init_rc: ["aidl/2.0/nfc2-service-nxp.rc"], 156 vintf_fragments: ["aidl/2.0/nfc2-service-nxp.xml"], 157 vendor: true, 158 cflags: [ 159 "-Wall", 160 "-Werror", 161 "-Wextra", 162 "-DNXP_NFC_RECOVERY=TRUE", 163 ], 164 shared_libs: [ 165 "libbase", 166 "liblog", 167 "libutils", 168 "libbinder_ndk", 169 "android.hardware.nfc-V2-ndk", 170 "nfc_nci_nxp_snxxx", 171 "libhardware", 172 "vendor.nxp.nxpnfc_aidl-V1-ndk", 173 ], 174 srcs: [ 175 "aidl/2.0/main.cpp", 176 "aidl/2.0/Nfc.cpp", 177 "aidl/2.0/NfcExtns.cpp", 178 "extns/impl/nxpnfc/aidl/NxpNfc.cpp", 179 ], 180 local_include_dirs: [ 181 "halimpl/common", 182 "halimpl/dnld", 183 "halimpl/hal", 184 "halimpl/inc", 185 "halimpl/log", 186 "halimpl/utils", 187 "halimpl/mifare", 188 "halimpl/recovery", 189 "halimpl/eseclients_extns/inc/", 190 "extns/impl/nxpnfc/aidl", 191 ], 192} 193 194cc_binary { 195 name: "android.hardware.nfc-service.nxp", 196 relative_install_path: "hw", 197 init_rc: ["aidl/1.0/nfc-service-nxp.rc"], 198 vintf_fragments: ["aidl/1.0/nfc-service-nxp.xml"], 199 vendor: true, 200 cflags: [ 201 "-Wall", 202 "-Werror", 203 "-Wextra", 204 "-DNXP_NFC_RECOVERY=TRUE", 205 ], 206 shared_libs: [ 207 "libbase", 208 "liblog", 209 "libutils", 210 "libbinder_ndk", 211 "android.hardware.nfc-V1-ndk", 212 "nfc_nci_nxp_snxxx", 213 "libhardware", 214 "vendor.nxp.nxpnfc_aidl-V1-ndk", 215 ], 216 srcs: [ 217 "aidl/1.0/main.cpp", 218 "aidl/1.0/Nfc.cpp", 219 "aidl/1.0/NfcExtns.cpp", 220 "extns/impl/nxpnfc/aidl/NxpNfc.cpp", 221 ], 222 local_include_dirs: [ 223 "halimpl/common", 224 "halimpl/dnld", 225 "halimpl/hal", 226 "halimpl/inc", 227 "halimpl/log", 228 "halimpl/utils", 229 "halimpl/mifare", 230 "halimpl/recovery", 231 "halimpl/eseclients_extns/inc/", 232 "extns/impl/nxpnfc/aidl", 233 ], 234} 235 236filegroup { 237 name: "nxp_gtest_filegroup", 238 239 srcs: [ 240 "halimpl/observe_mode/NciDiscoveryCommandBuilder.cc", 241 "halimpl/observe_mode/ReaderPollConfigParser.cc", 242 ], 243 visibility: [ 244 "//hardware/nxp/nfc/snxxx/tests/gtest", 245 ], 246} 247 248cc_library_headers { 249 name: "nxp_gtest_headers", 250 host_supported: true, 251 export_include_dirs: [ 252 "halimpl/common", 253 "halimpl/observe_mode", 254 ], 255 visibility: [ 256 "//hardware/nxp/nfc/snxxx/tests/gtest", 257 ], 258} 259