1## Process this file with automake to produce Makefile.in 2 3if HAVE_ZLIB 4GZCHECKPROGRAMS = zcgzip zcgunzip 5GZHEADERS = google/protobuf/io/gzip_stream.h 6GZTESTS = google/protobuf/io/gzip_stream_unittest.sh 7ZLIB_DEF = -DHAVE_ZLIB=1 8else 9GZCHECKPROGRAMS = 10GZHEADERS = 11GZTESTS = 12ZLIB_DEF = 13endif 14 15if HAVE_PTHREAD 16PTHREAD_DEF = -DHAVE_PTHREAD=1 17else 18PTHREAD_DEF = 19endif 20 21PROTOBUF_VERSION = 31:3:0 22 23if GCC 24# Turn on all warnings except for sign comparison (we ignore sign comparison 25# in Google so our code base have tons of such warnings). 26NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) -Wall -Wno-sign-compare 27else 28NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) 29endif 30 31AM_CXXFLAGS = $(NO_OPT_CXXFLAGS) $(PROTOBUF_OPT_FLAG) 32 33AM_LDFLAGS = $(PTHREAD_CFLAGS) ${LIBLOG_LIBS} 34 35# If I say "dist_include_DATA", automake complains that $(includedir) is not 36# a "legitimate" directory for DATA. Screw you, automake. 37protodir = $(includedir) 38 39# If you are adding new files here, also remember to change the build files for 40# all other languages, //protoc-artifacts/build-zip.sh and run 41# //update_file_list.sh for bazel. 42nobase_dist_proto_DATA = \ 43 google/protobuf/any.proto \ 44 google/protobuf/api.proto \ 45 google/protobuf/compiler/plugin.proto \ 46 google/protobuf/descriptor.proto \ 47 google/protobuf/duration.proto \ 48 google/protobuf/empty.proto \ 49 google/protobuf/field_mask.proto \ 50 google/protobuf/source_context.proto \ 51 google/protobuf/struct.proto \ 52 google/protobuf/timestamp.proto \ 53 google/protobuf/type.proto \ 54 google/protobuf/wrappers.proto 55 56# Not sure why these don't get cleaned automatically. 57clean-local: 58 rm -f *.loT 59 60CLEANFILES = $(protoc_outputs) unittest_proto_middleman \ 61 testzip.jar testzip.list testzip.proto testzip.zip \ 62 no_warning_test.cc 63 64MAINTAINERCLEANFILES = \ 65 Makefile.in 66 67nobase_include_HEADERS = \ 68 google/protobuf/any.h \ 69 google/protobuf/any.pb.h \ 70 google/protobuf/api.pb.h \ 71 google/protobuf/arena.h \ 72 google/protobuf/arena_impl.h \ 73 google/protobuf/arenastring.h \ 74 google/protobuf/arenaz_sampler.h \ 75 google/protobuf/compiler/code_generator.h \ 76 google/protobuf/compiler/command_line_interface.h \ 77 google/protobuf/compiler/cpp/cpp_file.h \ 78 google/protobuf/compiler/cpp/cpp_generator.h \ 79 google/protobuf/compiler/cpp/cpp_helpers.h \ 80 google/protobuf/compiler/cpp/cpp_names.h \ 81 google/protobuf/compiler/csharp/csharp_doc_comment.h \ 82 google/protobuf/compiler/csharp/csharp_generator.h \ 83 google/protobuf/compiler/csharp/csharp_names.h \ 84 google/protobuf/compiler/csharp/csharp_options.h \ 85 google/protobuf/compiler/importer.h \ 86 google/protobuf/compiler/java/java_generator.h \ 87 google/protobuf/compiler/java/java_kotlin_generator.h \ 88 google/protobuf/compiler/java/java_names.h \ 89 google/protobuf/compiler/js/js_generator.h \ 90 google/protobuf/compiler/objectivec/objectivec_generator.h \ 91 google/protobuf/compiler/objectivec/objectivec_helpers.h \ 92 google/protobuf/compiler/parser.h \ 93 google/protobuf/compiler/php/php_generator.h \ 94 google/protobuf/compiler/plugin.h \ 95 google/protobuf/compiler/plugin.pb.h \ 96 google/protobuf/compiler/python/python_generator.h \ 97 google/protobuf/compiler/python/python_pyi_generator.h \ 98 google/protobuf/compiler/ruby/ruby_generator.h \ 99 google/protobuf/descriptor.h \ 100 google/protobuf/descriptor.pb.h \ 101 google/protobuf/descriptor_database.h \ 102 google/protobuf/duration.pb.h \ 103 google/protobuf/dynamic_message.h \ 104 google/protobuf/empty.pb.h \ 105 google/protobuf/explicitly_constructed.h \ 106 google/protobuf/extension_set.h \ 107 google/protobuf/extension_set_inl.h \ 108 google/protobuf/field_access_listener.h \ 109 google/protobuf/field_mask.pb.h \ 110 google/protobuf/generated_enum_reflection.h \ 111 google/protobuf/generated_enum_util.h \ 112 google/protobuf/generated_message_bases.h \ 113 google/protobuf/generated_message_reflection.h \ 114 google/protobuf/generated_message_tctable_decl.h \ 115 google/protobuf/generated_message_tctable_impl.h \ 116 google/protobuf/generated_message_util.h \ 117 google/protobuf/has_bits.h \ 118 google/protobuf/implicit_weak_message.h \ 119 google/protobuf/inlined_string_field.h \ 120 google/protobuf/io/coded_stream.h \ 121 $(GZHEADERS) \ 122 google/protobuf/io/io_win32.h \ 123 google/protobuf/io/printer.h \ 124 google/protobuf/io/strtod.h \ 125 google/protobuf/io/tokenizer.h \ 126 google/protobuf/io/zero_copy_stream.h \ 127 google/protobuf/io/zero_copy_stream_impl.h \ 128 google/protobuf/io/zero_copy_stream_impl_lite.h \ 129 google/protobuf/map.h \ 130 google/protobuf/map_entry.h \ 131 google/protobuf/map_entry_lite.h \ 132 google/protobuf/map_field.h \ 133 google/protobuf/map_field_inl.h \ 134 google/protobuf/map_field_lite.h \ 135 google/protobuf/map_type_handler.h \ 136 google/protobuf/message.h \ 137 google/protobuf/message_lite.h \ 138 google/protobuf/metadata.h \ 139 google/protobuf/metadata_lite.h \ 140 google/protobuf/parse_context.h \ 141 google/protobuf/port.h \ 142 google/protobuf/port_def.inc \ 143 google/protobuf/port_undef.inc \ 144 google/protobuf/reflection.h \ 145 google/protobuf/reflection_ops.h \ 146 google/protobuf/repeated_field.h \ 147 google/protobuf/repeated_ptr_field.h \ 148 google/protobuf/service.h \ 149 google/protobuf/source_context.pb.h \ 150 google/protobuf/struct.pb.h \ 151 google/protobuf/stubs/bytestream.h \ 152 google/protobuf/stubs/callback.h \ 153 google/protobuf/stubs/casts.h \ 154 google/protobuf/stubs/common.h \ 155 google/protobuf/stubs/hash.h \ 156 google/protobuf/stubs/logging.h \ 157 google/protobuf/stubs/macros.h \ 158 google/protobuf/stubs/map_util.h \ 159 google/protobuf/stubs/mutex.h \ 160 google/protobuf/stubs/once.h \ 161 google/protobuf/stubs/platform_macros.h \ 162 google/protobuf/stubs/port.h \ 163 google/protobuf/stubs/status.h \ 164 google/protobuf/stubs/stl_util.h \ 165 google/protobuf/stubs/stringpiece.h \ 166 google/protobuf/stubs/strutil.h \ 167 google/protobuf/stubs/template_util.h \ 168 google/protobuf/text_format.h \ 169 google/protobuf/timestamp.pb.h \ 170 google/protobuf/type.pb.h \ 171 google/protobuf/unknown_field_set.h \ 172 google/protobuf/util/delimited_message_util.h \ 173 google/protobuf/util/field_comparator.h \ 174 google/protobuf/util/field_mask_util.h \ 175 google/protobuf/util/json_util.h \ 176 google/protobuf/util/message_differencer.h \ 177 google/protobuf/util/time_util.h \ 178 google/protobuf/util/type_resolver.h \ 179 google/protobuf/util/type_resolver_util.h \ 180 google/protobuf/wire_format.h \ 181 google/protobuf/wire_format_lite.h \ 182 google/protobuf/wrappers.pb.h 183 184lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la 185 186libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS) 187libprotobuf_lite_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined 188if HAVE_LD_VERSION_SCRIPT 189libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map 190EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map 191endif 192libprotobuf_lite_la_SOURCES = \ 193 google/protobuf/any_lite.cc \ 194 google/protobuf/arena.cc \ 195 google/protobuf/arenastring.cc \ 196 google/protobuf/arenaz_sampler.cc \ 197 google/protobuf/extension_set.cc \ 198 google/protobuf/generated_enum_util.cc \ 199 google/protobuf/generated_message_tctable_lite.cc \ 200 google/protobuf/generated_message_util.cc \ 201 google/protobuf/implicit_weak_message.cc \ 202 google/protobuf/inlined_string_field.cc \ 203 google/protobuf/io/coded_stream.cc \ 204 google/protobuf/io/io_win32.cc \ 205 google/protobuf/io/strtod.cc \ 206 google/protobuf/io/zero_copy_stream.cc \ 207 google/protobuf/io/zero_copy_stream_impl.cc \ 208 google/protobuf/io/zero_copy_stream_impl_lite.cc \ 209 google/protobuf/map.cc \ 210 google/protobuf/message_lite.cc \ 211 google/protobuf/parse_context.cc \ 212 google/protobuf/repeated_field.cc \ 213 google/protobuf/repeated_ptr_field.cc \ 214 google/protobuf/string_member_robber.h \ 215 google/protobuf/stubs/bytestream.cc \ 216 google/protobuf/stubs/common.cc \ 217 google/protobuf/stubs/int128.cc \ 218 google/protobuf/stubs/int128.h \ 219 google/protobuf/stubs/mathutil.h \ 220 google/protobuf/stubs/status.cc \ 221 google/protobuf/stubs/status_macros.h \ 222 google/protobuf/stubs/statusor.cc \ 223 google/protobuf/stubs/statusor.h \ 224 google/protobuf/stubs/stringpiece.cc \ 225 google/protobuf/stubs/stringprintf.cc \ 226 google/protobuf/stubs/stringprintf.h \ 227 google/protobuf/stubs/structurally_valid.cc \ 228 google/protobuf/stubs/strutil.cc \ 229 google/protobuf/stubs/time.cc \ 230 google/protobuf/stubs/time.h \ 231 google/protobuf/wire_format_lite.cc 232 233libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS) 234libprotobuf_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined 235if HAVE_LD_VERSION_SCRIPT 236libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map 237EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map 238endif 239libprotobuf_la_SOURCES = \ 240 $(libprotobuf_lite_la_SOURCES) \ 241 google/protobuf/any.cc \ 242 google/protobuf/any.pb.cc \ 243 google/protobuf/api.pb.cc \ 244 google/protobuf/compiler/importer.cc \ 245 google/protobuf/compiler/parser.cc \ 246 google/protobuf/descriptor.cc \ 247 google/protobuf/descriptor.pb.cc \ 248 google/protobuf/descriptor_database.cc \ 249 google/protobuf/duration.pb.cc \ 250 google/protobuf/dynamic_message.cc \ 251 google/protobuf/empty.pb.cc \ 252 google/protobuf/extension_set_heavy.cc \ 253 google/protobuf/field_mask.pb.cc \ 254 google/protobuf/generated_message_bases.cc \ 255 google/protobuf/generated_message_reflection.cc \ 256 google/protobuf/generated_message_tctable_full.cc \ 257 google/protobuf/io/gzip_stream.cc \ 258 google/protobuf/io/printer.cc \ 259 google/protobuf/io/tokenizer.cc \ 260 google/protobuf/map_field.cc \ 261 google/protobuf/message.cc \ 262 google/protobuf/reflection_internal.h \ 263 google/protobuf/reflection_ops.cc \ 264 google/protobuf/service.cc \ 265 google/protobuf/source_context.pb.cc \ 266 google/protobuf/struct.pb.cc \ 267 google/protobuf/stubs/substitute.cc \ 268 google/protobuf/stubs/substitute.h \ 269 google/protobuf/text_format.cc \ 270 google/protobuf/timestamp.pb.cc \ 271 google/protobuf/type.pb.cc \ 272 google/protobuf/unknown_field_set.cc \ 273 google/protobuf/util/delimited_message_util.cc \ 274 google/protobuf/util/field_comparator.cc \ 275 google/protobuf/util/field_mask_util.cc \ 276 google/protobuf/util/internal/constants.h \ 277 google/protobuf/util/internal/datapiece.cc \ 278 google/protobuf/util/internal/datapiece.h \ 279 google/protobuf/util/internal/default_value_objectwriter.cc \ 280 google/protobuf/util/internal/default_value_objectwriter.h \ 281 google/protobuf/util/internal/error_listener.cc \ 282 google/protobuf/util/internal/error_listener.h \ 283 google/protobuf/util/internal/expecting_objectwriter.h \ 284 google/protobuf/util/internal/field_mask_utility.cc \ 285 google/protobuf/util/internal/field_mask_utility.h \ 286 google/protobuf/util/internal/json_escaping.cc \ 287 google/protobuf/util/internal/json_escaping.h \ 288 google/protobuf/util/internal/json_objectwriter.cc \ 289 google/protobuf/util/internal/json_objectwriter.h \ 290 google/protobuf/util/internal/json_stream_parser.cc \ 291 google/protobuf/util/internal/json_stream_parser.h \ 292 google/protobuf/util/internal/location_tracker.h \ 293 google/protobuf/util/internal/mock_error_listener.h \ 294 google/protobuf/util/internal/object_location_tracker.h \ 295 google/protobuf/util/internal/object_source.h \ 296 google/protobuf/util/internal/object_writer.cc \ 297 google/protobuf/util/internal/object_writer.h \ 298 google/protobuf/util/internal/proto_writer.cc \ 299 google/protobuf/util/internal/proto_writer.h \ 300 google/protobuf/util/internal/protostream_objectsource.cc \ 301 google/protobuf/util/internal/protostream_objectsource.h \ 302 google/protobuf/util/internal/protostream_objectwriter.cc \ 303 google/protobuf/util/internal/protostream_objectwriter.h \ 304 google/protobuf/util/internal/structured_objectwriter.h \ 305 google/protobuf/util/internal/type_info.cc \ 306 google/protobuf/util/internal/type_info.h \ 307 google/protobuf/util/internal/type_info_test_helper.h \ 308 google/protobuf/util/internal/utility.cc \ 309 google/protobuf/util/internal/utility.h \ 310 google/protobuf/util/json_util.cc \ 311 google/protobuf/util/message_differencer.cc \ 312 google/protobuf/util/time_util.cc \ 313 google/protobuf/util/type_resolver_util.cc \ 314 google/protobuf/wire_format.cc \ 315 google/protobuf/wrappers.pb.cc 316 317nodist_libprotobuf_la_SOURCES = $(nodist_libprotobuf_lite_la_SOURCES) 318 319libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la 320libprotoc_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined 321if HAVE_LD_VERSION_SCRIPT 322libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map 323EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map 324endif 325libprotoc_la_SOURCES = \ 326 google/protobuf/compiler/code_generator.cc \ 327 google/protobuf/compiler/command_line_interface.cc \ 328 google/protobuf/compiler/cpp/cpp_enum.cc \ 329 google/protobuf/compiler/cpp/cpp_enum.h \ 330 google/protobuf/compiler/cpp/cpp_enum_field.cc \ 331 google/protobuf/compiler/cpp/cpp_enum_field.h \ 332 google/protobuf/compiler/cpp/cpp_extension.cc \ 333 google/protobuf/compiler/cpp/cpp_extension.h \ 334 google/protobuf/compiler/cpp/cpp_field.cc \ 335 google/protobuf/compiler/cpp/cpp_field.h \ 336 google/protobuf/compiler/cpp/cpp_file.cc \ 337 google/protobuf/compiler/cpp/cpp_generator.cc \ 338 google/protobuf/compiler/cpp/cpp_helpers.cc \ 339 google/protobuf/compiler/cpp/cpp_map_field.cc \ 340 google/protobuf/compiler/cpp/cpp_map_field.h \ 341 google/protobuf/compiler/cpp/cpp_message.cc \ 342 google/protobuf/compiler/cpp/cpp_message.h \ 343 google/protobuf/compiler/cpp/cpp_message_field.cc \ 344 google/protobuf/compiler/cpp/cpp_message_field.h \ 345 google/protobuf/compiler/cpp/cpp_message_layout_helper.h \ 346 google/protobuf/compiler/cpp/cpp_options.h \ 347 google/protobuf/compiler/cpp/cpp_padding_optimizer.cc \ 348 google/protobuf/compiler/cpp/cpp_padding_optimizer.h \ 349 google/protobuf/compiler/cpp/cpp_parse_function_generator.cc \ 350 google/protobuf/compiler/cpp/cpp_parse_function_generator.h \ 351 google/protobuf/compiler/cpp/cpp_primitive_field.cc \ 352 google/protobuf/compiler/cpp/cpp_primitive_field.h \ 353 google/protobuf/compiler/cpp/cpp_service.cc \ 354 google/protobuf/compiler/cpp/cpp_service.h \ 355 google/protobuf/compiler/cpp/cpp_string_field.cc \ 356 google/protobuf/compiler/cpp/cpp_string_field.h \ 357 google/protobuf/compiler/csharp/csharp_doc_comment.cc \ 358 google/protobuf/compiler/csharp/csharp_enum.cc \ 359 google/protobuf/compiler/csharp/csharp_enum.h \ 360 google/protobuf/compiler/csharp/csharp_enum_field.cc \ 361 google/protobuf/compiler/csharp/csharp_enum_field.h \ 362 google/protobuf/compiler/csharp/csharp_field_base.cc \ 363 google/protobuf/compiler/csharp/csharp_field_base.h \ 364 google/protobuf/compiler/csharp/csharp_generator.cc \ 365 google/protobuf/compiler/csharp/csharp_helpers.cc \ 366 google/protobuf/compiler/csharp/csharp_helpers.h \ 367 google/protobuf/compiler/csharp/csharp_map_field.cc \ 368 google/protobuf/compiler/csharp/csharp_map_field.h \ 369 google/protobuf/compiler/csharp/csharp_message.cc \ 370 google/protobuf/compiler/csharp/csharp_message.h \ 371 google/protobuf/compiler/csharp/csharp_message_field.cc \ 372 google/protobuf/compiler/csharp/csharp_message_field.h \ 373 google/protobuf/compiler/csharp/csharp_primitive_field.cc \ 374 google/protobuf/compiler/csharp/csharp_primitive_field.h \ 375 google/protobuf/compiler/csharp/csharp_reflection_class.cc \ 376 google/protobuf/compiler/csharp/csharp_reflection_class.h \ 377 google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc \ 378 google/protobuf/compiler/csharp/csharp_repeated_enum_field.h \ 379 google/protobuf/compiler/csharp/csharp_repeated_message_field.cc \ 380 google/protobuf/compiler/csharp/csharp_repeated_message_field.h \ 381 google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc \ 382 google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h \ 383 google/protobuf/compiler/csharp/csharp_source_generator_base.cc \ 384 google/protobuf/compiler/csharp/csharp_source_generator_base.h \ 385 google/protobuf/compiler/csharp/csharp_wrapper_field.cc \ 386 google/protobuf/compiler/csharp/csharp_wrapper_field.h \ 387 google/protobuf/compiler/java/java_context.cc \ 388 google/protobuf/compiler/java/java_context.h \ 389 google/protobuf/compiler/java/java_doc_comment.cc \ 390 google/protobuf/compiler/java/java_doc_comment.h \ 391 google/protobuf/compiler/java/java_enum.cc \ 392 google/protobuf/compiler/java/java_enum.h \ 393 google/protobuf/compiler/java/java_enum_field.cc \ 394 google/protobuf/compiler/java/java_enum_field.h \ 395 google/protobuf/compiler/java/java_enum_field_lite.cc \ 396 google/protobuf/compiler/java/java_enum_field_lite.h \ 397 google/protobuf/compiler/java/java_enum_lite.cc \ 398 google/protobuf/compiler/java/java_enum_lite.h \ 399 google/protobuf/compiler/java/java_extension.cc \ 400 google/protobuf/compiler/java/java_extension.h \ 401 google/protobuf/compiler/java/java_extension_lite.cc \ 402 google/protobuf/compiler/java/java_extension_lite.h \ 403 google/protobuf/compiler/java/java_field.cc \ 404 google/protobuf/compiler/java/java_field.h \ 405 google/protobuf/compiler/java/java_file.cc \ 406 google/protobuf/compiler/java/java_file.h \ 407 google/protobuf/compiler/java/java_generator.cc \ 408 google/protobuf/compiler/java/java_generator_factory.cc \ 409 google/protobuf/compiler/java/java_generator_factory.h \ 410 google/protobuf/compiler/java/java_helpers.cc \ 411 google/protobuf/compiler/java/java_helpers.h \ 412 google/protobuf/compiler/java/java_kotlin_generator.cc \ 413 google/protobuf/compiler/java/java_map_field.cc \ 414 google/protobuf/compiler/java/java_map_field.h \ 415 google/protobuf/compiler/java/java_map_field_lite.cc \ 416 google/protobuf/compiler/java/java_map_field_lite.h \ 417 google/protobuf/compiler/java/java_message.cc \ 418 google/protobuf/compiler/java/java_message.h \ 419 google/protobuf/compiler/java/java_message_builder.cc \ 420 google/protobuf/compiler/java/java_message_builder.h \ 421 google/protobuf/compiler/java/java_message_builder_lite.cc \ 422 google/protobuf/compiler/java/java_message_builder_lite.h \ 423 google/protobuf/compiler/java/java_message_field.cc \ 424 google/protobuf/compiler/java/java_message_field.h \ 425 google/protobuf/compiler/java/java_message_field_lite.cc \ 426 google/protobuf/compiler/java/java_message_field_lite.h \ 427 google/protobuf/compiler/java/java_message_lite.cc \ 428 google/protobuf/compiler/java/java_message_lite.h \ 429 google/protobuf/compiler/java/java_name_resolver.cc \ 430 google/protobuf/compiler/java/java_name_resolver.h \ 431 google/protobuf/compiler/java/java_options.h \ 432 google/protobuf/compiler/java/java_primitive_field.cc \ 433 google/protobuf/compiler/java/java_primitive_field.h \ 434 google/protobuf/compiler/java/java_primitive_field_lite.cc \ 435 google/protobuf/compiler/java/java_primitive_field_lite.h \ 436 google/protobuf/compiler/java/java_service.cc \ 437 google/protobuf/compiler/java/java_service.h \ 438 google/protobuf/compiler/java/java_shared_code_generator.cc \ 439 google/protobuf/compiler/java/java_shared_code_generator.h \ 440 google/protobuf/compiler/java/java_string_field.cc \ 441 google/protobuf/compiler/java/java_string_field.h \ 442 google/protobuf/compiler/java/java_string_field_lite.cc \ 443 google/protobuf/compiler/java/java_string_field_lite.h \ 444 google/protobuf/compiler/js/js_generator.cc \ 445 google/protobuf/compiler/js/well_known_types_embed.cc \ 446 google/protobuf/compiler/js/well_known_types_embed.h \ 447 google/protobuf/compiler/objectivec/objectivec_enum.cc \ 448 google/protobuf/compiler/objectivec/objectivec_enum.h \ 449 google/protobuf/compiler/objectivec/objectivec_enum_field.cc \ 450 google/protobuf/compiler/objectivec/objectivec_enum_field.h \ 451 google/protobuf/compiler/objectivec/objectivec_extension.cc \ 452 google/protobuf/compiler/objectivec/objectivec_extension.h \ 453 google/protobuf/compiler/objectivec/objectivec_field.cc \ 454 google/protobuf/compiler/objectivec/objectivec_field.h \ 455 google/protobuf/compiler/objectivec/objectivec_file.cc \ 456 google/protobuf/compiler/objectivec/objectivec_file.h \ 457 google/protobuf/compiler/objectivec/objectivec_generator.cc \ 458 google/protobuf/compiler/objectivec/objectivec_helpers.cc \ 459 google/protobuf/compiler/objectivec/objectivec_map_field.cc \ 460 google/protobuf/compiler/objectivec/objectivec_map_field.h \ 461 google/protobuf/compiler/objectivec/objectivec_message.cc \ 462 google/protobuf/compiler/objectivec/objectivec_message.h \ 463 google/protobuf/compiler/objectivec/objectivec_message_field.cc \ 464 google/protobuf/compiler/objectivec/objectivec_message_field.h \ 465 google/protobuf/compiler/objectivec/objectivec_nsobject_methods.h \ 466 google/protobuf/compiler/objectivec/objectivec_oneof.cc \ 467 google/protobuf/compiler/objectivec/objectivec_oneof.h \ 468 google/protobuf/compiler/objectivec/objectivec_primitive_field.cc \ 469 google/protobuf/compiler/objectivec/objectivec_primitive_field.h \ 470 google/protobuf/compiler/php/php_generator.cc \ 471 google/protobuf/compiler/plugin.cc \ 472 google/protobuf/compiler/plugin.pb.cc \ 473 google/protobuf/compiler/python/python_generator.cc \ 474 google/protobuf/compiler/python/python_helpers.cc \ 475 google/protobuf/compiler/python/python_helpers.h \ 476 google/protobuf/compiler/python/python_pyi_generator.cc \ 477 google/protobuf/compiler/ruby/ruby_generator.cc \ 478 google/protobuf/compiler/scc.h \ 479 google/protobuf/compiler/subprocess.cc \ 480 google/protobuf/compiler/subprocess.h \ 481 google/protobuf/compiler/zip_writer.cc \ 482 google/protobuf/compiler/zip_writer.h 483 484bin_PROGRAMS = protoc 485protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la 486protoc_SOURCES = google/protobuf/compiler/main.cc 487 488# Tests ============================================================== 489 490protoc_inputs = \ 491 google/protobuf/any_test.proto \ 492 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto \ 493 google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto \ 494 google/protobuf/map_lite_unittest.proto \ 495 google/protobuf/map_proto2_unittest.proto \ 496 google/protobuf/map_unittest.proto \ 497 google/protobuf/unittest.proto \ 498 google/protobuf/unittest_arena.proto \ 499 google/protobuf/unittest_custom_options.proto \ 500 google/protobuf/unittest_drop_unknown_fields.proto \ 501 google/protobuf/unittest_embed_optimize_for.proto \ 502 google/protobuf/unittest_empty.proto \ 503 google/protobuf/unittest_enormous_descriptor.proto \ 504 google/protobuf/unittest_import.proto \ 505 google/protobuf/unittest_import_lite.proto \ 506 google/protobuf/unittest_import_public.proto \ 507 google/protobuf/unittest_import_public_lite.proto \ 508 google/protobuf/unittest_lazy_dependencies.proto \ 509 google/protobuf/unittest_lazy_dependencies_custom_option.proto \ 510 google/protobuf/unittest_lazy_dependencies_enum.proto \ 511 google/protobuf/unittest_lite.proto \ 512 google/protobuf/unittest_lite_imports_nonlite.proto \ 513 google/protobuf/unittest_mset.proto \ 514 google/protobuf/unittest_mset_wire_format.proto \ 515 google/protobuf/unittest_no_field_presence.proto \ 516 google/protobuf/unittest_no_generic_services.proto \ 517 google/protobuf/unittest_optimize_for.proto \ 518 google/protobuf/unittest_preserve_unknown_enum.proto \ 519 google/protobuf/unittest_preserve_unknown_enum2.proto \ 520 google/protobuf/unittest_proto3.proto \ 521 google/protobuf/unittest_proto3_arena.proto \ 522 google/protobuf/unittest_proto3_arena_lite.proto \ 523 google/protobuf/unittest_proto3_lite.proto \ 524 google/protobuf/unittest_proto3_optional.proto \ 525 google/protobuf/unittest_well_known_types.proto \ 526 google/protobuf/util/internal/testdata/anys.proto \ 527 google/protobuf/util/internal/testdata/books.proto \ 528 google/protobuf/util/internal/testdata/default_value.proto \ 529 google/protobuf/util/internal/testdata/default_value_test.proto \ 530 google/protobuf/util/internal/testdata/field_mask.proto \ 531 google/protobuf/util/internal/testdata/maps.proto \ 532 google/protobuf/util/internal/testdata/oneofs.proto \ 533 google/protobuf/util/internal/testdata/proto3.proto \ 534 google/protobuf/util/internal/testdata/struct.proto \ 535 google/protobuf/util/internal/testdata/timestamp_duration.proto \ 536 google/protobuf/util/internal/testdata/wrappers.proto \ 537 google/protobuf/util/json_format.proto \ 538 google/protobuf/util/json_format_proto3.proto \ 539 google/protobuf/util/message_differencer_unittest.proto 540 541EXTRA_DIST = \ 542 $(protoc_inputs) \ 543 README.md \ 544 google/protobuf/compiler/package_info.h \ 545 google/protobuf/compiler/ruby/ruby_generated_code.proto \ 546 google/protobuf/compiler/ruby/ruby_generated_code_pb.rb \ 547 google/protobuf/compiler/ruby/ruby_generated_code_proto2.proto \ 548 google/protobuf/compiler/ruby/ruby_generated_code_proto2_import.proto \ 549 google/protobuf/compiler/ruby/ruby_generated_code_proto2_pb.rb \ 550 google/protobuf/compiler/ruby/ruby_generated_pkg_explicit.proto \ 551 google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy.proto \ 552 google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb \ 553 google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb \ 554 google/protobuf/compiler/ruby/ruby_generated_pkg_implicit.proto \ 555 google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb \ 556 google/protobuf/compiler/zip_output_unittest.sh \ 557 google/protobuf/io/gzip_stream.h \ 558 google/protobuf/io/gzip_stream_unittest.sh \ 559 google/protobuf/io/package_info.h \ 560 google/protobuf/package_info.h \ 561 google/protobuf/test_messages_proto2.proto \ 562 google/protobuf/test_messages_proto3.proto \ 563 google/protobuf/testdata/bad_utf8_string \ 564 google/protobuf/testdata/golden_message \ 565 google/protobuf/testdata/golden_message_maps \ 566 google/protobuf/testdata/golden_message_oneof_implemented \ 567 google/protobuf/testdata/golden_message_proto3 \ 568 google/protobuf/testdata/golden_packed_fields_message \ 569 google/protobuf/testdata/map_test_data.txt \ 570 google/protobuf/testdata/text_format_unittest_data.txt \ 571 google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt \ 572 google/protobuf/testdata/text_format_unittest_data_pointy.txt \ 573 google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt \ 574 google/protobuf/testdata/text_format_unittest_extensions_data.txt \ 575 google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \ 576 google/protobuf/util/package_info.h \ 577 libprotobuf-lite.map \ 578 libprotobuf.map \ 579 libprotoc.map \ 580 solaris/libstdc++.la 581 582protoc_lite_outputs = \ 583 google/protobuf/map_lite_unittest.pb.cc \ 584 google/protobuf/map_lite_unittest.pb.h \ 585 google/protobuf/unittest_import_lite.pb.cc \ 586 google/protobuf/unittest_import_lite.pb.h \ 587 google/protobuf/unittest_import_public_lite.pb.cc \ 588 google/protobuf/unittest_import_public_lite.pb.h \ 589 google/protobuf/unittest_lite.pb.cc \ 590 google/protobuf/unittest_lite.pb.h 591 592protoc_outputs = \ 593 $(protoc_lite_outputs) \ 594 google/protobuf/any_test.pb.cc \ 595 google/protobuf/any_test.pb.h \ 596 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \ 597 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h \ 598 google/protobuf/compiler/cpp/cpp_test_large_enum_value.pb.cc \ 599 google/protobuf/compiler/cpp/cpp_test_large_enum_value.pb.h \ 600 google/protobuf/map_proto2_unittest.pb.cc \ 601 google/protobuf/map_proto2_unittest.pb.h \ 602 google/protobuf/map_unittest.pb.cc \ 603 google/protobuf/map_unittest.pb.h \ 604 google/protobuf/unittest.pb.cc \ 605 google/protobuf/unittest.pb.h \ 606 google/protobuf/unittest_arena.pb.cc \ 607 google/protobuf/unittest_arena.pb.h \ 608 google/protobuf/unittest_custom_options.pb.cc \ 609 google/protobuf/unittest_custom_options.pb.h \ 610 google/protobuf/unittest_drop_unknown_fields.pb.cc \ 611 google/protobuf/unittest_drop_unknown_fields.pb.h \ 612 google/protobuf/unittest_embed_optimize_for.pb.cc \ 613 google/protobuf/unittest_embed_optimize_for.pb.h \ 614 google/protobuf/unittest_empty.pb.cc \ 615 google/protobuf/unittest_empty.pb.h \ 616 google/protobuf/unittest_enormous_descriptor.pb.cc \ 617 google/protobuf/unittest_enormous_descriptor.pb.h \ 618 google/protobuf/unittest_import.pb.cc \ 619 google/protobuf/unittest_import.pb.h \ 620 google/protobuf/unittest_import_public.pb.cc \ 621 google/protobuf/unittest_import_public.pb.h \ 622 google/protobuf/unittest_lazy_dependencies.pb.cc \ 623 google/protobuf/unittest_lazy_dependencies.pb.h \ 624 google/protobuf/unittest_lazy_dependencies_custom_option.pb.cc \ 625 google/protobuf/unittest_lazy_dependencies_custom_option.pb.h \ 626 google/protobuf/unittest_lazy_dependencies_enum.pb.cc \ 627 google/protobuf/unittest_lazy_dependencies_enum.pb.h \ 628 google/protobuf/unittest_lite_imports_nonlite.pb.cc \ 629 google/protobuf/unittest_lite_imports_nonlite.pb.h \ 630 google/protobuf/unittest_mset.pb.cc \ 631 google/protobuf/unittest_mset.pb.h \ 632 google/protobuf/unittest_mset_wire_format.pb.cc \ 633 google/protobuf/unittest_mset_wire_format.pb.h \ 634 google/protobuf/unittest_no_field_presence.pb.cc \ 635 google/protobuf/unittest_no_field_presence.pb.h \ 636 google/protobuf/unittest_no_generic_services.pb.cc \ 637 google/protobuf/unittest_no_generic_services.pb.h \ 638 google/protobuf/unittest_optimize_for.pb.cc \ 639 google/protobuf/unittest_optimize_for.pb.h \ 640 google/protobuf/unittest_preserve_unknown_enum.pb.cc \ 641 google/protobuf/unittest_preserve_unknown_enum.pb.h \ 642 google/protobuf/unittest_preserve_unknown_enum2.pb.cc \ 643 google/protobuf/unittest_preserve_unknown_enum2.pb.h \ 644 google/protobuf/unittest_proto3.pb.cc \ 645 google/protobuf/unittest_proto3.pb.h \ 646 google/protobuf/unittest_proto3_arena.pb.cc \ 647 google/protobuf/unittest_proto3_arena.pb.h \ 648 google/protobuf/unittest_proto3_arena_lite.pb.cc \ 649 google/protobuf/unittest_proto3_arena_lite.pb.h \ 650 google/protobuf/unittest_proto3_lite.pb.cc \ 651 google/protobuf/unittest_proto3_lite.pb.h \ 652 google/protobuf/unittest_proto3_optional.pb.cc \ 653 google/protobuf/unittest_proto3_optional.pb.h \ 654 google/protobuf/unittest_well_known_types.pb.cc \ 655 google/protobuf/unittest_well_known_types.pb.h \ 656 google/protobuf/util/internal/testdata/anys.pb.cc \ 657 google/protobuf/util/internal/testdata/anys.pb.h \ 658 google/protobuf/util/internal/testdata/books.pb.cc \ 659 google/protobuf/util/internal/testdata/books.pb.h \ 660 google/protobuf/util/internal/testdata/default_value.pb.cc \ 661 google/protobuf/util/internal/testdata/default_value.pb.h \ 662 google/protobuf/util/internal/testdata/default_value_test.pb.cc \ 663 google/protobuf/util/internal/testdata/default_value_test.pb.h \ 664 google/protobuf/util/internal/testdata/field_mask.pb.cc \ 665 google/protobuf/util/internal/testdata/field_mask.pb.h \ 666 google/protobuf/util/internal/testdata/maps.pb.cc \ 667 google/protobuf/util/internal/testdata/maps.pb.h \ 668 google/protobuf/util/internal/testdata/oneofs.pb.cc \ 669 google/protobuf/util/internal/testdata/oneofs.pb.h \ 670 google/protobuf/util/internal/testdata/proto3.pb.cc \ 671 google/protobuf/util/internal/testdata/proto3.pb.h \ 672 google/protobuf/util/internal/testdata/struct.pb.cc \ 673 google/protobuf/util/internal/testdata/struct.pb.h \ 674 google/protobuf/util/internal/testdata/timestamp_duration.pb.cc \ 675 google/protobuf/util/internal/testdata/timestamp_duration.pb.h \ 676 google/protobuf/util/internal/testdata/wrappers.pb.cc \ 677 google/protobuf/util/internal/testdata/wrappers.pb.h \ 678 google/protobuf/util/json_format.pb.cc \ 679 google/protobuf/util/json_format.pb.h \ 680 google/protobuf/util/json_format_proto3.pb.cc \ 681 google/protobuf/util/json_format_proto3.pb.h \ 682 google/protobuf/util/message_differencer_unittest.pb.cc \ 683 google/protobuf/util/message_differencer_unittest.pb.h 684 685if USE_EXTERNAL_PROTOC 686 687unittest_proto_middleman: $(protoc_inputs) 688 $(PROTOC) -I$(srcdir) --cpp_out=. $^ 689 touch unittest_proto_middleman 690 691else 692 693# We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is 694# relative to srcdir, which may not be the same as the current directory when 695# building out-of-tree. 696unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs) 697 oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) --experimental_allow_proto3_optional ) 698 touch unittest_proto_middleman 699 700endif 701 702$(protoc_outputs): unittest_proto_middleman 703 704COMMON_TEST_SOURCES = \ 705 $(COMMON_LITE_TEST_SOURCES) \ 706 google/protobuf/compiler/cpp/cpp_unittest.h \ 707 google/protobuf/map_test_util.h \ 708 google/protobuf/map_test_util.inc \ 709 google/protobuf/reflection_tester.cc \ 710 google/protobuf/reflection_tester.h \ 711 google/protobuf/test_util.cc \ 712 google/protobuf/test_util.h \ 713 google/protobuf/test_util.inc \ 714 google/protobuf/test_util2.h \ 715 google/protobuf/testing/file.cc \ 716 google/protobuf/testing/file.h \ 717 google/protobuf/testing/googletest.cc \ 718 google/protobuf/testing/googletest.h 719 720GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest 721GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock 722GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest 723GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock 724check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ 725 protobuf-lite-test test_plugin protobuf-lite-arena-test \ 726 no-warning-test $(GZCHECKPROGRAMS) 727protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ 728 $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ 729 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ 730 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la 731protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \ 732 -I$(GOOGLEMOCK_SRC_DIR)/include 733# Disable optimization for tests unless the user explicitly asked for it, 734# since test_util.cc takes forever to compile with optimization (with GCC). 735# See configure.ac for more info. 736protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) 737protobuf_test_SOURCES = \ 738 $(COMMON_TEST_SOURCES) \ 739 google/protobuf/any_test.cc \ 740 google/protobuf/arena_unittest.cc \ 741 google/protobuf/arenastring_unittest.cc \ 742 google/protobuf/arenaz_sampler_test.cc \ 743 google/protobuf/compiler/annotation_test_util.cc \ 744 google/protobuf/compiler/annotation_test_util.h \ 745 google/protobuf/compiler/command_line_interface_unittest.cc \ 746 google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \ 747 google/protobuf/compiler/cpp/cpp_move_unittest.cc \ 748 google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \ 749 google/protobuf/compiler/cpp/cpp_unittest.cc \ 750 google/protobuf/compiler/cpp/cpp_unittest.inc \ 751 google/protobuf/compiler/cpp/metadata_test.cc \ 752 google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc \ 753 google/protobuf/compiler/csharp/csharp_generator_unittest.cc \ 754 google/protobuf/compiler/importer_unittest.cc \ 755 google/protobuf/compiler/java/java_doc_comment_unittest.cc \ 756 google/protobuf/compiler/java/java_plugin_unittest.cc \ 757 google/protobuf/compiler/mock_code_generator.cc \ 758 google/protobuf/compiler/mock_code_generator.h \ 759 google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc \ 760 google/protobuf/compiler/parser_unittest.cc \ 761 google/protobuf/compiler/python/python_plugin_unittest.cc \ 762 google/protobuf/compiler/ruby/ruby_generator_unittest.cc \ 763 google/protobuf/descriptor_database_unittest.cc \ 764 google/protobuf/descriptor_unittest.cc \ 765 google/protobuf/drop_unknown_fields_test.cc \ 766 google/protobuf/dynamic_message_unittest.cc \ 767 google/protobuf/extension_set_unittest.cc \ 768 google/protobuf/generated_message_reflection_unittest.cc \ 769 google/protobuf/generated_message_tctable_lite_test.cc \ 770 google/protobuf/inlined_string_field_unittest.cc \ 771 google/protobuf/io/coded_stream_unittest.cc \ 772 google/protobuf/io/io_win32_unittest.cc \ 773 google/protobuf/io/printer_unittest.cc \ 774 google/protobuf/io/tokenizer_unittest.cc \ 775 google/protobuf/io/zero_copy_stream_unittest.cc \ 776 google/protobuf/map_field_test.cc \ 777 google/protobuf/map_test.cc \ 778 google/protobuf/map_test.inc \ 779 google/protobuf/message_unittest.cc \ 780 google/protobuf/message_unittest.inc \ 781 google/protobuf/no_field_presence_test.cc \ 782 google/protobuf/preserve_unknown_enum_test.cc \ 783 google/protobuf/proto3_arena_lite_unittest.cc \ 784 google/protobuf/proto3_arena_unittest.cc \ 785 google/protobuf/proto3_lite_unittest.cc \ 786 google/protobuf/proto3_lite_unittest.inc \ 787 google/protobuf/reflection_ops_unittest.cc \ 788 google/protobuf/repeated_field_reflection_unittest.cc \ 789 google/protobuf/repeated_field_unittest.cc \ 790 google/protobuf/stubs/bytestream_unittest.cc \ 791 google/protobuf/stubs/common_unittest.cc \ 792 google/protobuf/stubs/int128_unittest.cc \ 793 google/protobuf/stubs/status_test.cc \ 794 google/protobuf/stubs/statusor_test.cc \ 795 google/protobuf/stubs/stringpiece_unittest.cc \ 796 google/protobuf/stubs/stringprintf_unittest.cc \ 797 google/protobuf/stubs/structurally_valid_unittest.cc \ 798 google/protobuf/stubs/strutil_unittest.cc \ 799 google/protobuf/stubs/template_util_unittest.cc \ 800 google/protobuf/stubs/time_test.cc \ 801 google/protobuf/text_format_unittest.cc \ 802 google/protobuf/unknown_field_set_unittest.cc \ 803 google/protobuf/util/delimited_message_util_test.cc \ 804 google/protobuf/util/field_comparator_test.cc \ 805 google/protobuf/util/field_mask_util_test.cc \ 806 google/protobuf/util/internal/default_value_objectwriter_test.cc \ 807 google/protobuf/util/internal/json_objectwriter_test.cc \ 808 google/protobuf/util/internal/json_stream_parser_test.cc \ 809 google/protobuf/util/internal/protostream_objectsource_test.cc \ 810 google/protobuf/util/internal/protostream_objectwriter_test.cc \ 811 google/protobuf/util/internal/type_info_test_helper.cc \ 812 google/protobuf/util/json_util_test.cc \ 813 google/protobuf/util/message_differencer_unittest.cc \ 814 google/protobuf/util/time_util_test.cc \ 815 google/protobuf/util/type_resolver_util_test.cc \ 816 google/protobuf/well_known_types_unittest.cc \ 817 google/protobuf/wire_format_unittest.cc \ 818 google/protobuf/wire_format_unittest.inc 819 820nodist_protobuf_test_SOURCES = $(protoc_outputs) 821$(am_protobuf_test_OBJECTS): unittest_proto_middleman 822 823# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. 824protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ 825 libprotoc.la \ 826 $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ 827 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ 828 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la 829protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ 830 -I$(GOOGLETEST_SRC_DIR)/include \ 831 -DPROTOBUF_TEST_NO_DESCRIPTORS 832protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) 833protobuf_lazy_descriptor_test_SOURCES = \ 834 google/protobuf/compiler/cpp/cpp_unittest.cc \ 835 $(COMMON_TEST_SOURCES) 836nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs) 837$(am_protobuf_lazy_descriptor_test_OBJECTS): unittest_proto_middleman 838 839COMMON_LITE_TEST_SOURCES = \ 840 google/protobuf/arena_test_util.cc \ 841 google/protobuf/arena_test_util.h \ 842 google/protobuf/map_lite_test_util.cc \ 843 google/protobuf/map_lite_test_util.h \ 844 google/protobuf/map_test_util_impl.h \ 845 google/protobuf/test_util_lite.cc \ 846 google/protobuf/test_util_lite.h 847 848# Build lite_unittest separately, since it doesn't use gtest. It can't 849# depend on gtest because our internal version of gtest depend on proto 850# full runtime and we want to make sure this test builds without full 851# runtime. 852protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ 853 $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ 854 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ 855 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la 856protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \ 857 -I$(GOOGLETEST_SRC_DIR)/include 858protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) 859protobuf_lite_test_SOURCES = \ 860 google/protobuf/lite_unittest.cc \ 861 $(COMMON_LITE_TEST_SOURCES) 862nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs) 863$(am_protobuf_lite_test_OBJECTS): unittest_proto_middleman 864 865# lite_arena_unittest depends on gtest because teboring@ found that without 866# gtest when building the test internally our memory sanitizer doesn't detect 867# memory leaks (don't know why). 868protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ 869 $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ 870 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ 871 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la 872protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ 873 -I$(GOOGLETEST_SRC_DIR)/include 874protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) 875protobuf_lite_arena_test_SOURCES = \ 876 google/protobuf/lite_arena_unittest.cc \ 877 $(COMMON_LITE_TEST_SOURCES) 878nodist_protobuf_lite_arena_test_SOURCES = $(protoc_lite_outputs) 879$(am_protobuf_lite_arena_test_OBJECTS): unittest_proto_middleman 880 881# Test plugin binary. 882test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ 883 $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la 884test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include 885test_plugin_SOURCES = \ 886 google/protobuf/compiler/mock_code_generator.cc \ 887 google/protobuf/compiler/test_plugin.cc \ 888 google/protobuf/testing/file.cc \ 889 google/protobuf/testing/file.h 890 891if HAVE_ZLIB 892zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la 893zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc 894 895zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la 896zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc 897endif 898 899# This test target is to ensure all our public header files and generated 900# code is free from warnings. We have to be more pedantic about these 901# files because they are compiled by users with different compiler flags. 902no_warning_test.cc: 903 echo "// Generated from Makefile.am" > no_warning_test.cc 904 for FILE in $(nobase_include_HEADERS); do \ 905 case $$FILE in *.inc) continue;; esac; \ 906 echo "#include <$${FILE}>" >> no_warning_test.cc; \ 907 done 908 echo "int main(int, char**) { return 0; }" >> no_warning_test.cc 909 910no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la 911no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \ 912 -Wall -Wextra -Werror -Wno-unused-parameter 913nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs) 914 915TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \ 916 google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \ 917 protobuf-lite-arena-test no-warning-test 918