Android.bp revision 7ad1110ecd6a840fcd2895c62668828a1ca029c6
1// 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: [
27        "ApkAssets.cpp",
28        "Asset.cpp",
29        "AssetDir.cpp",
30        "AssetManager.cpp",
31        "AssetManager2.cpp",
32        "AttributeResolution.cpp",
33        "ChunkIterator.cpp",
34        "LoadedArsc.cpp",
35        "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            },
72            static_libs: [
73                "libziparchive",
74                "libbase",
75                "liblog",
76                "libcutils",
77                "libutils",
78            ],
79            shared_libs: [
80                "libz-host",
81            ],
82        },
83        windows: {
84            enabled: true,
85        },
86    },
87}
88