1cc_defaults { 2 name: "nfc_utils_defaults", 3 include_dirs: [ 4 "system/nfc", 5 ], 6 cflags: [ 7 "-Wall", 8 "-Werror", 9 ], 10 target: { 11 linux_glibc: { 12 cflags: ["-D_GNU_SOURCE"], 13 }, 14 darwin: { 15 enabled: false, 16 }, 17 }, 18} 19 20cc_library_static { 21 name: "libnfcutils", 22 defaults: ["nfc_utils_defaults"], 23 export_include_dirs: ["include"], 24 host_supported: true, 25 srcs: [ 26 "config.cc", 27 "ringbuffer.cc", 28 ], 29 shared_libs: [ 30 "libbase", 31 ], 32} 33 34cc_test { 35 name: "nfc_test_utils", 36 defaults: ["nfc_utils_defaults"], 37 test_suites: ["device-tests"], 38 host_supported: true, 39 srcs: [ 40 "test/config_test.cc", 41 "test/ringbuffer_test.cc", 42 ], 43 static_libs: [ 44 "libnfcutils", 45 "libgmock", 46 ], 47 shared_libs: [ 48 "libbase", 49 ], 50} 51 52cc_fuzz { 53 name: "nfc_utils_ringbuffer_fuzzer", 54 host_supported: true, 55 srcs: [ 56 "test/ringbuffer_fuzzer/ringbuffer_fuzzer.cpp", 57 ], 58 static_libs: [ 59 "libnfcutils", 60 ], 61 corpus: [ 62 "test/ringbuffer_fuzzer/corpus/*", 63 ], 64}