Colin Cross | 4f8d9e6 | 2016-12-01 15:55:00 -0800 | [diff] [blame] | 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: [ |
Adam Lesinski | 7ad1110 | 2016-10-28 16:39:15 -0700 | [diff] [blame] | 27 | "ApkAssets.cpp", |
Colin Cross | 4f8d9e6 | 2016-12-01 15:55:00 -0800 | [diff] [blame] | 28 | "Asset.cpp", |
| 29 | "AssetDir.cpp", |
| 30 | "AssetManager.cpp", |
Adam Lesinski | 7ad1110 | 2016-10-28 16:39:15 -0700 | [diff] [blame] | 31 | "AssetManager2.cpp", |
Colin Cross | 4f8d9e6 | 2016-12-01 15:55:00 -0800 | [diff] [blame] | 32 | "AttributeResolution.cpp", |
Adam Lesinski | 7ad1110 | 2016-10-28 16:39:15 -0700 | [diff] [blame] | 33 | "ChunkIterator.cpp", |
| 34 | "LoadedArsc.cpp", |
Colin Cross | 4f8d9e6 | 2016-12-01 15:55:00 -0800 | [diff] [blame] | 35 | "LocaleData.cpp", |
| 36 | "misc.cpp", |
| 37 | "ObbFile.cpp", |
| 38 | "ResourceTypes.cpp", |
Adam Lesinski | 929d651 | 2017-01-16 19:11:19 -0800 | [diff] [blame] | 39 | "ResourceUtils.cpp", |
Colin Cross | 4f8d9e6 | 2016-12-01 15:55:00 -0800 | [diff] [blame] | 40 | "StreamingZipInflater.cpp", |
| 41 | "TypeWrappers.cpp", |
Adam Lesinski | da431a2 | 2016-12-29 16:08:16 -0500 | [diff] [blame] | 42 | "Util.cpp", |
Colin Cross | 4f8d9e6 | 2016-12-01 15:55:00 -0800 | [diff] [blame] | 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 | }, |
Adam Lesinski | 7ad1110 | 2016-10-28 16:39:15 -0700 | [diff] [blame] | 74 | static_libs: [ |
| 75 | "libziparchive", |
| 76 | "libbase", |
| 77 | "liblog", |
| 78 | "libcutils", |
| 79 | "libutils", |
| 80 | ], |
| 81 | shared_libs: [ |
| 82 | "libz-host", |
| 83 | ], |
Colin Cross | 4f8d9e6 | 2016-12-01 15:55:00 -0800 | [diff] [blame] | 84 | }, |
| 85 | windows: { |
| 86 | enabled: true, |
Adam Lesinski | da431a2 | 2016-12-29 16:08:16 -0500 | [diff] [blame] | 87 | cppflags: ["-Wno-missing-field-initializers"], // The Windows compiler warns |
| 88 | // incorrectly for value |
| 89 | // initialization with {}. |
Colin Cross | 4f8d9e6 | 2016-12-01 15:55:00 -0800 | [diff] [blame] | 90 | }, |
| 91 | }, |
| 92 | } |