blob: ed1b6620793945478c938d83b018429a6b805559 [file] [log] [blame]
temporal40ee5512008-07-10 02:12:20 +00001## Process this file with automake to produce Makefile.in
2
kenton@google.come59427a2009-04-16 22:30:56 +00003if HAVE_ZLIB
4GZCHECKPROGRAMS = zcgzip zcgunzip
5GZHEADERS = google/protobuf/io/gzip_stream.h
6GZTESTS = google/protobuf/io/gzip_stream_unittest.sh
Jisi Liu78d470c2015-06-12 15:49:21 -07007ZLIB_DEF = -DHAVE_ZLIB=1
kenton@google.come59427a2009-04-16 22:30:56 +00008else
9GZCHECKPROGRAMS =
10GZHEADERS =
11GZTESTS =
Jisi Liu78d470c2015-06-12 15:49:21 -070012ZLIB_DEF =
13endif
14
15if HAVE_PTHREAD
16PTHREAD_DEF = -DHAVE_PTHREAD=1
17else
18PTHREAD_DEF =
kenton@google.come59427a2009-04-16 22:30:56 +000019endif
20
Deanna Garcia367851d2021-06-04 21:21:39 +000021PROTOBUF_VERSION = 28:3:0
Hao Nguyen15c30d72018-12-12 15:38:14 -080022
temporal40ee5512008-07-10 02:12:20 +000023if GCC
Feng Xiao16adea32016-07-22 14:15:19 -070024# 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
temporal40ee5512008-07-10 02:12:20 +000027else
Jisi Liu78d470c2015-06-12 15:49:21 -070028NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF)
temporal40ee5512008-07-10 02:12:20 +000029endif
30
kenton@google.com42c81e12009-05-06 01:15:06 +000031AM_CXXFLAGS = $(NO_OPT_CXXFLAGS) $(PROTOBUF_OPT_FLAG)
32
s1341ee05cc12021-02-11 10:38:48 +020033AM_LDFLAGS = $(PTHREAD_CFLAGS) ${LIBLOG_LIBS}
temporal40ee5512008-07-10 02:12:20 +000034
35# If I say "dist_include_DATA", automake complains that $(includedir) is not
36# a "legitimate" directory for DATA. Screw you, automake.
37protodir = $(includedir)
Jisi Liue3fac652016-07-28 14:24:05 -070038
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.
Feng Xiaod36c0c52017-03-29 14:32:48 -070042nobase_dist_proto_DATA = google/protobuf/descriptor.proto \
43 google/protobuf/any.proto \
44 google/protobuf/api.proto \
45 google/protobuf/duration.proto \
46 google/protobuf/empty.proto \
47 google/protobuf/field_mask.proto \
48 google/protobuf/source_context.proto \
49 google/protobuf/struct.proto \
50 google/protobuf/timestamp.proto \
51 google/protobuf/type.proto \
52 google/protobuf/wrappers.proto \
Jisi Liu09354db2017-07-18 15:38:30 -070053 google/protobuf/compiler/plugin.proto
temporal40ee5512008-07-10 02:12:20 +000054
55# Not sure why these don't get cleaned automatically.
56clean-local:
57 rm -f *.loT
58
Jisi Liuf48dca52015-06-12 15:49:21 -070059CLEANFILES = $(protoc_outputs) unittest_proto_middleman \
Feng Xiao16adea32016-07-22 14:15:19 -070060 testzip.jar testzip.list testzip.proto testzip.zip \
Feng Xiao143851e2018-06-01 11:00:04 -070061 no_warning_test.cc
temporal40ee5512008-07-10 02:12:20 +000062
63MAINTAINERCLEANFILES = \
64 Makefile.in
65
Sergio Campamae75cf402016-11-10 10:20:07 -050066nobase_include_HEADERS = \
Sergio Campamae75cf402016-11-10 10:20:07 -050067 google/protobuf/stubs/callback.h \
68 google/protobuf/stubs/bytestream.h \
69 google/protobuf/stubs/casts.h \
70 google/protobuf/stubs/common.h \
Sergio Campamae75cf402016-11-10 10:20:07 -050071 google/protobuf/stubs/hash.h \
72 google/protobuf/stubs/logging.h \
73 google/protobuf/stubs/macros.h \
Adam Cozzette4aa77502019-06-06 10:29:58 -070074 google/protobuf/stubs/map_util.h \
Sergio Campamae75cf402016-11-10 10:20:07 -050075 google/protobuf/stubs/mutex.h \
76 google/protobuf/stubs/once.h \
77 google/protobuf/stubs/platform_macros.h \
78 google/protobuf/stubs/port.h \
Sergio Campamae75cf402016-11-10 10:20:07 -050079 google/protobuf/stubs/status.h \
80 google/protobuf/stubs/stl_util.h \
81 google/protobuf/stubs/stringpiece.h \
Adam Cozzette034dbf82018-11-14 14:50:50 -080082 google/protobuf/stubs/strutil.h \
Sergio Campamae75cf402016-11-10 10:20:07 -050083 google/protobuf/stubs/template_util.h \
Sergio Campamae75cf402016-11-10 10:20:07 -050084 google/protobuf/any.pb.h \
85 google/protobuf/api.pb.h \
86 google/protobuf/any.h \
87 google/protobuf/arena.h \
Jisi Liue45214e2017-07-19 13:07:19 -070088 google/protobuf/arena_impl.h \
Sergio Campamae75cf402016-11-10 10:20:07 -050089 google/protobuf/arenastring.h \
90 google/protobuf/descriptor_database.h \
91 google/protobuf/descriptor.h \
92 google/protobuf/descriptor.pb.h \
93 google/protobuf/duration.pb.h \
94 google/protobuf/dynamic_message.h \
95 google/protobuf/empty.pb.h \
96 google/protobuf/extension_set.h \
Adam Cozzettefbd69fa2018-11-08 08:41:12 -080097 google/protobuf/extension_set_inl.h \
Joshua Haberman95218032021-05-24 13:49:39 -070098 google/protobuf/field_access_listener.h \
Sergio Campamae75cf402016-11-10 10:20:07 -050099 google/protobuf/field_mask.pb.h \
100 google/protobuf/generated_enum_reflection.h \
101 google/protobuf/generated_enum_util.h \
102 google/protobuf/generated_message_reflection.h \
Feng Xiaod5827782017-03-30 17:43:45 -0700103 google/protobuf/generated_message_table_driven.h \
Deanna Garciaf1b0d4e2021-05-14 23:08:04 +0000104 google/protobuf/generated_message_tctable_decl.h \
Deanna Garcia7a1b3012021-05-14 22:58:57 +0000105 google/protobuf/generated_message_tctable_impl.h \
Deanna Garciad0ea8612021-05-14 23:21:52 +0000106 google/protobuf/generated_message_tctable_impl.inc \
Sergio Campamae75cf402016-11-10 10:20:07 -0500107 google/protobuf/generated_message_util.h \
108 google/protobuf/has_bits.h \
Adam Cozzette92a7e772017-12-01 10:05:10 -0800109 google/protobuf/implicit_weak_message.h \
Yannic Bonenberger27e85ab2019-07-23 21:38:13 +0200110 google/protobuf/io/io_win32.h \
Sergio Campamae75cf402016-11-10 10:20:07 -0500111 google/protobuf/map_entry.h \
112 google/protobuf/map_entry_lite.h \
113 google/protobuf/map_field.h \
114 google/protobuf/map_field_inl.h \
115 google/protobuf/map_field_lite.h \
116 google/protobuf/map.h \
117 google/protobuf/map_type_handler.h \
118 google/protobuf/message.h \
119 google/protobuf/message_lite.h \
120 google/protobuf/metadata.h \
Feng Xiaod5827782017-03-30 17:43:45 -0700121 google/protobuf/metadata_lite.h \
Adam Cozzettefbd69fa2018-11-08 08:41:12 -0800122 google/protobuf/parse_context.h \
Feng Xiaoacd5b052018-08-09 21:21:01 -0700123 google/protobuf/port.h \
124 google/protobuf/port_def.inc \
125 google/protobuf/port_undef.inc \
Sergio Campamae75cf402016-11-10 10:20:07 -0500126 google/protobuf/reflection.h \
127 google/protobuf/reflection_ops.h \
128 google/protobuf/repeated_field.h \
129 google/protobuf/service.h \
130 google/protobuf/source_context.pb.h \
131 google/protobuf/struct.pb.h \
132 google/protobuf/text_format.h \
133 google/protobuf/timestamp.pb.h \
134 google/protobuf/type.pb.h \
135 google/protobuf/unknown_field_set.h \
136 google/protobuf/wire_format.h \
137 google/protobuf/wire_format_lite.h \
Sergio Campamae75cf402016-11-10 10:20:07 -0500138 google/protobuf/wrappers.pb.h \
139 google/protobuf/io/coded_stream.h \
140 $(GZHEADERS) \
141 google/protobuf/io/printer.h \
142 google/protobuf/io/strtod.h \
143 google/protobuf/io/tokenizer.h \
144 google/protobuf/io/zero_copy_stream.h \
145 google/protobuf/io/zero_copy_stream_impl.h \
146 google/protobuf/io/zero_copy_stream_impl_lite.h \
147 google/protobuf/compiler/code_generator.h \
148 google/protobuf/compiler/command_line_interface.h \
149 google/protobuf/compiler/importer.h \
150 google/protobuf/compiler/parser.h \
151 google/protobuf/compiler/plugin.h \
152 google/protobuf/compiler/plugin.pb.h \
153 google/protobuf/compiler/cpp/cpp_generator.h \
154 google/protobuf/compiler/csharp/csharp_generator.h \
155 google/protobuf/compiler/csharp/csharp_names.h \
156 google/protobuf/compiler/java/java_generator.h \
Deanna Garciabe2f0002021-03-10 00:24:57 +0000157 google/protobuf/compiler/java/java_kotlin_generator.h \
Sergio Campamae75cf402016-11-10 10:20:07 -0500158 google/protobuf/compiler/java/java_names.h \
Sergio Campamae75cf402016-11-10 10:20:07 -0500159 google/protobuf/compiler/js/js_generator.h \
Adam Cozzette5d630972016-11-17 17:04:30 -0800160 google/protobuf/compiler/js/well_known_types_embed.h \
Sergio Campamae75cf402016-11-10 10:20:07 -0500161 google/protobuf/compiler/objectivec/objectivec_generator.h \
162 google/protobuf/compiler/objectivec/objectivec_helpers.h \
163 google/protobuf/compiler/php/php_generator.h \
164 google/protobuf/compiler/python/python_generator.h \
165 google/protobuf/compiler/ruby/ruby_generator.h \
166 google/protobuf/util/type_resolver.h \
Byron Yicb3e84b2017-03-16 20:01:22 +0800167 google/protobuf/util/delimited_message_util.h \
Sergio Campamae75cf402016-11-10 10:20:07 -0500168 google/protobuf/util/field_comparator.h \
169 google/protobuf/util/field_mask_util.h \
170 google/protobuf/util/json_util.h \
171 google/protobuf/util/time_util.h \
172 google/protobuf/util/type_resolver_util.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700173 google/protobuf/util/message_differencer.h
temporal40ee5512008-07-10 02:12:20 +0000174
kenton@google.com858a22b2009-07-29 02:21:47 +0000175lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
temporal40ee5512008-07-10 02:12:20 +0000176
Ben Wolsieffer56b40a82018-10-04 20:25:10 -0400177libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
Hao Nguyen15c30d72018-12-12 15:38:14 -0800178libprotobuf_lite_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined
Alexandros Frantzis13d165d2017-03-10 14:25:27 +0200179if HAVE_LD_VERSION_SCRIPT
180libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map
181EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map
182endif
kenton@google.com858a22b2009-07-29 02:21:47 +0000183libprotobuf_lite_la_SOURCES = \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700184 google/protobuf/stubs/bytestream.cc \
185 google/protobuf/stubs/bytestream.h \
temporal40ee5512008-07-10 02:12:20 +0000186 google/protobuf/stubs/common.cc \
temporal40ee5512008-07-10 02:12:20 +0000187 google/protobuf/stubs/hash.h \
Jisi Liub0f66112015-08-21 11:18:45 -0700188 google/protobuf/stubs/int128.cc \
189 google/protobuf/stubs/int128.h \
Hao Nguyen176f7db2019-04-09 06:23:32 -0700190 google/protobuf/io/io_win32.cc \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000191 google/protobuf/stubs/map_util.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700192 google/protobuf/stubs/mathutil.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700193 google/protobuf/stubs/status.cc \
194 google/protobuf/stubs/status.h \
195 google/protobuf/stubs/status_macros.h \
196 google/protobuf/stubs/statusor.cc \
197 google/protobuf/stubs/statusor.h \
198 google/protobuf/stubs/stringpiece.cc \
199 google/protobuf/stubs/stringpiece.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000200 google/protobuf/stubs/stringprintf.cc \
201 google/protobuf/stubs/stringprintf.h \
Feng Xiaob17ec3c2015-08-23 17:50:38 -0700202 google/protobuf/stubs/structurally_valid.cc \
Feng Xiao818c5ee2015-06-15 21:42:57 -0700203 google/protobuf/stubs/strutil.cc \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700204 google/protobuf/stubs/time.cc \
205 google/protobuf/stubs/time.h \
Yilun Chongd8c25012019-02-22 18:13:33 +0800206 google/protobuf/any_lite.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800207 google/protobuf/arena.cc \
Joshua Haberman38d6de12020-09-28 11:54:54 -0700208 google/protobuf/arenastring.cc \
kenton@google.com858a22b2009-07-29 02:21:47 +0000209 google/protobuf/extension_set.cc \
Joshua Haberman95218032021-05-24 13:49:39 -0700210 google/protobuf/field_access_listener.cc \
Hao Nguyen1d4e9592019-05-03 14:33:43 -0700211 google/protobuf/generated_enum_util.cc \
kenton@google.com858a22b2009-07-29 02:21:47 +0000212 google/protobuf/generated_message_util.cc \
Jisi Liu12c186f2017-07-25 14:38:00 -0700213 google/protobuf/generated_message_table_driven_lite.h \
214 google/protobuf/generated_message_table_driven_lite.cc \
Adam Cozzette92a7e772017-12-01 10:05:10 -0800215 google/protobuf/implicit_weak_message.cc \
Joshua Haberman95e6c5b2020-08-17 15:26:13 -0700216 google/protobuf/map.cc \
kenton@google.com858a22b2009-07-29 02:21:47 +0000217 google/protobuf/message_lite.cc \
Xiang Dai8df872a2019-01-24 17:10:22 +0800218 google/protobuf/parse_context.cc \
kenton@google.com858a22b2009-07-29 02:21:47 +0000219 google/protobuf/repeated_field.cc \
220 google/protobuf/wire_format_lite.cc \
221 google/protobuf/io/coded_stream.cc \
Aaron Bray42430822018-12-20 14:13:57 -0500222 google/protobuf/io/strtod.cc \
kenton@google.com858a22b2009-07-29 02:21:47 +0000223 google/protobuf/io/zero_copy_stream.cc \
Hao Nguyen1d4e9592019-05-03 14:33:43 -0700224 google/protobuf/io/zero_copy_stream_impl.cc \
Jisi Liua86baaa2015-02-25 20:39:13 -0800225 google/protobuf/io/zero_copy_stream_impl_lite.cc
kenton@google.com858a22b2009-07-29 02:21:47 +0000226
Ben Wolsieffer56b40a82018-10-04 20:25:10 -0400227libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
Hao Nguyen15c30d72018-12-12 15:38:14 -0800228libprotobuf_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined
Alexandros Frantzis13d165d2017-03-10 14:25:27 +0200229if HAVE_LD_VERSION_SCRIPT
230libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map
231EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map
232endif
kenton@google.com858a22b2009-07-29 02:21:47 +0000233libprotobuf_la_SOURCES = \
234 $(libprotobuf_lite_la_SOURCES) \
Feng Xiao33c92802015-05-11 13:47:41 -0700235 google/protobuf/any.pb.cc \
236 google/protobuf/api.pb.cc \
Bo Yang5db21732015-05-21 14:28:59 -0700237 google/protobuf/any.cc \
temporal40ee5512008-07-10 02:12:20 +0000238 google/protobuf/descriptor.cc \
temporal40ee5512008-07-10 02:12:20 +0000239 google/protobuf/descriptor_database.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800240 google/protobuf/descriptor.pb.cc \
Feng Xiao33c92802015-05-11 13:47:41 -0700241 google/protobuf/duration.pb.cc \
temporal40ee5512008-07-10 02:12:20 +0000242 google/protobuf/dynamic_message.cc \
Feng Xiao33c92802015-05-11 13:47:41 -0700243 google/protobuf/empty.pb.cc \
kenton@google.com80b1d622009-07-29 01:13:20 +0000244 google/protobuf/extension_set_heavy.cc \
Feng Xiao33c92802015-05-11 13:47:41 -0700245 google/protobuf/field_mask.pb.cc \
temporal40ee5512008-07-10 02:12:20 +0000246 google/protobuf/generated_message_reflection.cc \
Jisi Liu12c186f2017-07-25 14:38:00 -0700247 google/protobuf/generated_message_table_driven_lite.h \
Jisi Liue1777392017-07-25 14:37:19 -0700248 google/protobuf/generated_message_table_driven.cc \
Feng Xiao496d47c2014-12-09 15:47:25 -0800249 google/protobuf/map_field.cc \
temporal40ee5512008-07-10 02:12:20 +0000250 google/protobuf/message.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800251 google/protobuf/reflection_internal.h \
temporal40ee5512008-07-10 02:12:20 +0000252 google/protobuf/reflection_ops.cc \
temporal40ee5512008-07-10 02:12:20 +0000253 google/protobuf/service.cc \
Feng Xiao33c92802015-05-11 13:47:41 -0700254 google/protobuf/source_context.pb.cc \
255 google/protobuf/struct.pb.cc \
Feng Xiao33c92802015-05-11 13:47:41 -0700256 google/protobuf/stubs/substitute.cc \
257 google/protobuf/stubs/substitute.h \
temporal40ee5512008-07-10 02:12:20 +0000258 google/protobuf/text_format.cc \
Feng Xiao33c92802015-05-11 13:47:41 -0700259 google/protobuf/timestamp.pb.cc \
260 google/protobuf/type.pb.cc \
temporal40ee5512008-07-10 02:12:20 +0000261 google/protobuf/unknown_field_set.cc \
262 google/protobuf/wire_format.cc \
Feng Xiao33c92802015-05-11 13:47:41 -0700263 google/protobuf/wrappers.pb.cc \
kenton@google.come59427a2009-04-16 22:30:56 +0000264 google/protobuf/io/gzip_stream.cc \
temporal40ee5512008-07-10 02:12:20 +0000265 google/protobuf/io/printer.cc \
266 google/protobuf/io/tokenizer.cc \
temporal40ee5512008-07-10 02:12:20 +0000267 google/protobuf/compiler/importer.cc \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700268 google/protobuf/compiler/parser.cc \
Byron Yicb3e84b2017-03-16 20:01:22 +0800269 google/protobuf/util/delimited_message_util.cc \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700270 google/protobuf/util/field_comparator.cc \
Jisi Liub0f66112015-08-21 11:18:45 -0700271 google/protobuf/util/field_mask_util.cc \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700272 google/protobuf/util/internal/constants.h \
273 google/protobuf/util/internal/datapiece.cc \
274 google/protobuf/util/internal/datapiece.h \
275 google/protobuf/util/internal/default_value_objectwriter.cc \
276 google/protobuf/util/internal/default_value_objectwriter.h \
277 google/protobuf/util/internal/error_listener.cc \
278 google/protobuf/util/internal/error_listener.h \
Feng Xiao818c5ee2015-06-15 21:42:57 -0700279 google/protobuf/util/internal/expecting_objectwriter.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700280 google/protobuf/util/internal/field_mask_utility.cc \
281 google/protobuf/util/internal/field_mask_utility.h \
282 google/protobuf/util/internal/json_escaping.cc \
283 google/protobuf/util/internal/json_escaping.h \
284 google/protobuf/util/internal/json_objectwriter.cc \
285 google/protobuf/util/internal/json_objectwriter.h \
286 google/protobuf/util/internal/json_stream_parser.cc \
287 google/protobuf/util/internal/json_stream_parser.h \
288 google/protobuf/util/internal/location_tracker.h \
Feng Xiao818c5ee2015-06-15 21:42:57 -0700289 google/protobuf/util/internal/mock_error_listener.h \
290 google/protobuf/util/internal/object_location_tracker.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700291 google/protobuf/util/internal/object_source.h \
292 google/protobuf/util/internal/object_writer.cc \
293 google/protobuf/util/internal/object_writer.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700294 google/protobuf/util/internal/protostream_objectsource.cc \
295 google/protobuf/util/internal/protostream_objectsource.h \
296 google/protobuf/util/internal/protostream_objectwriter.cc \
297 google/protobuf/util/internal/protostream_objectwriter.h \
Feng Xiaoe841bac2015-12-11 17:09:20 -0800298 google/protobuf/util/internal/proto_writer.cc \
299 google/protobuf/util/internal/proto_writer.h \
Feng Xiao818c5ee2015-06-15 21:42:57 -0700300 google/protobuf/util/internal/structured_objectwriter.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700301 google/protobuf/util/internal/type_info.cc \
302 google/protobuf/util/internal/type_info.h \
Feng Xiao818c5ee2015-06-15 21:42:57 -0700303 google/protobuf/util/internal/type_info_test_helper.cc \
304 google/protobuf/util/internal/type_info_test_helper.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700305 google/protobuf/util/internal/utility.cc \
306 google/protobuf/util/internal/utility.h \
307 google/protobuf/util/json_util.cc \
Jisi Liub0f66112015-08-21 11:18:45 -0700308 google/protobuf/util/message_differencer.cc \
309 google/protobuf/util/time_util.cc \
310 google/protobuf/util/type_resolver_util.cc
311
Jisi Liua86baaa2015-02-25 20:39:13 -0800312nodist_libprotobuf_la_SOURCES = $(nodist_libprotobuf_lite_la_SOURCES)
temporal40ee5512008-07-10 02:12:20 +0000313
314libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
Hao Nguyen15c30d72018-12-12 15:38:14 -0800315libprotoc_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined
Alexandros Frantzis13d165d2017-03-10 14:25:27 +0200316if HAVE_LD_VERSION_SCRIPT
317libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map
318EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map
319endif
temporal40ee5512008-07-10 02:12:20 +0000320libprotoc_la_SOURCES = \
321 google/protobuf/compiler/code_generator.cc \
322 google/protobuf/compiler/command_line_interface.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000323 google/protobuf/compiler/plugin.cc \
324 google/protobuf/compiler/plugin.pb.cc \
Feng Xiao6bbe1972018-08-08 17:00:41 -0700325 google/protobuf/compiler/scc.h \
kenton@google.comfccb1462009-12-18 02:11:36 +0000326 google/protobuf/compiler/subprocess.cc \
327 google/protobuf/compiler/subprocess.h \
kenton@google.com50663222009-12-24 02:12:15 +0000328 google/protobuf/compiler/zip_writer.cc \
329 google/protobuf/compiler/zip_writer.h \
temporal40ee5512008-07-10 02:12:20 +0000330 google/protobuf/compiler/cpp/cpp_enum.cc \
331 google/protobuf/compiler/cpp/cpp_enum.h \
332 google/protobuf/compiler/cpp/cpp_enum_field.cc \
333 google/protobuf/compiler/cpp/cpp_enum_field.h \
334 google/protobuf/compiler/cpp/cpp_extension.cc \
335 google/protobuf/compiler/cpp/cpp_extension.h \
336 google/protobuf/compiler/cpp/cpp_field.cc \
337 google/protobuf/compiler/cpp/cpp_field.h \
338 google/protobuf/compiler/cpp/cpp_file.cc \
339 google/protobuf/compiler/cpp/cpp_file.h \
340 google/protobuf/compiler/cpp/cpp_generator.cc \
341 google/protobuf/compiler/cpp/cpp_helpers.cc \
342 google/protobuf/compiler/cpp/cpp_helpers.h \
Feng Xiaof157a562014-11-14 11:50:31 -0800343 google/protobuf/compiler/cpp/cpp_map_field.cc \
344 google/protobuf/compiler/cpp/cpp_map_field.h \
temporal40ee5512008-07-10 02:12:20 +0000345 google/protobuf/compiler/cpp/cpp_message.cc \
346 google/protobuf/compiler/cpp/cpp_message.h \
347 google/protobuf/compiler/cpp/cpp_message_field.cc \
348 google/protobuf/compiler/cpp/cpp_message_field.h \
Adam Cozzette13fd0452017-09-12 10:32:01 -0700349 google/protobuf/compiler/cpp/cpp_message_layout_helper.h \
deannagarcia7934a802021-01-22 15:50:57 -0800350 google/protobuf/compiler/cpp/cpp_names.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000351 google/protobuf/compiler/cpp/cpp_options.h \
Adam Cozzette13fd0452017-09-12 10:32:01 -0700352 google/protobuf/compiler/cpp/cpp_padding_optimizer.cc \
353 google/protobuf/compiler/cpp/cpp_padding_optimizer.h \
Joshua Habermance560632021-04-15 15:53:17 -0700354 google/protobuf/compiler/cpp/cpp_parse_function_generator.cc \
355 google/protobuf/compiler/cpp/cpp_parse_function_generator.h \
temporal40ee5512008-07-10 02:12:20 +0000356 google/protobuf/compiler/cpp/cpp_primitive_field.cc \
357 google/protobuf/compiler/cpp/cpp_primitive_field.h \
358 google/protobuf/compiler/cpp/cpp_service.cc \
359 google/protobuf/compiler/cpp/cpp_service.h \
360 google/protobuf/compiler/cpp/cpp_string_field.cc \
361 google/protobuf/compiler/cpp/cpp_string_field.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000362 google/protobuf/compiler/java/java_context.cc \
363 google/protobuf/compiler/java/java_context.h \
temporal40ee5512008-07-10 02:12:20 +0000364 google/protobuf/compiler/java/java_enum.cc \
Jisi Liub0f66112015-08-21 11:18:45 -0700365 google/protobuf/compiler/java/java_enum_lite.cc \
temporal40ee5512008-07-10 02:12:20 +0000366 google/protobuf/compiler/java/java_enum_field.cc \
367 google/protobuf/compiler/java/java_enum_field.h \
Bo Yang5db21732015-05-21 14:28:59 -0700368 google/protobuf/compiler/java/java_enum_field_lite.cc \
369 google/protobuf/compiler/java/java_enum_field_lite.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800370 google/protobuf/compiler/java/java_enum.h \
Jisi Liub0f66112015-08-21 11:18:45 -0700371 google/protobuf/compiler/java/java_enum_lite.h \
temporal40ee5512008-07-10 02:12:20 +0000372 google/protobuf/compiler/java/java_extension.cc \
373 google/protobuf/compiler/java/java_extension.h \
Jisi Liu5221dcb2016-01-29 13:51:05 -0800374 google/protobuf/compiler/java/java_extension_lite.cc \
375 google/protobuf/compiler/java/java_extension_lite.h \
temporal40ee5512008-07-10 02:12:20 +0000376 google/protobuf/compiler/java/java_field.cc \
377 google/protobuf/compiler/java/java_field.h \
378 google/protobuf/compiler/java/java_file.cc \
379 google/protobuf/compiler/java/java_file.h \
380 google/protobuf/compiler/java/java_generator.cc \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000381 google/protobuf/compiler/java/java_generator_factory.cc \
382 google/protobuf/compiler/java/java_generator_factory.h \
temporal40ee5512008-07-10 02:12:20 +0000383 google/protobuf/compiler/java/java_helpers.cc \
384 google/protobuf/compiler/java/java_helpers.h \
Deanna Garciabe2f0002021-03-10 00:24:57 +0000385 google/protobuf/compiler/java/java_kotlin_generator.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800386 google/protobuf/compiler/java/java_map_field.cc \
387 google/protobuf/compiler/java/java_map_field.h \
Bo Yang5db21732015-05-21 14:28:59 -0700388 google/protobuf/compiler/java/java_map_field_lite.cc \
389 google/protobuf/compiler/java/java_map_field_lite.h \
temporal40ee5512008-07-10 02:12:20 +0000390 google/protobuf/compiler/java/java_message.cc \
Bo Yang5db21732015-05-21 14:28:59 -0700391 google/protobuf/compiler/java/java_message_lite.cc \
392 google/protobuf/compiler/java/java_message_builder.cc \
393 google/protobuf/compiler/java/java_message_builder_lite.cc \
temporal40ee5512008-07-10 02:12:20 +0000394 google/protobuf/compiler/java/java_message_field.cc \
395 google/protobuf/compiler/java/java_message_field.h \
Bo Yang5db21732015-05-21 14:28:59 -0700396 google/protobuf/compiler/java/java_message_field_lite.cc \
397 google/protobuf/compiler/java/java_message_field_lite.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800398 google/protobuf/compiler/java/java_message.h \
Bo Yang5db21732015-05-21 14:28:59 -0700399 google/protobuf/compiler/java/java_message_lite.h \
400 google/protobuf/compiler/java/java_message_builder.h \
401 google/protobuf/compiler/java/java_message_builder_lite.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000402 google/protobuf/compiler/java/java_name_resolver.cc \
403 google/protobuf/compiler/java/java_name_resolver.h \
Feng Xiaoe102db12016-07-01 11:02:04 -0700404 google/protobuf/compiler/java/java_options.h \
temporal40ee5512008-07-10 02:12:20 +0000405 google/protobuf/compiler/java/java_primitive_field.cc \
406 google/protobuf/compiler/java/java_primitive_field.h \
Bo Yang5db21732015-05-21 14:28:59 -0700407 google/protobuf/compiler/java/java_primitive_field_lite.cc \
408 google/protobuf/compiler/java/java_primitive_field_lite.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000409 google/protobuf/compiler/java/java_shared_code_generator.cc \
410 google/protobuf/compiler/java/java_shared_code_generator.h \
temporal40ee5512008-07-10 02:12:20 +0000411 google/protobuf/compiler/java/java_service.cc \
412 google/protobuf/compiler/java/java_service.h \
liujisi@google.com33165fe2010-11-02 13:14:58 +0000413 google/protobuf/compiler/java/java_string_field.cc \
414 google/protobuf/compiler/java/java_string_field.h \
Bo Yang5db21732015-05-21 14:28:59 -0700415 google/protobuf/compiler/java/java_string_field_lite.cc \
416 google/protobuf/compiler/java/java_string_field_lite.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000417 google/protobuf/compiler/java/java_doc_comment.cc \
418 google/protobuf/compiler/java/java_doc_comment.h \
Feng Xiaoe841bac2015-12-11 17:09:20 -0800419 google/protobuf/compiler/js/js_generator.cc \
Adam Cozzette5a76e632016-11-17 16:48:38 -0800420 google/protobuf/compiler/js/well_known_types_embed.cc \
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400421 google/protobuf/compiler/objectivec/objectivec_enum.cc \
422 google/protobuf/compiler/objectivec/objectivec_enum.h \
423 google/protobuf/compiler/objectivec/objectivec_enum_field.cc \
424 google/protobuf/compiler/objectivec/objectivec_enum_field.h \
425 google/protobuf/compiler/objectivec/objectivec_extension.cc \
426 google/protobuf/compiler/objectivec/objectivec_extension.h \
427 google/protobuf/compiler/objectivec/objectivec_field.cc \
428 google/protobuf/compiler/objectivec/objectivec_field.h \
429 google/protobuf/compiler/objectivec/objectivec_file.cc \
430 google/protobuf/compiler/objectivec/objectivec_file.h \
431 google/protobuf/compiler/objectivec/objectivec_generator.cc \
432 google/protobuf/compiler/objectivec/objectivec_helpers.cc \
433 google/protobuf/compiler/objectivec/objectivec_helpers.h \
434 google/protobuf/compiler/objectivec/objectivec_map_field.cc \
435 google/protobuf/compiler/objectivec/objectivec_map_field.h \
436 google/protobuf/compiler/objectivec/objectivec_message.cc \
437 google/protobuf/compiler/objectivec/objectivec_message.h \
438 google/protobuf/compiler/objectivec/objectivec_message_field.cc \
439 google/protobuf/compiler/objectivec/objectivec_message_field.h \
Dave MacLachlanbe83b292018-10-25 12:35:20 -0700440 google/protobuf/compiler/objectivec/objectivec_nsobject_methods.h \
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400441 google/protobuf/compiler/objectivec/objectivec_oneof.cc \
442 google/protobuf/compiler/objectivec/objectivec_oneof.h \
443 google/protobuf/compiler/objectivec/objectivec_primitive_field.cc \
444 google/protobuf/compiler/objectivec/objectivec_primitive_field.h \
Paul Yange0e54662016-09-15 11:09:01 -0700445 google/protobuf/compiler/php/php_generator.cc \
Chris Fallin973f4252014-11-18 14:19:58 -0800446 google/protobuf/compiler/python/python_generator.cc \
Jan Tattermusch685ae362015-03-16 19:07:16 -0700447 google/protobuf/compiler/ruby/ruby_generator.cc \
Jon Skeet67dd42c2015-10-01 10:36:58 +0100448 google/protobuf/compiler/csharp/csharp_doc_comment.cc \
449 google/protobuf/compiler/csharp/csharp_doc_comment.h \
Jan Tattermusch685ae362015-03-16 19:07:16 -0700450 google/protobuf/compiler/csharp/csharp_enum.cc \
Jan Tattermusch7eaf4382015-04-17 16:51:43 -0700451 google/protobuf/compiler/csharp/csharp_enum.h \
Jan Tattermusch685ae362015-03-16 19:07:16 -0700452 google/protobuf/compiler/csharp/csharp_enum_field.cc \
Jan Tattermusch7eaf4382015-04-17 16:51:43 -0700453 google/protobuf/compiler/csharp/csharp_enum_field.h \
Jan Tattermusch685ae362015-03-16 19:07:16 -0700454 google/protobuf/compiler/csharp/csharp_field_base.cc \
Jan Tattermusch7eaf4382015-04-17 16:51:43 -0700455 google/protobuf/compiler/csharp/csharp_field_base.h \
Jan Tattermusch685ae362015-03-16 19:07:16 -0700456 google/protobuf/compiler/csharp/csharp_generator.cc \
457 google/protobuf/compiler/csharp/csharp_helpers.cc \
Jan Tattermusch7eaf4382015-04-17 16:51:43 -0700458 google/protobuf/compiler/csharp/csharp_helpers.h \
Jon Skeet0d684d32015-06-24 17:21:55 +0100459 google/protobuf/compiler/csharp/csharp_map_field.cc \
460 google/protobuf/compiler/csharp/csharp_map_field.h \
Jan Tattermusch685ae362015-03-16 19:07:16 -0700461 google/protobuf/compiler/csharp/csharp_message.cc \
Jan Tattermusch7eaf4382015-04-17 16:51:43 -0700462 google/protobuf/compiler/csharp/csharp_message.h \
Jan Tattermusch685ae362015-03-16 19:07:16 -0700463 google/protobuf/compiler/csharp/csharp_message_field.cc \
Jan Tattermusch7eaf4382015-04-17 16:51:43 -0700464 google/protobuf/compiler/csharp/csharp_message_field.h \
Gaurav Vaish74d8b0b2016-03-24 11:44:56 -0700465 google/protobuf/compiler/csharp/csharp_options.h \
Jan Tattermusch685ae362015-03-16 19:07:16 -0700466 google/protobuf/compiler/csharp/csharp_primitive_field.cc \
Jan Tattermusch7eaf4382015-04-17 16:51:43 -0700467 google/protobuf/compiler/csharp/csharp_primitive_field.h \
Jon Skeeta6361a12015-11-19 13:05:17 +0000468 google/protobuf/compiler/csharp/csharp_reflection_class.cc \
469 google/protobuf/compiler/csharp/csharp_reflection_class.h \
Jan Tattermusch685ae362015-03-16 19:07:16 -0700470 google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc \
Jan Tattermusch7eaf4382015-04-17 16:51:43 -0700471 google/protobuf/compiler/csharp/csharp_repeated_enum_field.h \
Jan Tattermusch685ae362015-03-16 19:07:16 -0700472 google/protobuf/compiler/csharp/csharp_repeated_message_field.cc \
Jan Tattermusch7eaf4382015-04-17 16:51:43 -0700473 google/protobuf/compiler/csharp/csharp_repeated_message_field.h \
Jan Tattermusch685ae362015-03-16 19:07:16 -0700474 google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc \
Jan Tattermusch7eaf4382015-04-17 16:51:43 -0700475 google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h \
Jan Tattermusch685ae362015-03-16 19:07:16 -0700476 google/protobuf/compiler/csharp/csharp_source_generator_base.cc \
Jan Tattermusch7eaf4382015-04-17 16:51:43 -0700477 google/protobuf/compiler/csharp/csharp_source_generator_base.h \
Jon Skeetb2ac8682015-07-15 13:17:42 +0100478 google/protobuf/compiler/csharp/csharp_wrapper_field.cc \
479 google/protobuf/compiler/csharp/csharp_wrapper_field.h
temporal40ee5512008-07-10 02:12:20 +0000480
Adam Cozzetteb40d3182017-01-03 13:07:21 -0800481bin_PROGRAMS = protoc
temporal40ee5512008-07-10 02:12:20 +0000482protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
483protoc_SOURCES = google/protobuf/compiler/main.cc
484
485# Tests ==============================================================
486
Feng Xiaoe96ff302015-06-15 18:21:48 -0700487protoc_inputs = \
488 google/protobuf/any_test.proto \
489 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto \
490 google/protobuf/map_lite_unittest.proto \
491 google/protobuf/map_proto2_unittest.proto \
492 google/protobuf/map_unittest.proto \
493 google/protobuf/unittest_arena.proto \
494 google/protobuf/unittest_custom_options.proto \
495 google/protobuf/unittest_drop_unknown_fields.proto \
496 google/protobuf/unittest_embed_optimize_for.proto \
497 google/protobuf/unittest_empty.proto \
498 google/protobuf/unittest_enormous_descriptor.proto \
499 google/protobuf/unittest_import_lite.proto \
500 google/protobuf/unittest_import.proto \
501 google/protobuf/unittest_import_public_lite.proto \
502 google/protobuf/unittest_import_public.proto \
Feng Xiaod36c0c52017-03-29 14:32:48 -0700503 google/protobuf/unittest_lazy_dependencies.proto \
504 google/protobuf/unittest_lazy_dependencies_custom_option.proto \
505 google/protobuf/unittest_lazy_dependencies_enum.proto \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700506 google/protobuf/unittest_lite_imports_nonlite.proto \
507 google/protobuf/unittest_lite.proto \
508 google/protobuf/unittest_mset.proto \
Jisi Liub0f66112015-08-21 11:18:45 -0700509 google/protobuf/unittest_mset_wire_format.proto \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700510 google/protobuf/unittest_no_field_presence.proto \
511 google/protobuf/unittest_no_generic_services.proto \
512 google/protobuf/unittest_optimize_for.proto \
513 google/protobuf/unittest_preserve_unknown_enum2.proto \
514 google/protobuf/unittest_preserve_unknown_enum.proto \
515 google/protobuf/unittest.proto \
Feng Xiao6bbe1972018-08-08 17:00:41 -0700516 google/protobuf/unittest_proto3.proto \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700517 google/protobuf/unittest_proto3_arena.proto \
Jisi Liu55fdbe52017-08-23 11:35:48 -0700518 google/protobuf/unittest_proto3_arena_lite.proto \
519 google/protobuf/unittest_proto3_lite.proto \
Joshua Habermanb99994d2020-03-31 16:25:37 -0700520 google/protobuf/unittest_proto3_optional.proto \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700521 google/protobuf/unittest_well_known_types.proto \
522 google/protobuf/util/internal/testdata/anys.proto \
523 google/protobuf/util/internal/testdata/books.proto \
524 google/protobuf/util/internal/testdata/default_value.proto \
525 google/protobuf/util/internal/testdata/default_value_test.proto \
526 google/protobuf/util/internal/testdata/field_mask.proto \
527 google/protobuf/util/internal/testdata/maps.proto \
Jisi Liub0f66112015-08-21 11:18:45 -0700528 google/protobuf/util/internal/testdata/oneofs.proto \
Bo Yangcc8ca5b2016-09-19 13:45:07 -0700529 google/protobuf/util/internal/testdata/proto3.proto \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700530 google/protobuf/util/internal/testdata/struct.proto \
531 google/protobuf/util/internal/testdata/timestamp_duration.proto \
Bo Yangcc8ca5b2016-09-19 13:45:07 -0700532 google/protobuf/util/internal/testdata/wrappers.proto \
Feng Xiao6bbe1972018-08-08 17:00:41 -0700533 google/protobuf/util/json_format.proto \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700534 google/protobuf/util/json_format_proto3.proto \
Feng Xiaob7610f12015-12-22 14:36:04 -0800535 google/protobuf/util/message_differencer_unittest.proto \
Tamir Duberstein53bee662015-03-31 10:19:05 -0700536 google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto
temporal40ee5512008-07-10 02:12:20 +0000537
538EXTRA_DIST = \
539 $(protoc_inputs) \
540 solaris/libstdc++.la \
Jisi Liu55fdbe52017-08-23 11:35:48 -0700541 google/protobuf/test_messages_proto3.proto \
542 google/protobuf/test_messages_proto2.proto \
kenton@google.come59427a2009-04-16 22:30:56 +0000543 google/protobuf/io/gzip_stream.h \
544 google/protobuf/io/gzip_stream_unittest.sh \
temporal40ee5512008-07-10 02:12:20 +0000545 google/protobuf/testdata/golden_message \
Feng Xiao0b682552016-07-14 15:21:10 -0700546 google/protobuf/testdata/golden_message_maps \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000547 google/protobuf/testdata/golden_message_oneof_implemented \
Josh Haberman0b70a432015-02-25 20:17:32 -0800548 google/protobuf/testdata/golden_message_proto3 \
kenton@google.com2d6daa72009-01-22 01:27:00 +0000549 google/protobuf/testdata/golden_packed_fields_message \
jieluo@google.come61b5132014-08-14 21:51:48 +0000550 google/protobuf/testdata/bad_utf8_string \
Bo Yang5db21732015-05-21 14:28:59 -0700551 google/protobuf/testdata/map_test_data.txt \
jieluo@google.come61b5132014-08-14 21:51:48 +0000552 google/protobuf/testdata/text_format_unittest_data.txt \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000553 google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt \
jieluo@google.combde4a322014-08-12 21:10:30 +0000554 google/protobuf/testdata/text_format_unittest_data_pointy.txt \
jieluo@google.come61b5132014-08-14 21:51:48 +0000555 google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000556 google/protobuf/testdata/text_format_unittest_extensions_data.txt \
jieluo@google.combde4a322014-08-12 21:10:30 +0000557 google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \
temporal40ee5512008-07-10 02:12:20 +0000558 google/protobuf/package_info.h \
559 google/protobuf/io/package_info.h \
Jisi Liu3916a0a2016-08-01 18:47:45 -0700560 google/protobuf/util/package_info.h \
Bo Yanga9332e22015-05-25 16:04:36 -0700561 google/protobuf/compiler/ruby/ruby_generated_code.proto \
Josh Haberman43b36dd2016-07-26 10:28:18 -0700562 google/protobuf/compiler/ruby/ruby_generated_code_pb.rb \
Joe Bolingerae85b452019-03-02 10:38:10 -0800563 google/protobuf/compiler/ruby/ruby_generated_code_proto2.proto \
564 google/protobuf/compiler/ruby/ruby_generated_code_proto2_pb.rb \
565 google/protobuf/compiler/ruby/ruby_generated_pkg_explicit.proto \
566 google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy.proto \
567 google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb \
568 google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb \
569 google/protobuf/compiler/ruby/ruby_generated_pkg_implicit.proto \
570 google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb \
kenton@google.com8aae2a22009-08-11 00:23:25 +0000571 google/protobuf/compiler/package_info.h \
Feng Xiao60cb0942016-07-19 16:15:42 -0700572 google/protobuf/compiler/zip_output_unittest.sh \
Alexandros Frantzis13d165d2017-03-10 14:25:27 +0200573 libprotobuf-lite.map \
574 libprotobuf.map \
575 libprotoc.map \
Feng Xiao60cb0942016-07-19 16:15:42 -0700576 README.md
temporal40ee5512008-07-10 02:12:20 +0000577
kenton@google.com80b1d622009-07-29 01:13:20 +0000578protoc_lite_outputs = \
Jisi Liu885b6122015-02-28 14:51:22 -0800579 google/protobuf/map_lite_unittest.pb.cc \
580 google/protobuf/map_lite_unittest.pb.h \
kenton@google.com80b1d622009-07-29 01:13:20 +0000581 google/protobuf/unittest_lite.pb.cc \
582 google/protobuf/unittest_lite.pb.h \
583 google/protobuf/unittest_import_lite.pb.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000584 google/protobuf/unittest_import_lite.pb.h \
585 google/protobuf/unittest_import_public_lite.pb.cc \
586 google/protobuf/unittest_import_public_lite.pb.h
kenton@google.com80b1d622009-07-29 01:13:20 +0000587
Feng Xiaoe96ff302015-06-15 18:21:48 -0700588protoc_outputs = \
589 $(protoc_lite_outputs) \
590 google/protobuf/any_test.pb.cc \
591 google/protobuf/any_test.pb.h \
592 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \
593 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h \
594 google/protobuf/compiler/cpp/cpp_test_large_enum_value.pb.cc \
595 google/protobuf/compiler/cpp/cpp_test_large_enum_value.pb.h \
596 google/protobuf/map_proto2_unittest.pb.cc \
597 google/protobuf/map_proto2_unittest.pb.h \
598 google/protobuf/map_unittest.pb.cc \
599 google/protobuf/map_unittest.pb.h \
600 google/protobuf/unittest_arena.pb.cc \
601 google/protobuf/unittest_arena.pb.h \
602 google/protobuf/unittest_custom_options.pb.cc \
603 google/protobuf/unittest_custom_options.pb.h \
604 google/protobuf/unittest_drop_unknown_fields.pb.cc \
605 google/protobuf/unittest_drop_unknown_fields.pb.h \
606 google/protobuf/unittest_embed_optimize_for.pb.cc \
607 google/protobuf/unittest_embed_optimize_for.pb.h \
608 google/protobuf/unittest_empty.pb.cc \
609 google/protobuf/unittest_empty.pb.h \
610 google/protobuf/unittest_enormous_descriptor.pb.cc \
611 google/protobuf/unittest_enormous_descriptor.pb.h \
612 google/protobuf/unittest_import.pb.cc \
613 google/protobuf/unittest_import.pb.h \
614 google/protobuf/unittest_import_public.pb.cc \
615 google/protobuf/unittest_import_public.pb.h \
Feng Xiaod36c0c52017-03-29 14:32:48 -0700616 google/protobuf/unittest_lazy_dependencies.pb.cc \
617 google/protobuf/unittest_lazy_dependencies.pb.h \
618 google/protobuf/unittest_lazy_dependencies_custom_option.pb.cc \
619 google/protobuf/unittest_lazy_dependencies_custom_option.pb.h \
620 google/protobuf/unittest_lazy_dependencies_enum.pb.cc \
621 google/protobuf/unittest_lazy_dependencies_enum.pb.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700622 google/protobuf/unittest_lite_imports_nonlite.pb.cc \
623 google/protobuf/unittest_lite_imports_nonlite.pb.h \
624 google/protobuf/unittest_mset.pb.cc \
625 google/protobuf/unittest_mset.pb.h \
Jisi Liub0f66112015-08-21 11:18:45 -0700626 google/protobuf/unittest_mset_wire_format.pb.cc \
627 google/protobuf/unittest_mset_wire_format.pb.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700628 google/protobuf/unittest_no_field_presence.pb.cc \
629 google/protobuf/unittest_no_field_presence.pb.h \
630 google/protobuf/unittest_no_generic_services.pb.cc \
631 google/protobuf/unittest_no_generic_services.pb.h \
632 google/protobuf/unittest_optimize_for.pb.cc \
633 google/protobuf/unittest_optimize_for.pb.h \
634 google/protobuf/unittest.pb.cc \
635 google/protobuf/unittest.pb.h \
636 google/protobuf/unittest_preserve_unknown_enum2.pb.cc \
637 google/protobuf/unittest_preserve_unknown_enum2.pb.h \
638 google/protobuf/unittest_preserve_unknown_enum.pb.cc \
639 google/protobuf/unittest_preserve_unknown_enum.pb.h \
Feng Xiao6bbe1972018-08-08 17:00:41 -0700640 google/protobuf/unittest_proto3.pb.cc \
641 google/protobuf/unittest_proto3.pb.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700642 google/protobuf/unittest_proto3_arena.pb.cc \
643 google/protobuf/unittest_proto3_arena.pb.h \
Jisi Liue8fc0662017-08-10 10:47:06 -0700644 google/protobuf/unittest_proto3_arena_lite.pb.cc \
645 google/protobuf/unittest_proto3_arena_lite.pb.h \
646 google/protobuf/unittest_proto3_lite.pb.cc \
647 google/protobuf/unittest_proto3_lite.pb.h \
Joshua Habermanb99994d2020-03-31 16:25:37 -0700648 google/protobuf/unittest_proto3_optional.pb.cc \
649 google/protobuf/unittest_proto3_optional.pb.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700650 google/protobuf/unittest_well_known_types.pb.cc \
651 google/protobuf/unittest_well_known_types.pb.h \
652 google/protobuf/util/internal/testdata/anys.pb.cc \
653 google/protobuf/util/internal/testdata/anys.pb.h \
654 google/protobuf/util/internal/testdata/books.pb.cc \
655 google/protobuf/util/internal/testdata/books.pb.h \
656 google/protobuf/util/internal/testdata/default_value.pb.cc \
657 google/protobuf/util/internal/testdata/default_value.pb.h \
658 google/protobuf/util/internal/testdata/default_value_test.pb.cc \
659 google/protobuf/util/internal/testdata/default_value_test.pb.h \
660 google/protobuf/util/internal/testdata/field_mask.pb.cc \
661 google/protobuf/util/internal/testdata/field_mask.pb.h \
662 google/protobuf/util/internal/testdata/maps.pb.cc \
663 google/protobuf/util/internal/testdata/maps.pb.h \
Jisi Liub0f66112015-08-21 11:18:45 -0700664 google/protobuf/util/internal/testdata/oneofs.pb.cc \
665 google/protobuf/util/internal/testdata/oneofs.pb.h \
Bo Yangcc8ca5b2016-09-19 13:45:07 -0700666 google/protobuf/util/internal/testdata/proto3.pb.cc \
667 google/protobuf/util/internal/testdata/proto3.pb.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700668 google/protobuf/util/internal/testdata/struct.pb.cc \
669 google/protobuf/util/internal/testdata/struct.pb.h \
670 google/protobuf/util/internal/testdata/timestamp_duration.pb.cc \
671 google/protobuf/util/internal/testdata/timestamp_duration.pb.h \
Bo Yangcc8ca5b2016-09-19 13:45:07 -0700672 google/protobuf/util/internal/testdata/wrappers.pb.cc \
673 google/protobuf/util/internal/testdata/wrappers.pb.h \
Feng Xiao6bbe1972018-08-08 17:00:41 -0700674 google/protobuf/util/json_format.pb.cc \
675 google/protobuf/util/json_format.pb.h \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700676 google/protobuf/util/json_format_proto3.pb.cc \
Feng Xiaob7610f12015-12-22 14:36:04 -0800677 google/protobuf/util/json_format_proto3.pb.h \
678 google/protobuf/util/message_differencer_unittest.pb.cc \
679 google/protobuf/util/message_differencer_unittest.pb.h
temporal40ee5512008-07-10 02:12:20 +0000680
kenton@google.com9824eda2009-05-06 17:49:37 +0000681if USE_EXTERNAL_PROTOC
682
683unittest_proto_middleman: $(protoc_inputs)
kenton@google.com721995d2009-09-11 22:08:40 +0000684 $(PROTOC) -I$(srcdir) --cpp_out=. $^
kenton@google.com9824eda2009-05-06 17:49:37 +0000685 touch unittest_proto_middleman
686
687else
688
kenton@google.com38fcd392010-01-08 04:48:19 +0000689# We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is
690# relative to srcdir, which may not be the same as the current directory when
691# building out-of-tree.
temporal40ee5512008-07-10 02:12:20 +0000692unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs)
Joshua Habermanb99994d2020-03-31 16:25:37 -0700693 oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) --experimental_allow_proto3_optional )
temporal40ee5512008-07-10 02:12:20 +0000694 touch unittest_proto_middleman
695
kenton@google.com9824eda2009-05-06 17:49:37 +0000696endif
697
temporal40ee5512008-07-10 02:12:20 +0000698$(protoc_outputs): unittest_proto_middleman
699
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000700COMMON_TEST_SOURCES = \
Jisi Liu885b6122015-02-28 14:51:22 -0800701 google/protobuf/arena_test_util.cc \
702 google/protobuf/arena_test_util.h \
Hao Nguyen51026d92019-06-26 11:01:34 -0700703 google/protobuf/map_test_util.inc \
Feng Xiaof157a562014-11-14 11:50:31 -0800704 google/protobuf/map_test_util.h \
Jisi Liu885b6122015-02-28 14:51:22 -0800705 google/protobuf/map_test_util_impl.h \
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000706 google/protobuf/test_util.cc \
707 google/protobuf/test_util.h \
Adam Cozzette00b1c142018-03-14 14:06:18 -0700708 google/protobuf/test_util.inc \
Feng Xiaoacd5b052018-08-09 21:21:01 -0700709 google/protobuf/test_util2.h \
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000710 google/protobuf/testing/googletest.cc \
711 google/protobuf/testing/googletest.h \
712 google/protobuf/testing/file.cc \
713 google/protobuf/testing/file.h
714
Carlos O'Ryan3c5442a2018-03-26 16:54:32 -0400715GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
716GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
717GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
718GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
kenton@google.comd2fcbba2010-01-04 19:47:18 +0000719check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
Feng Xiaob17ec3c2015-08-23 17:50:38 -0700720 protobuf-lite-test test_plugin protobuf-lite-arena-test \
Feng Xiao16adea32016-07-22 14:15:19 -0700721 no-warning-test $(GZCHECKPROGRAMS)
kenton@google.com37ad00d2009-04-21 21:00:39 +0000722protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
Carlos O'Ryan3c5442a2018-03-26 16:54:32 -0400723 $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
724 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
725 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
726protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
727 -I$(GOOGLEMOCK_SRC_DIR)/include
kenton@google.com42c81e12009-05-06 01:15:06 +0000728# Disable optimization for tests unless the user explicitly asked for it,
729# since test_util.cc takes forever to compile with optimization (with GCC).
730# See configure.ac for more info.
731protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
Yannic Bonenberger49794892019-07-20 12:49:03 +0200732# Doesn't pass on Windows with MSVC
733NON_MSVC_TEST_SOURCES = \
734 google/protobuf/compiler/command_line_interface_unittest.cc
temporal40ee5512008-07-10 02:12:20 +0000735protobuf_test_SOURCES = \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700736 google/protobuf/stubs/bytestream_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000737 google/protobuf/stubs/common_unittest.cc \
Jisi Liub0f66112015-08-21 11:18:45 -0700738 google/protobuf/stubs/int128_unittest.cc \
Hao Nguyen176f7db2019-04-09 06:23:32 -0700739 google/protobuf/io/io_win32_unittest.cc \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700740 google/protobuf/stubs/statusor_test.cc \
741 google/protobuf/stubs/status_test.cc \
742 google/protobuf/stubs/stringpiece_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000743 google/protobuf/stubs/stringprintf_unittest.cc \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700744 google/protobuf/stubs/structurally_valid_unittest.cc \
745 google/protobuf/stubs/strutil_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000746 google/protobuf/stubs/template_util_unittest.cc \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700747 google/protobuf/stubs/time_test.cc \
Bo Yang5db21732015-05-21 14:28:59 -0700748 google/protobuf/any_test.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800749 google/protobuf/arenastring_unittest.cc \
750 google/protobuf/arena_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000751 google/protobuf/descriptor_database_unittest.cc \
752 google/protobuf/descriptor_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800753 google/protobuf/drop_unknown_fields_test.cc \
temporal40ee5512008-07-10 02:12:20 +0000754 google/protobuf/dynamic_message_unittest.cc \
755 google/protobuf/extension_set_unittest.cc \
756 google/protobuf/generated_message_reflection_unittest.cc \
Feng Xiaof157a562014-11-14 11:50:31 -0800757 google/protobuf/map_field_test.cc \
758 google/protobuf/map_test.cc \
temporal40ee5512008-07-10 02:12:20 +0000759 google/protobuf/message_unittest.cc \
Adam Cozzette00b1c142018-03-14 14:06:18 -0700760 google/protobuf/message_unittest.inc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800761 google/protobuf/no_field_presence_test.cc \
762 google/protobuf/preserve_unknown_enum_test.cc \
Jisi Liu09354db2017-07-18 15:38:30 -0700763 google/protobuf/proto3_arena_lite_unittest.cc \
Adam Cozzette0400cca2018-03-13 16:37:29 -0700764 google/protobuf/proto3_arena_unittest.cc \
Jisi Liu09354db2017-07-18 15:38:30 -0700765 google/protobuf/proto3_lite_unittest.cc \
Feng Xiaoacd5b052018-08-09 21:21:01 -0700766 google/protobuf/proto3_lite_unittest.inc \
temporal40ee5512008-07-10 02:12:20 +0000767 google/protobuf/reflection_ops_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000768 google/protobuf/repeated_field_reflection_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800769 google/protobuf/repeated_field_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000770 google/protobuf/text_format_unittest.cc \
771 google/protobuf/unknown_field_set_unittest.cc \
Feng Xiao33c92802015-05-11 13:47:41 -0700772 google/protobuf/well_known_types_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000773 google/protobuf/wire_format_unittest.cc \
774 google/protobuf/io/coded_stream_unittest.cc \
775 google/protobuf/io/printer_unittest.cc \
776 google/protobuf/io/tokenizer_unittest.cc \
777 google/protobuf/io/zero_copy_stream_unittest.cc \
Jisi Liu1a7a7fc2017-10-18 12:22:18 -0700778 google/protobuf/compiler/annotation_test_util.h \
779 google/protobuf/compiler/annotation_test_util.cc \
temporal40ee5512008-07-10 02:12:20 +0000780 google/protobuf/compiler/importer_unittest.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000781 google/protobuf/compiler/mock_code_generator.cc \
782 google/protobuf/compiler/mock_code_generator.h \
temporal40ee5512008-07-10 02:12:20 +0000783 google/protobuf/compiler/parser_unittest.cc \
784 google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \
Jisi Liu09354db2017-07-18 15:38:30 -0700785 google/protobuf/compiler/cpp/cpp_move_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000786 google/protobuf/compiler/cpp/cpp_unittest.h \
temporal40ee5512008-07-10 02:12:20 +0000787 google/protobuf/compiler/cpp/cpp_unittest.cc \
Adam Cozzette00b1c142018-03-14 14:06:18 -0700788 google/protobuf/compiler/cpp/cpp_unittest.inc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000789 google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \
Jisi Liu5221dcb2016-01-29 13:51:05 -0800790 google/protobuf/compiler/cpp/metadata_test.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000791 google/protobuf/compiler/java/java_plugin_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000792 google/protobuf/compiler/java/java_doc_comment_unittest.cc \
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400793 google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000794 google/protobuf/compiler/python/python_plugin_unittest.cc \
Chris Fallin3f3820d2015-01-14 15:44:46 -0800795 google/protobuf/compiler/ruby/ruby_generator_unittest.cc \
Jie Luoaf13bff2017-03-02 17:15:58 -0800796 google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc \
Jan Tattermusch685ae362015-03-16 19:07:16 -0700797 google/protobuf/compiler/csharp/csharp_generator_unittest.cc \
Byron Yicb3e84b2017-03-16 20:01:22 +0800798 google/protobuf/util/delimited_message_util_test.cc \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700799 google/protobuf/util/field_comparator_test.cc \
Jisi Liub0f66112015-08-21 11:18:45 -0700800 google/protobuf/util/field_mask_util_test.cc \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700801 google/protobuf/util/internal/default_value_objectwriter_test.cc \
802 google/protobuf/util/internal/json_objectwriter_test.cc \
803 google/protobuf/util/internal/json_stream_parser_test.cc \
804 google/protobuf/util/internal/protostream_objectsource_test.cc \
805 google/protobuf/util/internal/protostream_objectwriter_test.cc \
806 google/protobuf/util/internal/type_info_test_helper.cc \
807 google/protobuf/util/json_util_test.cc \
Feng Xiaob7610f12015-12-22 14:36:04 -0800808 google/protobuf/util/message_differencer_unittest.cc \
Jisi Liub0f66112015-08-21 11:18:45 -0700809 google/protobuf/util/time_util_test.cc \
Feng Xiaoe96ff302015-06-15 18:21:48 -0700810 google/protobuf/util/type_resolver_util_test.cc \
Yannic Bonenberger49794892019-07-20 12:49:03 +0200811 $(NON_MSVC_TEST_SOURCES) \
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000812 $(COMMON_TEST_SOURCES)
813nodist_protobuf_test_SOURCES = $(protoc_outputs)
Feng Xiaoc337d9f2017-11-21 13:19:45 -0800814$(am_protobuf_test_OBJECTS): unittest_proto_middleman
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000815
816# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
817protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000818 libprotoc.la \
Carlos O'Ryan3c5442a2018-03-26 16:54:32 -0400819 $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
820 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
821 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
822protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
823 -I$(GOOGLETEST_SRC_DIR)/include \
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000824 -DPROTOBUF_TEST_NO_DESCRIPTORS
kenton@google.com4f3491e2009-07-29 21:33:08 +0000825protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000826protobuf_lazy_descriptor_test_SOURCES = \
827 google/protobuf/compiler/cpp/cpp_unittest.cc \
828 $(COMMON_TEST_SOURCES)
829nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs)
Feng Xiaoc337d9f2017-11-21 13:19:45 -0800830$(am_protobuf_lazy_descriptor_test_OBJECTS): unittest_proto_middleman
temporal40ee5512008-07-10 02:12:20 +0000831
Feng Xiaob17ec3c2015-08-23 17:50:38 -0700832COMMON_LITE_TEST_SOURCES = \
Bo Yang5db21732015-05-21 14:28:59 -0700833 google/protobuf/arena_test_util.cc \
834 google/protobuf/arena_test_util.h \
Jisi Liu885b6122015-02-28 14:51:22 -0800835 google/protobuf/map_lite_test_util.cc \
836 google/protobuf/map_lite_test_util.h \
kenton@google.com80b1d622009-07-29 01:13:20 +0000837 google/protobuf/test_util_lite.cc \
838 google/protobuf/test_util_lite.h
Feng Xiaob17ec3c2015-08-23 17:50:38 -0700839
840# Build lite_unittest separately, since it doesn't use gtest. It can't
841# depend on gtest because our internal version of gtest depend on proto
842# full runtime and we want to make sure this test builds without full
843# runtime.
Carlos O'Ryan3c5442a2018-03-26 16:54:32 -0400844protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
845 $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
846 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
847 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
848protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
849 -I$(GOOGLETEST_SRC_DIR)/include
Feng Xiaob17ec3c2015-08-23 17:50:38 -0700850protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
851protobuf_lite_test_SOURCES = \
852 google/protobuf/lite_unittest.cc \
853 $(COMMON_LITE_TEST_SOURCES)
kenton@google.com80b1d622009-07-29 01:13:20 +0000854nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs)
Feng Xiaoc337d9f2017-11-21 13:19:45 -0800855$(am_protobuf_lite_test_OBJECTS): unittest_proto_middleman
kenton@google.com80b1d622009-07-29 01:13:20 +0000856
Feng Xiaob17ec3c2015-08-23 17:50:38 -0700857# lite_arena_unittest depends on gtest because teboring@ found that without
858# gtest when building the test internally our memory sanitizer doesn't detect
859# memory leaks (don't know why).
860protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
Carlos O'Ryan3c5442a2018-03-26 16:54:32 -0400861 $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
862 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
863 $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
864protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
865 -I$(GOOGLETEST_SRC_DIR)/include
Feng Xiaob17ec3c2015-08-23 17:50:38 -0700866protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
867protobuf_lite_arena_test_SOURCES = \
868 google/protobuf/lite_arena_unittest.cc \
869 $(COMMON_LITE_TEST_SOURCES)
870nodist_protobuf_lite_arena_test_SOURCES = $(protoc_lite_outputs)
Feng Xiaoc337d9f2017-11-21 13:19:45 -0800871$(am_protobuf_lite_arena_test_OBJECTS): unittest_proto_middleman
Feng Xiaob17ec3c2015-08-23 17:50:38 -0700872
kenton@google.comfccb1462009-12-18 02:11:36 +0000873# Test plugin binary.
874test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
Carlos O'Ryan3c5442a2018-03-26 16:54:32 -0400875 $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
876test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
kenton@google.comfccb1462009-12-18 02:11:36 +0000877test_plugin_SOURCES = \
878 google/protobuf/compiler/mock_code_generator.cc \
879 google/protobuf/testing/file.cc \
880 google/protobuf/testing/file.h \
881 google/protobuf/compiler/test_plugin.cc
882
kenton@google.come59427a2009-04-16 22:30:56 +0000883if HAVE_ZLIB
884zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
885zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc
886
887zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
888zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc
889endif
890
Feng Xiao16adea32016-07-22 14:15:19 -0700891# This test target is to ensure all our public header files and generated
892# code is free from warnings. We have to be more pedantic about these
893# files because they are compiled by users with different compiler flags.
894no_warning_test.cc:
895 echo "// Generated from Makefile.am" > no_warning_test.cc
896 for FILE in $(nobase_include_HEADERS); do \
Deanna Garciad43433d2021-05-18 20:44:04 +0000897 if [[ $$FILE != *.inc ]]; then \
898 echo "#include <$${FILE}>" >> no_warning_test.cc; \
899 fi \
Feng Xiao16adea32016-07-22 14:15:19 -0700900 done
Jisi Liue8fc0662017-08-10 10:47:06 -0700901 echo "int main(int, char**) { return 0; }" >> no_warning_test.cc
Feng Xiao16adea32016-07-22 14:15:19 -0700902
Jisi Liue8fc0662017-08-10 10:47:06 -0700903no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
Feng Xiao16adea32016-07-22 14:15:19 -0700904no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \
Adam Cozzette45aba802019-03-11 14:39:49 -0700905 -Wall -Wextra -Werror -Wno-unused-parameter
Feng Xiao16adea32016-07-22 14:15:19 -0700906nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs)
907
kenton@google.comd2fcbba2010-01-04 19:47:18 +0000908TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
Feng Xiaob17ec3c2015-08-23 17:50:38 -0700909 google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
Feng Xiao16adea32016-07-22 14:15:19 -0700910 protobuf-lite-arena-test no-warning-test