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
15cc_library_static {
16    name: "libbz",
17    host_supported: true,
18    vendor_available: true,
19    recovery_available: true,
20    visibility: [
21        "//bootable/recovery:__subpackages__",
22        "//external/bsdiff:__subpackages__",
23        "//external/puffin:__subpackages__",
24        "//system/update_engine:__subpackages__",
25    ],
26    arch: {
27        arm: {
28            // measurements show that the ARM version of ZLib is about x1.17 faster
29            // than the thumb one...
30            instruction_set: "arm",
31        },
32    },
33    cflags: [
34        "-O3",
35        "-DUSE_MMAP",
36        "-Werror",
37        "-Wno-unused-parameter",
38    ],
39    export_include_dirs: ["."],
40    srcs: [
41        "blocksort.c",
42        "bzlib.c",
43        "compress.c",
44        "crctable.c",
45        "decompress.c",
46        "huffman.c",
47        "randtable.c",
48    ],
49    sdk_version: "9",
50    stl: "none",
51}
52
53cc_binary {
54    name: "bzip2",
55    host_supported: true,
56
57    cflags: [
58        "-Werror",
59        "-Wno-unused-parameter",
60    ],
61    static_libs: ["libbz"],
62    srcs: ["bzip2.c"],
63    stl: "none",
64    symlinks: [
65        "bunzip2",
66        "bzcat",
67    ],
68}
69