Home | History | Annotate | Download | only in androidfw
      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 
     17 cc_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         "ResourceUtils.cpp",
     40         "StreamingZipInflater.cpp",
     41         "TypeWrappers.cpp",
     42         "Util.cpp",
     43         "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             },
     74             static_libs: [
     75                 "libziparchive",
     76                 "libbase",
     77                 "liblog",
     78                 "libcutils",
     79                 "libutils",
     80             ],
     81             shared_libs: [
     82                 "libz-host",
     83             ],
     84         },
     85         windows: {
     86             enabled: true,
     87             cppflags: ["-Wno-missing-field-initializers"],  // The Windows compiler warns
     88                                                             // incorrectly for value
     89                                                             // initialization with {}.
     90         },
     91     },
     92 }
     93