blob: 410dbbcc8fe422288719c1a759bcb3576d22e3d7 [file] [log] [blame]
Colin Crossf55cbaf2018-09-11 15:45:18 -07001// Copyright (C) 2017 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//
15
Bill Peckham2a13eb62019-10-17 18:07:39 -070016cc_library_static {
Elliott Hughes7e4c2692017-05-23 13:40:14 -070017 name: "libbrotli",
Tianjie Xuefe81522017-07-06 15:35:29 -070018 host_supported: true,
Bill Peckham2254e7c2019-09-17 16:46:36 -070019 vendor_available: true,
Dan Willemsen76c29522018-10-23 13:40:03 -070020 recovery_available: true,
Bill Peckham2a13eb62019-10-17 18:07:39 -070021
Josh Gao47a09882020-03-25 17:00:44 -070022 apex_available: [
23 "//apex_available:platform",
24 "com.android.adbd",
25 ],
26
Bill Peckham2a13eb62019-10-17 18:07:39 -070027 visibility: [
28 "//bootable/recovery:__subpackages__",
29 "//external/bsdiff:__subpackages__",
30 "//external/puffin:__subpackages__",
Josh Gao47a09882020-03-25 17:00:44 -070031 "//system/core/adb:__subpackages__",
Bill Peckham2a13eb62019-10-17 18:07:39 -070032 "//system/update_engine:__subpackages__",
33 ],
34
Elliott Hughes7e4c2692017-05-23 13:40:14 -070035 cflags: [
36 "-Werror",
37 "-O2",
38 ],
Alex Deymo06117152017-11-09 20:25:41 +010039 export_include_dirs: ["c/include"],
Elliott Hughes7e4c2692017-05-23 13:40:14 -070040 srcs: [
Alex Deymo06117152017-11-09 20:25:41 +010041 "c/common/*.c",
42 "c/dec/*.c",
43 "c/enc/*.c",
Elliott Hughes7e4c2692017-05-23 13:40:14 -070044 ],
Tianjie Xuefe81522017-07-06 15:35:29 -070045 target: {
46 linux_bionic: {
47 enabled: true,
48 },
Josh Gao47a09882020-03-25 17:00:44 -070049 windows: {
50 enabled: true,
51 },
Tianjie Xuefe81522017-07-06 15:35:29 -070052 },
Elliott Hughes7e4c2692017-05-23 13:40:14 -070053 stl: "none",
54}
55
56cc_binary {
Alex Deymo06117152017-11-09 20:25:41 +010057 name: "brotli",
Tianjie Xuefe81522017-07-06 15:35:29 -070058 host_supported: true,
Elliott Hughes7e4c2692017-05-23 13:40:14 -070059 cflags: ["-Werror"],
Alex Deymo06117152017-11-09 20:25:41 +010060 srcs: ["c/tools/brotli.c"],
Tianjie Xuefe81522017-07-06 15:35:29 -070061 target: {
62 linux_bionic: {
63 enabled: true,
64 },
65 },
Bill Peckham2a13eb62019-10-17 18:07:39 -070066 static_libs: ["libbrotli"],
Elliott Hughes7e4c2692017-05-23 13:40:14 -070067}
Colin Crossf55cbaf2018-09-11 15:45:18 -070068
69//
70// Support for brotli in java code.
71//
72
73java_library {
74 name: "brotli-java",
75 host_supported: true,
76 hostdex: true,
77 srcs: ["java/**/*.java"],
78 exclude_srcs: ["java/**/*Test.java"],
Jeff Sharkey1ac7fc62018-10-02 10:57:12 -060079 sdk_version: "current",
Colin Crossf55cbaf2018-09-11 15:45:18 -070080}