• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
7else
8GZCHECKPROGRAMS =
9GZHEADERS =
10GZTESTS =
11endif
12
13if GCC
14# These are good warnings to turn on by default
15NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare
16else
17NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS)
18endif
19
20AM_CXXFLAGS = $(NO_OPT_CXXFLAGS) $(PROTOBUF_OPT_FLAG)
21
22AM_LDFLAGS = $(PTHREAD_CFLAGS)
23
24# If I say "dist_include_DATA", automake complains that $(includedir) is not
25# a "legitimate" directory for DATA.  Screw you, automake.
26protodir = $(includedir)
27nobase_dist_proto_DATA = google/protobuf/descriptor.proto \
28                         google/protobuf/compiler/plugin.proto
29
30# Not sure why these don't get cleaned automatically.
31clean-local:
32	rm -f *.loT
33
34CLEANFILES = $(protoc_outputs) unittest_proto_middleman \
35             testzip.jar testzip.list testzip.proto testzip.zip
36
37MAINTAINERCLEANFILES =   \
38  Makefile.in
39
40nobase_include_HEADERS =                                        \
41  google/protobuf/stubs/atomicops.h                             \
42  google/protobuf/stubs/atomicops_internals_arm_gcc.h           \
43  google/protobuf/stubs/atomicops_internals_arm64_gcc.h         \
44  google/protobuf/stubs/atomicops_internals_arm_qnx.h           \
45  google/protobuf/stubs/atomicops_internals_atomicword_compat.h \
46  google/protobuf/stubs/atomicops_internals_generic_gcc.h       \
47  google/protobuf/stubs/atomicops_internals_macosx.h            \
48  google/protobuf/stubs/atomicops_internals_mips_gcc.h          \
49  google/protobuf/stubs/atomicops_internals_pnacl.h             \
50  google/protobuf/stubs/atomicops_internals_tsan.h              \
51  google/protobuf/stubs/atomicops_internals_x86_gcc.h           \
52  google/protobuf/stubs/atomicops_internals_x86_msvc.h          \
53  google/protobuf/stubs/common.h                                \
54  google/protobuf/stubs/platform_macros.h                       \
55  google/protobuf/stubs/once.h                                  \
56  google/protobuf/stubs/stl_util.h                              \
57  google/protobuf/stubs/template_util.h                         \
58  google/protobuf/stubs/type_traits.h                           \
59  google/protobuf/descriptor.h                                  \
60  google/protobuf/descriptor.pb.h                               \
61  google/protobuf/descriptor_database.h                         \
62  google/protobuf/dynamic_message.h                             \
63  google/protobuf/extension_set.h                               \
64  google/protobuf/generated_enum_reflection.h                   \
65  google/protobuf/generated_message_util.h                      \
66  google/protobuf/generated_message_reflection.h                \
67  google/protobuf/message.h                                     \
68  google/protobuf/message_lite.h                                \
69  google/protobuf/reflection_ops.h                              \
70  google/protobuf/repeated_field.h                              \
71  google/protobuf/service.h                                     \
72  google/protobuf/text_format.h                                 \
73  google/protobuf/unknown_field_set.h                           \
74  google/protobuf/wire_format.h                                 \
75  google/protobuf/wire_format_lite.h                            \
76  google/protobuf/wire_format_lite_inl.h                        \
77  google/protobuf/io/coded_stream.h                             \
78  $(GZHEADERS)                                                  \
79  google/protobuf/io/printer.h                                  \
80  google/protobuf/io/strtod.h                                   \
81  google/protobuf/io/tokenizer.h                                \
82  google/protobuf/io/zero_copy_stream.h                         \
83  google/protobuf/io/zero_copy_stream_impl.h                    \
84  google/protobuf/io/zero_copy_stream_impl_lite.h               \
85  google/protobuf/compiler/code_generator.h                     \
86  google/protobuf/compiler/command_line_interface.h             \
87  google/protobuf/compiler/importer.h                           \
88  google/protobuf/compiler/parser.h                             \
89  google/protobuf/compiler/plugin.h                             \
90  google/protobuf/compiler/plugin.pb.h                          \
91  google/protobuf/compiler/cpp/cpp_generator.h                  \
92  google/protobuf/compiler/java/java_generator.h                \
93  google/protobuf/compiler/javamicro/javamicro_generator.h      \
94  google/protobuf/compiler/javanano/javanano_generator.h        \
95  google/protobuf/compiler/python/python_generator.h
96
97lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
98
99libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
100libprotobuf_lite_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined
101libprotobuf_lite_la_SOURCES =                                  \
102  google/protobuf/stubs/atomicops_internals_x86_gcc.cc         \
103  google/protobuf/stubs/atomicops_internals_x86_msvc.cc        \
104  google/protobuf/stubs/common.cc                              \
105  google/protobuf/stubs/once.cc                                \
106  google/protobuf/stubs/hash.h                                 \
107  google/protobuf/stubs/map_util.h                             \
108  google/protobuf/stubs/shared_ptr.h                           \
109  google/protobuf/stubs/stringprintf.cc                        \
110  google/protobuf/stubs/stringprintf.h                         \
111  google/protobuf/extension_set.cc                             \
112  google/protobuf/generated_message_util.cc                    \
113  google/protobuf/message_lite.cc                              \
114  google/protobuf/repeated_field.cc                            \
115  google/protobuf/wire_format_lite.cc                          \
116  google/protobuf/io/coded_stream.cc                           \
117  google/protobuf/io/coded_stream_inl.h                        \
118  google/protobuf/io/zero_copy_stream.cc                       \
119  google/protobuf/io/zero_copy_stream_impl_lite.cc
120
121libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
122libprotobuf_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined
123libprotobuf_la_SOURCES =                                       \
124  $(libprotobuf_lite_la_SOURCES)                               \
125  google/protobuf/stubs/strutil.cc                             \
126  google/protobuf/stubs/strutil.h                              \
127  google/protobuf/stubs/substitute.cc                          \
128  google/protobuf/stubs/substitute.h                           \
129  google/protobuf/stubs/structurally_valid.cc                  \
130  google/protobuf/descriptor.cc                                \
131  google/protobuf/descriptor.pb.cc                             \
132  google/protobuf/descriptor_database.cc                       \
133  google/protobuf/dynamic_message.cc                           \
134  google/protobuf/extension_set_heavy.cc                       \
135  google/protobuf/generated_message_reflection.cc              \
136  google/protobuf/message.cc                                   \
137  google/protobuf/reflection_ops.cc                            \
138  google/protobuf/service.cc                                   \
139  google/protobuf/text_format.cc                               \
140  google/protobuf/unknown_field_set.cc                         \
141  google/protobuf/wire_format.cc                               \
142  google/protobuf/io/gzip_stream.cc                            \
143  google/protobuf/io/printer.cc                                \
144  google/protobuf/io/strtod.cc                                 \
145  google/protobuf/io/tokenizer.cc                              \
146  google/protobuf/io/zero_copy_stream_impl.cc                  \
147  google/protobuf/compiler/importer.cc                         \
148  google/protobuf/compiler/parser.cc
149
150libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
151libprotoc_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined
152libprotoc_la_SOURCES =                                         \
153  google/protobuf/compiler/code_generator.cc                   \
154  google/protobuf/compiler/command_line_interface.cc           \
155  google/protobuf/compiler/plugin.cc                           \
156  google/protobuf/compiler/plugin.pb.cc                        \
157  google/protobuf/compiler/subprocess.cc                       \
158  google/protobuf/compiler/subprocess.h                        \
159  google/protobuf/compiler/zip_writer.cc                       \
160  google/protobuf/compiler/zip_writer.h                        \
161  google/protobuf/compiler/cpp/cpp_enum.cc                     \
162  google/protobuf/compiler/cpp/cpp_enum.h                      \
163  google/protobuf/compiler/cpp/cpp_enum_field.cc               \
164  google/protobuf/compiler/cpp/cpp_enum_field.h                \
165  google/protobuf/compiler/cpp/cpp_extension.cc                \
166  google/protobuf/compiler/cpp/cpp_extension.h                 \
167  google/protobuf/compiler/cpp/cpp_field.cc                    \
168  google/protobuf/compiler/cpp/cpp_field.h                     \
169  google/protobuf/compiler/cpp/cpp_file.cc                     \
170  google/protobuf/compiler/cpp/cpp_file.h                      \
171  google/protobuf/compiler/cpp/cpp_generator.cc                \
172  google/protobuf/compiler/cpp/cpp_helpers.cc                  \
173  google/protobuf/compiler/cpp/cpp_helpers.h                   \
174  google/protobuf/compiler/cpp/cpp_message.cc                  \
175  google/protobuf/compiler/cpp/cpp_message.h                   \
176  google/protobuf/compiler/cpp/cpp_message_field.cc            \
177  google/protobuf/compiler/cpp/cpp_message_field.h             \
178  google/protobuf/compiler/cpp/cpp_options.h                   \
179  google/protobuf/compiler/cpp/cpp_primitive_field.cc          \
180  google/protobuf/compiler/cpp/cpp_primitive_field.h           \
181  google/protobuf/compiler/cpp/cpp_service.cc                  \
182  google/protobuf/compiler/cpp/cpp_service.h                   \
183  google/protobuf/compiler/cpp/cpp_string_field.cc             \
184  google/protobuf/compiler/cpp/cpp_string_field.h              \
185  google/protobuf/compiler/java/java_context.cc                \
186  google/protobuf/compiler/java/java_context.h                 \
187  google/protobuf/compiler/java/java_enum.cc                   \
188  google/protobuf/compiler/java/java_enum.h                    \
189  google/protobuf/compiler/java/java_enum_field.cc             \
190  google/protobuf/compiler/java/java_enum_field.h              \
191  google/protobuf/compiler/java/java_extension.cc              \
192  google/protobuf/compiler/java/java_extension.h               \
193  google/protobuf/compiler/java/java_field.cc                  \
194  google/protobuf/compiler/java/java_field.h                   \
195  google/protobuf/compiler/java/java_file.cc                   \
196  google/protobuf/compiler/java/java_file.h                    \
197  google/protobuf/compiler/java/java_generator.cc              \
198  google/protobuf/compiler/java/java_generator_factory.cc      \
199  google/protobuf/compiler/java/java_generator_factory.h       \
200  google/protobuf/compiler/java/java_helpers.cc                \
201  google/protobuf/compiler/java/java_helpers.h                 \
202  google/protobuf/compiler/java/java_lazy_message_field.cc     \
203  google/protobuf/compiler/java/java_lazy_message_field.h      \
204  google/protobuf/compiler/java/java_message.cc                \
205  google/protobuf/compiler/java/java_message.h                 \
206  google/protobuf/compiler/java/java_message_field.cc          \
207  google/protobuf/compiler/java/java_message_field.h           \
208  google/protobuf/compiler/java/java_name_resolver.cc          \
209  google/protobuf/compiler/java/java_name_resolver.h           \
210  google/protobuf/compiler/java/java_primitive_field.cc        \
211  google/protobuf/compiler/java/java_primitive_field.h         \
212  google/protobuf/compiler/java/java_shared_code_generator.cc  \
213  google/protobuf/compiler/java/java_shared_code_generator.h   \
214  google/protobuf/compiler/java/java_service.cc                \
215  google/protobuf/compiler/java/java_service.h                 \
216  google/protobuf/compiler/java/java_string_field.cc           \
217  google/protobuf/compiler/java/java_string_field.h            \
218  google/protobuf/compiler/java/java_doc_comment.cc            \
219  google/protobuf/compiler/java/java_doc_comment.h             \
220  google/protobuf/compiler/javamicro/javamicro_enum.cc         \
221  google/protobuf/compiler/javamicro/javamicro_enum.h          \
222  google/protobuf/compiler/javamicro/javamicro_enum_field.cc   \
223  google/protobuf/compiler/javamicro/javamicro_enum_field.h    \
224  google/protobuf/compiler/javamicro/javamicro_field.cc        \
225  google/protobuf/compiler/javamicro/javamicro_field.h         \
226  google/protobuf/compiler/javamicro/javamicro_file.cc         \
227  google/protobuf/compiler/javamicro/javamicro_file.h          \
228  google/protobuf/compiler/javamicro/javamicro_generator.cc    \
229  google/protobuf/compiler/javamicro/javamicro_helpers.cc      \
230  google/protobuf/compiler/javamicro/javamicro_helpers.h       \
231  google/protobuf/compiler/javamicro/javamicro_message.cc      \
232  google/protobuf/compiler/javamicro/javamicro_message.h       \
233  google/protobuf/compiler/javamicro/javamicro_message_field.cc\
234  google/protobuf/compiler/javamicro/javamicro_message_field.h \
235  google/protobuf/compiler/javamicro/javamicro_primitive_field.cc\
236  google/protobuf/compiler/javamicro/javamicro_primitive_field.h\
237  google/protobuf/compiler/javanano/javanano_enum.cc         \
238  google/protobuf/compiler/javanano/javanano_enum.h          \
239  google/protobuf/compiler/javanano/javanano_enum_field.cc   \
240  google/protobuf/compiler/javanano/javanano_enum_field.h    \
241  google/protobuf/compiler/javanano/javanano_extension.cc    \
242  google/protobuf/compiler/javanano/javanano_extension.h     \
243  google/protobuf/compiler/javanano/javanano_field.cc        \
244  google/protobuf/compiler/javanano/javanano_field.h         \
245  google/protobuf/compiler/javanano/javanano_file.cc         \
246  google/protobuf/compiler/javanano/javanano_file.h          \
247  google/protobuf/compiler/javanano/javanano_generator.cc    \
248  google/protobuf/compiler/javanano/javanano_helpers.cc      \
249  google/protobuf/compiler/javanano/javanano_helpers.h       \
250  google/protobuf/compiler/javanano/javanano_message.cc      \
251  google/protobuf/compiler/javanano/javanano_message.h       \
252  google/protobuf/compiler/javanano/javanano_message_field.cc\
253  google/protobuf/compiler/javanano/javanano_message_field.h \
254  google/protobuf/compiler/javanano/javanano_primitive_field.cc\
255  google/protobuf/compiler/javanano/javanano_primitive_field.h\
256  google/protobuf/compiler/python/python_generator.cc
257
258bin_PROGRAMS = protoc
259protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
260protoc_SOURCES = google/protobuf/compiler/main.cc
261
262# Tests ==============================================================
263
264protoc_inputs =                                                \
265  google/protobuf/unittest.proto                               \
266  google/protobuf/unittest_empty.proto                         \
267  google/protobuf/unittest_import.proto                        \
268  google/protobuf/unittest_import_public.proto                 \
269  google/protobuf/unittest_mset.proto                          \
270  google/protobuf/unittest_optimize_for.proto                  \
271  google/protobuf/unittest_embed_optimize_for.proto            \
272  google/protobuf/unittest_custom_options.proto                \
273  google/protobuf/unittest_lite.proto                          \
274  google/protobuf/unittest_import_lite.proto                   \
275  google/protobuf/unittest_import_public_lite.proto            \
276  google/protobuf/unittest_lite_imports_nonlite.proto          \
277  google/protobuf/unittest_no_generic_services.proto           \
278  google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto
279
280EXTRA_DIST =                                                   \
281  $(protoc_inputs)                                             \
282  solaris/libstdc++.la                                         \
283  google/protobuf/io/gzip_stream.h                             \
284  google/protobuf/io/gzip_stream_unittest.sh                   \
285  google/protobuf/testdata/golden_message                      \
286  google/protobuf/testdata/golden_message_oneof_implemented    \
287  google/protobuf/testdata/golden_packed_fields_message        \
288  google/protobuf/testdata/bad_utf8_string                     \
289  google/protobuf/testdata/text_format_unittest_data.txt       \
290  google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt  \
291  google/protobuf/testdata/text_format_unittest_data_pointy.txt             \
292  google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt       \
293  google/protobuf/testdata/text_format_unittest_extensions_data.txt         \
294  google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt  \
295  google/protobuf/package_info.h                               \
296  google/protobuf/io/package_info.h                            \
297  google/protobuf/compiler/package_info.h                      \
298  google/protobuf/compiler/zip_output_unittest.sh              \
299  google/protobuf/unittest_enormous_descriptor.proto
300
301protoc_lite_outputs =                                          \
302  google/protobuf/unittest_lite.pb.cc                          \
303  google/protobuf/unittest_lite.pb.h                           \
304  google/protobuf/unittest_import_lite.pb.cc                   \
305  google/protobuf/unittest_import_lite.pb.h                    \
306  google/protobuf/unittest_import_public_lite.pb.cc            \
307  google/protobuf/unittest_import_public_lite.pb.h
308
309protoc_outputs =                                               \
310  $(protoc_lite_outputs)                                       \
311  google/protobuf/unittest.pb.cc                               \
312  google/protobuf/unittest.pb.h                                \
313  google/protobuf/unittest_empty.pb.cc                         \
314  google/protobuf/unittest_empty.pb.h                          \
315  google/protobuf/unittest_import.pb.cc                        \
316  google/protobuf/unittest_import.pb.h                         \
317  google/protobuf/unittest_import_public.pb.cc                 \
318  google/protobuf/unittest_import_public.pb.h                  \
319  google/protobuf/unittest_mset.pb.cc                          \
320  google/protobuf/unittest_mset.pb.h                           \
321  google/protobuf/unittest_optimize_for.pb.cc                  \
322  google/protobuf/unittest_optimize_for.pb.h                   \
323  google/protobuf/unittest_embed_optimize_for.pb.cc            \
324  google/protobuf/unittest_embed_optimize_for.pb.h             \
325  google/protobuf/unittest_custom_options.pb.cc                \
326  google/protobuf/unittest_custom_options.pb.h                 \
327  google/protobuf/unittest_lite_imports_nonlite.pb.cc          \
328  google/protobuf/unittest_lite_imports_nonlite.pb.h           \
329  google/protobuf/unittest_no_generic_services.pb.cc           \
330  google/protobuf/unittest_no_generic_services.pb.h            \
331  google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc  \
332  google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h
333
334BUILT_SOURCES = $(protoc_outputs)
335
336if USE_EXTERNAL_PROTOC
337
338unittest_proto_middleman: $(protoc_inputs)
339	$(PROTOC) -I$(srcdir) --cpp_out=. $^
340	touch unittest_proto_middleman
341
342else
343
344# We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is
345# relative to srcdir, which may not be the same as the current directory when
346# building out-of-tree.
347unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs)
348	oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) )
349	touch unittest_proto_middleman
350
351endif
352
353$(protoc_outputs): unittest_proto_middleman
354
355COMMON_TEST_SOURCES =                                          \
356  google/protobuf/test_util.cc                                 \
357  google/protobuf/test_util.h                                  \
358  google/protobuf/testing/googletest.cc                        \
359  google/protobuf/testing/googletest.h                         \
360  google/protobuf/testing/file.cc                              \
361  google/protobuf/testing/file.h
362
363check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
364                 protobuf-lite-test test_plugin $(GZCHECKPROGRAMS)
365protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
366                      $(top_builddir)/gtest/lib/libgtest.la       \
367                      $(top_builddir)/gtest/lib/libgtest_main.la
368protobuf_test_CPPFLAGS = -I$(top_srcdir)/gtest/include         \
369                         -I$(top_builddir)/gtest/include
370# Disable optimization for tests unless the user explicitly asked for it,
371# since test_util.cc takes forever to compile with optimization (with GCC).
372# See configure.ac for more info.
373protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
374protobuf_test_SOURCES =                                        \
375  google/protobuf/stubs/common_unittest.cc                     \
376  google/protobuf/stubs/once_unittest.cc                       \
377  google/protobuf/stubs/strutil_unittest.cc                    \
378  google/protobuf/stubs/structurally_valid_unittest.cc         \
379  google/protobuf/stubs/stringprintf_unittest.cc               \
380  google/protobuf/stubs/template_util_unittest.cc              \
381  google/protobuf/stubs/type_traits_unittest.cc                \
382  google/protobuf/descriptor_database_unittest.cc              \
383  google/protobuf/descriptor_unittest.cc                       \
384  google/protobuf/dynamic_message_unittest.cc                  \
385  google/protobuf/extension_set_unittest.cc                    \
386  google/protobuf/generated_message_reflection_unittest.cc     \
387  google/protobuf/message_unittest.cc                          \
388  google/protobuf/reflection_ops_unittest.cc                   \
389  google/protobuf/repeated_field_unittest.cc                   \
390  google/protobuf/repeated_field_reflection_unittest.cc        \
391  google/protobuf/text_format_unittest.cc                      \
392  google/protobuf/unknown_field_set_unittest.cc                \
393  google/protobuf/wire_format_unittest.cc                      \
394  google/protobuf/io/coded_stream_unittest.cc                  \
395  google/protobuf/io/printer_unittest.cc                       \
396  google/protobuf/io/tokenizer_unittest.cc                     \
397  google/protobuf/io/zero_copy_stream_unittest.cc              \
398  google/protobuf/compiler/command_line_interface_unittest.cc  \
399  google/protobuf/compiler/importer_unittest.cc                \
400  google/protobuf/compiler/mock_code_generator.cc              \
401  google/protobuf/compiler/mock_code_generator.h               \
402  google/protobuf/compiler/parser_unittest.cc                  \
403  google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc       \
404  google/protobuf/compiler/cpp/cpp_unittest.h                  \
405  google/protobuf/compiler/cpp/cpp_unittest.cc                 \
406  google/protobuf/compiler/cpp/cpp_plugin_unittest.cc          \
407  google/protobuf/compiler/java/java_plugin_unittest.cc        \
408  google/protobuf/compiler/java/java_doc_comment_unittest.cc   \
409  google/protobuf/compiler/python/python_plugin_unittest.cc    \
410  $(COMMON_TEST_SOURCES)
411nodist_protobuf_test_SOURCES = $(protoc_outputs)
412
413# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
414protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
415                      libprotoc.la                                   \
416                      $(top_builddir)/gtest/lib/libgtest.la          \
417                      $(top_builddir)/gtest/lib/libgtest_main.la
418protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include    \
419                                         -I$(top_builddir)/gtest/include  \
420                                         -DPROTOBUF_TEST_NO_DESCRIPTORS
421protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
422protobuf_lazy_descriptor_test_SOURCES =                        \
423  google/protobuf/compiler/cpp/cpp_unittest.cc                 \
424  $(COMMON_TEST_SOURCES)
425nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs)
426
427# Build lite_unittest separately, since it doesn't use gtest.
428protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la
429protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
430protobuf_lite_test_SOURCES =                                           \
431  google/protobuf/lite_unittest.cc                                     \
432  google/protobuf/test_util_lite.cc                                    \
433  google/protobuf/test_util_lite.h
434nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs)
435
436# Test plugin binary.
437test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
438                    $(top_builddir)/gtest/lib/libgtest.la
439test_plugin_CPPFLAGS = -I$(top_srcdir)/gtest/include         \
440                       -I$(top_builddir)/gtest/include
441test_plugin_SOURCES =                                          \
442  google/protobuf/compiler/mock_code_generator.cc              \
443  google/protobuf/testing/file.cc                              \
444  google/protobuf/testing/file.h                               \
445  google/protobuf/compiler/test_plugin.cc
446
447if HAVE_ZLIB
448zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
449zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc
450
451zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
452zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc
453endif
454
455TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
456        google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS)
457