1// Copyright 2015 The Android Open Source Project 2 3package { 4 default_applicable_licenses: ["system_extras_libfec_license"], 5} 6 7// Added automatically by a large-scale-change 8// See: http://go/android-license-faq 9license { 10 name: "system_extras_libfec_license", 11 visibility: [":__subpackages__"], 12 license_kinds: [ 13 "SPDX-license-identifier-Apache-2.0", 14 ], 15 license_text: [ 16 "NOTICE", 17 ], 18} 19 20cc_defaults { 21 name: "libfec_default", 22 23 cflags: [ 24 "-Wall", 25 "-Werror", 26 "-O3", 27 "-D_LARGEFILE64_SOURCE", 28 ], 29 30 srcs: [ 31 "fec_open.cpp", 32 "fec_read.cpp", 33 "fec_verity.cpp", 34 "fec_process.cpp", 35 ], 36 37 export_include_dirs: ["include"], 38 // Exported header include/fec/io.h includes crypto_utils headers. 39 export_shared_lib_headers: ["libcrypto_utils"], 40 41 shared_libs: [ 42 "libbase", 43 "libcrypto", 44 "libcrypto_utils", 45 "libcutils", 46 "libext4_utils", 47 "libsquashfs_utils", 48 ], 49 50 static_libs: [ 51 "libfec_rs", 52 ], 53 54 target: { 55 host: { 56 cflags: [ 57 "-D_GNU_SOURCE", 58 "-DFEC_NO_KLOG", 59 ], 60 }, 61 host_linux: { 62 sanitize: { 63 misc_undefined: ["integer"], 64 }, 65 }, 66 }, 67} 68 69cc_library { 70 name: "libfec", 71 defaults: ["libfec_default"], 72 host_supported: true, 73 ramdisk_available: true, 74 vendor_ramdisk_available: true, 75 recovery_available: true, 76 77 target: { 78 linux: { 79 srcs: [ 80 "avb_utils.cpp", 81 ], 82 static_libs: [ 83 "libavb", 84 ], 85 }, 86 87 // libavb isn't available on mac. 88 darwin: { 89 srcs: [ 90 "avb_utils_stub.cpp", 91 ], 92 }, 93 }, 94} 95