blob: 89c1080810e33ae5d42afda8e8991cfc9b7cd1f4 [file] [log] [blame]
Colin Cross4f8d9e62016-12-01 15:55:00 -08001// Copyright (C) 2010 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// libandroidfw is partially built for the host (used by obbtool, aapt, and others)
16
17cc_library {
18 name: "libandroidfw",
19 host_supported: true,
20 cflags: [
21 "-Wall",
22 "-Werror",
23 "-Wunused",
24 "-Wunreachable-code",
25 ],
26 srcs: [
Adam Lesinski7ad11102016-10-28 16:39:15 -070027 "ApkAssets.cpp",
Colin Cross4f8d9e62016-12-01 15:55:00 -080028 "Asset.cpp",
29 "AssetDir.cpp",
30 "AssetManager.cpp",
Adam Lesinski7ad11102016-10-28 16:39:15 -070031 "AssetManager2.cpp",
Colin Cross4f8d9e62016-12-01 15:55:00 -080032 "AttributeResolution.cpp",
Adam Lesinski7ad11102016-10-28 16:39:15 -070033 "ChunkIterator.cpp",
34 "LoadedArsc.cpp",
Colin Cross4f8d9e62016-12-01 15:55:00 -080035 "LocaleData.cpp",
36 "misc.cpp",
37 "ObbFile.cpp",
38 "ResourceTypes.cpp",
Adam Lesinski929d6512017-01-16 19:11:19 -080039 "ResourceUtils.cpp",
Colin Cross4f8d9e62016-12-01 15:55:00 -080040 "StreamingZipInflater.cpp",
41 "TypeWrappers.cpp",
Adam Lesinskida431a22016-12-29 16:08:16 -050042 "Util.cpp",
Colin Cross4f8d9e62016-12-01 15:55:00 -080043 "ZipFileRO.cpp",
44 "ZipUtils.cpp",
45 ],
46 export_include_dirs: ["include"],
Dan Willemsen4888b1f2018-05-09 20:30:33 -070047 export_shared_lib_headers: ["libz"],
Colin Cross4f8d9e62016-12-01 15:55:00 -080048 target: {
49 android: {
50 srcs: [
51 "BackupData.cpp",
52 "BackupHelpers.cpp",
53 "CursorWindow.cpp",
54 "DisplayEventDispatcher.cpp",
55 ],
56 shared_libs: [
57 "libziparchive",
58 "libbase",
59 "libbinder",
60 "liblog",
61 "libcutils",
62 "libgui",
63 "libutils",
64 "libz",
65 ],
66 static: {
67 enabled: false,
68 },
69 },
70 host: {
71 cflags: ["-DSTATIC_ANDROIDFW_FOR_TOOLS"],
72 shared: {
73 enabled: false,
74 },
Adam Lesinski7ad11102016-10-28 16:39:15 -070075 static_libs: [
76 "libziparchive",
77 "libbase",
78 "liblog",
79 "libcutils",
80 "libutils",
81 ],
82 shared_libs: [
Dan Willemsena2902e32017-09-27 16:20:31 -070083 "libz",
Adam Lesinski7ad11102016-10-28 16:39:15 -070084 ],
Colin Cross4f8d9e62016-12-01 15:55:00 -080085 },
86 windows: {
87 enabled: true,
Adam Lesinskida431a22016-12-29 16:08:16 -050088 cppflags: ["-Wno-missing-field-initializers"], // The Windows compiler warns
89 // incorrectly for value
90 // initialization with {}.
Colin Cross4f8d9e62016-12-01 15:55:00 -080091 },
92 },
Ivan Lozano6593d712017-11-07 13:26:27 -080093 sanitize: {
94 blacklist: "libandroidfw_blacklist.txt",
95 },
Colin Cross4f8d9e62016-12-01 15:55:00 -080096}