blob: 5179846ca54be023b11f7d368b51c38cc85f5875 [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
Jisi Liudf184fb2015-02-25 15:28:44 -080034public_config = google/protobuf/stubs/pbconfig.h
35
36CLEANFILES = $(protoc_outputs) $(public_config) unittest_proto_middleman \
kenton@google.comd2fcbba2010-01-04 19:47:18 +000037 testzip.jar testzip.list testzip.proto testzip.zip
temporal40ee5512008-07-10 02:12:20 +000038
39MAINTAINERCLEANFILES = \
40 Makefile.in
41
Jisi Liudf184fb2015-02-25 15:28:44 -080042# Generate and distribute a minimum config.h file to make hash_map work.
43# The autoheader config has too much info, which might conflict with other
44# macros applications might include. Thus, we create a stubs/pbconfig.h, that
45# only #defines what we really need, and prefix it with GOOGLE_PROTOBUF_ to
46# avoid conflicts.
47$(public_config): $(top_builddir)/config.h $(top_srcdir)/config.h.include
48 echo "// Note: Google Protobuf internal only. Do NOT include." > $@
49 cat $(top_builddir)/config.h | grep -f $(top_srcdir)/config.h.include | \
50 sed 's,#define , #define GOOGLE_PROTOBUF_,' >> $@
51
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000052nobase_include_HEADERS = \
Feng Xiao6ef984a2014-11-10 17:34:54 -080053 google/protobuf/stubs/atomic_sequence_num.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000054 google/protobuf/stubs/atomicops.h \
Feng Xiaof157a562014-11-14 11:50:31 -080055 google/protobuf/stubs/atomicops_internals_aix.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +000056 google/protobuf/stubs/atomicops_internals_arm64_gcc.h \
Feng Xiao53d202f2014-10-22 11:33:55 -070057 google/protobuf/stubs/atomicops_internals_arm_gcc.h \
liujisi@google.com4d8c2f92013-01-10 21:24:56 +000058 google/protobuf/stubs/atomicops_internals_arm_qnx.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000059 google/protobuf/stubs/atomicops_internals_atomicword_compat.h \
jieluo@google.com1eba9d92014-08-25 20:17:53 +000060 google/protobuf/stubs/atomicops_internals_generic_gcc.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000061 google/protobuf/stubs/atomicops_internals_macosx.h \
62 google/protobuf/stubs/atomicops_internals_mips_gcc.h \
liujisi@google.comf5b373d2013-01-10 21:37:04 +000063 google/protobuf/stubs/atomicops_internals_pnacl.h \
Feng Xiao53d202f2014-10-22 11:33:55 -070064 google/protobuf/stubs/atomicops_internals_solaris.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +000065 google/protobuf/stubs/atomicops_internals_tsan.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000066 google/protobuf/stubs/atomicops_internals_x86_gcc.h \
67 google/protobuf/stubs/atomicops_internals_x86_msvc.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080068 google/protobuf/stubs/casts.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000069 google/protobuf/stubs/common.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080070 google/protobuf/stubs/fastmem.h \
Jisi Liudf184fb2015-02-25 15:28:44 -080071 google/protobuf/stubs/hash.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000072 google/protobuf/stubs/once.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080073 google/protobuf/stubs/platform_macros.h \
Jisi Liudf184fb2015-02-25 15:28:44 -080074 google/protobuf/stubs/singleton.h \
jieluo@google.com1eba9d92014-08-25 20:17:53 +000075 google/protobuf/stubs/stl_util.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000076 google/protobuf/stubs/template_util.h \
77 google/protobuf/stubs/type_traits.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080078 google/protobuf/arena.h \
79 google/protobuf/arenastring.h \
80 google/protobuf/descriptor_database.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000081 google/protobuf/descriptor.h \
82 google/protobuf/descriptor.pb.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000083 google/protobuf/dynamic_message.h \
84 google/protobuf/extension_set.h \
85 google/protobuf/generated_enum_reflection.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000086 google/protobuf/generated_message_reflection.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080087 google/protobuf/generated_message_util.h \
Feng Xiaof157a562014-11-14 11:50:31 -080088 google/protobuf/map_entry.h \
89 google/protobuf/map_field.h \
90 google/protobuf/map_field_inl.h \
91 google/protobuf/map.h \
92 google/protobuf/map_type_handler.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000093 google/protobuf/message.h \
94 google/protobuf/message_lite.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080095 google/protobuf/metadata.h \
96 google/protobuf/reflection.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000097 google/protobuf/reflection_ops.h \
98 google/protobuf/repeated_field.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080099 google/protobuf/repeated_field_reflection.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +0000100 google/protobuf/service.h \
101 google/protobuf/text_format.h \
102 google/protobuf/unknown_field_set.h \
103 google/protobuf/wire_format.h \
104 google/protobuf/wire_format_lite.h \
105 google/protobuf/wire_format_lite_inl.h \
106 google/protobuf/io/coded_stream.h \
107 $(GZHEADERS) \
108 google/protobuf/io/printer.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000109 google/protobuf/io/strtod.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +0000110 google/protobuf/io/tokenizer.h \
111 google/protobuf/io/zero_copy_stream.h \
112 google/protobuf/io/zero_copy_stream_impl.h \
113 google/protobuf/io/zero_copy_stream_impl_lite.h \
114 google/protobuf/compiler/code_generator.h \
115 google/protobuf/compiler/command_line_interface.h \
116 google/protobuf/compiler/importer.h \
117 google/protobuf/compiler/parser.h \
118 google/protobuf/compiler/plugin.h \
119 google/protobuf/compiler/plugin.pb.h \
120 google/protobuf/compiler/cpp/cpp_generator.h \
121 google/protobuf/compiler/java/java_generator.h \
zhangkun83a6b3ab02015-01-12 15:56:07 -0800122 google/protobuf/compiler/java/java_names.h \
Feng Xiao044e0952014-12-12 17:50:43 -0800123 google/protobuf/compiler/javanano/javanano_generator.h \
124 google/protobuf/compiler/python/python_generator.h \
125 google/protobuf/compiler/ruby/ruby_generator.h
temporal40ee5512008-07-10 02:12:20 +0000126
Jisi Liudf184fb2015-02-25 15:28:44 -0800127nobase_nodist_include_HEADERS = \
128 $(public_config)
129
kenton@google.com858a22b2009-07-29 02:21:47 +0000130lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
temporal40ee5512008-07-10 02:12:20 +0000131
kenton@google.com858a22b2009-07-29 02:21:47 +0000132libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
Feng Xiao81a630c2014-12-03 11:52:21 -0800133libprotobuf_lite_la_LDFLAGS = -version-info 10:0:0 -export-dynamic -no-undefined
kenton@google.com858a22b2009-07-29 02:21:47 +0000134libprotobuf_lite_la_SOURCES = \
pliard@google.comf5de4862012-03-02 13:04:36 +0000135 google/protobuf/stubs/atomicops_internals_x86_gcc.cc \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +0000136 google/protobuf/stubs/atomicops_internals_x86_msvc.cc \
temporal40ee5512008-07-10 02:12:20 +0000137 google/protobuf/stubs/common.cc \
kenton@google.comd37d46d2009-04-25 02:53:47 +0000138 google/protobuf/stubs/once.cc \
temporal40ee5512008-07-10 02:12:20 +0000139 google/protobuf/stubs/hash.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000140 google/protobuf/stubs/map_util.h \
jieluo@google.combde4a322014-08-12 21:10:30 +0000141 google/protobuf/stubs/shared_ptr.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000142 google/protobuf/stubs/stringprintf.cc \
143 google/protobuf/stubs/stringprintf.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800144 google/protobuf/arena.cc \
145 google/protobuf/arenastring.cc \
kenton@google.com858a22b2009-07-29 02:21:47 +0000146 google/protobuf/extension_set.cc \
147 google/protobuf/generated_message_util.cc \
148 google/protobuf/message_lite.cc \
149 google/protobuf/repeated_field.cc \
150 google/protobuf/wire_format_lite.cc \
151 google/protobuf/io/coded_stream.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000152 google/protobuf/io/coded_stream_inl.h \
kenton@google.com858a22b2009-07-29 02:21:47 +0000153 google/protobuf/io/zero_copy_stream.cc \
Jisi Liudf184fb2015-02-25 15:28:44 -0800154 google/protobuf/io/zero_copy_stream_impl_lite.cc \
155 $(public_config)
kenton@google.com858a22b2009-07-29 02:21:47 +0000156
157libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
Feng Xiao81a630c2014-12-03 11:52:21 -0800158libprotobuf_la_LDFLAGS = -version-info 10:0:0 -export-dynamic -no-undefined
kenton@google.com858a22b2009-07-29 02:21:47 +0000159libprotobuf_la_SOURCES = \
160 $(libprotobuf_lite_la_SOURCES) \
kenton@google.com4f3491e2009-07-29 21:33:08 +0000161 google/protobuf/stubs/strutil.cc \
162 google/protobuf/stubs/strutil.h \
163 google/protobuf/stubs/substitute.cc \
164 google/protobuf/stubs/substitute.h \
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000165 google/protobuf/stubs/structurally_valid.cc \
temporal40ee5512008-07-10 02:12:20 +0000166 google/protobuf/descriptor.cc \
temporal40ee5512008-07-10 02:12:20 +0000167 google/protobuf/descriptor_database.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800168 google/protobuf/descriptor.pb.cc \
temporal40ee5512008-07-10 02:12:20 +0000169 google/protobuf/dynamic_message.cc \
kenton@google.com80b1d622009-07-29 01:13:20 +0000170 google/protobuf/extension_set_heavy.cc \
temporal40ee5512008-07-10 02:12:20 +0000171 google/protobuf/generated_message_reflection.cc \
Feng Xiao496d47c2014-12-09 15:47:25 -0800172 google/protobuf/map_field.cc \
temporal40ee5512008-07-10 02:12:20 +0000173 google/protobuf/message.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800174 google/protobuf/reflection_internal.h \
temporal40ee5512008-07-10 02:12:20 +0000175 google/protobuf/reflection_ops.cc \
temporal40ee5512008-07-10 02:12:20 +0000176 google/protobuf/service.cc \
177 google/protobuf/text_format.cc \
178 google/protobuf/unknown_field_set.cc \
179 google/protobuf/wire_format.cc \
kenton@google.come59427a2009-04-16 22:30:56 +0000180 google/protobuf/io/gzip_stream.cc \
temporal40ee5512008-07-10 02:12:20 +0000181 google/protobuf/io/printer.cc \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000182 google/protobuf/io/strtod.cc \
temporal40ee5512008-07-10 02:12:20 +0000183 google/protobuf/io/tokenizer.cc \
temporal40ee5512008-07-10 02:12:20 +0000184 google/protobuf/io/zero_copy_stream_impl.cc \
185 google/protobuf/compiler/importer.cc \
186 google/protobuf/compiler/parser.cc
187
188libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
Feng Xiao81a630c2014-12-03 11:52:21 -0800189libprotoc_la_LDFLAGS = -version-info 10:0:0 -export-dynamic -no-undefined
temporal40ee5512008-07-10 02:12:20 +0000190libprotoc_la_SOURCES = \
191 google/protobuf/compiler/code_generator.cc \
192 google/protobuf/compiler/command_line_interface.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000193 google/protobuf/compiler/plugin.cc \
194 google/protobuf/compiler/plugin.pb.cc \
195 google/protobuf/compiler/subprocess.cc \
196 google/protobuf/compiler/subprocess.h \
kenton@google.com50663222009-12-24 02:12:15 +0000197 google/protobuf/compiler/zip_writer.cc \
198 google/protobuf/compiler/zip_writer.h \
temporal40ee5512008-07-10 02:12:20 +0000199 google/protobuf/compiler/cpp/cpp_enum.cc \
200 google/protobuf/compiler/cpp/cpp_enum.h \
201 google/protobuf/compiler/cpp/cpp_enum_field.cc \
202 google/protobuf/compiler/cpp/cpp_enum_field.h \
203 google/protobuf/compiler/cpp/cpp_extension.cc \
204 google/protobuf/compiler/cpp/cpp_extension.h \
205 google/protobuf/compiler/cpp/cpp_field.cc \
206 google/protobuf/compiler/cpp/cpp_field.h \
207 google/protobuf/compiler/cpp/cpp_file.cc \
208 google/protobuf/compiler/cpp/cpp_file.h \
209 google/protobuf/compiler/cpp/cpp_generator.cc \
210 google/protobuf/compiler/cpp/cpp_helpers.cc \
211 google/protobuf/compiler/cpp/cpp_helpers.h \
Feng Xiaof157a562014-11-14 11:50:31 -0800212 google/protobuf/compiler/cpp/cpp_map_field.cc \
213 google/protobuf/compiler/cpp/cpp_map_field.h \
temporal40ee5512008-07-10 02:12:20 +0000214 google/protobuf/compiler/cpp/cpp_message.cc \
215 google/protobuf/compiler/cpp/cpp_message.h \
216 google/protobuf/compiler/cpp/cpp_message_field.cc \
217 google/protobuf/compiler/cpp/cpp_message_field.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000218 google/protobuf/compiler/cpp/cpp_options.h \
temporal40ee5512008-07-10 02:12:20 +0000219 google/protobuf/compiler/cpp/cpp_primitive_field.cc \
220 google/protobuf/compiler/cpp/cpp_primitive_field.h \
221 google/protobuf/compiler/cpp/cpp_service.cc \
222 google/protobuf/compiler/cpp/cpp_service.h \
223 google/protobuf/compiler/cpp/cpp_string_field.cc \
224 google/protobuf/compiler/cpp/cpp_string_field.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000225 google/protobuf/compiler/java/java_context.cc \
226 google/protobuf/compiler/java/java_context.h \
temporal40ee5512008-07-10 02:12:20 +0000227 google/protobuf/compiler/java/java_enum.cc \
temporal40ee5512008-07-10 02:12:20 +0000228 google/protobuf/compiler/java/java_enum_field.cc \
229 google/protobuf/compiler/java/java_enum_field.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800230 google/protobuf/compiler/java/java_enum.h \
temporal40ee5512008-07-10 02:12:20 +0000231 google/protobuf/compiler/java/java_extension.cc \
232 google/protobuf/compiler/java/java_extension.h \
233 google/protobuf/compiler/java/java_field.cc \
234 google/protobuf/compiler/java/java_field.h \
235 google/protobuf/compiler/java/java_file.cc \
236 google/protobuf/compiler/java/java_file.h \
237 google/protobuf/compiler/java/java_generator.cc \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000238 google/protobuf/compiler/java/java_generator_factory.cc \
239 google/protobuf/compiler/java/java_generator_factory.h \
temporal40ee5512008-07-10 02:12:20 +0000240 google/protobuf/compiler/java/java_helpers.cc \
241 google/protobuf/compiler/java/java_helpers.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000242 google/protobuf/compiler/java/java_lazy_message_field.cc \
243 google/protobuf/compiler/java/java_lazy_message_field.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800244 google/protobuf/compiler/java/java_map_field.cc \
245 google/protobuf/compiler/java/java_map_field.h \
temporal40ee5512008-07-10 02:12:20 +0000246 google/protobuf/compiler/java/java_message.cc \
temporal40ee5512008-07-10 02:12:20 +0000247 google/protobuf/compiler/java/java_message_field.cc \
248 google/protobuf/compiler/java/java_message_field.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800249 google/protobuf/compiler/java/java_message.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000250 google/protobuf/compiler/java/java_name_resolver.cc \
251 google/protobuf/compiler/java/java_name_resolver.h \
temporal40ee5512008-07-10 02:12:20 +0000252 google/protobuf/compiler/java/java_primitive_field.cc \
253 google/protobuf/compiler/java/java_primitive_field.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000254 google/protobuf/compiler/java/java_shared_code_generator.cc \
255 google/protobuf/compiler/java/java_shared_code_generator.h \
temporal40ee5512008-07-10 02:12:20 +0000256 google/protobuf/compiler/java/java_service.cc \
257 google/protobuf/compiler/java/java_service.h \
liujisi@google.com33165fe2010-11-02 13:14:58 +0000258 google/protobuf/compiler/java/java_string_field.cc \
259 google/protobuf/compiler/java/java_string_field.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000260 google/protobuf/compiler/java/java_doc_comment.cc \
261 google/protobuf/compiler/java/java_doc_comment.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800262 google/protobuf/compiler/javanano/javanano_enum.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800263 google/protobuf/compiler/javanano/javanano_enum.h \
264 google/protobuf/compiler/javanano/javanano_enum_field.cc \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800265 google/protobuf/compiler/javanano/javanano_enum_field.h \
266 google/protobuf/compiler/javanano/javanano_extension.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800267 google/protobuf/compiler/javanano/javanano_extension.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800268 google/protobuf/compiler/javanano/javanano_field.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800269 google/protobuf/compiler/javanano/javanano_field.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800270 google/protobuf/compiler/javanano/javanano_file.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800271 google/protobuf/compiler/javanano/javanano_file.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800272 google/protobuf/compiler/javanano/javanano_generator.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800273 google/protobuf/compiler/javanano/javanano_generator.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800274 google/protobuf/compiler/javanano/javanano_helpers.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800275 google/protobuf/compiler/javanano/javanano_helpers.h \
276 google/protobuf/compiler/javanano/javanano_map_field.cc \
277 google/protobuf/compiler/javanano/javanano_map_field.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800278 google/protobuf/compiler/javanano/javanano_message.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800279 google/protobuf/compiler/javanano/javanano_message.h \
280 google/protobuf/compiler/javanano/javanano_message_field.cc \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800281 google/protobuf/compiler/javanano/javanano_message_field.h \
282 google/protobuf/compiler/javanano/javanano_params.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800283 google/protobuf/compiler/javanano/javanano_primitive_field.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800284 google/protobuf/compiler/javanano/javanano_primitive_field.h \
Chris Fallin973f4252014-11-18 14:19:58 -0800285 google/protobuf/compiler/python/python_generator.cc \
286 google/protobuf/compiler/ruby/ruby_generator.cc
temporal40ee5512008-07-10 02:12:20 +0000287
288bin_PROGRAMS = protoc
289protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
290protoc_SOURCES = google/protobuf/compiler/main.cc
291
292# Tests ==============================================================
293
294protoc_inputs = \
Feng Xiaof157a562014-11-14 11:50:31 -0800295 google/protobuf/map_lite_unittest.proto \
296 google/protobuf/map_proto2_unittest.proto \
297 google/protobuf/map_unittest.proto \
temporal40ee5512008-07-10 02:12:20 +0000298 google/protobuf/unittest.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800299 google/protobuf/unittest_arena.proto \
kenton@google.com24bf56f2008-09-24 20:31:01 +0000300 google/protobuf/unittest_custom_options.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800301 google/protobuf/unittest_drop_unknown_fields.proto \
302 google/protobuf/unittest_embed_optimize_for.proto \
303 google/protobuf/unittest_empty.proto \
kenton@google.com80b1d622009-07-29 01:13:20 +0000304 google/protobuf/unittest_import_lite.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800305 google/protobuf/unittest_import.proto \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000306 google/protobuf/unittest_import_public_lite.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800307 google/protobuf/unittest_import_public.proto \
kenton@google.com80b1d622009-07-29 01:13:20 +0000308 google/protobuf/unittest_lite_imports_nonlite.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800309 google/protobuf/unittest_lite.proto \
310 google/protobuf/unittest_mset.proto \
311 google/protobuf/unittest_no_arena_import.proto \
312 google/protobuf/unittest_no_arena.proto \
313 google/protobuf/unittest_no_field_presence.proto \
kenton@google.comfccb1462009-12-18 02:11:36 +0000314 google/protobuf/unittest_no_generic_services.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800315 google/protobuf/unittest_optimize_for.proto \
316 google/protobuf/unittest_preserve_unknown_enum.proto \
317 google/protobuf/unittest_proto3_arena.proto \
temporal40ee5512008-07-10 02:12:20 +0000318 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto
319
320EXTRA_DIST = \
321 $(protoc_inputs) \
322 solaris/libstdc++.la \
kenton@google.come59427a2009-04-16 22:30:56 +0000323 google/protobuf/io/gzip_stream.h \
324 google/protobuf/io/gzip_stream_unittest.sh \
temporal40ee5512008-07-10 02:12:20 +0000325 google/protobuf/testdata/golden_message \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000326 google/protobuf/testdata/golden_message_oneof_implemented \
kenton@google.com2d6daa72009-01-22 01:27:00 +0000327 google/protobuf/testdata/golden_packed_fields_message \
jieluo@google.come61b5132014-08-14 21:51:48 +0000328 google/protobuf/testdata/bad_utf8_string \
329 google/protobuf/testdata/text_format_unittest_data.txt \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000330 google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt \
jieluo@google.combde4a322014-08-12 21:10:30 +0000331 google/protobuf/testdata/text_format_unittest_data_pointy.txt \
jieluo@google.come61b5132014-08-14 21:51:48 +0000332 google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000333 google/protobuf/testdata/text_format_unittest_extensions_data.txt \
jieluo@google.combde4a322014-08-12 21:10:30 +0000334 google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \
temporal40ee5512008-07-10 02:12:20 +0000335 google/protobuf/package_info.h \
336 google/protobuf/io/package_info.h \
kenton@google.com8aae2a22009-08-11 00:23:25 +0000337 google/protobuf/compiler/package_info.h \
kenton@google.com2773bdf2010-01-07 04:14:34 +0000338 google/protobuf/compiler/zip_output_unittest.sh \
kenton@google.com8aae2a22009-08-11 00:23:25 +0000339 google/protobuf/unittest_enormous_descriptor.proto
temporal40ee5512008-07-10 02:12:20 +0000340
kenton@google.com80b1d622009-07-29 01:13:20 +0000341protoc_lite_outputs = \
342 google/protobuf/unittest_lite.pb.cc \
343 google/protobuf/unittest_lite.pb.h \
344 google/protobuf/unittest_import_lite.pb.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000345 google/protobuf/unittest_import_lite.pb.h \
346 google/protobuf/unittest_import_public_lite.pb.cc \
347 google/protobuf/unittest_import_public_lite.pb.h
kenton@google.com80b1d622009-07-29 01:13:20 +0000348
temporal40ee5512008-07-10 02:12:20 +0000349protoc_outputs = \
kenton@google.com80b1d622009-07-29 01:13:20 +0000350 $(protoc_lite_outputs) \
Feng Xiaof157a562014-11-14 11:50:31 -0800351 google/protobuf/map_lite_unittest.pb.cc \
352 google/protobuf/map_lite_unittest.pb.h \
353 google/protobuf/map_proto2_unittest.pb.cc \
354 google/protobuf/map_proto2_unittest.pb.h \
355 google/protobuf/map_unittest.pb.cc \
356 google/protobuf/map_unittest.pb.h \
temporal40ee5512008-07-10 02:12:20 +0000357 google/protobuf/unittest.pb.cc \
358 google/protobuf/unittest.pb.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800359 google/protobuf/unittest_arena.pb.cc \
360 google/protobuf/unittest_arena.pb.h \
361 google/protobuf/unittest_custom_options.pb.cc \
362 google/protobuf/unittest_custom_options.pb.h \
363 google/protobuf/unittest_drop_unknown_fields.pb.cc \
364 google/protobuf/unittest_drop_unknown_fields.pb.h \
365 google/protobuf/unittest_embed_optimize_for.pb.cc \
366 google/protobuf/unittest_embed_optimize_for.pb.h \
kenton@google.comd37d46d2009-04-25 02:53:47 +0000367 google/protobuf/unittest_empty.pb.cc \
368 google/protobuf/unittest_empty.pb.h \
temporal40ee5512008-07-10 02:12:20 +0000369 google/protobuf/unittest_import.pb.cc \
370 google/protobuf/unittest_import.pb.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000371 google/protobuf/unittest_import_public.pb.cc \
372 google/protobuf/unittest_import_public.pb.h \
kenton@google.com80b1d622009-07-29 01:13:20 +0000373 google/protobuf/unittest_lite_imports_nonlite.pb.cc \
374 google/protobuf/unittest_lite_imports_nonlite.pb.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800375 google/protobuf/unittest_mset.pb.cc \
376 google/protobuf/unittest_mset.pb.h \
377 google/protobuf/unittest_no_arena.pb.cc \
378 google/protobuf/unittest_no_arena.pb.h \
379 google/protobuf/unittest_no_arena_import.pb.cc \
380 google/protobuf/unittest_no_arena_import.pb.h \
381 google/protobuf/unittest_no_field_presence.pb.cc \
382 google/protobuf/unittest_no_field_presence.pb.h \
kenton@google.comfccb1462009-12-18 02:11:36 +0000383 google/protobuf/unittest_no_generic_services.pb.cc \
384 google/protobuf/unittest_no_generic_services.pb.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800385 google/protobuf/unittest_optimize_for.pb.cc \
386 google/protobuf/unittest_optimize_for.pb.h \
387 google/protobuf/unittest_preserve_unknown_enum.pb.cc \
388 google/protobuf/unittest_preserve_unknown_enum.pb.h \
389 google/protobuf/unittest_proto3_arena.pb.cc \
390 google/protobuf/unittest_proto3_arena.pb.h \
temporal40ee5512008-07-10 02:12:20 +0000391 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \
392 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h
393
Jisi Liudf184fb2015-02-25 15:28:44 -0800394BUILT_SOURCES = $(protoc_outputs) $(public_config)
temporal40ee5512008-07-10 02:12:20 +0000395
kenton@google.com9824eda2009-05-06 17:49:37 +0000396if USE_EXTERNAL_PROTOC
397
398unittest_proto_middleman: $(protoc_inputs)
kenton@google.com721995d2009-09-11 22:08:40 +0000399 $(PROTOC) -I$(srcdir) --cpp_out=. $^
kenton@google.com9824eda2009-05-06 17:49:37 +0000400 touch unittest_proto_middleman
401
402else
403
kenton@google.com38fcd392010-01-08 04:48:19 +0000404# We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is
405# relative to srcdir, which may not be the same as the current directory when
406# building out-of-tree.
temporal40ee5512008-07-10 02:12:20 +0000407unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs)
kenton@google.com38fcd392010-01-08 04:48:19 +0000408 oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) )
temporal40ee5512008-07-10 02:12:20 +0000409 touch unittest_proto_middleman
410
kenton@google.com9824eda2009-05-06 17:49:37 +0000411endif
412
temporal40ee5512008-07-10 02:12:20 +0000413$(protoc_outputs): unittest_proto_middleman
414
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000415COMMON_TEST_SOURCES = \
Feng Xiaof157a562014-11-14 11:50:31 -0800416 google/protobuf/map_test_util.cc \
417 google/protobuf/map_test_util.h \
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000418 google/protobuf/test_util.cc \
419 google/protobuf/test_util.h \
420 google/protobuf/testing/googletest.cc \
421 google/protobuf/testing/googletest.h \
422 google/protobuf/testing/file.cc \
423 google/protobuf/testing/file.h
424
kenton@google.comd2fcbba2010-01-04 19:47:18 +0000425check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
426 protobuf-lite-test test_plugin $(GZCHECKPROGRAMS)
kenton@google.com37ad00d2009-04-21 21:00:39 +0000427protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
428 $(top_builddir)/gtest/lib/libgtest.la \
429 $(top_builddir)/gtest/lib/libgtest_main.la
430protobuf_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
431 -I$(top_builddir)/gtest/include
kenton@google.com42c81e12009-05-06 01:15:06 +0000432# Disable optimization for tests unless the user explicitly asked for it,
433# since test_util.cc takes forever to compile with optimization (with GCC).
434# See configure.ac for more info.
435protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
temporal40ee5512008-07-10 02:12:20 +0000436protobuf_test_SOURCES = \
437 google/protobuf/stubs/common_unittest.cc \
kenton@google.comd37d46d2009-04-25 02:53:47 +0000438 google/protobuf/stubs/once_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000439 google/protobuf/stubs/strutil_unittest.cc \
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000440 google/protobuf/stubs/structurally_valid_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000441 google/protobuf/stubs/stringprintf_unittest.cc \
442 google/protobuf/stubs/template_util_unittest.cc \
443 google/protobuf/stubs/type_traits_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800444 google/protobuf/arenastring_unittest.cc \
445 google/protobuf/arena_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000446 google/protobuf/descriptor_database_unittest.cc \
447 google/protobuf/descriptor_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800448 google/protobuf/drop_unknown_fields_test.cc \
temporal40ee5512008-07-10 02:12:20 +0000449 google/protobuf/dynamic_message_unittest.cc \
450 google/protobuf/extension_set_unittest.cc \
451 google/protobuf/generated_message_reflection_unittest.cc \
Feng Xiaof157a562014-11-14 11:50:31 -0800452 google/protobuf/map_field_test.cc \
453 google/protobuf/map_test.cc \
temporal40ee5512008-07-10 02:12:20 +0000454 google/protobuf/message_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800455 google/protobuf/no_field_presence_test.cc \
456 google/protobuf/preserve_unknown_enum_test.cc \
457 google/protobuf/proto3_arena_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000458 google/protobuf/reflection_ops_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000459 google/protobuf/repeated_field_reflection_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800460 google/protobuf/repeated_field_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000461 google/protobuf/text_format_unittest.cc \
462 google/protobuf/unknown_field_set_unittest.cc \
463 google/protobuf/wire_format_unittest.cc \
464 google/protobuf/io/coded_stream_unittest.cc \
465 google/protobuf/io/printer_unittest.cc \
466 google/protobuf/io/tokenizer_unittest.cc \
467 google/protobuf/io/zero_copy_stream_unittest.cc \
468 google/protobuf/compiler/command_line_interface_unittest.cc \
469 google/protobuf/compiler/importer_unittest.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000470 google/protobuf/compiler/mock_code_generator.cc \
471 google/protobuf/compiler/mock_code_generator.h \
temporal40ee5512008-07-10 02:12:20 +0000472 google/protobuf/compiler/parser_unittest.cc \
473 google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000474 google/protobuf/compiler/cpp/cpp_unittest.h \
temporal40ee5512008-07-10 02:12:20 +0000475 google/protobuf/compiler/cpp/cpp_unittest.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000476 google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \
477 google/protobuf/compiler/java/java_plugin_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000478 google/protobuf/compiler/java/java_doc_comment_unittest.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000479 google/protobuf/compiler/python/python_plugin_unittest.cc \
Chris Fallin3f3820d2015-01-14 15:44:46 -0800480 google/protobuf/compiler/ruby/ruby_generator_unittest.cc \
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000481 $(COMMON_TEST_SOURCES)
482nodist_protobuf_test_SOURCES = $(protoc_outputs)
483
484# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
485protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000486 libprotoc.la \
487 $(top_builddir)/gtest/lib/libgtest.la \
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000488 $(top_builddir)/gtest/lib/libgtest_main.la
489protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
490 -I$(top_builddir)/gtest/include \
491 -DPROTOBUF_TEST_NO_DESCRIPTORS
kenton@google.com4f3491e2009-07-29 21:33:08 +0000492protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000493protobuf_lazy_descriptor_test_SOURCES = \
494 google/protobuf/compiler/cpp/cpp_unittest.cc \
495 $(COMMON_TEST_SOURCES)
496nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs)
temporal40ee5512008-07-10 02:12:20 +0000497
kenton@google.com80b1d622009-07-29 01:13:20 +0000498# Build lite_unittest separately, since it doesn't use gtest.
kenton@google.com858a22b2009-07-29 02:21:47 +0000499protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la
kenton@google.com4f3491e2009-07-29 21:33:08 +0000500protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
kenton@google.com80b1d622009-07-29 01:13:20 +0000501protobuf_lite_test_SOURCES = \
502 google/protobuf/lite_unittest.cc \
503 google/protobuf/test_util_lite.cc \
504 google/protobuf/test_util_lite.h
505nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs)
506
kenton@google.comfccb1462009-12-18 02:11:36 +0000507# Test plugin binary.
508test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
509 $(top_builddir)/gtest/lib/libgtest.la
kenton@google.com83ad01e2009-12-18 02:40:43 +0000510test_plugin_CPPFLAGS = -I$(top_srcdir)/gtest/include \
511 -I$(top_builddir)/gtest/include
kenton@google.comfccb1462009-12-18 02:11:36 +0000512test_plugin_SOURCES = \
513 google/protobuf/compiler/mock_code_generator.cc \
514 google/protobuf/testing/file.cc \
515 google/protobuf/testing/file.h \
516 google/protobuf/compiler/test_plugin.cc
517
kenton@google.come59427a2009-04-16 22:30:56 +0000518if HAVE_ZLIB
519zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
520zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc
521
522zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
523zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc
524endif
525
kenton@google.comd2fcbba2010-01-04 19:47:18 +0000526TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
527 google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS)