Wink Saville | e5566f8 | 2010-05-28 11:49:52 -0700 | [diff] [blame] | 1 | # Copyright (C) 2009 The Android Open Source Project |
Wink Saville | f9e5cc7 | 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 | e5566f8 | 2010-05-28 11:49:52 -0700 | [diff] [blame] | 14 | # |
| 15 | # |
Wink Saville | f9e5cc7 | 2010-05-27 15:44:42 -0700 | [diff] [blame] | 16 | |
| 17 | LOCAL_PATH := $(call my-dir) |
Wink Saville | f9e5cc7 | 2010-05-27 15:44:42 -0700 | [diff] [blame] | 18 | |
Kristian Monsen | eee1dd7 | 2013-11-13 11:07:49 -0800 | [diff] [blame] | 19 | IGNORED_WARNINGS := -Wno-sign-compare -Wno-unused-parameter -Wno-sign-promo |
| 20 | |
Wink Saville | 7d0a2a3 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 21 | CC_LITE_SRC_FILES := \ |
Omari Stephens | aa67764 | 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 | 7d0a2a3 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 37 | |
Omari Stephens | aa67764 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 38 | JAVA_LITE_SRC_FILES := \ |
Wink Saville | e9da248 | 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 | f5bc288 | 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 | 2337023 | 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 | 5659cca | 2013-06-19 13:17:43 -0700 | [diff] [blame] | 113 | src/google/protobuf/compiler/javanano/javanano_extension.cc \ |
Ulas Kirazci | 2337023 | 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 | f5bc288 | 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 | aa67764 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 135 | |
Ulas Kirazci | 2337023 | 2013-03-14 16:44:33 -0700 | [diff] [blame] | 136 | # Java nano library (for device-side users) |
| 137 | # ======================================================= |
| 138 | include $(CLEAR_VARS) |
| 139 | |
Jeff Davidson | dac0167 | 2014-10-16 10:54:04 -0700 | [diff] [blame] | 140 | LOCAL_MODULE := libprotobuf-java-nano |
Ulas Kirazci | 2337023 | 2013-03-14 16:44:33 -0700 | [diff] [blame] | 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 | ec4b1ce | 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 | 2337023 | 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 | |
Jeff Davidson | dac0167 | 2014-10-16 10:54:04 -0700 | [diff] [blame] | 153 | LOCAL_MODULE := host-libprotobuf-java-nano |
Ulas Kirazci | 2337023 | 2013-03-14 16:44:33 -0700 | [diff] [blame] | 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 | aa67764 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 160 | # Java micro library (for device-side users) |
| 161 | # ======================================================= |
| 162 | include $(CLEAR_VARS) |
| 163 | |
Jeff Davidson | dac0167 | 2014-10-16 10:54:04 -0700 | [diff] [blame] | 164 | LOCAL_MODULE := libprotobuf-java-micro |
Jean-Baptiste Queru | 6ebe230 | 2010-10-05 10:26:11 -0700 | [diff] [blame] | 165 | LOCAL_MODULE_TAGS := optional |
Ying Wang | ddf7406 | 2011-01-26 13:37:44 -0800 | [diff] [blame] | 166 | LOCAL_SDK_VERSION := 8 |
Omari Stephens | aa67764 | 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 | e9da248 | 2010-06-04 17:44:37 -0700 | [diff] [blame] | 170 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 171 | |
Omari Stephens | aa67764 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 172 | # Java micro library (for host-side users) |
| 173 | # ======================================================= |
| 174 | include $(CLEAR_VARS) |
| 175 | |
Jeff Davidson | dac0167 | 2014-10-16 10:54:04 -0700 | [diff] [blame] | 176 | LOCAL_MODULE := host-libprotobuf-java-micro |
Omari Stephens | aa67764 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 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 | |
Jeff Davidson | dac0167 | 2014-10-16 10:54:04 -0700 | [diff] [blame] | 187 | LOCAL_MODULE := libprotobuf-java-lite |
Jean-Baptiste Queru | 6ebe230 | 2010-10-05 10:26:11 -0700 | [diff] [blame] | 188 | LOCAL_MODULE_TAGS := optional |
Ying Wang | ddf7406 | 2011-01-26 13:37:44 -0800 | [diff] [blame] | 189 | LOCAL_SDK_VERSION := 8 |
Omari Stephens | aa67764 | 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 | |
Jeff Davidson | dac0167 | 2014-10-16 10:54:04 -0700 | [diff] [blame] | 199 | LOCAL_MODULE := host-libprotobuf-java-lite |
Omari Stephens | aa67764 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 200 | LOCAL_MODULE_TAGS := optional |
| 201 | |
| 202 | LOCAL_SRC_FILES := $(JAVA_LITE_SRC_FILES) |
| 203 | |
| 204 | include $(BUILD_HOST_JAVA_LIBRARY) |
| 205 | |
Wink Saville | acf8ef1 | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 206 | # C++ lite library |
| 207 | # ======================================================= |
| 208 | include $(CLEAR_VARS) |
| 209 | |
Jeff Davidson | dac0167 | 2014-10-16 10:54:04 -0700 | [diff] [blame] | 210 | LOCAL_MODULE := libprotobuf-cpp-lite |
Jean-Baptiste Queru | 6ebe230 | 2010-10-05 10:26:11 -0700 | [diff] [blame] | 211 | LOCAL_MODULE_TAGS := optional |
Wink Saville | acf8ef1 | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 212 | |
| 213 | LOCAL_CPP_EXTENSION := .cc |
| 214 | |
Wink Saville | 7d0a2a3 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 215 | LOCAL_SRC_FILES := $(CC_LITE_SRC_FILES) |
Wink Saville | acf8ef1 | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 216 | |
| 217 | LOCAL_C_INCLUDES := \ |
| 218 | $(LOCAL_PATH)/android \ |
Wink Saville | acf8ef1 | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 219 | $(LOCAL_PATH)/src |
| 220 | |
Wink Saville | acf8ef1 | 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 | eee1dd7 | 2013-11-13 11:07:49 -0800 | [diff] [blame] | 233 | LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI $(IGNORED_WARNINGS) |
Wink Saville | acf8ef1 | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 234 | |
Ying Wang | 4747b03 | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 235 | # These are the minimum versions and don't need to be update. |
Ying Wang | b67a8ec | 2012-09-06 11:35:34 -0700 | [diff] [blame] | 236 | ifeq ($(TARGET_ARCH),arm) |
Ying Wang | 4747b03 | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 237 | LOCAL_SDK_VERSION := 8 |
Ying Wang | 6422722 | 2012-08-14 10:28:02 -0700 | [diff] [blame] | 238 | else |
Ying Wang | b67a8ec | 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 | 4747b03 | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 241 | endif |
Ying Wang | b67a8ec | 2012-09-06 11:35:34 -0700 | [diff] [blame] | 242 | LOCAL_NDK_STL_VARIANT := stlport_static |
Ying Wang | 4747b03 | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 243 | |
Wink Saville | acf8ef1 | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 244 | include $(BUILD_STATIC_LIBRARY) |
Wink Saville | 7d0a2a3 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 245 | |
Dan Albert | 68e7e78 | 2014-11-11 11:03:23 -0800 | [diff] [blame] | 246 | # C++ lite library (libc++ flavored for the platform) |
| 247 | # ======================================================= |
| 248 | include $(CLEAR_VARS) |
| 249 | |
| 250 | LOCAL_MODULE := libprotobuf-cpp-lite |
| 251 | LOCAL_MODULE_TAGS := optional |
| 252 | |
| 253 | LOCAL_CPP_EXTENSION := .cc |
| 254 | |
| 255 | LOCAL_SRC_FILES := $(CC_LITE_SRC_FILES) |
| 256 | |
| 257 | LOCAL_C_INCLUDES := \ |
| 258 | $(LOCAL_PATH)/android \ |
| 259 | $(LOCAL_PATH)/src |
| 260 | |
| 261 | LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI $(IGNORED_WARNINGS) |
| 262 | |
| 263 | include $(BUILD_SHARED_LIBRARY) |
| 264 | |
Wink Saville | 7d0a2a3 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 265 | # C++ full library |
| 266 | # ======================================================= |
Przemyslaw Szczepaniak | 610c2fd | 2012-11-06 14:42:21 +0000 | [diff] [blame] | 267 | protobuf_cc_full_src_files := \ |
Omari Stephens | aa67764 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 268 | $(CC_LITE_SRC_FILES) \ |
| 269 | src/google/protobuf/stubs/strutil.cc \ |
| 270 | src/google/protobuf/stubs/strutil.h \ |
| 271 | src/google/protobuf/stubs/substitute.cc \ |
| 272 | src/google/protobuf/stubs/substitute.h \ |
| 273 | src/google/protobuf/stubs/structurally_valid.cc \ |
| 274 | src/google/protobuf/descriptor.cc \ |
| 275 | src/google/protobuf/descriptor.pb.cc \ |
| 276 | src/google/protobuf/descriptor_database.cc \ |
| 277 | src/google/protobuf/dynamic_message.cc \ |
| 278 | src/google/protobuf/extension_set_heavy.cc \ |
| 279 | src/google/protobuf/generated_message_reflection.cc \ |
| 280 | src/google/protobuf/message.cc \ |
| 281 | src/google/protobuf/reflection_ops.cc \ |
| 282 | src/google/protobuf/service.cc \ |
| 283 | src/google/protobuf/text_format.cc \ |
| 284 | src/google/protobuf/unknown_field_set.cc \ |
| 285 | src/google/protobuf/wire_format.cc \ |
| 286 | src/google/protobuf/io/gzip_stream.cc \ |
| 287 | src/google/protobuf/io/printer.cc \ |
| 288 | src/google/protobuf/io/tokenizer.cc \ |
| 289 | src/google/protobuf/io/zero_copy_stream_impl.cc \ |
| 290 | src/google/protobuf/compiler/importer.cc \ |
| 291 | src/google/protobuf/compiler/parser.cc |
Wink Saville | 7d0a2a3 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 292 | |
Przemyslaw Szczepaniak | 610c2fd | 2012-11-06 14:42:21 +0000 | [diff] [blame] | 293 | # C++ full library - stlport version |
| 294 | # ======================================================= |
| 295 | include $(CLEAR_VARS) |
| 296 | |
Jeff Davidson | dac0167 | 2014-10-16 10:54:04 -0700 | [diff] [blame] | 297 | LOCAL_MODULE := libprotobuf-cpp-full |
Przemyslaw Szczepaniak | 610c2fd | 2012-11-06 14:42:21 +0000 | [diff] [blame] | 298 | LOCAL_MODULE_TAGS := optional |
| 299 | LOCAL_CPP_EXTENSION := .cc |
| 300 | LOCAL_SRC_FILES := $(protobuf_cc_full_src_files) |
Wink Saville | 7d0a2a3 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 301 | LOCAL_C_INCLUDES := \ |
| 302 | $(LOCAL_PATH)/android \ |
Wink Saville | 7d0a2a3 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 303 | external/zlib \ |
| 304 | $(LOCAL_PATH)/src |
| 305 | |
Wink Saville | 7d0a2a3 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 306 | # Define the header files to be copied |
| 307 | #LOCAL_COPY_HEADERS := \ |
| 308 | # src/google/protobuf/stubs/once.h \ |
| 309 | # src/google/protobuf/stubs/common.h \ |
| 310 | # src/google/protobuf/io/coded_stream.h \ |
| 311 | # src/google/protobuf/generated_message_util.h \ |
| 312 | # src/google/protobuf/repeated_field.h \ |
| 313 | # src/google/protobuf/extension_set.h \ |
| 314 | # src/google/protobuf/wire_format_lite_inl.h |
| 315 | # |
| 316 | #LOCAL_COPY_HEADERS_TO := $(LOCAL_MODULE) |
| 317 | |
Kristian Monsen | eee1dd7 | 2013-11-13 11:07:49 -0800 | [diff] [blame] | 318 | LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI $(IGNORED_WARNINGS) |
Wink Saville | 7d0a2a3 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 319 | |
Ying Wang | 4747b03 | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 320 | # These are the minimum versions and don't need to be update. |
Ying Wang | b67a8ec | 2012-09-06 11:35:34 -0700 | [diff] [blame] | 321 | ifeq ($(TARGET_ARCH),arm) |
Ying Wang | 4747b03 | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 322 | LOCAL_SDK_VERSION := 8 |
Ying Wang | 6422722 | 2012-08-14 10:28:02 -0700 | [diff] [blame] | 323 | else |
Ying Wang | b67a8ec | 2012-09-06 11:35:34 -0700 | [diff] [blame] | 324 | # x86/mips support only available from API 9. |
| 325 | LOCAL_SDK_VERSION := 9 |
Ying Wang | 4747b03 | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 326 | endif |
Ying Wang | b67a8ec | 2012-09-06 11:35:34 -0700 | [diff] [blame] | 327 | LOCAL_NDK_STL_VARIANT := stlport_static |
Ying Wang | 4747b03 | 2012-06-14 18:32:34 -0700 | [diff] [blame] | 328 | |
Wink Saville | 7d0a2a3 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 329 | include $(BUILD_STATIC_LIBRARY) |
Iain Merrick | f5bc288 | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 330 | |
Przemyslaw Szczepaniak | 610c2fd | 2012-11-06 14:42:21 +0000 | [diff] [blame] | 331 | # C++ full library - Gnustl+rtti version |
| 332 | # ======================================================= |
| 333 | include $(CLEAR_VARS) |
| 334 | |
Jeff Davidson | dac0167 | 2014-10-16 10:54:04 -0700 | [diff] [blame] | 335 | LOCAL_MODULE := libprotobuf-cpp-full-gnustl-rtti |
Przemyslaw Szczepaniak | 610c2fd | 2012-11-06 14:42:21 +0000 | [diff] [blame] | 336 | LOCAL_MODULE_TAGS := optional |
| 337 | LOCAL_CPP_EXTENSION := .cc |
| 338 | LOCAL_SRC_FILES := $(protobuf_cc_full_src_files) |
| 339 | LOCAL_C_INCLUDES := \ |
| 340 | $(LOCAL_PATH)/android \ |
| 341 | external/zlib \ |
| 342 | $(LOCAL_PATH)/src |
| 343 | |
Kristian Monsen | eee1dd7 | 2013-11-13 11:07:49 -0800 | [diff] [blame] | 344 | LOCAL_CFLAGS := -frtti $(IGNORED_WARNINGS) |
Przemyslaw Szczepaniak | 610c2fd | 2012-11-06 14:42:21 +0000 | [diff] [blame] | 345 | LOCAL_SDK_VERSION := 14 |
| 346 | LOCAL_NDK_STL_VARIANT := gnustl_static |
| 347 | |
| 348 | include $(BUILD_STATIC_LIBRARY) |
| 349 | |
Dan Albert | 68e7e78 | 2014-11-11 11:03:23 -0800 | [diff] [blame] | 350 | # C++ full library - libc++ version for the platform |
| 351 | # ======================================================= |
| 352 | include $(CLEAR_VARS) |
| 353 | |
| 354 | LOCAL_MODULE := libprotobuf-cpp-full |
| 355 | LOCAL_MODULE_TAGS := optional |
| 356 | LOCAL_CPP_EXTENSION := .cc |
| 357 | LOCAL_SRC_FILES := $(protobuf_cc_full_src_files) |
| 358 | LOCAL_C_INCLUDES := \ |
| 359 | $(LOCAL_PATH)/android \ |
| 360 | external/zlib \ |
| 361 | $(LOCAL_PATH)/src |
| 362 | |
| 363 | LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI $(IGNORED_WARNINGS) |
| 364 | LOCAL_SHARED_LIBRARIES := libz |
| 365 | |
| 366 | include $(BUILD_SHARED_LIBRARY) |
| 367 | |
Przemyslaw Szczepaniak | 610c2fd | 2012-11-06 14:42:21 +0000 | [diff] [blame] | 368 | # Clean temp vars |
| 369 | protobuf_cc_full_src_files := |
| 370 | |
| 371 | |
Wink Saville | 4e79aac | 2010-11-05 11:28:46 -0700 | [diff] [blame] | 372 | # Android Protocol buffer compiler, aprotoc (host executable) |
| 373 | # used by the build systems as $(PROTOC) defined in |
| 374 | # build/core/config.mk |
Iain Merrick | f5bc288 | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 375 | # ======================================================= |
| 376 | include $(CLEAR_VARS) |
| 377 | |
Wink Saville | 4e79aac | 2010-11-05 11:28:46 -0700 | [diff] [blame] | 378 | LOCAL_MODULE := aprotoc |
Iain Merrick | f5bc288 | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 379 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 380 | LOCAL_MODULE_TAGS := optional |
| 381 | |
| 382 | LOCAL_CPP_EXTENSION := .cc |
| 383 | LOCAL_SRC_FILES := $(COMPILER_SRC_FILES) |
| 384 | |
| 385 | LOCAL_C_INCLUDES := \ |
| 386 | $(LOCAL_PATH)/android \ |
Leandro Gracia Gil | b596f9c | 2014-07-28 15:27:19 -0700 | [diff] [blame] | 387 | external/zlib \ |
Iain Merrick | f5bc288 | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 388 | $(LOCAL_PATH)/src |
| 389 | |
| 390 | LOCAL_STATIC_LIBRARIES += libz |
Leandro Gracia Gil | b596f9c | 2014-07-28 15:27:19 -0700 | [diff] [blame] | 391 | |
| 392 | ifneq ($(HOST_OS),windows) |
Iain Merrick | f5bc288 | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 393 | LOCAL_LDLIBS := -lpthread |
Leandro Gracia Gil | b596f9c | 2014-07-28 15:27:19 -0700 | [diff] [blame] | 394 | endif |
Iain Merrick | f5bc288 | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 395 | |
Kristian Monsen | eee1dd7 | 2013-11-13 11:07:49 -0800 | [diff] [blame] | 396 | LOCAL_CFLAGS := $(IGNORED_WARNINGS) |
| 397 | |
Iain Merrick | f5bc288 | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 398 | include $(BUILD_HOST_EXECUTABLE) |
Ulas Kirazci | 2000cfd | 2013-07-24 14:35:42 -0700 | [diff] [blame] | 399 | |
| 400 | # To test java proto params build rules. |
| 401 | # ======================================================= |
| 402 | include $(CLEAR_VARS) |
| 403 | |
| 404 | LOCAL_MODULE := aprotoc-test-nano-params |
| 405 | LOCAL_MODULE_TAGS := tests |
| 406 | LOCAL_SDK_VERSION := current |
| 407 | |
| 408 | LOCAL_PROTOC_OPTIMIZE_TYPE := nano |
| 409 | |
| 410 | LOCAL_SRC_FILES := \ |
| 411 | src/google/protobuf/unittest_import_nano.proto \ |
| 412 | src/google/protobuf/unittest_simple_nano.proto \ |
| 413 | src/google/protobuf/unittest_stringutf8_nano.proto \ |
Wink Saville | 473985e | 2013-08-07 21:00:39 -0700 | [diff] [blame] | 414 | src/google/protobuf/unittest_recursive_nano.proto |
| 415 | |
Ulas Kirazci | 2000cfd | 2013-07-24 14:35:42 -0700 | [diff] [blame] | 416 | |
| 417 | LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src |
| 418 | |
Max Cai | bc8eec3 | 2014-01-14 14:54:48 +0000 | [diff] [blame] | 419 | LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \ |
| 420 | java_package = $(LOCAL_PATH)/src/google/protobuf/unittest_import_nano.proto|com.google.protobuf.nano, \ |
| 421 | java_outer_classname = $(LOCAL_PATH)/src/google/protobuf/unittest_import_nano.proto|UnittestImportNano |
Ulas Kirazci | 2000cfd | 2013-07-24 14:35:42 -0700 | [diff] [blame] | 422 | |
| 423 | include $(BUILD_STATIC_JAVA_LIBRARY) |
Jeff Davidson | ec4b1ce | 2014-04-22 23:25:53 -0700 | [diff] [blame] | 424 | |
| 425 | # To test Android-specific nanoproto features. |
| 426 | # ======================================================= |
| 427 | include $(CLEAR_VARS) |
| 428 | |
| 429 | # Parcelable messages |
| 430 | LOCAL_MODULE := android-nano-test-parcelable |
| 431 | LOCAL_MODULE_TAGS := tests |
| 432 | LOCAL_SDK_VERSION := current |
| 433 | |
| 434 | LOCAL_PROTOC_OPTIMIZE_TYPE := nano |
| 435 | |
| 436 | LOCAL_SRC_FILES := src/google/protobuf/unittest_simple_nano.proto |
| 437 | |
| 438 | LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src |
| 439 | |
| 440 | LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \ |
| 441 | parcelable_messages = true |
| 442 | |
| 443 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 444 | |
| 445 | include $(CLEAR_VARS) |
| 446 | |
| 447 | # Parcelable and extendable messages |
| 448 | LOCAL_MODULE := android-nano-test-parcelable-extendable |
| 449 | LOCAL_MODULE_TAGS := tests |
| 450 | LOCAL_SDK_VERSION := current |
| 451 | |
| 452 | LOCAL_PROTOC_OPTIMIZE_TYPE := nano |
| 453 | |
| 454 | LOCAL_SRC_FILES := src/google/protobuf/unittest_extension_nano.proto |
| 455 | |
| 456 | LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/src |
| 457 | |
| 458 | LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \ |
| 459 | parcelable_messages = true, \ |
| 460 | store_unknown_fields = true |
| 461 | |
| 462 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 463 | |
| 464 | include $(CLEAR_VARS) |
| 465 | |
| 466 | # Test APK |
| 467 | LOCAL_PACKAGE_NAME := NanoAndroidTest |
| 468 | |
| 469 | LOCAL_SDK_VERSION := 8 |
| 470 | |
| 471 | LOCAL_MODULE_TAGS := tests |
| 472 | |
| 473 | LOCAL_SRC_FILES := $(call all-java-files-under, java/src/device/test/java/com/google/protobuf/nano) |
| 474 | |
| 475 | LOCAL_MANIFEST_FILE := java/src/device/test/AndroidManifest.xml |
| 476 | |
Jeff Davidson | dac0167 | 2014-10-16 10:54:04 -0700 | [diff] [blame] | 477 | LOCAL_STATIC_JAVA_LIBRARIES := libprotobuf-java-nano \ |
Jeff Davidson | ec4b1ce | 2014-04-22 23:25:53 -0700 | [diff] [blame] | 478 | android-nano-test-parcelable \ |
| 479 | android-nano-test-parcelable-extendable |
| 480 | |
Ying Wang | d750270 | 2014-05-01 20:45:22 -0700 | [diff] [blame] | 481 | LOCAL_DEX_PREOPT := false |
Jeff Davidson | ec4b1ce | 2014-04-22 23:25:53 -0700 | [diff] [blame] | 482 | |
| 483 | include $(BUILD_PACKAGE) |
Jeff Davidson | dac0167 | 2014-10-16 10:54:04 -0700 | [diff] [blame] | 484 | |
| 485 | # 2.3.0 prebuilts for backwards compatibility. |
| 486 | include $(LOCAL_PATH)/prebuilts/Android.mk |