diff options
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 231 |
1 files changed, 110 insertions, 121 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 8c25a10a..b8648049 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -37,17 +37,17 @@ protodir = $(includedir) # If you are adding new files here, also remember to change the build files for # all other languages, //protoc-artifacts/build-zip.sh and run # //update_file_list.sh for bazel. -nobase_dist_proto_DATA = google/protobuf/descriptor.proto \ - google/protobuf/any.proto \ - google/protobuf/api.proto \ - google/protobuf/duration.proto \ - google/protobuf/empty.proto \ - google/protobuf/field_mask.proto \ - google/protobuf/source_context.proto \ - google/protobuf/struct.proto \ - google/protobuf/timestamp.proto \ - google/protobuf/type.proto \ - google/protobuf/wrappers.proto \ +nobase_dist_proto_DATA = google/protobuf/descriptor.proto \ + google/protobuf/any.proto \ + google/protobuf/api.proto \ + google/protobuf/duration.proto \ + google/protobuf/empty.proto \ + google/protobuf/field_mask.proto \ + google/protobuf/source_context.proto \ + google/protobuf/struct.proto \ + google/protobuf/timestamp.proto \ + google/protobuf/type.proto \ + google/protobuf/wrappers.proto \ google/protobuf/compiler/plugin.proto # Not sure why these don't get cleaned automatically. @@ -56,29 +56,12 @@ clean-local: CLEANFILES = $(protoc_outputs) unittest_proto_middleman \ testzip.jar testzip.list testzip.proto testzip.zip \ - no_warning_test.cc \ - google/protobuf/compiler/js/well_known_types_embed.cc \ - js_embed$(EXEEXT) + no_warning_test.cc MAINTAINERCLEANFILES = \ Makefile.in nobase_include_HEADERS = \ - google/protobuf/stubs/atomic_sequence_num.h \ - google/protobuf/stubs/atomicops.h \ - google/protobuf/stubs/atomicops_internals_power.h \ - google/protobuf/stubs/atomicops_internals_ppc_gcc.h \ - google/protobuf/stubs/atomicops_internals_arm64_gcc.h \ - google/protobuf/stubs/atomicops_internals_arm_gcc.h \ - google/protobuf/stubs/atomicops_internals_arm_qnx.h \ - google/protobuf/stubs/atomicops_internals_atomicword_compat.h \ - google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h \ - google/protobuf/stubs/atomicops_internals_generic_gcc.h \ - google/protobuf/stubs/atomicops_internals_mips_gcc.h \ - google/protobuf/stubs/atomicops_internals_solaris.h \ - google/protobuf/stubs/atomicops_internals_tsan.h \ - google/protobuf/stubs/atomicops_internals_x86_gcc.h \ - google/protobuf/stubs/atomicops_internals_x86_msvc.h \ google/protobuf/stubs/callback.h \ google/protobuf/stubs/bytestream.h \ google/protobuf/stubs/casts.h \ @@ -91,18 +74,16 @@ nobase_include_HEADERS = \ google/protobuf/stubs/once.h \ google/protobuf/stubs/platform_macros.h \ google/protobuf/stubs/port.h \ - google/protobuf/stubs/scoped_ptr.h \ - google/protobuf/stubs/shared_ptr.h \ google/protobuf/stubs/singleton.h \ google/protobuf/stubs/status.h \ google/protobuf/stubs/stl_util.h \ google/protobuf/stubs/stringpiece.h \ google/protobuf/stubs/template_util.h \ - google/protobuf/stubs/type_traits.h \ google/protobuf/any.pb.h \ google/protobuf/api.pb.h \ google/protobuf/any.h \ google/protobuf/arena.h \ + google/protobuf/arena_impl.h \ google/protobuf/arenastring.h \ google/protobuf/descriptor_database.h \ google/protobuf/descriptor.h \ @@ -115,8 +96,11 @@ nobase_include_HEADERS = \ google/protobuf/generated_enum_reflection.h \ google/protobuf/generated_enum_util.h \ google/protobuf/generated_message_reflection.h \ + google/protobuf/generated_message_table_driven.h \ google/protobuf/generated_message_util.h \ google/protobuf/has_bits.h \ + google/protobuf/implicit_weak_message.h \ + google/protobuf/inlined_string_field.h \ google/protobuf/map_entry.h \ google/protobuf/map_entry_lite.h \ google/protobuf/map_field.h \ @@ -127,6 +111,7 @@ nobase_include_HEADERS = \ google/protobuf/message.h \ google/protobuf/message_lite.h \ google/protobuf/metadata.h \ + google/protobuf/metadata_lite.h \ google/protobuf/reflection.h \ google/protobuf/reflection_ops.h \ google/protobuf/repeated_field.h \ @@ -160,7 +145,6 @@ nobase_include_HEADERS = \ google/protobuf/compiler/csharp/csharp_names.h \ google/protobuf/compiler/java/java_generator.h \ google/protobuf/compiler/java/java_names.h \ - google/protobuf/compiler/javanano/javanano_generator.h \ google/protobuf/compiler/js/js_generator.h \ google/protobuf/compiler/js/well_known_types_embed.h \ google/protobuf/compiler/objectivec/objectivec_generator.h \ @@ -169,6 +153,7 @@ nobase_include_HEADERS = \ google/protobuf/compiler/python/python_generator.h \ google/protobuf/compiler/ruby/ruby_generator.h \ google/protobuf/util/type_resolver.h \ + google/protobuf/util/delimited_message_util.h \ google/protobuf/util/field_comparator.h \ google/protobuf/util/field_mask_util.h \ google/protobuf/util/json_util.h \ @@ -179,20 +164,22 @@ nobase_include_HEADERS = \ lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) -libprotobuf_lite_la_LDFLAGS = -version-info 12:0:0 -export-dynamic -no-undefined +libprotobuf_lite_la_LDFLAGS = -version-info 15:1:0 -export-dynamic -no-undefined +if HAVE_LD_VERSION_SCRIPT +libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map +EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map +endif libprotobuf_lite_la_SOURCES = \ - google/protobuf/stubs/atomicops_internals_x86_gcc.cc \ - google/protobuf/stubs/atomicops_internals_x86_msvc.cc \ google/protobuf/stubs/bytestream.cc \ google/protobuf/stubs/bytestream.h \ google/protobuf/stubs/common.cc \ google/protobuf/stubs/hash.h \ google/protobuf/stubs/int128.cc \ google/protobuf/stubs/int128.h \ + google/protobuf/stubs/io_win32.cc \ + google/protobuf/stubs/io_win32.h \ google/protobuf/stubs/map_util.h \ google/protobuf/stubs/mathutil.h \ - google/protobuf/stubs/once.cc \ - google/protobuf/stubs/shared_ptr.h \ google/protobuf/stubs/status.cc \ google/protobuf/stubs/status.h \ google/protobuf/stubs/status_macros.h \ @@ -211,6 +198,9 @@ libprotobuf_lite_la_SOURCES = \ google/protobuf/arenastring.cc \ google/protobuf/extension_set.cc \ google/protobuf/generated_message_util.cc \ + google/protobuf/generated_message_table_driven_lite.h \ + google/protobuf/generated_message_table_driven_lite.cc \ + google/protobuf/implicit_weak_message.cc \ google/protobuf/message_lite.cc \ google/protobuf/repeated_field.cc \ google/protobuf/wire_format_lite.cc \ @@ -220,7 +210,11 @@ libprotobuf_lite_la_SOURCES = \ google/protobuf/io/zero_copy_stream_impl_lite.cc libprotobuf_la_LIBADD = $(PTHREAD_LIBS) -libprotobuf_la_LDFLAGS = -version-info 12:0:0 -export-dynamic -no-undefined +libprotobuf_la_LDFLAGS = -version-info 15:1:0 -export-dynamic -no-undefined +if HAVE_LD_VERSION_SCRIPT +libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map +EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map +endif libprotobuf_la_SOURCES = \ $(libprotobuf_lite_la_SOURCES) \ google/protobuf/any.pb.cc \ @@ -237,6 +231,8 @@ libprotobuf_la_SOURCES = \ google/protobuf/extension_set_heavy.cc \ google/protobuf/field_mask.pb.cc \ google/protobuf/generated_message_reflection.cc \ + google/protobuf/generated_message_table_driven_lite.h \ + google/protobuf/generated_message_table_driven.cc \ google/protobuf/map_field.cc \ google/protobuf/message.cc \ google/protobuf/reflection_internal.h \ @@ -259,6 +255,7 @@ libprotobuf_la_SOURCES = \ google/protobuf/io/zero_copy_stream_impl.cc \ google/protobuf/compiler/importer.cc \ google/protobuf/compiler/parser.cc \ + google/protobuf/util/delimited_message_util.cc \ google/protobuf/util/field_comparator.cc \ google/protobuf/util/field_mask_util.cc \ google/protobuf/util/internal/constants.h \ @@ -304,7 +301,11 @@ libprotobuf_la_SOURCES = \ nodist_libprotobuf_la_SOURCES = $(nodist_libprotobuf_lite_la_SOURCES) libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la -libprotoc_la_LDFLAGS = -version-info 12:0:0 -export-dynamic -no-undefined +libprotoc_la_LDFLAGS = -version-info 15:1:0 -export-dynamic -no-undefined +if HAVE_LD_VERSION_SCRIPT +libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map +EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map +endif libprotoc_la_SOURCES = \ google/protobuf/compiler/code_generator.cc \ google/protobuf/compiler/command_line_interface.cc \ @@ -333,7 +334,10 @@ libprotoc_la_SOURCES = \ google/protobuf/compiler/cpp/cpp_message.h \ google/protobuf/compiler/cpp/cpp_message_field.cc \ google/protobuf/compiler/cpp/cpp_message_field.h \ + google/protobuf/compiler/cpp/cpp_message_layout_helper.h \ google/protobuf/compiler/cpp/cpp_options.h \ + google/protobuf/compiler/cpp/cpp_padding_optimizer.cc \ + google/protobuf/compiler/cpp/cpp_padding_optimizer.h \ google/protobuf/compiler/cpp/cpp_primitive_field.cc \ google/protobuf/compiler/cpp/cpp_primitive_field.h \ google/protobuf/compiler/cpp/cpp_service.cc \ @@ -402,29 +406,6 @@ libprotoc_la_SOURCES = \ google/protobuf/compiler/java/java_doc_comment.h \ google/protobuf/compiler/js/js_generator.cc \ google/protobuf/compiler/js/well_known_types_embed.cc \ - google/protobuf/compiler/javanano/javanano_enum.cc \ - google/protobuf/compiler/javanano/javanano_enum.h \ - google/protobuf/compiler/javanano/javanano_enum_field.cc \ - google/protobuf/compiler/javanano/javanano_enum_field.h \ - google/protobuf/compiler/javanano/javanano_extension.cc \ - google/protobuf/compiler/javanano/javanano_extension.h \ - google/protobuf/compiler/javanano/javanano_field.cc \ - google/protobuf/compiler/javanano/javanano_field.h \ - google/protobuf/compiler/javanano/javanano_file.cc \ - google/protobuf/compiler/javanano/javanano_file.h \ - google/protobuf/compiler/javanano/javanano_generator.cc \ - google/protobuf/compiler/javanano/javanano_generator.h \ - google/protobuf/compiler/javanano/javanano_helpers.cc \ - google/protobuf/compiler/javanano/javanano_helpers.h \ - google/protobuf/compiler/javanano/javanano_map_field.cc \ - google/protobuf/compiler/javanano/javanano_map_field.h \ - google/protobuf/compiler/javanano/javanano_message.cc \ - google/protobuf/compiler/javanano/javanano_message.h \ - google/protobuf/compiler/javanano/javanano_message_field.cc \ - google/protobuf/compiler/javanano/javanano_message_field.h \ - google/protobuf/compiler/javanano/javanano_params.h \ - google/protobuf/compiler/javanano/javanano_primitive_field.cc \ - google/protobuf/compiler/javanano/javanano_primitive_field.h \ google/protobuf/compiler/objectivec/objectivec_enum.cc \ google/protobuf/compiler/objectivec/objectivec_enum.h \ google/protobuf/compiler/objectivec/objectivec_enum_field.cc \ @@ -488,21 +469,6 @@ bin_PROGRAMS = protoc protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la protoc_SOURCES = google/protobuf/compiler/main.cc -# The special JS code for the well-known types is linked into the compiler via -# well_known_types_embed.cc, which is generated from .js source files. We have -# to build the js_embed binary using $(CXX_FOR_BUILD) so that it is executable -# on the build machine in a cross-compilation setup. -js_embed$(EXEEXT): $(srcdir)/google/protobuf/compiler/js/embed.cc - $(CXX_FOR_BUILD) -o $@ $< -js_well_known_types_sources = \ - google/protobuf/compiler/js/well_known_types/any.js \ - google/protobuf/compiler/js/well_known_types/struct.js \ - google/protobuf/compiler/js/well_known_types/timestamp.js -# We have to cd to $(srcdir) so that out-of-tree builds work properly. -google/protobuf/compiler/js/well_known_types_embed.cc: js_embed$(EXEEXT) $(js_well_known_types_sources) - oldpwd=`pwd` && cd $(srcdir) && \ - $$oldpwd/js_embed$(EXEEXT) $(js_well_known_types_sources) > $$oldpwd/$@ - # Tests ============================================================== protoc_inputs = \ @@ -521,6 +487,9 @@ protoc_inputs = \ google/protobuf/unittest_import.proto \ google/protobuf/unittest_import_public_lite.proto \ google/protobuf/unittest_import_public.proto \ + google/protobuf/unittest_lazy_dependencies.proto \ + google/protobuf/unittest_lazy_dependencies_custom_option.proto \ + google/protobuf/unittest_lazy_dependencies_enum.proto \ google/protobuf/unittest_lite_imports_nonlite.proto \ google/protobuf/unittest_lite.proto \ google/protobuf/unittest_mset.proto \ @@ -535,8 +504,8 @@ protoc_inputs = \ google/protobuf/unittest_preserve_unknown_enum.proto \ google/protobuf/unittest.proto \ google/protobuf/unittest_proto3_arena.proto \ - google/protobuf/unittest_proto3_arena_lite.proto \ - google/protobuf/unittest_proto3_lite.proto \ + google/protobuf/unittest_proto3_arena_lite.proto \ + google/protobuf/unittest_proto3_lite.proto \ google/protobuf/unittest_well_known_types.proto \ google/protobuf/util/internal/testdata/anys.proto \ google/protobuf/util/internal/testdata/books.proto \ @@ -557,6 +526,9 @@ EXTRA_DIST = \ $(protoc_inputs) \ $(js_well_known_types_sources) \ solaris/libstdc++.la \ + google/protobuf/unittest_proto3.proto \ + google/protobuf/test_messages_proto3.proto \ + google/protobuf/test_messages_proto2.proto \ google/protobuf/io/gzip_stream.h \ google/protobuf/io/gzip_stream_unittest.sh \ google/protobuf/testdata/golden_message \ @@ -575,11 +547,13 @@ EXTRA_DIST = \ google/protobuf/package_info.h \ google/protobuf/io/package_info.h \ google/protobuf/util/package_info.h \ - google/protobuf/compiler/js/embed.cc \ google/protobuf/compiler/ruby/ruby_generated_code.proto \ google/protobuf/compiler/ruby/ruby_generated_code_pb.rb \ google/protobuf/compiler/package_info.h \ google/protobuf/compiler/zip_output_unittest.sh \ + libprotobuf-lite.map \ + libprotobuf.map \ + libprotoc.map \ README.md protoc_lite_outputs = \ @@ -622,6 +596,12 @@ protoc_outputs = \ google/protobuf/unittest_import.pb.h \ google/protobuf/unittest_import_public.pb.cc \ google/protobuf/unittest_import_public.pb.h \ + google/protobuf/unittest_lazy_dependencies.pb.cc \ + google/protobuf/unittest_lazy_dependencies.pb.h \ + google/protobuf/unittest_lazy_dependencies_custom_option.pb.cc \ + google/protobuf/unittest_lazy_dependencies_custom_option.pb.h \ + google/protobuf/unittest_lazy_dependencies_enum.pb.cc \ + google/protobuf/unittest_lazy_dependencies_enum.pb.h \ google/protobuf/unittest_lite_imports_nonlite.pb.cc \ google/protobuf/unittest_lite_imports_nonlite.pb.h \ google/protobuf/unittest_mset.pb.cc \ @@ -646,10 +626,10 @@ protoc_outputs = \ google/protobuf/unittest_preserve_unknown_enum.pb.h \ google/protobuf/unittest_proto3_arena.pb.cc \ google/protobuf/unittest_proto3_arena.pb.h \ - google/protobuf/unittest_proto3_arena_lite.pb.cc \ - google/protobuf/unittest_proto3_arena_lite.pb.h \ - google/protobuf/unittest_proto3_lite.pb.cc \ - google/protobuf/unittest_proto3_lite.pb.h \ + google/protobuf/unittest_proto3_arena_lite.pb.cc \ + google/protobuf/unittest_proto3_arena_lite.pb.h \ + google/protobuf/unittest_proto3_lite.pb.cc \ + google/protobuf/unittest_proto3_lite.pb.h \ google/protobuf/unittest_well_known_types.pb.cc \ google/protobuf/unittest_well_known_types.pb.h \ google/protobuf/util/internal/testdata/anys.pb.cc \ @@ -679,8 +659,6 @@ protoc_outputs = \ google/protobuf/util/message_differencer_unittest.pb.cc \ google/protobuf/util/message_differencer_unittest.pb.h -BUILT_SOURCES = $(protoc_outputs) google/protobuf/compiler/js/well_known_types_embed.cc - if USE_EXTERNAL_PROTOC unittest_proto_middleman: $(protoc_inputs) @@ -708,20 +686,25 @@ COMMON_TEST_SOURCES = \ google/protobuf/map_test_util_impl.h \ google/protobuf/test_util.cc \ google/protobuf/test_util.h \ + google/protobuf/test_util.inc \ google/protobuf/testing/googletest.cc \ google/protobuf/testing/googletest.h \ google/protobuf/testing/file.cc \ google/protobuf/testing/file.h +GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest +GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock +GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest +GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ protobuf-lite-test test_plugin protobuf-lite-arena-test \ no-warning-test $(GZCHECKPROGRAMS) protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ - ../gmock/gtest/lib/libgtest.la \ - ../gmock/lib/libgmock.la \ - ../gmock/lib/libgmock_main.la -protobuf_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include \ - -I$(srcdir)/../gmock/include + $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ + $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ + $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \ + -I$(GOOGLEMOCK_SRC_DIR)/include # Disable optimization for tests unless the user explicitly asked for it, # since test_util.cc takes forever to compile with optimization (with GCC). # See configure.ac for more info. @@ -730,7 +713,7 @@ protobuf_test_SOURCES = \ google/protobuf/stubs/bytestream_unittest.cc \ google/protobuf/stubs/common_unittest.cc \ google/protobuf/stubs/int128_unittest.cc \ - google/protobuf/stubs/once_unittest.cc \ + google/protobuf/stubs/io_win32_unittest.cc \ google/protobuf/stubs/statusor_test.cc \ google/protobuf/stubs/status_test.cc \ google/protobuf/stubs/stringpiece_unittest.cc \ @@ -739,7 +722,6 @@ protobuf_test_SOURCES = \ google/protobuf/stubs/strutil_unittest.cc \ google/protobuf/stubs/template_util_unittest.cc \ google/protobuf/stubs/time_test.cc \ - google/protobuf/stubs/type_traits_unittest.cc \ google/protobuf/any_test.cc \ google/protobuf/arenastring_unittest.cc \ google/protobuf/arena_unittest.cc \ @@ -752,11 +734,12 @@ protobuf_test_SOURCES = \ google/protobuf/map_field_test.cc \ google/protobuf/map_test.cc \ google/protobuf/message_unittest.cc \ + google/protobuf/message_unittest.inc \ google/protobuf/no_field_presence_test.cc \ google/protobuf/preserve_unknown_enum_test.cc \ + google/protobuf/proto3_arena_lite_unittest.cc \ google/protobuf/proto3_arena_unittest.cc \ - google/protobuf/proto3_arena_lite_unittest.cc \ - google/protobuf/proto3_lite_unittest.cc \ + google/protobuf/proto3_lite_unittest.cc \ google/protobuf/reflection_ops_unittest.cc \ google/protobuf/repeated_field_reflection_unittest.cc \ google/protobuf/repeated_field_unittest.cc \ @@ -768,14 +751,18 @@ protobuf_test_SOURCES = \ google/protobuf/io/printer_unittest.cc \ google/protobuf/io/tokenizer_unittest.cc \ google/protobuf/io/zero_copy_stream_unittest.cc \ + google/protobuf/compiler/annotation_test_util.h \ + google/protobuf/compiler/annotation_test_util.cc \ google/protobuf/compiler/command_line_interface_unittest.cc \ google/protobuf/compiler/importer_unittest.cc \ google/protobuf/compiler/mock_code_generator.cc \ google/protobuf/compiler/mock_code_generator.h \ google/protobuf/compiler/parser_unittest.cc \ google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \ + google/protobuf/compiler/cpp/cpp_move_unittest.cc \ google/protobuf/compiler/cpp/cpp_unittest.h \ google/protobuf/compiler/cpp/cpp_unittest.cc \ + google/protobuf/compiler/cpp/cpp_unittest.inc \ google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \ google/protobuf/compiler/cpp/metadata_test.cc \ google/protobuf/compiler/java/java_plugin_unittest.cc \ @@ -785,6 +772,7 @@ protobuf_test_SOURCES = \ google/protobuf/compiler/ruby/ruby_generator_unittest.cc \ google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc \ google/protobuf/compiler/csharp/csharp_generator_unittest.cc \ + google/protobuf/util/delimited_message_util_test.cc \ google/protobuf/util/field_comparator_test.cc \ google/protobuf/util/field_mask_util_test.cc \ google/protobuf/util/internal/default_value_objectwriter_test.cc \ @@ -798,24 +786,24 @@ protobuf_test_SOURCES = \ google/protobuf/util/time_util_test.cc \ google/protobuf/util/type_resolver_util_test.cc \ $(COMMON_TEST_SOURCES) - - nodist_protobuf_test_SOURCES = $(protoc_outputs) +$(am_protobuf_test_OBJECTS): unittest_proto_middleman # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ libprotoc.la \ - ../gmock/gtest/lib/libgtest.la \ - ../gmock/lib/libgmock.la \ - ../gmock/lib/libgmock_main.la -protobuf_lazy_descriptor_test_CPPFLAGS = -I$(srcdir)/../gmock/include \ - -I$(srcdir)/../gmock/gtest/include \ + $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ + $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ + $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ + -I$(GOOGLETEST_SRC_DIR)/include \ -DPROTOBUF_TEST_NO_DESCRIPTORS protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) protobuf_lazy_descriptor_test_SOURCES = \ google/protobuf/compiler/cpp/cpp_unittest.cc \ $(COMMON_TEST_SOURCES) nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs) +$(am_protobuf_lazy_descriptor_test_OBJECTS): unittest_proto_middleman COMMON_LITE_TEST_SOURCES = \ google/protobuf/arena_test_util.cc \ @@ -829,32 +817,39 @@ COMMON_LITE_TEST_SOURCES = \ # depend on gtest because our internal version of gtest depend on proto # full runtime and we want to make sure this test builds without full # runtime. -protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la +protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ + $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ + $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ + $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \ + -I$(GOOGLETEST_SRC_DIR)/include protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) protobuf_lite_test_SOURCES = \ google/protobuf/lite_unittest.cc \ $(COMMON_LITE_TEST_SOURCES) nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs) +$(am_protobuf_lite_test_OBJECTS): unittest_proto_middleman # lite_arena_unittest depends on gtest because teboring@ found that without # gtest when building the test internally our memory sanitizer doesn't detect # memory leaks (don't know why). protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ - ../gmock/gtest/lib/libgtest.la \ - ../gmock/lib/libgmock.la \ - ../gmock/lib/libgmock_main.la -protobuf_lite_arena_test_CPPFLAGS = -I$(srcdir)/../gmock/include \ - -I$(srcdir)/../gmock/gtest/include + $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ + $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ + $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ + -I$(GOOGLETEST_SRC_DIR)/include protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) protobuf_lite_arena_test_SOURCES = \ google/protobuf/lite_arena_unittest.cc \ $(COMMON_LITE_TEST_SOURCES) nodist_protobuf_lite_arena_test_SOURCES = $(protoc_lite_outputs) +$(am_protobuf_lite_arena_test_OBJECTS): unittest_proto_middleman # Test plugin binary. test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ - ../gmock/gtest/lib/libgtest.la -test_plugin_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include + $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la +test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include test_plugin_SOURCES = \ google/protobuf/compiler/mock_code_generator.cc \ google/protobuf/testing/file.cc \ @@ -875,19 +870,13 @@ endif no_warning_test.cc: echo "// Generated from Makefile.am" > no_warning_test.cc for FILE in $(nobase_include_HEADERS); do \ - if ! echo $${FILE} | grep "atomicops"; then \ - echo "#include <$${FILE}>" >> no_warning_test.cc; \ - fi \ + echo "#include <$${FILE}>" >> no_warning_test.cc; \ done - echo "#include <gtest/gtest.h>" >> no_warning_test.cc - echo "TEST(NoWarningTest, Empty) {}" >> no_warning_test.cc + echo "int main(int, char**) { return 0; }" >> no_warning_test.cc -no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ - ../gmock/gtest/lib/libgtest.la \ - ../gmock/gtest/lib/libgtest_main.la -no_warning_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include +no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \ - -Wall -Werror + -Wall -Wextra -Werror -Wno-unused-parameter nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs) TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \ |