1// Copyright (C) 2008 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 default_applicable_licenses: ["external_bzip2_license"], 17} 18 19// Added automatically by a large-scale-change that took the approach of 20// 'apply every license found to every target'. While this makes sure we respect 21// every license restriction, it may not be entirely correct. 22// 23// e.g. GPL in an MIT project might only apply to the contrib/ directory. 24// 25// Please consider splitting the single license below into multiple licenses, 26// taking care not to lose any license_kind information, and overriding the 27// default license using the 'licenses: [...]' property on targets as needed. 28// 29// For unused files, consider creating a 'fileGroup' with "//visibility:private" 30// to attach the license to, and including a comment whether the files may be 31// used in the current project. 32// 33// large-scale-change filtered out the below license kinds as false-positives: 34// SPDX-license-identifier-GPL 35// SPDX-license-identifier-OFL 36// See: http://go/android-license-faq 37license { 38 name: "external_bzip2_license", 39 visibility: [":__subpackages__"], 40 license_kinds: [ 41 "SPDX-license-identifier-BSD", 42 "legacy_unencumbered", 43 ], 44 license_text: [ 45 "LICENSE", 46 ], 47} 48 49cc_library_static { 50 name: "libbz", 51 host_supported: true, 52 vendor_available: true, 53 recovery_available: true, 54 visibility: [ 55 "//bootable/recovery:__subpackages__", 56 "//bootable/deprecated-ota:__subpackages__", 57 "//external/bsdiff:__subpackages__", 58 "//external/puffin:__subpackages__", 59 "//external/python/cpython3:__subpackages__", 60 "//system/update_engine:__subpackages__", 61 "//system/core/fs_mgr/libsnapshot:__subpackages__", 62 "//vendor:__subpackages__", 63 ], 64 arch: { 65 arm: { 66 // measurements show that the ARM version of ZLib is about x1.17 faster 67 // than the thumb one... 68 instruction_set: "arm", 69 }, 70 }, 71 cflags: [ 72 "-O3", 73 "-DUSE_MMAP", 74 "-Werror", 75 "-Wno-unused-parameter", 76 ], 77 export_include_dirs: ["."], 78 srcs: [ 79 "blocksort.c", 80 "bzlib.c", 81 "compress.c", 82 "crctable.c", 83 "decompress.c", 84 "huffman.c", 85 "randtable.c", 86 ], 87 sdk_version: "9", 88 stl: "none", 89} 90 91cc_binary { 92 name: "bzip2", 93 host_supported: true, 94 95 cflags: [ 96 "-Werror", 97 "-Wno-unused-parameter", 98 ], 99 static_libs: ["libbz"], 100 srcs: ["bzip2.c"], 101 stl: "none", 102 symlinks: [ 103 "bunzip2", 104 "bzcat", 105 ], 106} 107