1package { 2 // See: http://go/android-license-faq 3 // A large-scale-change added 'default_applicable_licenses' to import 4 // all of the 'license_kinds' from "system_nfc_license" 5 // to get the below license kinds: 6 // SPDX-license-identifier-Apache-2.0 7 default_applicable_licenses: ["system_nfc_license"], 8} 9 10cc_library_shared { 11 arch: { 12 arm: { 13 instruction_set: "arm", 14 }, 15 }, 16 name: "libnfc-nci", 17 shared_libs: [ 18 "libcutils", 19 "liblog", 20 "libdl", 21 "libhardware", 22 "libz", 23 "libchrome", 24 "libbase", 25 "libstatslog", 26 27 // Treble configuration 28 "libhidlbase", 29 "libutils", 30 "android.hardware.nfc@1.0", 31 "android.hardware.nfc@1.1", 32 "android.hardware.nfc@1.2", 33 ], 34 static_libs: [ 35 "libnfcutils", 36 ], 37 cflags: [ 38 "-DDYN_ALLOC=1", 39 "-DBUILDCFG=1", 40 "-Wall", 41 "-Werror", 42 "-Wimplicit-fallthrough", 43 ], 44 local_include_dirs: [ 45 "include", 46 "gki/ulinux", 47 "gki/common", 48 "nfa/include", 49 "nfc/include", 50 ], 51 srcs: [ 52 "nfa/ce/*.cc", 53 "nfa/dm/*.cc", 54 "nfa/ee/*.cc", 55 "nfa/hci/*.cc", 56 "nfa/p2p/*.cc", 57 "nfa/rw/*.cc", 58 "nfa/sys/*.cc", 59 "nfc/llcp/*.cc", 60 "nfc/nci/*.cc", 61 "nfc/ndef/*.cc", 62 "nfc/nfc/*.cc", 63 "nfc/tags/*.cc", 64 "adaptation/*.cc", 65 "gki/common/*.cc", 66 "gki/ulinux/*.cc", 67 ], 68 required: [ 69 // Provide a default libnfc-nci.conf in /system/etc for devices that 70 // does not ship one in /product 71 "libnfc-nci.conf-default", 72 ], 73 product_variables: { 74 debuggable: { 75 cflags: [ 76 "-DDCHECK_ALWAYS_ON", 77 ], 78 }, 79 }, 80 sanitize: { 81 misc_undefined: ["bounds"], 82 integer_overflow: true, 83 scs: true, 84 }, 85 86} 87 88cc_defaults { 89 name: "nfc_fuzzer_defaults", 90 host_supported: true, 91 native_coverage: true, 92 static_libs: [ 93 "libnfcutils", 94 "libcutils", 95 "liblog", 96 "libbase", 97 "libchrome", 98 ], 99 cflags: [ 100 "-DBUILDCFG=1", 101 "-Wall", 102 "-Werror", 103 "-Wimplicit-fallthrough", 104 "-g", 105 "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION", 106 "-DGKI_ENABLE_BUF_CORRUPTION_CHECK=FALSE", 107 ], 108 product_variables: { 109 debuggable: { 110 cflags: [ 111 "-DDCHECK_ALWAYS_ON" 112 ], 113 }, 114 }, 115 local_include_dirs: [ 116 "include", 117 "gki/ulinux", 118 "gki/common", 119 "nfc/include", 120 "nfa/include", 121 "fuzzers/inc", 122 ], 123} 124 125cc_fuzz { 126 name: "nfc_nci_fuzzer", 127 defaults: ["nfc_fuzzer_defaults"], 128 srcs: [ 129 "nfc/nci/*.cc", 130 "nfc/nfc/*.cc", 131 "gki/common/*.cc", 132 "gki/ulinux/*.cc", 133 "fuzzers/*.cc", 134 "fuzzers/nci/*.cc", 135 ], 136} 137 138cc_fuzz { 139 name: "nfc_rw_fuzzer", 140 defaults: ["nfc_fuzzer_defaults"], 141 srcs: [ 142 "nfc/tags/rw_*.cc", 143 "nfc/tags/tags_int.cc", 144 "gki/common/*.cc", 145 "gki/ulinux/*.cc", 146 "fuzzers/*.cc", 147 "fuzzers/rw/*.cc", 148 ], 149} 150 151cc_fuzz { 152 name: "nfc_ce_fuzzer", 153 defaults: ["nfc_fuzzer_defaults"], 154 srcs: [ 155 "nfc/tags/ce_*.cc", 156 "nfc/tags/tags_int.cc", 157 "gki/common/*.cc", 158 "gki/ulinux/*.cc", 159 "fuzzers/*.cc", 160 "fuzzers/ce/*.cc", 161 ], 162} 163 164cc_fuzz { 165 name: "nfc_ndef_fuzzer", 166 defaults: ["nfc_fuzzer_defaults"], 167 srcs: [ 168 "nfa/dm/nfa_dm_ndef.cc", 169 "nfc/ndef/*.cc", 170 "gki/common/*.cc", 171 "gki/ulinux/*.cc", 172 "fuzzers/*.cc", 173 "fuzzers/ndef/*.cc", 174 ], 175} 176 177cc_fuzz { 178 name: "nfc_llcp_fuzzer", 179 defaults: ["nfc_fuzzer_defaults"], 180 srcs: [ 181 "nfc/llcp/*.cc", 182 "gki/common/*.cc", 183 "gki/ulinux/*.cc", 184 "fuzzers/*.cc", 185 "fuzzers/llcp/*.cc", 186 ], 187} 188