blob: fb898355db9281368822b23cf34a5d2a2bb3000b [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",
41 "ZipFileRO.cpp",
42 "ZipUtils.cpp",
43 ],
44 export_include_dirs: ["include"],
45 target: {
46 android: {
47 srcs: [
48 "BackupData.cpp",
49 "BackupHelpers.cpp",
50 "CursorWindow.cpp",
51 "DisplayEventDispatcher.cpp",
52 ],
53 shared_libs: [
54 "libziparchive",
55 "libbase",
56 "libbinder",
57 "liblog",
58 "libcutils",
59 "libgui",
60 "libutils",
61 "libz",
62 ],
63 static: {
64 enabled: false,
65 },
66 },
67 host: {
68 cflags: ["-DSTATIC_ANDROIDFW_FOR_TOOLS"],
69 shared: {
70 enabled: false,
71 },
Adam Lesinski7ad11102016-10-28 16:39:15 -070072 static_libs: [
73 "libziparchive",
74 "libbase",
75 "liblog",
76 "libcutils",
77 "libutils",
78 ],
79 shared_libs: [
80 "libz-host",
81 ],
Colin Cross4f8d9e62016-12-01 15:55:00 -080082 },
83 windows: {
84 enabled: true,
85 },
86 },
87}