1//
2// Copyright (C) 2018-2019 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
16package {
17    // See: http://go/android-license-faq
18    // A large-scale-change added 'default_applicable_licenses' to import
19    // all of the 'license_kinds' from "hardware_nxp_nfc_license"
20    // to get the below license kinds:
21    //   SPDX-license-identifier-Apache-2.0
22    default_applicable_licenses: ["hardware_nxp_nfc_license"],
23}
24
25cc_library_shared {
26    name: "nfc_nci_nxp_snxxx",
27    defaults: ["hidl_defaults"],
28    proprietary: true,
29
30    cflags: [
31        "-Wall",
32        "-Werror",
33        "-Wextra",
34        "-DNXP_EXTNS=TRUE",
35        "-DNXP_HW_SELF_TEST=TRUE",
36        "-DNXP_SRD=TRUE"
37    ],
38    srcs: [
39        "halimpl/dnld/phDnldNfc.cc",
40        "halimpl/dnld/phDnldNfc_Internal.cc",
41        "halimpl/dnld/phDnldNfc_Utils.cc",
42        "halimpl/dnld/phNxpNciHal_Dnld.cc",
43        "halimpl/hal/phNxpNciHal.cc",
44        "halimpl/hal/phNxpNciHal_NfcDepSWPrio.cc",
45        "halimpl/hal/phNxpNciHal_dta.cc",
46        "halimpl/hal/phNxpNciHal_ext.cc",
47        "halimpl/hal/phNxpNciHal_nciParser.cc",
48        "halimpl/log/phNxpLog.cc",
49        "halimpl/self-test/phNxpNciHal_SelfTest.cc",
50        "halimpl/src/adaptation/EseAdaptation.cc",
51        "halimpl/tml/phDal4Nfc_messageQueueLib.cc",
52        "halimpl/tml/phOsalNfc_Timer.cc",
53        "halimpl/tml/phTmlNfc.cc",
54        "halimpl/tml/spi_spm.cc",
55        "halimpl/tml/NfccTransportFactory.cc",
56        "halimpl/tml/transport/*.cc",
57        "halimpl/utils/NxpNfcCapability.cc",
58        "halimpl/utils/phNxpConfig.cc",
59        "halimpl/utils/phNxpNciHal_utils.cc",
60        "halimpl/utils/sparse_crc32.cc",
61        "halimpl/eseclients_extns/src/*.cc",
62        "halimpl/hal/phNxpNciHal_IoctlOperations.cc",
63        "halimpl/hal/phNxpNciHal_extOperations.cc",
64        "halimpl/mifare/NxpMfcReader.cc",
65    ],
66
67    local_include_dirs: [
68        "halimpl/common",
69        "halimpl/dnld",
70        "halimpl/hal",
71        "halimpl/inc",
72        "halimpl/log",
73        "halimpl/self-test",
74        "halimpl/tml/transport",
75        "halimpl/tml",
76        "halimpl/utils",
77        "halimpl/eseclients_extns/inc",
78        "halimpl/src/include",
79        "halimpl/mifare",
80        "extns/impl/nxpnfc/2.0"
81    ],
82
83    include_dirs: [
84        "hardware/nxp/secure_element/snxxx/extns/impl",
85    ],
86
87    shared_libs: [
88        "android.hardware.nfc@1.0",
89        "android.hardware.nfc@1.1",
90        "android.hardware.nfc@1.2",
91        "android.hardware.secure_element@1.0",
92        "libbase",
93        "libcutils",
94        "libdl",
95        "libhardware",
96        "libhardware_legacy",
97        "libhidlbase",
98        "liblog",
99        "libutils",
100        "vendor.nxp.nxpese@1.0",
101        "vendor.nxp.nxpnfc@2.0",
102    ],
103}
104
105cc_binary {
106    name: "android.hardware.nfc_snxxx@1.2-service",
107    defaults: ["hidl_defaults"],
108    proprietary: true,
109    init_rc: ["1.2/android.hardware.nfc_snxxx@1.2-service.rc"],
110    relative_install_path: "hw",
111    cflags: [
112         "-Wall",
113         "-Werror",
114         "-Wextra",
115         "-fexceptions",
116         "-DNXP_EXTNS=TRUE"
117     ],
118
119    srcs: [
120        "1.2/NxpNfcService.cpp",
121        "1.2/Nfc.cpp",
122        "extns/impl/nxpnfc/2.0/NxpNfc.cpp",
123        "halimpl/eseclients_extns/src/eSEClientExtns.cc",
124    ],
125
126    shared_libs: [
127        "nfc_nci_nxp_snxxx",
128        "libbase",
129        "libcutils",
130        "libdl",
131        "libhardware",
132        "liblog",
133        "libutils",
134        "android.hardware.nfc@1.0",
135        "android.hardware.nfc@1.1",
136        "android.hardware.nfc@1.2",
137        "libhidlbase",
138        "vendor.nxp.nxpese@1.0",
139        "vendor.nxp.nxpnfc@2.0",
140    ],
141
142    local_include_dirs: [
143        "halimpl/common",
144        "halimpl/dnld",
145        "halimpl/hal",
146        "halimpl/inc",
147        "halimpl/log",
148        "halimpl/self-test",
149        "halimpl/tml",
150        "halimpl/utils",
151        "halimpl/mifare",
152        "halimpl/eseclients_extns/inc/",
153        "extns/impl/nxpnfc/2.0",
154    ],
155
156    include_dirs: [
157        "hardware/nxp/secure_element/snxxx/extns/impl",
158    ],
159}
160