blob: c4c14c9e32d4fb3ba77a5f48c3115dd70a075409 [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"],
47 target: {
48 android: {
49 srcs: [
50 "BackupData.cpp",
51 "BackupHelpers.cpp",
52 "CursorWindow.cpp",
53 "DisplayEventDispatcher.cpp",
54 ],
55 shared_libs: [
56 "libziparchive",
57 "libbase",
58 "libbinder",
59 "liblog",
60 "libcutils",
61 "libgui",
62 "libutils",
63 "libz",
64 ],
65 static: {
66 enabled: false,
67 },
68 },
69 host: {
70 cflags: ["-DSTATIC_ANDROIDFW_FOR_TOOLS"],
71 shared: {
72 enabled: false,
73 },
Adam Lesinski7ad11102016-10-28 16:39:15 -070074 static_libs: [
75 "libziparchive",
76 "libbase",
77 "liblog",
78 "libcutils",
79 "libutils",
80 ],
81 shared_libs: [
Dan Willemsena2902e32017-09-27 16:20:31 -070082 "libz",
Adam Lesinski7ad11102016-10-28 16:39:15 -070083 ],
Colin Cross4f8d9e62016-12-01 15:55:00 -080084 },
85 windows: {
86 enabled: true,
Adam Lesinskida431a22016-12-29 16:08:16 -050087 cppflags: ["-Wno-missing-field-initializers"], // The Windows compiler warns
88 // incorrectly for value
89 // initialization with {}.
Colin Cross4f8d9e62016-12-01 15:55:00 -080090 },
91 },
92}