Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2015 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
Adam Lesinski | 64587af | 2016-02-18 18:33:06 -0800 | [diff] [blame] | 16 | LOCAL_PATH:= $(call my-dir) |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 17 | |
| 18 | # ========================================================== |
| 19 | # Setup some common variables for the different build |
| 20 | # targets here. |
| 21 | # ========================================================== |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 22 | |
| 23 | main := Main.cpp |
| 24 | sources := \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 25 | compile/IdAssigner.cpp \ |
Adam Lesinski | 5eeaadd | 2016-08-25 12:26:56 -0700 | [diff] [blame] | 26 | compile/InlineXmlFormatParser.cpp \ |
Adam Lesinski | 21efb68 | 2016-09-14 17:35:43 -0700 | [diff] [blame] | 27 | compile/NinePatch.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 28 | compile/Png.cpp \ |
Adam Lesinski | 21efb68 | 2016-09-14 17:35:43 -0700 | [diff] [blame] | 29 | compile/PngChunkFilter.cpp \ |
| 30 | compile/PngCrunch.cpp \ |
Adam Lesinski | 393b5f0 | 2015-12-17 13:03:11 -0800 | [diff] [blame] | 31 | compile/PseudolocaleGenerator.cpp \ |
| 32 | compile/Pseudolocalizer.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 33 | compile/XmlIdCollector.cpp \ |
Adam Lesinski | 6a00817 | 2016-02-02 17:02:58 -0800 | [diff] [blame] | 34 | filter/ConfigFilter.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 35 | flatten/Archive.cpp \ |
| 36 | flatten/TableFlattener.cpp \ |
| 37 | flatten/XmlFlattener.cpp \ |
Adam Lesinski | 5eeaadd | 2016-08-25 12:26:56 -0700 | [diff] [blame] | 38 | io/File.cpp \ |
Adam Lesinski | a6fe345 | 2015-12-09 15:20:52 -0800 | [diff] [blame] | 39 | io/FileSystem.cpp \ |
Adam Lesinski | 21efb68 | 2016-09-14 17:35:43 -0700 | [diff] [blame] | 40 | io/Io.cpp \ |
Adam Lesinski | a6fe345 | 2015-12-09 15:20:52 -0800 | [diff] [blame] | 41 | io/ZipArchive.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 42 | link/AutoVersioner.cpp \ |
Adam Lesinski | 2ae4a87 | 2015-11-02 16:10:55 -0800 | [diff] [blame] | 43 | link/ManifestFixer.cpp \ |
Adam Lesinski | e4bb9eb | 2016-02-12 22:18:51 -0800 | [diff] [blame] | 44 | link/ProductFilter.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 45 | link/PrivateAttributeMover.cpp \ |
| 46 | link/ReferenceLinker.cpp \ |
Alexandria Cornwall | 77788eb | 2016-09-06 15:16:49 -0700 | [diff] [blame] | 47 | link/ResourceDeduper.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 48 | link/TableMerger.cpp \ |
Adam Lesinski | fb6312f | 2016-06-28 14:40:32 -0700 | [diff] [blame] | 49 | link/VersionCollapser.cpp \ |
Alexandria Cornwall | a7cc3f1 | 2016-08-16 13:33:32 -0700 | [diff] [blame] | 50 | link/XmlNamespaceRemover.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 51 | link/XmlReferenceLinker.cpp \ |
| 52 | process/SymbolTable.cpp \ |
Adam Lesinski | 59e04c6 | 2016-02-04 15:59:23 -0800 | [diff] [blame] | 53 | proto/ProtoHelpers.cpp \ |
| 54 | proto/TableProtoDeserializer.cpp \ |
| 55 | proto/TableProtoSerializer.cpp \ |
Adam Lesinski | 355f285 | 2016-02-13 20:26:45 -0800 | [diff] [blame] | 56 | split/TableSplitter.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 57 | unflatten/BinaryResourceParser.cpp \ |
| 58 | unflatten/ResChunkPullParser.cpp \ |
| 59 | util/BigBuffer.cpp \ |
| 60 | util/Files.cpp \ |
| 61 | util/Util.cpp \ |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 62 | ConfigDescription.cpp \ |
Adam Lesinski | 330edcd | 2015-05-04 17:40:56 -0700 | [diff] [blame] | 63 | Debug.cpp \ |
Alexandria Cornwall | 77788eb | 2016-09-06 15:16:49 -0700 | [diff] [blame] | 64 | DominatorTree.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 65 | Flags.cpp \ |
Adam Lesinski | ca5638f | 2015-10-21 14:42:43 -0700 | [diff] [blame] | 66 | java/AnnotationProcessor.cpp \ |
Adam Lesinski | 6cbfb1d | 2016-03-31 13:33:02 -0700 | [diff] [blame] | 67 | java/ClassDefinition.cpp \ |
Adam Lesinski | ca5638f | 2015-10-21 14:42:43 -0700 | [diff] [blame] | 68 | java/JavaClassGenerator.cpp \ |
| 69 | java/ManifestClassGenerator.cpp \ |
| 70 | java/ProguardRules.cpp \ |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 71 | Locale.cpp \ |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 72 | Resource.cpp \ |
| 73 | ResourceParser.cpp \ |
| 74 | ResourceTable.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 75 | ResourceUtils.cpp \ |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 76 | ResourceValues.cpp \ |
| 77 | SdkConstants.cpp \ |
| 78 | StringPool.cpp \ |
Adam Lesinski | cc5609d | 2016-04-05 12:41:07 -0700 | [diff] [blame] | 79 | xml/XmlActionExecutor.cpp \ |
Adam Lesinski | 467f171 | 2015-11-16 17:35:44 -0800 | [diff] [blame] | 80 | xml/XmlDom.cpp \ |
| 81 | xml/XmlPullParser.cpp \ |
| 82 | xml/XmlUtil.cpp |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 83 | |
Adam Lesinski | 59e04c6 | 2016-02-04 15:59:23 -0800 | [diff] [blame] | 84 | sources += Format.proto |
| 85 | |
Paulo Casanova | 2559608 | 2016-10-07 12:00:26 +0100 | [diff] [blame] | 86 | sourcesJni := jni/aapt2_jni.cpp |
Paulo Casanova | c7ca55e | 2016-09-23 20:52:31 +0100 | [diff] [blame] | 87 | |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 88 | testSources := \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 89 | compile/IdAssigner_test.cpp \ |
Adam Lesinski | 5eeaadd | 2016-08-25 12:26:56 -0700 | [diff] [blame] | 90 | compile/InlineXmlFormatParser_test.cpp \ |
Adam Lesinski | 21efb68 | 2016-09-14 17:35:43 -0700 | [diff] [blame] | 91 | compile/NinePatch_test.cpp \ |
Adam Lesinski | 393b5f0 | 2015-12-17 13:03:11 -0800 | [diff] [blame] | 92 | compile/PseudolocaleGenerator_test.cpp \ |
| 93 | compile/Pseudolocalizer_test.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 94 | compile/XmlIdCollector_test.cpp \ |
Adam Lesinski | 6a00817 | 2016-02-02 17:02:58 -0800 | [diff] [blame] | 95 | filter/ConfigFilter_test.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 96 | flatten/TableFlattener_test.cpp \ |
| 97 | flatten/XmlFlattener_test.cpp \ |
| 98 | link/AutoVersioner_test.cpp \ |
Adam Lesinski | 2ae4a87 | 2015-11-02 16:10:55 -0800 | [diff] [blame] | 99 | link/ManifestFixer_test.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 100 | link/PrivateAttributeMover_test.cpp \ |
Adam Lesinski | e4bb9eb | 2016-02-12 22:18:51 -0800 | [diff] [blame] | 101 | link/ProductFilter_test.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 102 | link/ReferenceLinker_test.cpp \ |
Alexandria Cornwall | 77788eb | 2016-09-06 15:16:49 -0700 | [diff] [blame] | 103 | link/ResourceDeduper_test.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 104 | link/TableMerger_test.cpp \ |
Adam Lesinski | fb6312f | 2016-06-28 14:40:32 -0700 | [diff] [blame] | 105 | link/VersionCollapser_test.cpp \ |
Alexandria Cornwall | a7cc3f1 | 2016-08-16 13:33:32 -0700 | [diff] [blame] | 106 | link/XmlNamespaceRemover_test.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 107 | link/XmlReferenceLinker_test.cpp \ |
| 108 | process/SymbolTable_test.cpp \ |
Adam Lesinski | 59e04c6 | 2016-02-04 15:59:23 -0800 | [diff] [blame] | 109 | proto/TableProtoSerializer_test.cpp \ |
Adam Lesinski | 355f285 | 2016-02-13 20:26:45 -0800 | [diff] [blame] | 110 | split/TableSplitter_test.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 111 | util/BigBuffer_test.cpp \ |
Adam Lesinski | 96917c2 | 2016-03-09 13:11:25 -0800 | [diff] [blame] | 112 | util/Files_test.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 113 | util/Maybe_test.cpp \ |
| 114 | util/StringPiece_test.cpp \ |
| 115 | util/Util_test.cpp \ |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 116 | ConfigDescription_test.cpp \ |
Alexandria Cornwall | 77788eb | 2016-09-06 15:16:49 -0700 | [diff] [blame] | 117 | DominatorTree_test.cpp \ |
Adam Lesinski | b274e35 | 2015-11-06 15:14:35 -0800 | [diff] [blame] | 118 | java/AnnotationProcessor_test.cpp \ |
Adam Lesinski | ca5638f | 2015-10-21 14:42:43 -0700 | [diff] [blame] | 119 | java/JavaClassGenerator_test.cpp \ |
| 120 | java/ManifestClassGenerator_test.cpp \ |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 121 | Locale_test.cpp \ |
Adam Lesinski | d0f116b | 2016-07-08 15:00:32 -0700 | [diff] [blame] | 122 | NameMangler_test.cpp \ |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 123 | Resource_test.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 124 | ResourceParser_test.cpp \ |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 125 | ResourceTable_test.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 126 | ResourceUtils_test.cpp \ |
Adam Lesinski | 355f285 | 2016-02-13 20:26:45 -0800 | [diff] [blame] | 127 | SdkConstants_test.cpp \ |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 128 | StringPool_test.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 129 | ValueVisitor_test.cpp \ |
Adam Lesinski | cc5609d | 2016-04-05 12:41:07 -0700 | [diff] [blame] | 130 | xml/XmlActionExecutor_test.cpp \ |
Adam Lesinski | 467f171 | 2015-11-16 17:35:44 -0800 | [diff] [blame] | 131 | xml/XmlDom_test.cpp \ |
| 132 | xml/XmlPullParser_test.cpp \ |
| 133 | xml/XmlUtil_test.cpp |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 134 | |
| 135 | toolSources := \ |
| 136 | compile/Compile.cpp \ |
Adam Lesinski | 458b877 | 2016-04-25 14:20:21 -0700 | [diff] [blame] | 137 | diff/Diff.cpp \ |
Adam Lesinski | 59e04c6 | 2016-02-04 15:59:23 -0800 | [diff] [blame] | 138 | dump/Dump.cpp \ |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 139 | link/Link.cpp |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 140 | |
Adam Lesinski | feefeb4 | 2015-04-03 12:44:40 -0700 | [diff] [blame] | 141 | hostLdLibs := |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 142 | |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 143 | hostStaticLibs := \ |
| 144 | libandroidfw \ |
| 145 | libutils \ |
| 146 | liblog \ |
| 147 | libcutils \ |
| 148 | libexpat \ |
Colin Cross | 9a1a3bc | 2016-08-26 11:15:17 -0700 | [diff] [blame] | 149 | libziparchive \ |
Narayan Kamath | 231e054 | 2015-04-29 16:32:23 +0100 | [diff] [blame] | 150 | libpng \ |
Adam Lesinski | f4ab612 | 2016-03-10 19:24:00 -0800 | [diff] [blame] | 151 | libbase \ |
Dan Willemsen | 2005edf | 2016-07-31 22:48:28 -0700 | [diff] [blame] | 152 | libprotobuf-cpp-lite |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 153 | |
Adam Lesinski | 59e04c6 | 2016-02-04 15:59:23 -0800 | [diff] [blame] | 154 | |
Adam Lesinski | 803c7c8 | 2016-04-06 16:09:43 -0700 | [diff] [blame] | 155 | # Statically link libz for MinGW (Win SDK under Linux), |
| 156 | # and dynamically link for all others. |
| 157 | hostStaticLibs_windows := libz |
| 158 | hostLdLibs_linux := -lz |
| 159 | hostLdLibs_darwin := -lz |
Adam Lesinski | feefeb4 | 2015-04-03 12:44:40 -0700 | [diff] [blame] | 160 | |
Adam Lesinski | ce5e56e | 2016-10-21 17:56:45 -0700 | [diff] [blame] | 161 | cFlags := -Wall -Werror -Wno-unused-parameter |
Adam Lesinski | 803c7c8 | 2016-04-06 16:09:43 -0700 | [diff] [blame] | 162 | cFlags_darwin := -D_DARWIN_UNLIMITED_STREAMS |
| 163 | cFlags_windows := -Wno-maybe-uninitialized # Incorrectly marking use of Maybe.value() as error. |
Elliott Hughes | c08e32e | 2016-10-07 15:57:17 -0700 | [diff] [blame] | 164 | cppFlags := -Wno-missing-field-initializers -fno-exceptions -fno-rtti |
Adam Lesinski | 59e04c6 | 2016-02-04 15:59:23 -0800 | [diff] [blame] | 165 | protoIncludes := $(call generated-sources-dir-for,STATIC_LIBRARIES,libaapt2,HOST) |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 166 | |
| 167 | # ========================================================== |
Adam Lesinski | 803c7c8 | 2016-04-06 16:09:43 -0700 | [diff] [blame] | 168 | # NOTE: Do not add any shared libraries. |
| 169 | # AAPT2 is built to run on many environments |
| 170 | # that may not have the required dependencies. |
| 171 | # ========================================================== |
| 172 | |
| 173 | # ========================================================== |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 174 | # Build the host static library: libaapt2 |
| 175 | # ========================================================== |
| 176 | include $(CLEAR_VARS) |
| 177 | LOCAL_MODULE := libaapt2 |
Adam Lesinski | 803c7c8 | 2016-04-06 16:09:43 -0700 | [diff] [blame] | 178 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 179 | LOCAL_MODULE_HOST_OS := darwin linux windows |
| 180 | LOCAL_CFLAGS := $(cFlags) |
| 181 | LOCAL_CFLAGS_darwin := $(cFlags_darwin) |
| 182 | LOCAL_CFLAGS_windows := $(cFlags_windows) |
| 183 | LOCAL_CPPFLAGS := $(cppFlags) |
| 184 | LOCAL_C_INCLUDES := $(protoIncludes) |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 185 | LOCAL_SRC_FILES := $(sources) |
Adam Lesinski | 803c7c8 | 2016-04-06 16:09:43 -0700 | [diff] [blame] | 186 | LOCAL_STATIC_LIBRARIES := $(hostStaticLibs) |
| 187 | LOCAL_STATIC_LIBRARIES_windows := $(hostStaticLibs_windows) |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 188 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 189 | |
Paulo Casanova | c7ca55e | 2016-09-23 20:52:31 +0100 | [diff] [blame] | 190 | |
| 191 | # ========================================================== |
| 192 | # Build the host shared library: libaapt2_jni |
| 193 | # ========================================================== |
| 194 | include $(CLEAR_VARS) |
| 195 | LOCAL_MODULE := libaapt2_jni |
| 196 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
Paulo Casanova | 3497b26 | 2016-11-01 17:07:06 +0000 | [diff] [blame] | 197 | LOCAL_MODULE_HOST_OS := darwin linux windows |
Paulo Casanova | c7ca55e | 2016-09-23 20:52:31 +0100 | [diff] [blame] | 198 | LOCAL_CFLAGS := $(cFlags) |
| 199 | LOCAL_CFLAGS_darwin := $(cFlags_darwin) |
| 200 | LOCAL_CFLAGS_windows := $(cFlags_windows) |
| 201 | LOCAL_CPPFLAGS := $(cppFlags) |
| 202 | LOCAL_C_INCLUDES := $(protoIncludes) |
Paulo Casanova | 2559608 | 2016-10-07 12:00:26 +0100 | [diff] [blame] | 203 | LOCAL_SRC_FILES := $(toolSources) $(sourcesJni) |
Paulo Casanova | 3497b26 | 2016-11-01 17:07:06 +0000 | [diff] [blame] | 204 | LOCAL_STATIC_LIBRARIES := libaapt2 $(hostStaticLibs) |
Paulo Casanova | c7ca55e | 2016-09-23 20:52:31 +0100 | [diff] [blame] | 205 | LOCAL_STATIC_LIBRARIES_windows := $(hostStaticLibs_windows) |
Paulo Casanova | 2559608 | 2016-10-07 12:00:26 +0100 | [diff] [blame] | 206 | LOCAL_LDLIBS := $(hostLdLibs) |
| 207 | LOCAL_LDLIBS_darwin := $(hostLdLibs_darwin) |
| 208 | LOCAL_LDLIBS_linux := $(hostLdLibs_linux) |
Paulo Casanova | c7ca55e | 2016-09-23 20:52:31 +0100 | [diff] [blame] | 209 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 210 | |
| 211 | |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 212 | # ========================================================== |
| 213 | # Build the host tests: libaapt2_tests |
| 214 | # ========================================================== |
| 215 | include $(CLEAR_VARS) |
| 216 | LOCAL_MODULE := libaapt2_tests |
| 217 | LOCAL_MODULE_TAGS := tests |
Adam Lesinski | 803c7c8 | 2016-04-06 16:09:43 -0700 | [diff] [blame] | 218 | LOCAL_MODULE_HOST_OS := darwin linux windows |
| 219 | LOCAL_CFLAGS := $(cFlags) |
| 220 | LOCAL_CFLAGS_darwin := $(cFlags_darwin) |
| 221 | LOCAL_CFLAGS_windows := $(cFlags_windows) |
| 222 | LOCAL_CPPFLAGS := $(cppFlags) |
| 223 | LOCAL_C_INCLUDES := $(protoIncludes) |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 224 | LOCAL_SRC_FILES := $(testSources) |
Adam Lesinski | 803c7c8 | 2016-04-06 16:09:43 -0700 | [diff] [blame] | 225 | LOCAL_STATIC_LIBRARIES := libaapt2 $(hostStaticLibs) |
| 226 | LOCAL_STATIC_LIBRARIES_windows := $(hostStaticLibs_windows) |
| 227 | LOCAL_LDLIBS := $(hostLdLibs) |
| 228 | LOCAL_LDLIBS_darwin := $(hostLdLibs_darwin) |
| 229 | LOCAL_LDLIBS_linux := $(hostLdLibs_linux) |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 230 | include $(BUILD_HOST_NATIVE_TEST) |
| 231 | |
| 232 | # ========================================================== |
| 233 | # Build the host executable: aapt2 |
| 234 | # ========================================================== |
| 235 | include $(CLEAR_VARS) |
| 236 | LOCAL_MODULE := aapt2 |
Adam Lesinski | 803c7c8 | 2016-04-06 16:09:43 -0700 | [diff] [blame] | 237 | LOCAL_MODULE_HOST_OS := darwin linux windows |
| 238 | LOCAL_CFLAGS := $(cFlags) |
| 239 | LOCAL_CFLAGS_darwin := $(cFlags_darwin) |
| 240 | LOCAL_CFLAGS_windows := $(cFlags_windows) |
| 241 | LOCAL_CPPFLAGS := $(cppFlags) |
| 242 | LOCAL_C_INCLUDES := $(protoIncludes) |
Adam Lesinski | 1ab598f | 2015-08-14 14:26:04 -0700 | [diff] [blame] | 243 | LOCAL_SRC_FILES := $(main) $(toolSources) |
Adam Lesinski | 803c7c8 | 2016-04-06 16:09:43 -0700 | [diff] [blame] | 244 | LOCAL_STATIC_LIBRARIES := libaapt2 $(hostStaticLibs) |
| 245 | LOCAL_STATIC_LIBRARIES_windows := $(hostStaticLibs_windows) |
| 246 | LOCAL_LDLIBS := $(hostLdLibs) |
| 247 | LOCAL_LDLIBS_darwin := $(hostLdLibs_darwin) |
| 248 | LOCAL_LDLIBS_linux := $(hostLdLibs_linux) |
Adam Lesinski | 6f6ceb7 | 2014-11-14 14:48:12 -0800 | [diff] [blame] | 249 | include $(BUILD_HOST_EXECUTABLE) |
| 250 | |
Adam Lesinski | 64587af | 2016-02-18 18:33:06 -0800 | [diff] [blame] | 251 | ifeq ($(ONE_SHOT_MAKEFILE),) |
| 252 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
| 253 | endif |