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 | |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 19 | CC_LITE_SRC_FILES := \ |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 20 | src/google/protobuf/stubs/common.cc \ |
| 21 | src/google/protobuf/stubs/once.cc \ |
| 22 | src/google/protobuf/stubs/hash.cc \ |
| 23 | src/google/protobuf/stubs/hash.h \ |
| 24 | src/google/protobuf/stubs/map-util.h \ |
| 25 | src/google/protobuf/stubs/stl_util-inl.h \ |
| 26 | src/google/protobuf/extension_set.cc \ |
| 27 | src/google/protobuf/generated_message_util.cc \ |
| 28 | src/google/protobuf/message_lite.cc \ |
| 29 | src/google/protobuf/repeated_field.cc \ |
| 30 | src/google/protobuf/wire_format_lite.cc \ |
| 31 | src/google/protobuf/io/coded_stream.cc \ |
| 32 | src/google/protobuf/io/coded_stream_inl.h \ |
| 33 | src/google/protobuf/io/zero_copy_stream.cc \ |
| 34 | src/google/protobuf/io/zero_copy_stream_impl_lite.cc |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 35 | |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 36 | JAVA_LITE_SRC_FILES := \ |
Wink Saville | a3d3079 | 2010-06-04 17:44:37 -0700 | [diff] [blame] | 37 | java/src/main/java/com/google/protobuf/UninitializedMessageException.java \ |
| 38 | java/src/main/java/com/google/protobuf/MessageLite.java \ |
| 39 | java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java \ |
| 40 | java/src/main/java/com/google/protobuf/CodedOutputStream.java \ |
| 41 | java/src/main/java/com/google/protobuf/ByteString.java \ |
| 42 | java/src/main/java/com/google/protobuf/CodedInputStream.java \ |
| 43 | java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java \ |
| 44 | java/src/main/java/com/google/protobuf/AbstractMessageLite.java \ |
| 45 | java/src/main/java/com/google/protobuf/FieldSet.java \ |
| 46 | java/src/main/java/com/google/protobuf/Internal.java \ |
| 47 | java/src/main/java/com/google/protobuf/WireFormat.java \ |
| 48 | java/src/main/java/com/google/protobuf/GeneratedMessageLite.java |
| 49 | |
Iain Merrick | aeb2b2a | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 50 | COMPILER_SRC_FILES := \ |
| 51 | src/google/protobuf/descriptor.cc \ |
| 52 | src/google/protobuf/descriptor.pb.cc \ |
| 53 | src/google/protobuf/descriptor_database.cc \ |
| 54 | src/google/protobuf/dynamic_message.cc \ |
| 55 | src/google/protobuf/extension_set.cc \ |
| 56 | src/google/protobuf/extension_set_heavy.cc \ |
| 57 | src/google/protobuf/generated_message_reflection.cc \ |
| 58 | src/google/protobuf/generated_message_util.cc \ |
| 59 | src/google/protobuf/message.cc \ |
| 60 | src/google/protobuf/message_lite.cc \ |
| 61 | src/google/protobuf/reflection_ops.cc \ |
| 62 | src/google/protobuf/repeated_field.cc \ |
| 63 | src/google/protobuf/service.cc \ |
| 64 | src/google/protobuf/text_format.cc \ |
| 65 | src/google/protobuf/unknown_field_set.cc \ |
| 66 | src/google/protobuf/wire_format.cc \ |
| 67 | src/google/protobuf/wire_format_lite.cc \ |
| 68 | src/google/protobuf/compiler/code_generator.cc \ |
| 69 | src/google/protobuf/compiler/command_line_interface.cc \ |
| 70 | src/google/protobuf/compiler/importer.cc \ |
| 71 | src/google/protobuf/compiler/main.cc \ |
| 72 | src/google/protobuf/compiler/parser.cc \ |
| 73 | src/google/protobuf/compiler/plugin.cc \ |
| 74 | src/google/protobuf/compiler/plugin.pb.cc \ |
| 75 | src/google/protobuf/compiler/subprocess.cc \ |
| 76 | src/google/protobuf/compiler/zip_writer.cc \ |
| 77 | src/google/protobuf/compiler/cpp/cpp_enum.cc \ |
| 78 | src/google/protobuf/compiler/cpp/cpp_enum_field.cc \ |
| 79 | src/google/protobuf/compiler/cpp/cpp_extension.cc \ |
| 80 | src/google/protobuf/compiler/cpp/cpp_field.cc \ |
| 81 | src/google/protobuf/compiler/cpp/cpp_file.cc \ |
| 82 | src/google/protobuf/compiler/cpp/cpp_generator.cc \ |
| 83 | src/google/protobuf/compiler/cpp/cpp_helpers.cc \ |
| 84 | src/google/protobuf/compiler/cpp/cpp_message.cc \ |
| 85 | src/google/protobuf/compiler/cpp/cpp_message_field.cc \ |
| 86 | src/google/protobuf/compiler/cpp/cpp_primitive_field.cc \ |
| 87 | src/google/protobuf/compiler/cpp/cpp_service.cc \ |
| 88 | src/google/protobuf/compiler/cpp/cpp_string_field.cc \ |
| 89 | src/google/protobuf/compiler/java/java_enum.cc \ |
| 90 | src/google/protobuf/compiler/java/java_enum_field.cc \ |
| 91 | src/google/protobuf/compiler/java/java_extension.cc \ |
| 92 | src/google/protobuf/compiler/java/java_field.cc \ |
| 93 | src/google/protobuf/compiler/java/java_file.cc \ |
| 94 | src/google/protobuf/compiler/java/java_generator.cc \ |
| 95 | src/google/protobuf/compiler/java/java_helpers.cc \ |
| 96 | src/google/protobuf/compiler/java/java_message.cc \ |
| 97 | src/google/protobuf/compiler/java/java_message_field.cc \ |
| 98 | src/google/protobuf/compiler/java/java_primitive_field.cc \ |
| 99 | src/google/protobuf/compiler/java/java_service.cc \ |
| 100 | src/google/protobuf/compiler/javamicro/javamicro_enum.cc \ |
| 101 | src/google/protobuf/compiler/javamicro/javamicro_enum_field.cc \ |
| 102 | src/google/protobuf/compiler/javamicro/javamicro_field.cc \ |
| 103 | src/google/protobuf/compiler/javamicro/javamicro_file.cc \ |
| 104 | src/google/protobuf/compiler/javamicro/javamicro_generator.cc \ |
| 105 | src/google/protobuf/compiler/javamicro/javamicro_helpers.cc \ |
| 106 | src/google/protobuf/compiler/javamicro/javamicro_message.cc \ |
| 107 | src/google/protobuf/compiler/javamicro/javamicro_message_field.cc \ |
| 108 | src/google/protobuf/compiler/javamicro/javamicro_primitive_field.cc \ |
| 109 | src/google/protobuf/compiler/python/python_generator.cc \ |
| 110 | src/google/protobuf/io/coded_stream.cc \ |
| 111 | src/google/protobuf/io/gzip_stream.cc \ |
| 112 | src/google/protobuf/io/printer.cc \ |
| 113 | src/google/protobuf/io/tokenizer.cc \ |
| 114 | src/google/protobuf/io/zero_copy_stream.cc \ |
| 115 | src/google/protobuf/io/zero_copy_stream_impl.cc \ |
| 116 | src/google/protobuf/io/zero_copy_stream_impl_lite.cc \ |
| 117 | src/google/protobuf/stubs/common.cc \ |
| 118 | src/google/protobuf/stubs/hash.cc \ |
| 119 | src/google/protobuf/stubs/once.cc \ |
| 120 | src/google/protobuf/stubs/structurally_valid.cc \ |
| 121 | src/google/protobuf/stubs/strutil.cc \ |
| 122 | src/google/protobuf/stubs/substitute.cc |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 123 | |
| 124 | # Java micro library (for device-side users) |
| 125 | # ======================================================= |
| 126 | include $(CLEAR_VARS) |
| 127 | |
| 128 | LOCAL_MODULE := libprotobuf-java-2.3.0-micro |
Jean-Baptiste Queru | b854f4d | 2010-10-05 10:26:11 -0700 | [diff] [blame] | 129 | LOCAL_MODULE_TAGS := optional |
Ying Wang | 770e659 | 2011-01-26 13:37:44 -0800 | [diff] [blame^] | 130 | LOCAL_SDK_VERSION := 8 |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 131 | |
| 132 | LOCAL_SRC_FILES := $(call all-java-files-under, java/src/main/java/com/google/protobuf/micro) |
| 133 | |
Wink Saville | a3d3079 | 2010-06-04 17:44:37 -0700 | [diff] [blame] | 134 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 135 | |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 136 | # Java micro library (for host-side users) |
| 137 | # ======================================================= |
| 138 | include $(CLEAR_VARS) |
| 139 | |
| 140 | LOCAL_MODULE := host-libprotobuf-java-2.3.0-micro |
| 141 | LOCAL_MODULE_TAGS := optional |
| 142 | |
| 143 | LOCAL_SRC_FILES := $(call all-java-files-under, java/src/main/java/com/google/protobuf/micro) |
| 144 | |
| 145 | include $(BUILD_HOST_JAVA_LIBRARY) |
| 146 | |
| 147 | # Java lite library (for device-side users) |
| 148 | # ======================================================= |
| 149 | include $(CLEAR_VARS) |
| 150 | |
| 151 | LOCAL_MODULE := libprotobuf-java-2.3.0-lite |
Jean-Baptiste Queru | b854f4d | 2010-10-05 10:26:11 -0700 | [diff] [blame] | 152 | LOCAL_MODULE_TAGS := optional |
Ying Wang | 770e659 | 2011-01-26 13:37:44 -0800 | [diff] [blame^] | 153 | LOCAL_SDK_VERSION := 8 |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 154 | |
| 155 | LOCAL_SRC_FILES := $(JAVA_LITE_SRC_FILES) |
| 156 | |
| 157 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 158 | |
| 159 | # Java lite library (for host-side users) |
| 160 | # ======================================================= |
| 161 | include $(CLEAR_VARS) |
| 162 | |
| 163 | LOCAL_MODULE := host-libprotobuf-java-2.3.0-lite |
| 164 | LOCAL_MODULE_TAGS := optional |
| 165 | |
| 166 | LOCAL_SRC_FILES := $(JAVA_LITE_SRC_FILES) |
| 167 | |
| 168 | include $(BUILD_HOST_JAVA_LIBRARY) |
| 169 | |
Wink Saville | b3fe74b | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 170 | # C++ lite library |
| 171 | # ======================================================= |
| 172 | include $(CLEAR_VARS) |
| 173 | |
| 174 | LOCAL_MODULE := libprotobuf-cpp-2.3.0-lite |
Jean-Baptiste Queru | b854f4d | 2010-10-05 10:26:11 -0700 | [diff] [blame] | 175 | LOCAL_MODULE_TAGS := optional |
Wink Saville | b3fe74b | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 176 | |
| 177 | LOCAL_CPP_EXTENSION := .cc |
| 178 | |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 179 | LOCAL_SRC_FILES := $(CC_LITE_SRC_FILES) |
Wink Saville | b3fe74b | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 180 | |
| 181 | LOCAL_C_INCLUDES := \ |
| 182 | $(LOCAL_PATH)/android \ |
| 183 | bionic \ |
Wink Saville | b3fe74b | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 184 | $(LOCAL_PATH)/src |
| 185 | |
| 186 | LOCAL_SHARED_LIBRARIES := \ |
Kenny Root | 5ea4d58 | 2010-06-04 09:37:31 -0700 | [diff] [blame] | 187 | libcutils libutils |
| 188 | |
| 189 | # stlport conflicts with the host stl library |
| 190 | ifneq ($(TARGET_SIMULATOR),true) |
| 191 | LOCAL_C_INCLUDES += external/stlport/stlport |
| 192 | LOCAL_SHARED_LIBRARIES += libstlport |
| 193 | endif |
Wink Saville | b3fe74b | 2010-06-03 15:33:07 -0700 | [diff] [blame] | 194 | |
| 195 | # Define the header files to be copied |
| 196 | #LOCAL_COPY_HEADERS := \ |
| 197 | # src/google/protobuf/stubs/once.h \ |
| 198 | # src/google/protobuf/stubs/common.h \ |
| 199 | # src/google/protobuf/io/coded_stream.h \ |
| 200 | # src/google/protobuf/generated_message_util.h \ |
| 201 | # src/google/protobuf/repeated_field.h \ |
| 202 | # src/google/protobuf/extension_set.h \ |
| 203 | # src/google/protobuf/wire_format_lite_inl.h |
| 204 | # |
| 205 | #LOCAL_COPY_HEADERS_TO := $(LOCAL_MODULE) |
| 206 | |
| 207 | LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI |
| 208 | |
| 209 | include $(BUILD_STATIC_LIBRARY) |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 210 | |
| 211 | # C++ full library |
| 212 | # ======================================================= |
| 213 | include $(CLEAR_VARS) |
| 214 | |
| 215 | LOCAL_MODULE := libprotobuf-cpp-2.3.0-full |
Jean-Baptiste Queru | b854f4d | 2010-10-05 10:26:11 -0700 | [diff] [blame] | 216 | LOCAL_MODULE_TAGS := optional |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 217 | |
| 218 | LOCAL_CPP_EXTENSION := .cc |
| 219 | |
| 220 | LOCAL_SRC_FILES := \ |
Omari Stephens | 373caa0 | 2010-09-30 15:59:59 -0700 | [diff] [blame] | 221 | $(CC_LITE_SRC_FILES) \ |
| 222 | src/google/protobuf/stubs/strutil.cc \ |
| 223 | src/google/protobuf/stubs/strutil.h \ |
| 224 | src/google/protobuf/stubs/substitute.cc \ |
| 225 | src/google/protobuf/stubs/substitute.h \ |
| 226 | src/google/protobuf/stubs/structurally_valid.cc \ |
| 227 | src/google/protobuf/descriptor.cc \ |
| 228 | src/google/protobuf/descriptor.pb.cc \ |
| 229 | src/google/protobuf/descriptor_database.cc \ |
| 230 | src/google/protobuf/dynamic_message.cc \ |
| 231 | src/google/protobuf/extension_set_heavy.cc \ |
| 232 | src/google/protobuf/generated_message_reflection.cc \ |
| 233 | src/google/protobuf/message.cc \ |
| 234 | src/google/protobuf/reflection_ops.cc \ |
| 235 | src/google/protobuf/service.cc \ |
| 236 | src/google/protobuf/text_format.cc \ |
| 237 | src/google/protobuf/unknown_field_set.cc \ |
| 238 | src/google/protobuf/wire_format.cc \ |
| 239 | src/google/protobuf/io/gzip_stream.cc \ |
| 240 | src/google/protobuf/io/printer.cc \ |
| 241 | src/google/protobuf/io/tokenizer.cc \ |
| 242 | src/google/protobuf/io/zero_copy_stream_impl.cc \ |
| 243 | src/google/protobuf/compiler/importer.cc \ |
| 244 | src/google/protobuf/compiler/parser.cc |
Wink Saville | 732aaf0 | 2010-06-28 15:05:24 -0700 | [diff] [blame] | 245 | |
| 246 | LOCAL_C_INCLUDES := \ |
| 247 | $(LOCAL_PATH)/android \ |
| 248 | bionic \ |
| 249 | external/zlib \ |
| 250 | $(LOCAL_PATH)/src |
| 251 | |
| 252 | LOCAL_SHARED_LIBRARIES := \ |
| 253 | libz libcutils libutils |
| 254 | |
| 255 | # stlport conflicts with the host stl library |
| 256 | ifneq ($(TARGET_SIMULATOR),true) |
| 257 | LOCAL_C_INCLUDES += external/stlport/stlport |
| 258 | LOCAL_SHARED_LIBRARIES += libstlport |
| 259 | endif |
| 260 | |
| 261 | # Define the header files to be copied |
| 262 | #LOCAL_COPY_HEADERS := \ |
| 263 | # src/google/protobuf/stubs/once.h \ |
| 264 | # src/google/protobuf/stubs/common.h \ |
| 265 | # src/google/protobuf/io/coded_stream.h \ |
| 266 | # src/google/protobuf/generated_message_util.h \ |
| 267 | # src/google/protobuf/repeated_field.h \ |
| 268 | # src/google/protobuf/extension_set.h \ |
| 269 | # src/google/protobuf/wire_format_lite_inl.h |
| 270 | # |
| 271 | #LOCAL_COPY_HEADERS_TO := $(LOCAL_MODULE) |
| 272 | |
| 273 | LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI |
| 274 | |
| 275 | include $(BUILD_STATIC_LIBRARY) |
Iain Merrick | aeb2b2a | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 276 | |
Wink Saville | 8d24c6a | 2010-11-05 11:28:46 -0700 | [diff] [blame] | 277 | # Android Protocol buffer compiler, aprotoc (host executable) |
| 278 | # used by the build systems as $(PROTOC) defined in |
| 279 | # build/core/config.mk |
Iain Merrick | aeb2b2a | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 280 | # ======================================================= |
| 281 | include $(CLEAR_VARS) |
| 282 | |
Wink Saville | 8d24c6a | 2010-11-05 11:28:46 -0700 | [diff] [blame] | 283 | LOCAL_MODULE := aprotoc |
Iain Merrick | aeb2b2a | 2010-11-01 17:29:13 +0000 | [diff] [blame] | 284 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 285 | LOCAL_MODULE_TAGS := optional |
| 286 | |
| 287 | LOCAL_CPP_EXTENSION := .cc |
| 288 | LOCAL_SRC_FILES := $(COMPILER_SRC_FILES) |
| 289 | |
| 290 | LOCAL_C_INCLUDES := \ |
| 291 | $(LOCAL_PATH)/android \ |
| 292 | $(LOCAL_PATH)/src |
| 293 | |
| 294 | LOCAL_STATIC_LIBRARIES += libz |
| 295 | LOCAL_LDLIBS := -lpthread |
| 296 | |
| 297 | include $(BUILD_HOST_EXECUTABLE) |