blob: 815c9ae960ecd8c6a11371ef0a7be63fecab365b [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
7else
8GZCHECKPROGRAMS =
9GZHEADERS =
10GZTESTS =
11endif
12
temporal40ee5512008-07-10 02:12:20 +000013if GCC
14# These are good warnings to turn on by default
kenton@google.com42c81e12009-05-06 01:15:06 +000015NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare
temporal40ee5512008-07-10 02:12:20 +000016else
kenton@google.com42c81e12009-05-06 01:15:06 +000017NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS)
temporal40ee5512008-07-10 02:12:20 +000018endif
19
kenton@google.com42c81e12009-05-06 01:15:06 +000020AM_CXXFLAGS = $(NO_OPT_CXXFLAGS) $(PROTOBUF_OPT_FLAG)
21
temporal40ee5512008-07-10 02:12:20 +000022AM_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)
kenton@google.comfccb1462009-12-18 02:11:36 +000027nobase_dist_proto_DATA = google/protobuf/descriptor.proto \
28 google/protobuf/compiler/plugin.proto
temporal40ee5512008-07-10 02:12:20 +000029
30# Not sure why these don't get cleaned automatically.
31clean-local:
32 rm -f *.loT
33
kenton@google.comd2fcbba2010-01-04 19:47:18 +000034CLEANFILES = $(protoc_outputs) unittest_proto_middleman \
35 testzip.jar testzip.list testzip.proto testzip.zip
temporal40ee5512008-07-10 02:12:20 +000036
37MAINTAINERCLEANFILES = \
38 Makefile.in
39
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000040nobase_include_HEADERS = \
Feng Xiao6ef984a2014-11-10 17:34:54 -080041 google/protobuf/stubs/atomic_sequence_num.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000042 google/protobuf/stubs/atomicops.h \
Feng Xiaof157a562014-11-14 11:50:31 -080043 google/protobuf/stubs/atomicops_internals_aix.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +000044 google/protobuf/stubs/atomicops_internals_arm64_gcc.h \
Feng Xiao53d202f2014-10-22 11:33:55 -070045 google/protobuf/stubs/atomicops_internals_arm_gcc.h \
liujisi@google.com4d8c2f92013-01-10 21:24:56 +000046 google/protobuf/stubs/atomicops_internals_arm_qnx.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000047 google/protobuf/stubs/atomicops_internals_atomicword_compat.h \
jieluo@google.com1eba9d92014-08-25 20:17:53 +000048 google/protobuf/stubs/atomicops_internals_generic_gcc.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000049 google/protobuf/stubs/atomicops_internals_macosx.h \
50 google/protobuf/stubs/atomicops_internals_mips_gcc.h \
liujisi@google.comf5b373d2013-01-10 21:37:04 +000051 google/protobuf/stubs/atomicops_internals_pnacl.h \
Feng Xiao53d202f2014-10-22 11:33:55 -070052 google/protobuf/stubs/atomicops_internals_solaris.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +000053 google/protobuf/stubs/atomicops_internals_tsan.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000054 google/protobuf/stubs/atomicops_internals_x86_gcc.h \
55 google/protobuf/stubs/atomicops_internals_x86_msvc.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080056 google/protobuf/stubs/casts.h \
57 google/protobuf/stubs/singleton.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000058 google/protobuf/stubs/common.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080059 google/protobuf/stubs/fastmem.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000060 google/protobuf/stubs/once.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080061 google/protobuf/stubs/platform_macros.h \
jieluo@google.com1eba9d92014-08-25 20:17:53 +000062 google/protobuf/stubs/stl_util.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000063 google/protobuf/stubs/template_util.h \
64 google/protobuf/stubs/type_traits.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080065 google/protobuf/arena.h \
66 google/protobuf/arenastring.h \
67 google/protobuf/descriptor_database.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000068 google/protobuf/descriptor.h \
69 google/protobuf/descriptor.pb.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000070 google/protobuf/dynamic_message.h \
71 google/protobuf/extension_set.h \
72 google/protobuf/generated_enum_reflection.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000073 google/protobuf/generated_message_reflection.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080074 google/protobuf/generated_message_util.h \
Feng Xiaof157a562014-11-14 11:50:31 -080075 google/protobuf/map_entry.h \
76 google/protobuf/map_field.h \
77 google/protobuf/map_field_inl.h \
78 google/protobuf/map.h \
79 google/protobuf/map_type_handler.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000080 google/protobuf/message.h \
81 google/protobuf/message_lite.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080082 google/protobuf/metadata.h \
83 google/protobuf/reflection.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000084 google/protobuf/reflection_ops.h \
85 google/protobuf/repeated_field.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080086 google/protobuf/repeated_field_reflection.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000087 google/protobuf/service.h \
88 google/protobuf/text_format.h \
89 google/protobuf/unknown_field_set.h \
90 google/protobuf/wire_format.h \
91 google/protobuf/wire_format_lite.h \
92 google/protobuf/wire_format_lite_inl.h \
93 google/protobuf/io/coded_stream.h \
94 $(GZHEADERS) \
95 google/protobuf/io/printer.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +000096 google/protobuf/io/strtod.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000097 google/protobuf/io/tokenizer.h \
98 google/protobuf/io/zero_copy_stream.h \
99 google/protobuf/io/zero_copy_stream_impl.h \
100 google/protobuf/io/zero_copy_stream_impl_lite.h \
101 google/protobuf/compiler/code_generator.h \
102 google/protobuf/compiler/command_line_interface.h \
103 google/protobuf/compiler/importer.h \
104 google/protobuf/compiler/parser.h \
105 google/protobuf/compiler/plugin.h \
106 google/protobuf/compiler/plugin.pb.h \
107 google/protobuf/compiler/cpp/cpp_generator.h \
108 google/protobuf/compiler/java/java_generator.h \
temporal40ee5512008-07-10 02:12:20 +0000109 google/protobuf/compiler/python/python_generator.h
110
kenton@google.com858a22b2009-07-29 02:21:47 +0000111lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
temporal40ee5512008-07-10 02:12:20 +0000112
kenton@google.com858a22b2009-07-29 02:21:47 +0000113libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
Feng Xiaodf5481c2014-10-21 16:47:33 -0700114libprotobuf_lite_la_LDFLAGS = -version-info 9:2:0 -export-dynamic -no-undefined
kenton@google.com858a22b2009-07-29 02:21:47 +0000115libprotobuf_lite_la_SOURCES = \
pliard@google.comf5de4862012-03-02 13:04:36 +0000116 google/protobuf/stubs/atomicops_internals_x86_gcc.cc \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +0000117 google/protobuf/stubs/atomicops_internals_x86_msvc.cc \
temporal40ee5512008-07-10 02:12:20 +0000118 google/protobuf/stubs/common.cc \
kenton@google.comd37d46d2009-04-25 02:53:47 +0000119 google/protobuf/stubs/once.cc \
temporal40ee5512008-07-10 02:12:20 +0000120 google/protobuf/stubs/hash.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000121 google/protobuf/stubs/map_util.h \
jieluo@google.combde4a322014-08-12 21:10:30 +0000122 google/protobuf/stubs/shared_ptr.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000123 google/protobuf/stubs/stringprintf.cc \
124 google/protobuf/stubs/stringprintf.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800125 google/protobuf/arena.cc \
126 google/protobuf/arenastring.cc \
kenton@google.com858a22b2009-07-29 02:21:47 +0000127 google/protobuf/extension_set.cc \
128 google/protobuf/generated_message_util.cc \
Feng Xiaof157a562014-11-14 11:50:31 -0800129 google/protobuf/map_field.cc \
kenton@google.com858a22b2009-07-29 02:21:47 +0000130 google/protobuf/message_lite.cc \
131 google/protobuf/repeated_field.cc \
132 google/protobuf/wire_format_lite.cc \
133 google/protobuf/io/coded_stream.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000134 google/protobuf/io/coded_stream_inl.h \
kenton@google.com858a22b2009-07-29 02:21:47 +0000135 google/protobuf/io/zero_copy_stream.cc \
136 google/protobuf/io/zero_copy_stream_impl_lite.cc
137
138libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
Feng Xiaodf5481c2014-10-21 16:47:33 -0700139libprotobuf_la_LDFLAGS = -version-info 9:2:0 -export-dynamic -no-undefined
kenton@google.com858a22b2009-07-29 02:21:47 +0000140libprotobuf_la_SOURCES = \
141 $(libprotobuf_lite_la_SOURCES) \
kenton@google.com4f3491e2009-07-29 21:33:08 +0000142 google/protobuf/stubs/strutil.cc \
143 google/protobuf/stubs/strutil.h \
144 google/protobuf/stubs/substitute.cc \
145 google/protobuf/stubs/substitute.h \
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000146 google/protobuf/stubs/structurally_valid.cc \
temporal40ee5512008-07-10 02:12:20 +0000147 google/protobuf/descriptor.cc \
temporal40ee5512008-07-10 02:12:20 +0000148 google/protobuf/descriptor_database.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800149 google/protobuf/descriptor.pb.cc \
temporal40ee5512008-07-10 02:12:20 +0000150 google/protobuf/dynamic_message.cc \
kenton@google.com80b1d622009-07-29 01:13:20 +0000151 google/protobuf/extension_set_heavy.cc \
temporal40ee5512008-07-10 02:12:20 +0000152 google/protobuf/generated_message_reflection.cc \
153 google/protobuf/message.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800154 google/protobuf/reflection_internal.h \
temporal40ee5512008-07-10 02:12:20 +0000155 google/protobuf/reflection_ops.cc \
temporal40ee5512008-07-10 02:12:20 +0000156 google/protobuf/service.cc \
157 google/protobuf/text_format.cc \
158 google/protobuf/unknown_field_set.cc \
159 google/protobuf/wire_format.cc \
kenton@google.come59427a2009-04-16 22:30:56 +0000160 google/protobuf/io/gzip_stream.cc \
temporal40ee5512008-07-10 02:12:20 +0000161 google/protobuf/io/printer.cc \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000162 google/protobuf/io/strtod.cc \
temporal40ee5512008-07-10 02:12:20 +0000163 google/protobuf/io/tokenizer.cc \
temporal40ee5512008-07-10 02:12:20 +0000164 google/protobuf/io/zero_copy_stream_impl.cc \
165 google/protobuf/compiler/importer.cc \
166 google/protobuf/compiler/parser.cc
167
168libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
Feng Xiaodf5481c2014-10-21 16:47:33 -0700169libprotoc_la_LDFLAGS = -version-info 9:2:0 -export-dynamic -no-undefined
temporal40ee5512008-07-10 02:12:20 +0000170libprotoc_la_SOURCES = \
171 google/protobuf/compiler/code_generator.cc \
172 google/protobuf/compiler/command_line_interface.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000173 google/protobuf/compiler/plugin.cc \
174 google/protobuf/compiler/plugin.pb.cc \
175 google/protobuf/compiler/subprocess.cc \
176 google/protobuf/compiler/subprocess.h \
kenton@google.com50663222009-12-24 02:12:15 +0000177 google/protobuf/compiler/zip_writer.cc \
178 google/protobuf/compiler/zip_writer.h \
temporal40ee5512008-07-10 02:12:20 +0000179 google/protobuf/compiler/cpp/cpp_enum.cc \
180 google/protobuf/compiler/cpp/cpp_enum.h \
181 google/protobuf/compiler/cpp/cpp_enum_field.cc \
182 google/protobuf/compiler/cpp/cpp_enum_field.h \
183 google/protobuf/compiler/cpp/cpp_extension.cc \
184 google/protobuf/compiler/cpp/cpp_extension.h \
185 google/protobuf/compiler/cpp/cpp_field.cc \
186 google/protobuf/compiler/cpp/cpp_field.h \
187 google/protobuf/compiler/cpp/cpp_file.cc \
188 google/protobuf/compiler/cpp/cpp_file.h \
189 google/protobuf/compiler/cpp/cpp_generator.cc \
190 google/protobuf/compiler/cpp/cpp_helpers.cc \
191 google/protobuf/compiler/cpp/cpp_helpers.h \
Feng Xiaof157a562014-11-14 11:50:31 -0800192 google/protobuf/compiler/cpp/cpp_map_field.cc \
193 google/protobuf/compiler/cpp/cpp_map_field.h \
temporal40ee5512008-07-10 02:12:20 +0000194 google/protobuf/compiler/cpp/cpp_message.cc \
195 google/protobuf/compiler/cpp/cpp_message.h \
196 google/protobuf/compiler/cpp/cpp_message_field.cc \
197 google/protobuf/compiler/cpp/cpp_message_field.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000198 google/protobuf/compiler/cpp/cpp_options.h \
temporal40ee5512008-07-10 02:12:20 +0000199 google/protobuf/compiler/cpp/cpp_primitive_field.cc \
200 google/protobuf/compiler/cpp/cpp_primitive_field.h \
201 google/protobuf/compiler/cpp/cpp_service.cc \
202 google/protobuf/compiler/cpp/cpp_service.h \
203 google/protobuf/compiler/cpp/cpp_string_field.cc \
204 google/protobuf/compiler/cpp/cpp_string_field.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000205 google/protobuf/compiler/java/java_context.cc \
206 google/protobuf/compiler/java/java_context.h \
temporal40ee5512008-07-10 02:12:20 +0000207 google/protobuf/compiler/java/java_enum.cc \
temporal40ee5512008-07-10 02:12:20 +0000208 google/protobuf/compiler/java/java_enum_field.cc \
209 google/protobuf/compiler/java/java_enum_field.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800210 google/protobuf/compiler/java/java_enum.h \
temporal40ee5512008-07-10 02:12:20 +0000211 google/protobuf/compiler/java/java_extension.cc \
212 google/protobuf/compiler/java/java_extension.h \
213 google/protobuf/compiler/java/java_field.cc \
214 google/protobuf/compiler/java/java_field.h \
215 google/protobuf/compiler/java/java_file.cc \
216 google/protobuf/compiler/java/java_file.h \
217 google/protobuf/compiler/java/java_generator.cc \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000218 google/protobuf/compiler/java/java_generator_factory.cc \
219 google/protobuf/compiler/java/java_generator_factory.h \
temporal40ee5512008-07-10 02:12:20 +0000220 google/protobuf/compiler/java/java_helpers.cc \
221 google/protobuf/compiler/java/java_helpers.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000222 google/protobuf/compiler/java/java_lazy_message_field.cc \
223 google/protobuf/compiler/java/java_lazy_message_field.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800224 google/protobuf/compiler/java/java_map_field.cc \
225 google/protobuf/compiler/java/java_map_field.h \
temporal40ee5512008-07-10 02:12:20 +0000226 google/protobuf/compiler/java/java_message.cc \
temporal40ee5512008-07-10 02:12:20 +0000227 google/protobuf/compiler/java/java_message_field.cc \
228 google/protobuf/compiler/java/java_message_field.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800229 google/protobuf/compiler/java/java_message.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000230 google/protobuf/compiler/java/java_name_resolver.cc \
231 google/protobuf/compiler/java/java_name_resolver.h \
temporal40ee5512008-07-10 02:12:20 +0000232 google/protobuf/compiler/java/java_primitive_field.cc \
233 google/protobuf/compiler/java/java_primitive_field.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000234 google/protobuf/compiler/java/java_shared_code_generator.cc \
235 google/protobuf/compiler/java/java_shared_code_generator.h \
temporal40ee5512008-07-10 02:12:20 +0000236 google/protobuf/compiler/java/java_service.cc \
237 google/protobuf/compiler/java/java_service.h \
liujisi@google.com33165fe2010-11-02 13:14:58 +0000238 google/protobuf/compiler/java/java_string_field.cc \
239 google/protobuf/compiler/java/java_string_field.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000240 google/protobuf/compiler/java/java_doc_comment.cc \
241 google/protobuf/compiler/java/java_doc_comment.h \
temporal40ee5512008-07-10 02:12:20 +0000242 google/protobuf/compiler/python/python_generator.cc
243
244bin_PROGRAMS = protoc
245protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
246protoc_SOURCES = google/protobuf/compiler/main.cc
247
248# Tests ==============================================================
249
250protoc_inputs = \
Feng Xiaof157a562014-11-14 11:50:31 -0800251 google/protobuf/map_lite_unittest.proto \
252 google/protobuf/map_proto2_unittest.proto \
253 google/protobuf/map_unittest.proto \
temporal40ee5512008-07-10 02:12:20 +0000254 google/protobuf/unittest.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800255 google/protobuf/unittest_arena.proto \
kenton@google.com24bf56f2008-09-24 20:31:01 +0000256 google/protobuf/unittest_custom_options.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800257 google/protobuf/unittest_drop_unknown_fields.proto \
258 google/protobuf/unittest_embed_optimize_for.proto \
259 google/protobuf/unittest_empty.proto \
kenton@google.com80b1d622009-07-29 01:13:20 +0000260 google/protobuf/unittest_import_lite.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800261 google/protobuf/unittest_import.proto \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000262 google/protobuf/unittest_import_public_lite.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800263 google/protobuf/unittest_import_public.proto \
kenton@google.com80b1d622009-07-29 01:13:20 +0000264 google/protobuf/unittest_lite_imports_nonlite.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800265 google/protobuf/unittest_lite.proto \
266 google/protobuf/unittest_mset.proto \
267 google/protobuf/unittest_no_arena_import.proto \
268 google/protobuf/unittest_no_arena.proto \
269 google/protobuf/unittest_no_field_presence.proto \
kenton@google.comfccb1462009-12-18 02:11:36 +0000270 google/protobuf/unittest_no_generic_services.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800271 google/protobuf/unittest_optimize_for.proto \
272 google/protobuf/unittest_preserve_unknown_enum.proto \
273 google/protobuf/unittest_proto3_arena.proto \
temporal40ee5512008-07-10 02:12:20 +0000274 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto
275
276EXTRA_DIST = \
277 $(protoc_inputs) \
278 solaris/libstdc++.la \
kenton@google.come59427a2009-04-16 22:30:56 +0000279 google/protobuf/io/gzip_stream.h \
280 google/protobuf/io/gzip_stream_unittest.sh \
temporal40ee5512008-07-10 02:12:20 +0000281 google/protobuf/testdata/golden_message \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000282 google/protobuf/testdata/golden_message_oneof_implemented \
kenton@google.com2d6daa72009-01-22 01:27:00 +0000283 google/protobuf/testdata/golden_packed_fields_message \
jieluo@google.come61b5132014-08-14 21:51:48 +0000284 google/protobuf/testdata/bad_utf8_string \
285 google/protobuf/testdata/text_format_unittest_data.txt \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000286 google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt \
jieluo@google.combde4a322014-08-12 21:10:30 +0000287 google/protobuf/testdata/text_format_unittest_data_pointy.txt \
jieluo@google.come61b5132014-08-14 21:51:48 +0000288 google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000289 google/protobuf/testdata/text_format_unittest_extensions_data.txt \
jieluo@google.combde4a322014-08-12 21:10:30 +0000290 google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \
temporal40ee5512008-07-10 02:12:20 +0000291 google/protobuf/package_info.h \
292 google/protobuf/io/package_info.h \
kenton@google.com8aae2a22009-08-11 00:23:25 +0000293 google/protobuf/compiler/package_info.h \
kenton@google.com2773bdf2010-01-07 04:14:34 +0000294 google/protobuf/compiler/zip_output_unittest.sh \
kenton@google.com8aae2a22009-08-11 00:23:25 +0000295 google/protobuf/unittest_enormous_descriptor.proto
temporal40ee5512008-07-10 02:12:20 +0000296
kenton@google.com80b1d622009-07-29 01:13:20 +0000297protoc_lite_outputs = \
298 google/protobuf/unittest_lite.pb.cc \
299 google/protobuf/unittest_lite.pb.h \
300 google/protobuf/unittest_import_lite.pb.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000301 google/protobuf/unittest_import_lite.pb.h \
302 google/protobuf/unittest_import_public_lite.pb.cc \
303 google/protobuf/unittest_import_public_lite.pb.h
kenton@google.com80b1d622009-07-29 01:13:20 +0000304
temporal40ee5512008-07-10 02:12:20 +0000305protoc_outputs = \
kenton@google.com80b1d622009-07-29 01:13:20 +0000306 $(protoc_lite_outputs) \
Feng Xiaof157a562014-11-14 11:50:31 -0800307 google/protobuf/map_lite_unittest.pb.cc \
308 google/protobuf/map_lite_unittest.pb.h \
309 google/protobuf/map_proto2_unittest.pb.cc \
310 google/protobuf/map_proto2_unittest.pb.h \
311 google/protobuf/map_unittest.pb.cc \
312 google/protobuf/map_unittest.pb.h \
temporal40ee5512008-07-10 02:12:20 +0000313 google/protobuf/unittest.pb.cc \
314 google/protobuf/unittest.pb.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800315 google/protobuf/unittest_arena.pb.cc \
316 google/protobuf/unittest_arena.pb.h \
317 google/protobuf/unittest_custom_options.pb.cc \
318 google/protobuf/unittest_custom_options.pb.h \
319 google/protobuf/unittest_drop_unknown_fields.pb.cc \
320 google/protobuf/unittest_drop_unknown_fields.pb.h \
321 google/protobuf/unittest_embed_optimize_for.pb.cc \
322 google/protobuf/unittest_embed_optimize_for.pb.h \
kenton@google.comd37d46d2009-04-25 02:53:47 +0000323 google/protobuf/unittest_empty.pb.cc \
324 google/protobuf/unittest_empty.pb.h \
temporal40ee5512008-07-10 02:12:20 +0000325 google/protobuf/unittest_import.pb.cc \
326 google/protobuf/unittest_import.pb.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000327 google/protobuf/unittest_import_public.pb.cc \
328 google/protobuf/unittest_import_public.pb.h \
kenton@google.com80b1d622009-07-29 01:13:20 +0000329 google/protobuf/unittest_lite_imports_nonlite.pb.cc \
330 google/protobuf/unittest_lite_imports_nonlite.pb.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800331 google/protobuf/unittest_mset.pb.cc \
332 google/protobuf/unittest_mset.pb.h \
333 google/protobuf/unittest_no_arena.pb.cc \
334 google/protobuf/unittest_no_arena.pb.h \
335 google/protobuf/unittest_no_arena_import.pb.cc \
336 google/protobuf/unittest_no_arena_import.pb.h \
337 google/protobuf/unittest_no_field_presence.pb.cc \
338 google/protobuf/unittest_no_field_presence.pb.h \
kenton@google.comfccb1462009-12-18 02:11:36 +0000339 google/protobuf/unittest_no_generic_services.pb.cc \
340 google/protobuf/unittest_no_generic_services.pb.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800341 google/protobuf/unittest_optimize_for.pb.cc \
342 google/protobuf/unittest_optimize_for.pb.h \
343 google/protobuf/unittest_preserve_unknown_enum.pb.cc \
344 google/protobuf/unittest_preserve_unknown_enum.pb.h \
345 google/protobuf/unittest_proto3_arena.pb.cc \
346 google/protobuf/unittest_proto3_arena.pb.h \
temporal40ee5512008-07-10 02:12:20 +0000347 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \
348 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h
349
350BUILT_SOURCES = $(protoc_outputs)
351
kenton@google.com9824eda2009-05-06 17:49:37 +0000352if USE_EXTERNAL_PROTOC
353
354unittest_proto_middleman: $(protoc_inputs)
kenton@google.com721995d2009-09-11 22:08:40 +0000355 $(PROTOC) -I$(srcdir) --cpp_out=. $^
kenton@google.com9824eda2009-05-06 17:49:37 +0000356 touch unittest_proto_middleman
357
358else
359
kenton@google.com38fcd392010-01-08 04:48:19 +0000360# We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is
361# relative to srcdir, which may not be the same as the current directory when
362# building out-of-tree.
temporal40ee5512008-07-10 02:12:20 +0000363unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs)
kenton@google.com38fcd392010-01-08 04:48:19 +0000364 oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) )
temporal40ee5512008-07-10 02:12:20 +0000365 touch unittest_proto_middleman
366
kenton@google.com9824eda2009-05-06 17:49:37 +0000367endif
368
temporal40ee5512008-07-10 02:12:20 +0000369$(protoc_outputs): unittest_proto_middleman
370
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000371COMMON_TEST_SOURCES = \
Feng Xiaof157a562014-11-14 11:50:31 -0800372 google/protobuf/map_test_util.cc \
373 google/protobuf/map_test_util.h \
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000374 google/protobuf/test_util.cc \
375 google/protobuf/test_util.h \
376 google/protobuf/testing/googletest.cc \
377 google/protobuf/testing/googletest.h \
378 google/protobuf/testing/file.cc \
379 google/protobuf/testing/file.h
380
kenton@google.comd2fcbba2010-01-04 19:47:18 +0000381check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
382 protobuf-lite-test test_plugin $(GZCHECKPROGRAMS)
kenton@google.com37ad00d2009-04-21 21:00:39 +0000383protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
384 $(top_builddir)/gtest/lib/libgtest.la \
385 $(top_builddir)/gtest/lib/libgtest_main.la
386protobuf_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
387 -I$(top_builddir)/gtest/include
kenton@google.com42c81e12009-05-06 01:15:06 +0000388# Disable optimization for tests unless the user explicitly asked for it,
389# since test_util.cc takes forever to compile with optimization (with GCC).
390# See configure.ac for more info.
391protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
temporal40ee5512008-07-10 02:12:20 +0000392protobuf_test_SOURCES = \
393 google/protobuf/stubs/common_unittest.cc \
kenton@google.comd37d46d2009-04-25 02:53:47 +0000394 google/protobuf/stubs/once_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000395 google/protobuf/stubs/strutil_unittest.cc \
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000396 google/protobuf/stubs/structurally_valid_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000397 google/protobuf/stubs/stringprintf_unittest.cc \
398 google/protobuf/stubs/template_util_unittest.cc \
399 google/protobuf/stubs/type_traits_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800400 google/protobuf/arenastring_unittest.cc \
401 google/protobuf/arena_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000402 google/protobuf/descriptor_database_unittest.cc \
403 google/protobuf/descriptor_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800404 google/protobuf/drop_unknown_fields_test.cc \
temporal40ee5512008-07-10 02:12:20 +0000405 google/protobuf/dynamic_message_unittest.cc \
406 google/protobuf/extension_set_unittest.cc \
407 google/protobuf/generated_message_reflection_unittest.cc \
Feng Xiaof157a562014-11-14 11:50:31 -0800408 google/protobuf/map_field_test.cc \
409 google/protobuf/map_test.cc \
temporal40ee5512008-07-10 02:12:20 +0000410 google/protobuf/message_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800411 google/protobuf/no_field_presence_test.cc \
412 google/protobuf/preserve_unknown_enum_test.cc \
413 google/protobuf/proto3_arena_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000414 google/protobuf/reflection_ops_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000415 google/protobuf/repeated_field_reflection_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800416 google/protobuf/repeated_field_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000417 google/protobuf/text_format_unittest.cc \
418 google/protobuf/unknown_field_set_unittest.cc \
419 google/protobuf/wire_format_unittest.cc \
420 google/protobuf/io/coded_stream_unittest.cc \
421 google/protobuf/io/printer_unittest.cc \
422 google/protobuf/io/tokenizer_unittest.cc \
423 google/protobuf/io/zero_copy_stream_unittest.cc \
424 google/protobuf/compiler/command_line_interface_unittest.cc \
425 google/protobuf/compiler/importer_unittest.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000426 google/protobuf/compiler/mock_code_generator.cc \
427 google/protobuf/compiler/mock_code_generator.h \
temporal40ee5512008-07-10 02:12:20 +0000428 google/protobuf/compiler/parser_unittest.cc \
429 google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000430 google/protobuf/compiler/cpp/cpp_unittest.h \
temporal40ee5512008-07-10 02:12:20 +0000431 google/protobuf/compiler/cpp/cpp_unittest.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000432 google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \
433 google/protobuf/compiler/java/java_plugin_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000434 google/protobuf/compiler/java/java_doc_comment_unittest.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000435 google/protobuf/compiler/python/python_plugin_unittest.cc \
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000436 $(COMMON_TEST_SOURCES)
437nodist_protobuf_test_SOURCES = $(protoc_outputs)
438
439# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
440protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000441 libprotoc.la \
442 $(top_builddir)/gtest/lib/libgtest.la \
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000443 $(top_builddir)/gtest/lib/libgtest_main.la
444protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
445 -I$(top_builddir)/gtest/include \
446 -DPROTOBUF_TEST_NO_DESCRIPTORS
kenton@google.com4f3491e2009-07-29 21:33:08 +0000447protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000448protobuf_lazy_descriptor_test_SOURCES = \
449 google/protobuf/compiler/cpp/cpp_unittest.cc \
450 $(COMMON_TEST_SOURCES)
451nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs)
temporal40ee5512008-07-10 02:12:20 +0000452
kenton@google.com80b1d622009-07-29 01:13:20 +0000453# Build lite_unittest separately, since it doesn't use gtest.
kenton@google.com858a22b2009-07-29 02:21:47 +0000454protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la
kenton@google.com4f3491e2009-07-29 21:33:08 +0000455protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
kenton@google.com80b1d622009-07-29 01:13:20 +0000456protobuf_lite_test_SOURCES = \
457 google/protobuf/lite_unittest.cc \
458 google/protobuf/test_util_lite.cc \
459 google/protobuf/test_util_lite.h
460nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs)
461
kenton@google.comfccb1462009-12-18 02:11:36 +0000462# Test plugin binary.
463test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
464 $(top_builddir)/gtest/lib/libgtest.la
kenton@google.com83ad01e2009-12-18 02:40:43 +0000465test_plugin_CPPFLAGS = -I$(top_srcdir)/gtest/include \
466 -I$(top_builddir)/gtest/include
kenton@google.comfccb1462009-12-18 02:11:36 +0000467test_plugin_SOURCES = \
468 google/protobuf/compiler/mock_code_generator.cc \
469 google/protobuf/testing/file.cc \
470 google/protobuf/testing/file.h \
471 google/protobuf/compiler/test_plugin.cc
472
kenton@google.come59427a2009-04-16 22:30:56 +0000473if HAVE_ZLIB
474zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
475zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc
476
477zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
478zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc
479endif
480
kenton@google.comd2fcbba2010-01-04 19:47:18 +0000481TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
482 google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS)