summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross2016-07-12 20:45:19 -0500
committerColin Cross2016-07-12 23:01:08 -0500
commit45566ba87961d21f5358ea29a2028d226ec72cce (patch)
tree915cf41a8fd7fe9d62c5d585c87aa8c1b31e58b8 /libziparchive/Android.bp
parent2e1591bef9691a5f501860227174089641e8685f (diff)
downloadplatform-system-core-45566ba87961d21f5358ea29a2028d226ec72cce.tar.gz
platform-system-core-45566ba87961d21f5358ea29a2028d226ec72cce.tar.xz
platform-system-core-45566ba87961d21f5358ea29a2028d226ec72cce.zip
Convert libziparchive from Android.mk to Android.bp
Change-Id: I6f0df9046b848ee8b841ae0a608a6adc981788e7
Diffstat (limited to 'libziparchive/Android.bp')
-rw-r--r--libziparchive/Android.bp111
1 files changed, 111 insertions, 0 deletions
diff --git a/libziparchive/Android.bp b/libziparchive/Android.bp
new file mode 100644
index 000000000..5ed0fe853
--- /dev/null
+++ b/libziparchive/Android.bp
@@ -0,0 +1,111 @@
1//
2// Copyright (C) 2013 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16cc_defaults {
17 name: "libziparchive_flags",
18 cflags: [
19 // ZLIB_CONST turns on const for input buffers, which is pretty standard.
20 "-DZLIB_CONST",
21 "-Werror",
22 "-Wall",
23 ],
24 cppflags: [
25 "-Wold-style-cast",
26 // Incorrectly warns when C++11 empty brace {} initializer is used.
27 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61489
28 "-Wno-missing-field-initializers",
29 ],
30}
31
32cc_defaults {
33 name: "libziparchive_defaults",
34 srcs: [
35 "zip_archive.cc",
36 "zip_archive_stream_entry.cc",
37 "zip_writer.cc",
38 ],
39
40 target: {
41 windows: {
42 cflags: ["-mno-ms-bitfields"],
43
44 enabled: true,
45 },
46 },
47
48 shared_libs: [
49 "libbase",
50 "liblog",
51 ],
52}
53
54
55cc_library {
56 name: "libziparchive",
57 host_supported: true,
58 defaults: ["libziparchive_defaults", "libziparchive_flags"],
59 static_libs: ["libutils"],
60 shared_libs: ["liblog", "libbase"],
61 target: {
62 android: {
63 static_libs: ["libz"],
64 },
65 host: {
66 shared_libs: ["libz-host"],
67 },
68 },
69}
70
71// Also provide libziparchive-host until everything is switched over to using libziparchive
72cc_library {
73 name: "libziparchive-host",
74 host_supported: true,
75 device_supported: false,
76 defaults: ["libziparchive_defaults", "libziparchive_flags"],
77 shared_libs: ["libz-host"],
78 static_libs: ["libutils"],
79}
80
81// Tests.
82cc_test {
83 name: "ziparchive-tests",
84 host_supported: true,
85 defaults: ["libziparchive_flags"],
86
87 srcs: [
88 "entry_name_utils_test.cc",
89 "zip_archive_test.cc",
90 "zip_writer_test.cc",
91 ],
92 shared_libs: [
93 "libbase",
94 "liblog",
95 ],
96
97 static_libs: [
98 "libziparchive",
99 "libz",
100 "libutils",
101 ],
102
103 target: {
104 host: {
105 cppflags: ["-Wno-unnamed-type-template-args"],
106 },
107 windows: {
108 enabled: true,
109 },
110 },
111}