Wink Saville | ede38fe | 2010-05-28 11:49:52 -0700 | [diff] [blame] | 1 | # Copyright (C) 2009 The Android Open Source Project |
Wink Saville | 79a4a60 | 2010-05-27 15:44:42 -0700 | [diff] [blame] | 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. |
Wink Saville | ede38fe | 2010-05-28 11:49:52 -0700 | [diff] [blame] | 14 | # |
| 15 | # |
Wink Saville | 79a4a60 | 2010-05-27 15:44:42 -0700 | [diff] [blame] | 16 | |
| 17 | LOCAL_PATH := $(call my-dir) |
Wink Saville | 79a4a60 | 2010-05-27 15:44:42 -0700 | [diff] [blame] | 18 | |
Kristian Monsen | cd0ff6e | 2013-11-13 11:07:49 -0800 | [diff] [blame] | 19 | IGNORED_WARNINGS := -Wno-sign-compare -Wno-unused-parameter -Wno-sign-promo |
| 20 | |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 21 | CC_LITE_SRC_FILES := \ |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 22 | src/google/protobuf/stubs/common.cc \ |
| 23 | src/google/protobuf/stubs/once.cc \ |
| 24 | src/google/protobuf/stubs/hash.cc \ |
| 25 | src/google/protobuf/stubs/hash.h \ |
| 26 | src/google/protobuf/stubs/map-util.h \ |
| 27 | src/google/protobuf/stubs/stl_util-inl.h \ |
| 28 | src/google/protobuf/extension_set.cc \ |
| 29 | src/google/protobuf/generated_message_util.cc \ |
| 30 | src/google/protobuf/message_lite.cc \ |
| 31 | src/google/protobuf/repeated_field.cc \ |
| 32 | src/google/protobuf/wire_format_lite.cc \ |
| 33 | src/google/protobuf/io/coded_stream.cc \ |
| 34 | src/google/protobuf/io/coded_stream_inl.h \ |
| 35 | src/google/protobuf/io/zero_copy_stream.cc \ |
| 36 | src/google/protobuf/io/zero_copy_stream_impl_lite.cc |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 37 | |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 38 | JAVA_LITE_SRC_FILES := \ |
Wink Saville | a3d3079 | 2010-06-04 17:44:37 -0700 | [diff] [blame] | 39 | java/src/main/java/com/google/protobuf/UninitializedMessageException.java \ |
| 40 | java/src/main/java/com/google/protobuf/MessageLite.java \ |
| 41 | java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java \ |
| 42 | java/src/main/java/com/google/protobuf/CodedOutputStream.java \ |
| 43 | java/src/main/java/com/google/protobuf/ByteString.java \ |
| 44 | java/src/main/java/com/google/protobuf/CodedInputStream.java \ |
| 45 | java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java \ |
| 46 | java/src/main/java/com/google/protobuf/AbstractMessageLite.java \ |
| 47 | java/src/main/java/com/google/protobuf/FieldSet.java \ |
| 48 | java/src/main/java/com/google/protobuf/Internal.java \ |
| 49 | java/src/main/java/com/google/protobuf/WireFormat.java \ |
| 50 | java/src/main/java/com/google/protobuf/GeneratedMessageLite.java |
| 51 | |
Iain Merrick | aeb2b2a | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 52 | COMPILER_SRC_FILES := \ |
| 53 | src/google/protobuf/descriptor.cc \ |
| 54 | src/google/protobuf/descriptor.pb.cc \ |
| 55 | src/google/protobuf/descriptor_database.cc \ |
| 56 | src/google/protobuf/dynamic_message.cc \ |
| 57 | src/google/protobuf/extension_set.cc \ |
| 58 | src/google/protobuf/extension_set_heavy.cc \ |
| 59 | src/google/protobuf/generated_message_reflection.cc \ |
| 60 | src/google/protobuf/generated_message_util.cc \ |
| 61 | src/google/protobuf/message.cc \ |
| 62 | src/google/protobuf/message_lite.cc \ |
| 63 | src/google/protobuf/reflection_ops.cc \ |
| 64 | src/google/protobuf/repeated_field.cc \ |
| 65 | src/google/protobuf/service.cc \ |
| 66 | src/google/protobuf/text_format.cc \ |
| 67 | src/google/protobuf/unknown_field_set.cc \ |
| 68 | src/google/protobuf/wire_format.cc \ |
| 69 | src/google/protobuf/wire_format_lite.cc \ |
| 70 | src/google/protobuf/compiler/code_generator.cc \ |
| 71 | src/google/protobuf/compiler/command_line_interface.cc \ |
| 72 | src/google/protobuf/compiler/importer.cc \ |
| 73 | src/google/protobuf/compiler/main.cc \ |
| 74 | src/google/protobuf/compiler/parser.cc \ |
| 75 | src/google/protobuf/compiler/plugin.cc \ |
| 76 | src/google/protobuf/compiler/plugin.pb.cc \ |
| 77 | src/google/protobuf/compiler/subprocess.cc \ |
| 78 | src/google/protobuf/compiler/zip_writer.cc \ |
| 79 | src/google/protobuf/compiler/cpp/cpp_enum.cc \ |
| 80 | src/google/protobuf/compiler/cpp/cpp_enum_field.cc \ |
| 81 | src/google/protobuf/compiler/cpp/cpp_extension.cc \ |
| 82 | src/google/protobuf/compiler/cpp/cpp_field.cc \ |
| 83 | src/google/protobuf/compiler/cpp/cpp_file.cc \ |
| 84 | src/google/protobuf/compiler/cpp/cpp_generator.cc \ |
| 85 | src/google/protobuf/compiler/cpp/cpp_helpers.cc \ |
| 86 | src/google/protobuf/compiler/cpp/cpp_message.cc \ |
| 87 | src/google/protobuf/compiler/cpp/cpp_message_field.cc \ |
| 88 | src/google/protobuf/compiler/cpp/cpp_primitive_field.cc \ |
| 89 | src/google/protobuf/compiler/cpp/cpp_service.cc \ |
| 90 | src/google/protobuf/compiler/cpp/cpp_string_field.cc \ |
| 91 | src/google/protobuf/compiler/java/java_enum.cc \ |
| 92 | src/google/protobuf/compiler/java/java_enum_field.cc \ |
| 93 | src/google/protobuf/compiler/java/java_extension.cc \ |
| 94 | src/google/protobuf/compiler/java/java_field.cc \ |
| 95 | src/google/protobuf/compiler/java/java_file.cc \ |
| 96 | src/google/protobuf/compiler/java/java_generator.cc \ |
| 97 | src/google/protobuf/compiler/java/java_helpers.cc \ |
| 98 | src/google/protobuf/compiler/java/java_message.cc \ |
| 99 | src/google/protobuf/compiler/java/java_message_field.cc \ |
| 100 | src/google/protobuf/compiler/java/java_primitive_field.cc \ |
| 101 | src/google/protobuf/compiler/java/java_service.cc \ |
| 102 | src/google/protobuf/compiler/javamicro/javamicro_enum.cc \ |
| 103 | src/google/protobuf/compiler/javamicro/javamicro_enum_field.cc \ |
| 104 | src/google/protobuf/compiler/javamicro/javamicro_field.cc \ |
| 105 | src/google/protobuf/compiler/javamicro/javamicro_file.cc \ |
| 106 | src/google/protobuf/compiler/javamicro/javamicro_generator.cc \ |
| 107 | src/google/protobuf/compiler/javamicro/javamicro_helpers.cc \ |
| 108 | src/google/protobuf/compiler/javamicro/javamicro_message.cc \ |
| 109 | src/google/protobuf/compiler/javamicro/javamicro_message_field.cc \ |
| 110 | src/google/protobuf/compiler/javamicro/javamicro_primitive_field.cc \ |
Ulas Kirazci | 64d8d8f | 2013-03-14 16:44:33 -0700 | [diff] [blame] | 111 | src/google/protobuf/compiler/javanano/javanano_enum.cc \ |
| 112 | src/google/protobuf/compiler/javanano/javanano_enum_field.cc \ |
Brian Duff | 0e055f0 | 2013-06-19 13:17:43 -0700 | [diff] [blame] | 113 | src/google/protobuf/compiler/javanano/javanano_extension.cc \ |
Ulas Kirazci | 64d8d8f | 2013-03-14 16:44:33 -0700 | [diff] [blame] | 114 | src/google/protobuf/compiler/javanano/javanano_field.cc \ |
| 115 | src/google/protobuf/compiler/javanano/javanano_file.cc \ |
| 116 | src/google/protobuf/compiler/javanano/javanano_generator.cc \ |
| 117 | src/google/protobuf/compiler/javanano/javanano_helpers.cc \ |
| 118 | src/google/protobuf/compiler/javanano/javanano_message.cc \ |
| 119 | src/google/protobuf/compiler/javanano/javanano_message_field.cc \ |
| 120 | src/google/protobuf/compiler/javanano/javanano_primitive_field.cc \ |
Iain Merrick | aeb2b2a | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 121 | src/google/protobuf/compiler/python/python_generator.cc \ |
| 122 | src/google/protobuf/io/coded_stream.cc \ |
| 123 | src/google/protobuf/io/gzip_stream.cc \ |
| 124 | src/google/protobuf/io/printer.cc \ |
| 125 | src/google/protobuf/io/tokenizer.cc \ |
| 126 | src/google/protobuf/io/zero_copy_stream.cc \ |
| 127 | src/google/protobuf/io/zero_copy_stream_impl.cc \ |
| 128 | src/google/protobuf/io/zero_copy_stream_impl_lite.cc \ |
| 129 | src/google/protobuf/stubs/common.cc \ |
| 130 | src/google/protobuf/stubs/hash.cc \ |
| 131 | src/google/protobuf/stubs/once.cc \ |
| 132 | src/google/protobuf/stubs/structurally_valid.cc \ |
| 133 | src/google/protobuf/stubs/strutil.cc \ |
| 134 | src/google/protobuf/stubs/substitute.cc |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 135 | |
Ulas Kirazci | 64d8d8f | 2013-03-14 16:44:33 -0700 | [diff] [blame] | 136 | # Java nano library (for device-side users) |
| 137 | # ======================================================= |
| 138 | include $(CLEAR_VARS) |
| 139 | |
| 140 | LOCAL_MODULE := libprotobuf-java-2.3.0-nano |
| 141 | LOCAL_MODULE_TAGS := optional |
| 142 | LOCAL_SDK_VERSION := 8 |
| 143 | |
| 144 | LOCAL_SRC_FILES := $(call all-java-files-under, java/src/main/java/com/google/protobuf/nano) |
Jeff Davidson | 721ea49 | 2014-04-22 23:25:53 -0700 | [diff] [blame] | 145 | LOCAL_SRC_FILES += $(call all-java-files-under, java/src/device/main/java/com/google/protobuf/nano) |
Ulas Kirazci | 64d8d8f | 2013-03-14 16:44:33 -0700 | [diff] [blame] | 146 | |
| 147 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 148 | |
| 149 | # Java nano library (for host-side users) |
| 150 | # ======================================================= |
| 151 | include $(CLEAR_VARS) |
| 152 | |
| 153 | LOCAL_MODULE := host-libprotobuf-java-2.3.0-nano |
| 154 | LOCAL_MODULE_TAGS := optional |
| 155 | |
| 156 | LOCAL_SRC_FILES := $(call all-java-files-under, java/src/main/java/com/google/protobuf/nano) |
| 157 | |
| 158 | include $(BUILD_HOST_JAVA_LIBRARY) |
| 159 | |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 160 | # Java micro library (for device-side users) |
| 161 | # ======================================================= |
| 162 | include $(CLEAR_VARS) |
| 163 | |
| 164 | LOCAL_MODULE := libprotobuf-java-2.3.0-micro |
Jean-Baptiste Queru | b854f4d | 2010-10-05 10:26:11 -0700 | [diff] [blame] | 165 | LOCAL_MODULE_TAGS := optional |
Ying Wang | 770e659 | 2011-01-26 13:37:44 -0800 | [diff] [blame] | 166 | LOCAL_SDK_VERSION := 8 |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 167 | |
| 168 | LOCAL_SRC_FILES := $(call all-java-files-under, java/src/main/java/com/google/protobuf/micro) |
| 169 | |
Wink Saville | a3d3079 | 2010-06-04 17:44:37 -0700 | [diff] [blame] | 170 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 171 | |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 172 | # Java micro library (for host-side users) |
| 173 | # ======================================================= |
| 174 | include $(CLEAR_VARS) |
| 175 | |
| 176 | LOCAL_MODULE := host-libprotobuf-java-2.3.0-micro |
| 177 | LOCAL_MODULE_TAGS := optional |
| 178 | |
| 179 | LOCAL_SRC_FILES := $(call all-java-files-under, java/src/main/java/com/google/protobuf/micro) |
| 180 | |
| 181 | include $(BUILD_HOST_JAVA_LIBRARY) |
| 182 | |
| 183 | # Java lite library (for device-side users) |
| 184 | # ======================================================= |
| 185 | include $(CLEAR_VARS) |
| 186 | |
| 187 | LOCAL_MODULE := libprotobuf-java-2.3.0-lite |
Jean-Baptiste Queru | b854f4d | 2010-10-05 10:26:11 -0700 | [diff] [blame] | 188 | LOCAL_MODULE_TAGS := optional |
Ying Wang | 770e659 | 2011-01-26 13:37:44 -0800 | [diff] [blame] | 189 | LOCAL_SDK_VERSION := 8 |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 190 | |
| 191 | LOCAL_SRC_FILES := $(JAVA_LITE_SRC_FILES) |
| 192 | |
| 193 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 194 | |
| 195 | # Java lite library (for host-side users) |
| 196 | # ======================================================= |
| 197 | include $(CLEAR_VARS) |
| 198 | |
| 199 | LOCAL_MODULE := host-libprotobuf-java-2.3.0-lite |
| 200 | LOCAL_MODULE_TAGS := optional |
| 201 | |
| 202 | LOCAL_SRC_FILES := $(JAVA_LITE_SRC_FILES) |
| 203 | |
| 204 | include $(BUILD_HOST_JAVA_LIBRARY) |
| 205 | |
Wink Saville | b3fe74b | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 206 | # C++ lite library |
| 207 | # ======================================================= |
| 208 | include $(CLEAR_VARS) |
| 209 | |
| 210 | LOCAL_MODULE := libprotobuf-cpp-2.3.0-lite |
Jean-Baptiste Queru | b854f4d | 2010-10-05 10:26:11 -0700 | [diff] [blame] | 211 | LOCAL_MODULE_TAGS := optional |
Wink Saville | b3fe74b | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 212 | |
| 213 | LOCAL_CPP_EXTENSION := .cc |
| 214 | |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 215 | LOCAL_SRC_FILES := $(CC_LITE_SRC_FILES) |
Wink Saville | b3fe74b | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 216 | |
| 217 | LOCAL_C_INCLUDES := \ |
| 218 | $(LOCAL_PATH)/android \ |
Wink Saville | b3fe74b | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 219 | $(LOCAL_PATH)/src |
| 220 | |
Wink Saville | b3fe74b | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 221 | # Define the header files to be copied |
| 222 | #LOCAL_COPY_HEADERS := \ |
| 223 | # src/google/protobuf/stubs/once.h \ |
| 224 | # src/google/protobuf/stubs/common.h \ |
| 225 | # src/google/protobuf/io/coded_stream.h \ |
| 226 | # src/google/protobuf/generated_message_util.h \ |
| 227 | # src/google/protobuf/repeated_field.h \ |
| 228 | # src/google/protobuf/extension_set.h \ |
| 229 | # src/google/protobuf/wire_format_lite_inl.h |
| 230 | # |
| 231 | #LOCAL_COPY_HEADERS_TO := $(LOCAL_MODULE) |
| 232 | |
Kristian Monsen | cd0ff6e | 2013-11-13 11:07:49 -0800 | [diff] [blame] | 233 | LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI $(IGNORED_WARNINGS) |
Wink Saville | b3fe74b | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 234 | |
Ying Wang | 77f19bf | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 235 | # These are the minimum versions and don't need to be update. |
Ying Wang | 082bf44 | 2012-09-06 11:35:34 -0700 | [diff] [blame] | 236 | ifeq ($(TARGET_ARCH),arm) |
Ying Wang | 77f19bf | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 237 | LOCAL_SDK_VERSION := 8 |
Ying Wang | f6da580 | 2012-08-14 10:28:02 -0700 | [diff] [blame] | 238 | else |
Ying Wang | 082bf44 | 2012-09-06 11:35:34 -0700 | [diff] [blame] | 239 | # x86/mips support only available from API 9. |
| 240 | LOCAL_SDK_VERSION := 9 |
Ying Wang | 77f19bf | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 241 | endif |
Ying Wang | 082bf44 | 2012-09-06 11:35:34 -0700 | [diff] [blame] | 242 | LOCAL_NDK_STL_VARIANT := stlport_static |
Ying Wang | 77f19bf | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 243 | |
Wink Saville | b3fe74b | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 244 | include $(BUILD_STATIC_LIBRARY) |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 245 | |
| 246 | # C++ full library |
| 247 | # ======================================================= |
Przemyslaw Szczepaniak | a939d66 | 2012-11-06 14:42:21 +0000 | [diff] [blame] | 248 | protobuf_cc_full_src_files := \ |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 249 | $(CC_LITE_SRC_FILES) \ |
| 250 | src/google/protobuf/stubs/strutil.cc \ |
| 251 | src/google/protobuf/stubs/strutil.h \ |
| 252 | src/google/protobuf/stubs/substitute.cc \ |
| 253 | src/google/protobuf/stubs/substitute.h \ |
| 254 | src/google/protobuf/stubs/structurally_valid.cc \ |
| 255 | src/google/protobuf/descriptor.cc \ |
| 256 | src/google/protobuf/descriptor.pb.cc \ |
| 257 | src/google/protobuf/descriptor_database.cc \ |
| 258 | src/google/protobuf/dynamic_message.cc \ |
| 259 | src/google/protobuf/extension_set_heavy.cc \ |
| 260 | src/google/protobuf/generated_message_reflection.cc \ |
| 261 | src/google/protobuf/message.cc \ |
| 262 | src/google/protobuf/reflection_ops.cc \ |
| 263 | src/google/protobuf/service.cc \ |
| 264 | src/google/protobuf/text_format.cc \ |
| 265 | src/google/protobuf/unknown_field_set.cc \ |
| 266 | src/google/protobuf/wire_format.cc \ |
| 267 | src/google/protobuf/io/gzip_stream.cc \ |
| 268 | src/google/protobuf/io/printer.cc \ |
| 269 | src/google/protobuf/io/tokenizer.cc \ |
| 270 | src/google/protobuf/io/zero_copy_stream_impl.cc \ |
| 271 | src/google/protobuf/compiler/importer.cc \ |
| 272 | src/google/protobuf/compiler/parser.cc |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 273 | |
Przemyslaw Szczepaniak | a939d66 | 2012-11-06 14:42:21 +0000 | [diff] [blame] | 274 | # C++ full library - stlport version |
| 275 | # ======================================================= |
| 276 | include $(CLEAR_VARS) |
| 277 | |
| 278 | LOCAL_MODULE := libprotobuf-cpp-2.3.0-full |
| 279 | LOCAL_MODULE_TAGS := optional |
| 280 | LOCAL_CPP_EXTENSION := .cc |
| 281 | LOCAL_SRC_FILES := $(protobuf_cc_full_src_files) |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 282 | LOCAL_C_INCLUDES := \ |
| 283 | $(LOCAL_PATH)/android \ |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 284 | external/zlib \ |
| 285 | $(LOCAL_PATH)/src |
| 286 | |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 287 | # Define the header files to be copied |
| 288 | #LOCAL_COPY_HEADERS := \ |
| 289 | # src/google/protobuf/stubs/once.h \ |
| 290 | # src/google/protobuf/stubs/common.h \ |
| 291 | # src/google/protobuf/io/coded_stream.h \ |
| 292 | # src/google/protobuf/generated_message_util.h \ |
| 293 | # src/google/protobuf/repeated_field.h \ |
| 294 | # src/google/protobuf/extension_set.h \ |
| 295 | # src/google/protobuf/wire_format_lite_inl.h |
| 296 | # |
| 297 | #LOCAL_COPY_HEADERS_TO := $(LOCAL_MODULE) |
| 298 | |
Kristian Monsen | cd0ff6e | 2013-11-13 11:07:49 -0800 | [diff] [blame] | 299 | LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI $(IGNORED_WARNINGS) |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 300 | |
Ying Wang | 77f19bf | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 301 | # These are the minimum versions and don't need to be update. |
Ying Wang | 082bf44 | 2012-09-06 11:35:34 -0700 | [diff] [blame] | 302 | ifeq ($(TARGET_ARCH),arm) |
Ying Wang | 77f19bf | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 303 | LOCAL_SDK_VERSION := 8 |
Ying Wang | f6da580 | 2012-08-14 10:28:02 -0700 | [diff] [blame] | 304 | else |
Ying Wang | 082bf44 | 2012-09-06 11:35:34 -0700 | [diff] [blame] | 305 | # x86/mips support only available from API 9. |
| 306 | LOCAL_SDK_VERSION := 9 |
Ying Wang | 77f19bf | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 307 | endif |
Ying Wang | 082bf44 | 2012-09-06 11:35:34 -0700 | [diff] [blame] | 308 | LOCAL_NDK_STL_VARIANT := stlport_static |
Ying Wang | 77f19bf | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 309 | |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 310 | include $(BUILD_STATIC_LIBRARY) |
Iain Merrick | aeb2b2a | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 311 | |
Przemyslaw Szczepaniak | a939d66 | 2012-11-06 14:42:21 +0000 | [diff] [blame] | 312 | # C++ full library - Gnustl+rtti version |
| 313 | # ======================================================= |
| 314 | include $(CLEAR_VARS) |
| 315 | |
| 316 | LOCAL_MODULE := libprotobuf-cpp-2.3.0-full-gnustl-rtti |
| 317 | LOCAL_MODULE_TAGS := optional |
| 318 | LOCAL_CPP_EXTENSION := .cc |
| 319 | LOCAL_SRC_FILES := $(protobuf_cc_full_src_files) |
| 320 | LOCAL_C_INCLUDES := \ |
| 321 | $(LOCAL_PATH)/android \ |
| 322 | external/zlib \ |
| 323 | $(LOCAL_PATH)/src |
| 324 | |
Kristian Monsen | cd0ff6e | 2013-11-13 11:07:49 -0800 | [diff] [blame] | 325 | LOCAL_CFLAGS := -frtti $(IGNORED_WARNINGS) |
Przemyslaw Szczepaniak | a939d66 | 2012-11-06 14:42:21 +0000 | [diff] [blame] | 326 | LOCAL_SDK_VERSION := 14 |
| 327 | LOCAL_NDK_STL_VARIANT := gnustl_static |
| 328 | |
| 329 | include $(BUILD_STATIC_LIBRARY) |
| 330 | |
| 331 | # Clean temp vars |
| 332 | protobuf_cc_full_src_files := |
| 333 | |
| 334 | |
Wink Saville | 8d24c6a | 2010-11-05 11:28:46 -0700 | [diff] [blame] | 335 | # Android Protocol buffer compiler, aprotoc (host executable) |
| 336 | # used by the build systems as $(PROTOC) defined in |
| 337 | # build/core/config.mk |
Iain Merrick | aeb2b2a | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 338 | # ======================================================= |
| 339 | include $(CLEAR_VARS) |
| 340 | |
Wink Saville | 8d24c6a | 2010-11-05 11:28:46 -0700 | [diff] [blame] | 341 | LOCAL_MODULE := aprotoc |
Iain Merrick | aeb2b2a | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 342 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 343 | LOCAL_MODULE_TAGS := optional |
| 344 | |
| 345 | LOCAL_CPP_EXTENSION := .cc |
| 346 | LOCAL_SRC_FILES := $(COMPILER_SRC_FILES) |
| 347 | |
| 348 | LOCAL_C_INCLUDES := \ |
| 349 | $(LOCAL_PATH)/android \ |
| 350 | $(LOCAL_PATH)/src |
| 351 | |
| 352 | LOCAL_STATIC_LIBRARIES += libz |
| 353 | LOCAL_LDLIBS := -lpthread |
| 354 | |
Kristian Monsen | cd0ff6e | 2013-11-13 11:07:49 -0800 | [diff] [blame] | 355 | LOCAL_CFLAGS := $(IGNORED_WARNINGS) |
| 356 | |
Iain Merrick | aeb2b2a | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 357 | include $(BUILD_HOST_EXECUTABLE) |
Ulas Kirazci | 7e567b8 | 2013-07-24 14:35:42 -0700 | [diff] [blame] | 358 | |
| 359 | # To test java proto params build rules. |
| 360 | # ======================================================= |
| 361 | include $(CLEAR_VARS) |
| 362 | |
| 363 | LOCAL_MODULE := aprotoc-test-nano-params |
| 364 | LOCAL_MODULE_TAGS := tests |
| 365 | LOCAL_SDK_VERSION := current |
| 366 | |
| 367 | LOCAL_PROTOC_OPTIMIZE_TYPE := nano |
| 368 | |
| 369 | LOCAL_SRC_FILES := \ |
| 370 | src/google/protobuf/unittest_import_nano.proto \ |
| 371 | src/google/protobuf/unittest_simple_nano.proto \ |
| 372 | src/google/protobuf/unittest_stringutf8_nano.proto \ |
Wink Saville | d1229a3 | 2013-08-07 21:00:39 -0700 | [diff] [blame] | 373 | src/google/protobuf/unittest_recursive_nano.proto |
| 374 | |
Ulas Kirazci | 7e567b8 | 2013-07-24 14:35:42 -0700 | [diff] [blame] | 375 | |
| 376 | LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src |
| 377 | |
Max Cai | 4109e91 | 2014-01-14 14:54:48 +0000 | [diff] [blame] | 378 | LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \ |
| 379 | java_package = $(LOCAL_PATH)/src/google/protobuf/unittest_import_nano.proto|com.google.protobuf.nano, \ |
| 380 | java_outer_classname = $(LOCAL_PATH)/src/google/protobuf/unittest_import_nano.proto|UnittestImportNano |
Ulas Kirazci | 7e567b8 | 2013-07-24 14:35:42 -0700 | [diff] [blame] | 381 | |
| 382 | include $(BUILD_STATIC_JAVA_LIBRARY) |
Jeff Davidson | 721ea49 | 2014-04-22 23:25:53 -0700 | [diff] [blame] | 383 | |
| 384 | # To test Android-specific nanoproto features. |
| 385 | # ======================================================= |
| 386 | include $(CLEAR_VARS) |
| 387 | |
| 388 | # Parcelable messages |
| 389 | LOCAL_MODULE := android-nano-test-parcelable |
| 390 | LOCAL_MODULE_TAGS := tests |
| 391 | LOCAL_SDK_VERSION := current |
| 392 | |
| 393 | LOCAL_PROTOC_OPTIMIZE_TYPE := nano |
| 394 | |
| 395 | LOCAL_SRC_FILES := src/google/protobuf/unittest_simple_nano.proto |
| 396 | |
| 397 | LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src |
| 398 | |
| 399 | LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \ |
| 400 | parcelable_messages = true |
| 401 | |
| 402 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 403 | |
| 404 | include $(CLEAR_VARS) |
| 405 | |
| 406 | # Parcelable and extendable messages |
| 407 | LOCAL_MODULE := android-nano-test-parcelable-extendable |
| 408 | LOCAL_MODULE_TAGS := tests |
| 409 | LOCAL_SDK_VERSION := current |
| 410 | |
| 411 | LOCAL_PROTOC_OPTIMIZE_TYPE := nano |
| 412 | |
| 413 | LOCAL_SRC_FILES := src/google/protobuf/unittest_extension_nano.proto |
| 414 | |
| 415 | LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src |
| 416 | |
| 417 | LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \ |
| 418 | parcelable_messages = true, \ |
| 419 | store_unknown_fields = true |
| 420 | |
| 421 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 422 | |
| 423 | include $(CLEAR_VARS) |
| 424 | |
| 425 | # Test APK |
| 426 | LOCAL_PACKAGE_NAME := NanoAndroidTest |
| 427 | |
| 428 | LOCAL_SDK_VERSION := 8 |
| 429 | |
| 430 | LOCAL_MODULE_TAGS := tests |
| 431 | |
| 432 | LOCAL_SRC_FILES := $(call all-java-files-under, java/src/device/test/java/com/google/protobuf/nano) |
| 433 | |
| 434 | LOCAL_MANIFEST_FILE := java/src/device/test/AndroidManifest.xml |
| 435 | |
| 436 | LOCAL_STATIC_JAVA_LIBRARIES := libprotobuf-java-2.3.0-nano \ |
| 437 | android-nano-test-parcelable \ |
| 438 | android-nano-test-parcelable-extendable |
| 439 | |
Ying Wang | eaa37c5 | 2014-05-01 20:45:22 -0700 | [diff] [blame] | 440 | LOCAL_DEX_PREOPT := false |
Jeff Davidson | 721ea49 | 2014-04-22 23:25:53 -0700 | [diff] [blame] | 441 | |
| 442 | include $(BUILD_PACKAGE) |