blob: ecf6bd4a0cf1768efe876a8c8598182b2ae7d484 [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",
39 "StreamingZipInflater.cpp",
40 "TypeWrappers.cpp",
Adam Lesinskida431a22016-12-29 16:08:16 -050041 "Util.cpp",
Colin Cross4f8d9e62016-12-01 15:55:00 -080042 "ZipFileRO.cpp",
43 "ZipUtils.cpp",
44 ],
45 export_include_dirs: ["include"],
46 target: {
47 android: {
48 srcs: [
49 "BackupData.cpp",
50 "BackupHelpers.cpp",
51 "CursorWindow.cpp",
52 "DisplayEventDispatcher.cpp",
53 ],
54 shared_libs: [
55 "libziparchive",
56 "libbase",
57 "libbinder",
58 "liblog",
59 "libcutils",
60 "libgui",
61 "libutils",
62 "libz",
63 ],
64 static: {
65 enabled: false,
66 },
67 },
68 host: {
69 cflags: ["-DSTATIC_ANDROIDFW_FOR_TOOLS"],
70 shared: {
71 enabled: false,
72 },
Adam Lesinski7ad11102016-10-28 16:39:15 -070073 static_libs: [
74 "libziparchive",
75 "libbase",
76 "liblog",
77 "libcutils",
78 "libutils",
79 ],
80 shared_libs: [
81 "libz-host",
82 ],
Colin Cross4f8d9e62016-12-01 15:55:00 -080083 },
84 windows: {
85 enabled: true,
Adam Lesinskida431a22016-12-29 16:08:16 -050086 cppflags: ["-Wno-missing-field-initializers"], // The Windows compiler warns
87 // incorrectly for value
88 // initialization with {}.
Colin Cross4f8d9e62016-12-01 15:55:00 -080089 },
90 },
91}