Colin Cross | 44bb3ea | 2016-07-11 16:24:15 -0700 | [diff] [blame] | 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 | |
Bob Badour | 8a97fe0 | 2021-02-12 14:17:16 -0800 | [diff] [blame] | 15 | package { |
| 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 |
| 37 | license { |
| 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 | |
Bill Peckham | 9f8ec25 | 2019-10-17 18:03:15 -0700 | [diff] [blame] | 49 | cc_library_static { |
Colin Cross | 44bb3ea | 2016-07-11 16:24:15 -0700 | [diff] [blame] | 50 | name: "libbz", |
| 51 | host_supported: true, |
Bill Peckham | 43b1a42 | 2019-09-17 16:49:41 -0700 | [diff] [blame] | 52 | vendor_available: true, |
Dan Willemsen | a04d8e9 | 2018-10-23 13:44:08 -0700 | [diff] [blame] | 53 | recovery_available: true, |
Bill Peckham | 9f8ec25 | 2019-10-17 18:03:15 -0700 | [diff] [blame] | 54 | visibility: [ |
| 55 | "//bootable/recovery:__subpackages__", |
| 56 | "//external/bsdiff:__subpackages__", |
| 57 | "//external/puffin:__subpackages__", |
| 58 | "//system/update_engine:__subpackages__", |
David Anderson | 30d23f8 | 2020-08-06 13:57:44 -0700 | [diff] [blame] | 59 | "//system/core/fs_mgr/libsnapshot:__subpackages__", |
Yuntao Xu | 81084e1 | 2022-01-11 13:09:56 -0800 | [diff] [blame] | 60 | "//vendor:__subpackages__", |
Bill Peckham | 9f8ec25 | 2019-10-17 18:03:15 -0700 | [diff] [blame] | 61 | ], |
Colin Cross | 44bb3ea | 2016-07-11 16:24:15 -0700 | [diff] [blame] | 62 | arch: { |
| 63 | arm: { |
| 64 | // measurements show that the ARM version of ZLib is about x1.17 faster |
| 65 | // than the thumb one... |
| 66 | instruction_set: "arm", |
| 67 | }, |
| 68 | }, |
| 69 | cflags: [ |
| 70 | "-O3", |
| 71 | "-DUSE_MMAP", |
Chih-Hung Hsieh | 0f5d30b | 2017-09-27 10:30:39 -0700 | [diff] [blame] | 72 | "-Werror", |
Colin Cross | 44bb3ea | 2016-07-11 16:24:15 -0700 | [diff] [blame] | 73 | "-Wno-unused-parameter", |
| 74 | ], |
| 75 | export_include_dirs: ["."], |
| 76 | srcs: [ |
| 77 | "blocksort.c", |
| 78 | "bzlib.c", |
| 79 | "compress.c", |
| 80 | "crctable.c", |
| 81 | "decompress.c", |
| 82 | "huffman.c", |
| 83 | "randtable.c", |
| 84 | ], |
| 85 | sdk_version: "9", |
| 86 | stl: "none", |
| 87 | } |
Elliott Hughes | 9fa5f2d | 2017-03-27 22:58:44 -0700 | [diff] [blame] | 88 | |
| 89 | cc_binary { |
| 90 | name: "bzip2", |
Elliott Hughes | 3a0c889 | 2019-02-19 12:49:59 -0800 | [diff] [blame] | 91 | host_supported: true, |
| 92 | |
Elliott Hughes | 9fa5f2d | 2017-03-27 22:58:44 -0700 | [diff] [blame] | 93 | cflags: [ |
Chih-Hung Hsieh | 0f5d30b | 2017-09-27 10:30:39 -0700 | [diff] [blame] | 94 | "-Werror", |
Elliott Hughes | 9fa5f2d | 2017-03-27 22:58:44 -0700 | [diff] [blame] | 95 | "-Wno-unused-parameter", |
| 96 | ], |
Elliott Hughes | 834d8f2 | 2019-09-23 12:08:19 -0700 | [diff] [blame] | 97 | static_libs: ["libbz"], |
Elliott Hughes | 3a0c889 | 2019-02-19 12:49:59 -0800 | [diff] [blame] | 98 | srcs: ["bzip2.c"], |
| 99 | stl: "none", |
Elliott Hughes | 9fa5f2d | 2017-03-27 22:58:44 -0700 | [diff] [blame] | 100 | symlinks: [ |
| 101 | "bunzip2", |
| 102 | "bzcat", |
| 103 | ], |
| 104 | } |