1package { 2 default_applicable_licenses: ["external_puffin_license"], 3} 4 5// Added automatically by a large-scale-change 6// See: http://go/android-license-faq 7license { 8 name: "external_puffin_license", 9 visibility: [":__subpackages__"], 10 license_kinds: [ 11 "SPDX-license-identifier-BSD", 12 ], 13 license_text: [ 14 "LICENSE", 15 ], 16} 17 18cc_defaults { 19 name: "puffin_defaults", 20 host_supported: true, 21 shared_libs: [ 22 "libchrome", 23 "libprotobuf-cpp-lite", 24 ], 25 static_libs: [ 26 "libbrotli", 27 "libbz", 28 ], 29 export_include_dirs: ["src/include"], 30 cflags: [ 31 "-DUSE_BRILLO=1", 32 "-D_FILE_OFFSET_BITS=64", 33 "-Wall", 34 "-Werror", 35 "-Wextra", 36 "-Wimplicit-fallthrough", 37 ], 38 target: { 39 darwin: { 40 enabled: false, 41 }, 42 }, 43} 44 45cc_library_static { 46 name: "libpuffpatch", 47 defaults: ["puffin_defaults"], 48 recovery_available: true, 49 srcs: [ 50 "puffin/src/puffin.proto", 51 "src/bit_reader.cc", 52 "src/bit_writer.cc", 53 "src/huffer.cc", 54 "src/huffman_table.cc", 55 "src/puff_reader.cc", 56 "src/puff_writer.cc", 57 "src/puffer.cc", 58 "src/puffin_stream.cc", 59 "src/puffpatch.cc", 60 ], 61 static_libs: [ 62 "libbspatch", 63 ], 64 proto: { 65 type: "lite", 66 export_proto_headers: true, 67 }, 68} 69 70cc_library_static { 71 name: "libpuffdiff", 72 defaults: ["puffin_defaults"], 73 srcs: [ 74 "src/file_stream.cc", 75 "src/memory_stream.cc", 76 "src/puffdiff.cc", 77 "src/utils.cc", 78 ], 79 static_libs: [ 80 "libbsdiff", 81 "libpuffpatch", 82 ], 83} 84 85cc_binary { 86 name: "puffin", 87 defaults: ["puffin_defaults"], 88 srcs: [ 89 "src/extent_stream.cc", 90 "src/main.cc", 91 ], 92 shared_libs: [ 93 "libbrillo", 94 ], 95 static_libs: [ 96 "libbsdiff", 97 "libbspatch", 98 "libdivsufsort", 99 "libdivsufsort64", 100 "libpuffdiff", 101 "libpuffpatch", 102 ], 103} 104 105cc_test { 106 name: "puffin_unittest", 107 defaults: ["puffin_defaults"], 108 test_suites: ["device-tests"], 109 cflags: ["-Wno-sign-compare"], 110 srcs: [ 111 "src/bit_io_unittest.cc", 112 "src/extent_stream.cc", 113 "src/patching_unittest.cc", 114 "src/puff_io_unittest.cc", 115 "src/puffin_unittest.cc", 116 "src/stream_unittest.cc", 117 "src/testrunner.cc", 118 "src/unittest_common.cc", 119 "src/utils_unittest.cc", 120 ], 121 shared_libs: [ 122 "libbrillo", 123 ], 124 static_libs: [ 125 "libbsdiff", 126 "libbspatch", 127 "libdivsufsort", 128 "libdivsufsort64", 129 "libpuffdiff", 130 "libpuffpatch", 131 ], 132} 133