• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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        "//external/bsdiff:__subpackages__",
57        "//external/puffin:__subpackages__",
58        "//system/update_engine:__subpackages__",
59        "//system/core/fs_mgr/libsnapshot:__subpackages__",
60        "//vendor:__subpackages__",
61    ],
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",
72        "-Werror",
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}
88
89cc_binary {
90    name: "bzip2",
91    host_supported: true,
92
93    cflags: [
94        "-Werror",
95        "-Wno-unused-parameter",
96    ],
97    static_libs: ["libbz"],
98    srcs: ["bzip2.c"],
99    stl: "none",
100    symlinks: [
101        "bunzip2",
102        "bzcat",
103    ],
104}
105