blob: b27c6a17c4ff63c8e67c1c1b0f89bc0f6c52e4a3 [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 Liub6709602015-02-25 17:09:55 -080074 google/protobuf/stubs/shared_ptr.h \
Jisi Liudf184fb2015-02-25 15:28:44 -080075 google/protobuf/stubs/singleton.h \
jieluo@google.com1eba9d92014-08-25 20:17:53 +000076 google/protobuf/stubs/stl_util.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000077 google/protobuf/stubs/template_util.h \
78 google/protobuf/stubs/type_traits.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080079 google/protobuf/arena.h \
80 google/protobuf/arenastring.h \
81 google/protobuf/descriptor_database.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000082 google/protobuf/descriptor.h \
83 google/protobuf/descriptor.pb.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000084 google/protobuf/dynamic_message.h \
85 google/protobuf/extension_set.h \
86 google/protobuf/generated_enum_reflection.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000087 google/protobuf/generated_message_reflection.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080088 google/protobuf/generated_message_util.h \
Feng Xiaof157a562014-11-14 11:50:31 -080089 google/protobuf/map_entry.h \
90 google/protobuf/map_field.h \
91 google/protobuf/map_field_inl.h \
92 google/protobuf/map.h \
93 google/protobuf/map_type_handler.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000094 google/protobuf/message.h \
95 google/protobuf/message_lite.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -080096 google/protobuf/metadata.h \
97 google/protobuf/reflection.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +000098 google/protobuf/reflection_ops.h \
99 google/protobuf/repeated_field.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800100 google/protobuf/repeated_field_reflection.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +0000101 google/protobuf/service.h \
102 google/protobuf/text_format.h \
103 google/protobuf/unknown_field_set.h \
104 google/protobuf/wire_format.h \
105 google/protobuf/wire_format_lite.h \
106 google/protobuf/wire_format_lite_inl.h \
107 google/protobuf/io/coded_stream.h \
108 $(GZHEADERS) \
109 google/protobuf/io/printer.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000110 google/protobuf/io/strtod.h \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +0000111 google/protobuf/io/tokenizer.h \
112 google/protobuf/io/zero_copy_stream.h \
113 google/protobuf/io/zero_copy_stream_impl.h \
114 google/protobuf/io/zero_copy_stream_impl_lite.h \
115 google/protobuf/compiler/code_generator.h \
116 google/protobuf/compiler/command_line_interface.h \
117 google/protobuf/compiler/importer.h \
118 google/protobuf/compiler/parser.h \
119 google/protobuf/compiler/plugin.h \
120 google/protobuf/compiler/plugin.pb.h \
121 google/protobuf/compiler/cpp/cpp_generator.h \
122 google/protobuf/compiler/java/java_generator.h \
zhangkun83a6b3ab02015-01-12 15:56:07 -0800123 google/protobuf/compiler/java/java_names.h \
Feng Xiao044e0952014-12-12 17:50:43 -0800124 google/protobuf/compiler/javanano/javanano_generator.h \
125 google/protobuf/compiler/python/python_generator.h \
126 google/protobuf/compiler/ruby/ruby_generator.h
temporal40ee5512008-07-10 02:12:20 +0000127
Jisi Liudf184fb2015-02-25 15:28:44 -0800128nobase_nodist_include_HEADERS = \
Jisi Liua86baaa2015-02-25 20:39:13 -0800129 $(public_config)
Jisi Liudf184fb2015-02-25 15:28:44 -0800130
kenton@google.com858a22b2009-07-29 02:21:47 +0000131lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
temporal40ee5512008-07-10 02:12:20 +0000132
kenton@google.com858a22b2009-07-29 02:21:47 +0000133libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
Feng Xiao81a630c2014-12-03 11:52:21 -0800134libprotobuf_lite_la_LDFLAGS = -version-info 10:0:0 -export-dynamic -no-undefined
kenton@google.com858a22b2009-07-29 02:21:47 +0000135libprotobuf_lite_la_SOURCES = \
pliard@google.comf5de4862012-03-02 13:04:36 +0000136 google/protobuf/stubs/atomicops_internals_x86_gcc.cc \
xiaofeng@google.comcaa66db2012-12-04 18:44:24 +0000137 google/protobuf/stubs/atomicops_internals_x86_msvc.cc \
temporal40ee5512008-07-10 02:12:20 +0000138 google/protobuf/stubs/common.cc \
kenton@google.comd37d46d2009-04-25 02:53:47 +0000139 google/protobuf/stubs/once.cc \
temporal40ee5512008-07-10 02:12:20 +0000140 google/protobuf/stubs/hash.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000141 google/protobuf/stubs/map_util.h \
jieluo@google.combde4a322014-08-12 21:10:30 +0000142 google/protobuf/stubs/shared_ptr.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000143 google/protobuf/stubs/stringprintf.cc \
144 google/protobuf/stubs/stringprintf.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800145 google/protobuf/arena.cc \
146 google/protobuf/arenastring.cc \
kenton@google.com858a22b2009-07-29 02:21:47 +0000147 google/protobuf/extension_set.cc \
148 google/protobuf/generated_message_util.cc \
149 google/protobuf/message_lite.cc \
150 google/protobuf/repeated_field.cc \
151 google/protobuf/wire_format_lite.cc \
152 google/protobuf/io/coded_stream.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000153 google/protobuf/io/coded_stream_inl.h \
kenton@google.com858a22b2009-07-29 02:21:47 +0000154 google/protobuf/io/zero_copy_stream.cc \
Jisi Liua86baaa2015-02-25 20:39:13 -0800155 google/protobuf/io/zero_copy_stream_impl_lite.cc
156nodist_libprotobuf_lite_la_SOURCES = $(public_config)
kenton@google.com858a22b2009-07-29 02:21:47 +0000157
158libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
Feng Xiao81a630c2014-12-03 11:52:21 -0800159libprotobuf_la_LDFLAGS = -version-info 10:0:0 -export-dynamic -no-undefined
kenton@google.com858a22b2009-07-29 02:21:47 +0000160libprotobuf_la_SOURCES = \
161 $(libprotobuf_lite_la_SOURCES) \
kenton@google.com4f3491e2009-07-29 21:33:08 +0000162 google/protobuf/stubs/strutil.cc \
163 google/protobuf/stubs/strutil.h \
164 google/protobuf/stubs/substitute.cc \
165 google/protobuf/stubs/substitute.h \
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000166 google/protobuf/stubs/structurally_valid.cc \
temporal40ee5512008-07-10 02:12:20 +0000167 google/protobuf/descriptor.cc \
temporal40ee5512008-07-10 02:12:20 +0000168 google/protobuf/descriptor_database.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800169 google/protobuf/descriptor.pb.cc \
temporal40ee5512008-07-10 02:12:20 +0000170 google/protobuf/dynamic_message.cc \
kenton@google.com80b1d622009-07-29 01:13:20 +0000171 google/protobuf/extension_set_heavy.cc \
temporal40ee5512008-07-10 02:12:20 +0000172 google/protobuf/generated_message_reflection.cc \
Feng Xiao496d47c2014-12-09 15:47:25 -0800173 google/protobuf/map_field.cc \
temporal40ee5512008-07-10 02:12:20 +0000174 google/protobuf/message.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800175 google/protobuf/reflection_internal.h \
temporal40ee5512008-07-10 02:12:20 +0000176 google/protobuf/reflection_ops.cc \
temporal40ee5512008-07-10 02:12:20 +0000177 google/protobuf/service.cc \
178 google/protobuf/text_format.cc \
179 google/protobuf/unknown_field_set.cc \
180 google/protobuf/wire_format.cc \
kenton@google.come59427a2009-04-16 22:30:56 +0000181 google/protobuf/io/gzip_stream.cc \
temporal40ee5512008-07-10 02:12:20 +0000182 google/protobuf/io/printer.cc \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000183 google/protobuf/io/strtod.cc \
temporal40ee5512008-07-10 02:12:20 +0000184 google/protobuf/io/tokenizer.cc \
temporal40ee5512008-07-10 02:12:20 +0000185 google/protobuf/io/zero_copy_stream_impl.cc \
186 google/protobuf/compiler/importer.cc \
187 google/protobuf/compiler/parser.cc
Jisi Liua86baaa2015-02-25 20:39:13 -0800188nodist_libprotobuf_la_SOURCES = $(nodist_libprotobuf_lite_la_SOURCES)
temporal40ee5512008-07-10 02:12:20 +0000189
190libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
Feng Xiao81a630c2014-12-03 11:52:21 -0800191libprotoc_la_LDFLAGS = -version-info 10:0:0 -export-dynamic -no-undefined
temporal40ee5512008-07-10 02:12:20 +0000192libprotoc_la_SOURCES = \
193 google/protobuf/compiler/code_generator.cc \
194 google/protobuf/compiler/command_line_interface.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000195 google/protobuf/compiler/plugin.cc \
196 google/protobuf/compiler/plugin.pb.cc \
197 google/protobuf/compiler/subprocess.cc \
198 google/protobuf/compiler/subprocess.h \
kenton@google.com50663222009-12-24 02:12:15 +0000199 google/protobuf/compiler/zip_writer.cc \
200 google/protobuf/compiler/zip_writer.h \
temporal40ee5512008-07-10 02:12:20 +0000201 google/protobuf/compiler/cpp/cpp_enum.cc \
202 google/protobuf/compiler/cpp/cpp_enum.h \
203 google/protobuf/compiler/cpp/cpp_enum_field.cc \
204 google/protobuf/compiler/cpp/cpp_enum_field.h \
205 google/protobuf/compiler/cpp/cpp_extension.cc \
206 google/protobuf/compiler/cpp/cpp_extension.h \
207 google/protobuf/compiler/cpp/cpp_field.cc \
208 google/protobuf/compiler/cpp/cpp_field.h \
209 google/protobuf/compiler/cpp/cpp_file.cc \
210 google/protobuf/compiler/cpp/cpp_file.h \
211 google/protobuf/compiler/cpp/cpp_generator.cc \
212 google/protobuf/compiler/cpp/cpp_helpers.cc \
213 google/protobuf/compiler/cpp/cpp_helpers.h \
Feng Xiaof157a562014-11-14 11:50:31 -0800214 google/protobuf/compiler/cpp/cpp_map_field.cc \
215 google/protobuf/compiler/cpp/cpp_map_field.h \
temporal40ee5512008-07-10 02:12:20 +0000216 google/protobuf/compiler/cpp/cpp_message.cc \
217 google/protobuf/compiler/cpp/cpp_message.h \
218 google/protobuf/compiler/cpp/cpp_message_field.cc \
219 google/protobuf/compiler/cpp/cpp_message_field.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000220 google/protobuf/compiler/cpp/cpp_options.h \
temporal40ee5512008-07-10 02:12:20 +0000221 google/protobuf/compiler/cpp/cpp_primitive_field.cc \
222 google/protobuf/compiler/cpp/cpp_primitive_field.h \
223 google/protobuf/compiler/cpp/cpp_service.cc \
224 google/protobuf/compiler/cpp/cpp_service.h \
225 google/protobuf/compiler/cpp/cpp_string_field.cc \
226 google/protobuf/compiler/cpp/cpp_string_field.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000227 google/protobuf/compiler/java/java_context.cc \
228 google/protobuf/compiler/java/java_context.h \
temporal40ee5512008-07-10 02:12:20 +0000229 google/protobuf/compiler/java/java_enum.cc \
temporal40ee5512008-07-10 02:12:20 +0000230 google/protobuf/compiler/java/java_enum_field.cc \
231 google/protobuf/compiler/java/java_enum_field.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800232 google/protobuf/compiler/java/java_enum.h \
temporal40ee5512008-07-10 02:12:20 +0000233 google/protobuf/compiler/java/java_extension.cc \
234 google/protobuf/compiler/java/java_extension.h \
235 google/protobuf/compiler/java/java_field.cc \
236 google/protobuf/compiler/java/java_field.h \
237 google/protobuf/compiler/java/java_file.cc \
238 google/protobuf/compiler/java/java_file.h \
239 google/protobuf/compiler/java/java_generator.cc \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000240 google/protobuf/compiler/java/java_generator_factory.cc \
241 google/protobuf/compiler/java/java_generator_factory.h \
temporal40ee5512008-07-10 02:12:20 +0000242 google/protobuf/compiler/java/java_helpers.cc \
243 google/protobuf/compiler/java/java_helpers.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000244 google/protobuf/compiler/java/java_lazy_message_field.cc \
245 google/protobuf/compiler/java/java_lazy_message_field.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800246 google/protobuf/compiler/java/java_map_field.cc \
247 google/protobuf/compiler/java/java_map_field.h \
temporal40ee5512008-07-10 02:12:20 +0000248 google/protobuf/compiler/java/java_message.cc \
temporal40ee5512008-07-10 02:12:20 +0000249 google/protobuf/compiler/java/java_message_field.cc \
250 google/protobuf/compiler/java/java_message_field.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800251 google/protobuf/compiler/java/java_message.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000252 google/protobuf/compiler/java/java_name_resolver.cc \
253 google/protobuf/compiler/java/java_name_resolver.h \
temporal40ee5512008-07-10 02:12:20 +0000254 google/protobuf/compiler/java/java_primitive_field.cc \
255 google/protobuf/compiler/java/java_primitive_field.h \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000256 google/protobuf/compiler/java/java_shared_code_generator.cc \
257 google/protobuf/compiler/java/java_shared_code_generator.h \
temporal40ee5512008-07-10 02:12:20 +0000258 google/protobuf/compiler/java/java_service.cc \
259 google/protobuf/compiler/java/java_service.h \
liujisi@google.com33165fe2010-11-02 13:14:58 +0000260 google/protobuf/compiler/java/java_string_field.cc \
261 google/protobuf/compiler/java/java_string_field.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000262 google/protobuf/compiler/java/java_doc_comment.cc \
263 google/protobuf/compiler/java/java_doc_comment.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800264 google/protobuf/compiler/javanano/javanano_enum.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800265 google/protobuf/compiler/javanano/javanano_enum.h \
266 google/protobuf/compiler/javanano/javanano_enum_field.cc \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800267 google/protobuf/compiler/javanano/javanano_enum_field.h \
268 google/protobuf/compiler/javanano/javanano_extension.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800269 google/protobuf/compiler/javanano/javanano_extension.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800270 google/protobuf/compiler/javanano/javanano_field.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800271 google/protobuf/compiler/javanano/javanano_field.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800272 google/protobuf/compiler/javanano/javanano_file.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800273 google/protobuf/compiler/javanano/javanano_file.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800274 google/protobuf/compiler/javanano/javanano_generator.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800275 google/protobuf/compiler/javanano/javanano_generator.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800276 google/protobuf/compiler/javanano/javanano_helpers.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800277 google/protobuf/compiler/javanano/javanano_helpers.h \
278 google/protobuf/compiler/javanano/javanano_map_field.cc \
279 google/protobuf/compiler/javanano/javanano_map_field.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800280 google/protobuf/compiler/javanano/javanano_message.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800281 google/protobuf/compiler/javanano/javanano_message.h \
282 google/protobuf/compiler/javanano/javanano_message_field.cc \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800283 google/protobuf/compiler/javanano/javanano_message_field.h \
284 google/protobuf/compiler/javanano/javanano_params.h \
Jisi Liue9bbfbc2014-11-25 14:47:04 -0800285 google/protobuf/compiler/javanano/javanano_primitive_field.cc \
Jisi Liudce81652015-01-30 16:14:15 -0800286 google/protobuf/compiler/javanano/javanano_primitive_field.h \
Chris Fallin973f4252014-11-18 14:19:58 -0800287 google/protobuf/compiler/python/python_generator.cc \
288 google/protobuf/compiler/ruby/ruby_generator.cc
temporal40ee5512008-07-10 02:12:20 +0000289
290bin_PROGRAMS = protoc
291protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
292protoc_SOURCES = google/protobuf/compiler/main.cc
293
294# Tests ==============================================================
295
296protoc_inputs = \
Feng Xiaof157a562014-11-14 11:50:31 -0800297 google/protobuf/map_lite_unittest.proto \
298 google/protobuf/map_proto2_unittest.proto \
299 google/protobuf/map_unittest.proto \
temporal40ee5512008-07-10 02:12:20 +0000300 google/protobuf/unittest.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800301 google/protobuf/unittest_arena.proto \
kenton@google.com24bf56f2008-09-24 20:31:01 +0000302 google/protobuf/unittest_custom_options.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800303 google/protobuf/unittest_drop_unknown_fields.proto \
304 google/protobuf/unittest_embed_optimize_for.proto \
305 google/protobuf/unittest_empty.proto \
kenton@google.com80b1d622009-07-29 01:13:20 +0000306 google/protobuf/unittest_import_lite.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800307 google/protobuf/unittest_import.proto \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000308 google/protobuf/unittest_import_public_lite.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800309 google/protobuf/unittest_import_public.proto \
kenton@google.com80b1d622009-07-29 01:13:20 +0000310 google/protobuf/unittest_lite_imports_nonlite.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800311 google/protobuf/unittest_lite.proto \
312 google/protobuf/unittest_mset.proto \
313 google/protobuf/unittest_no_arena_import.proto \
314 google/protobuf/unittest_no_arena.proto \
315 google/protobuf/unittest_no_field_presence.proto \
kenton@google.comfccb1462009-12-18 02:11:36 +0000316 google/protobuf/unittest_no_generic_services.proto \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800317 google/protobuf/unittest_optimize_for.proto \
318 google/protobuf/unittest_preserve_unknown_enum.proto \
319 google/protobuf/unittest_proto3_arena.proto \
temporal40ee5512008-07-10 02:12:20 +0000320 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto
321
322EXTRA_DIST = \
323 $(protoc_inputs) \
324 solaris/libstdc++.la \
kenton@google.come59427a2009-04-16 22:30:56 +0000325 google/protobuf/io/gzip_stream.h \
326 google/protobuf/io/gzip_stream_unittest.sh \
temporal40ee5512008-07-10 02:12:20 +0000327 google/protobuf/testdata/golden_message \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000328 google/protobuf/testdata/golden_message_oneof_implemented \
Josh Haberman0b70a432015-02-25 20:17:32 -0800329 google/protobuf/testdata/golden_message_proto3 \
kenton@google.com2d6daa72009-01-22 01:27:00 +0000330 google/protobuf/testdata/golden_packed_fields_message \
jieluo@google.come61b5132014-08-14 21:51:48 +0000331 google/protobuf/testdata/bad_utf8_string \
332 google/protobuf/testdata/text_format_unittest_data.txt \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000333 google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt \
jieluo@google.combde4a322014-08-12 21:10:30 +0000334 google/protobuf/testdata/text_format_unittest_data_pointy.txt \
jieluo@google.come61b5132014-08-14 21:51:48 +0000335 google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000336 google/protobuf/testdata/text_format_unittest_extensions_data.txt \
jieluo@google.combde4a322014-08-12 21:10:30 +0000337 google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \
temporal40ee5512008-07-10 02:12:20 +0000338 google/protobuf/package_info.h \
339 google/protobuf/io/package_info.h \
kenton@google.com8aae2a22009-08-11 00:23:25 +0000340 google/protobuf/compiler/package_info.h \
kenton@google.com2773bdf2010-01-07 04:14:34 +0000341 google/protobuf/compiler/zip_output_unittest.sh \
kenton@google.com8aae2a22009-08-11 00:23:25 +0000342 google/protobuf/unittest_enormous_descriptor.proto
temporal40ee5512008-07-10 02:12:20 +0000343
kenton@google.com80b1d622009-07-29 01:13:20 +0000344protoc_lite_outputs = \
345 google/protobuf/unittest_lite.pb.cc \
346 google/protobuf/unittest_lite.pb.h \
347 google/protobuf/unittest_import_lite.pb.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000348 google/protobuf/unittest_import_lite.pb.h \
349 google/protobuf/unittest_import_public_lite.pb.cc \
350 google/protobuf/unittest_import_public_lite.pb.h
kenton@google.com80b1d622009-07-29 01:13:20 +0000351
temporal40ee5512008-07-10 02:12:20 +0000352protoc_outputs = \
kenton@google.com80b1d622009-07-29 01:13:20 +0000353 $(protoc_lite_outputs) \
Feng Xiaof157a562014-11-14 11:50:31 -0800354 google/protobuf/map_lite_unittest.pb.cc \
355 google/protobuf/map_lite_unittest.pb.h \
356 google/protobuf/map_proto2_unittest.pb.cc \
357 google/protobuf/map_proto2_unittest.pb.h \
358 google/protobuf/map_unittest.pb.cc \
359 google/protobuf/map_unittest.pb.h \
temporal40ee5512008-07-10 02:12:20 +0000360 google/protobuf/unittest.pb.cc \
361 google/protobuf/unittest.pb.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800362 google/protobuf/unittest_arena.pb.cc \
363 google/protobuf/unittest_arena.pb.h \
364 google/protobuf/unittest_custom_options.pb.cc \
365 google/protobuf/unittest_custom_options.pb.h \
366 google/protobuf/unittest_drop_unknown_fields.pb.cc \
367 google/protobuf/unittest_drop_unknown_fields.pb.h \
368 google/protobuf/unittest_embed_optimize_for.pb.cc \
369 google/protobuf/unittest_embed_optimize_for.pb.h \
kenton@google.comd37d46d2009-04-25 02:53:47 +0000370 google/protobuf/unittest_empty.pb.cc \
371 google/protobuf/unittest_empty.pb.h \
temporal40ee5512008-07-10 02:12:20 +0000372 google/protobuf/unittest_import.pb.cc \
373 google/protobuf/unittest_import.pb.h \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000374 google/protobuf/unittest_import_public.pb.cc \
375 google/protobuf/unittest_import_public.pb.h \
kenton@google.com80b1d622009-07-29 01:13:20 +0000376 google/protobuf/unittest_lite_imports_nonlite.pb.cc \
377 google/protobuf/unittest_lite_imports_nonlite.pb.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800378 google/protobuf/unittest_mset.pb.cc \
379 google/protobuf/unittest_mset.pb.h \
380 google/protobuf/unittest_no_arena.pb.cc \
381 google/protobuf/unittest_no_arena.pb.h \
382 google/protobuf/unittest_no_arena_import.pb.cc \
383 google/protobuf/unittest_no_arena_import.pb.h \
384 google/protobuf/unittest_no_field_presence.pb.cc \
385 google/protobuf/unittest_no_field_presence.pb.h \
kenton@google.comfccb1462009-12-18 02:11:36 +0000386 google/protobuf/unittest_no_generic_services.pb.cc \
387 google/protobuf/unittest_no_generic_services.pb.h \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800388 google/protobuf/unittest_optimize_for.pb.cc \
389 google/protobuf/unittest_optimize_for.pb.h \
390 google/protobuf/unittest_preserve_unknown_enum.pb.cc \
391 google/protobuf/unittest_preserve_unknown_enum.pb.h \
392 google/protobuf/unittest_proto3_arena.pb.cc \
393 google/protobuf/unittest_proto3_arena.pb.h \
temporal40ee5512008-07-10 02:12:20 +0000394 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \
395 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h
396
Jisi Liudf184fb2015-02-25 15:28:44 -0800397BUILT_SOURCES = $(protoc_outputs) $(public_config)
temporal40ee5512008-07-10 02:12:20 +0000398
kenton@google.com9824eda2009-05-06 17:49:37 +0000399if USE_EXTERNAL_PROTOC
400
401unittest_proto_middleman: $(protoc_inputs)
kenton@google.com721995d2009-09-11 22:08:40 +0000402 $(PROTOC) -I$(srcdir) --cpp_out=. $^
kenton@google.com9824eda2009-05-06 17:49:37 +0000403 touch unittest_proto_middleman
404
405else
406
kenton@google.com38fcd392010-01-08 04:48:19 +0000407# We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is
408# relative to srcdir, which may not be the same as the current directory when
409# building out-of-tree.
temporal40ee5512008-07-10 02:12:20 +0000410unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs)
kenton@google.com38fcd392010-01-08 04:48:19 +0000411 oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) )
temporal40ee5512008-07-10 02:12:20 +0000412 touch unittest_proto_middleman
413
kenton@google.com9824eda2009-05-06 17:49:37 +0000414endif
415
temporal40ee5512008-07-10 02:12:20 +0000416$(protoc_outputs): unittest_proto_middleman
417
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000418COMMON_TEST_SOURCES = \
Feng Xiaof157a562014-11-14 11:50:31 -0800419 google/protobuf/map_test_util.cc \
420 google/protobuf/map_test_util.h \
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000421 google/protobuf/test_util.cc \
422 google/protobuf/test_util.h \
423 google/protobuf/testing/googletest.cc \
424 google/protobuf/testing/googletest.h \
425 google/protobuf/testing/file.cc \
426 google/protobuf/testing/file.h
427
kenton@google.comd2fcbba2010-01-04 19:47:18 +0000428check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
429 protobuf-lite-test test_plugin $(GZCHECKPROGRAMS)
kenton@google.com37ad00d2009-04-21 21:00:39 +0000430protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
431 $(top_builddir)/gtest/lib/libgtest.la \
432 $(top_builddir)/gtest/lib/libgtest_main.la
433protobuf_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
434 -I$(top_builddir)/gtest/include
kenton@google.com42c81e12009-05-06 01:15:06 +0000435# Disable optimization for tests unless the user explicitly asked for it,
436# since test_util.cc takes forever to compile with optimization (with GCC).
437# See configure.ac for more info.
438protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
temporal40ee5512008-07-10 02:12:20 +0000439protobuf_test_SOURCES = \
440 google/protobuf/stubs/common_unittest.cc \
kenton@google.comd37d46d2009-04-25 02:53:47 +0000441 google/protobuf/stubs/once_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000442 google/protobuf/stubs/strutil_unittest.cc \
kenton@google.com26bd9ee2008-11-21 00:06:27 +0000443 google/protobuf/stubs/structurally_valid_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000444 google/protobuf/stubs/stringprintf_unittest.cc \
445 google/protobuf/stubs/template_util_unittest.cc \
446 google/protobuf/stubs/type_traits_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800447 google/protobuf/arenastring_unittest.cc \
448 google/protobuf/arena_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000449 google/protobuf/descriptor_database_unittest.cc \
450 google/protobuf/descriptor_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800451 google/protobuf/drop_unknown_fields_test.cc \
temporal40ee5512008-07-10 02:12:20 +0000452 google/protobuf/dynamic_message_unittest.cc \
453 google/protobuf/extension_set_unittest.cc \
454 google/protobuf/generated_message_reflection_unittest.cc \
Feng Xiaof157a562014-11-14 11:50:31 -0800455 google/protobuf/map_field_test.cc \
456 google/protobuf/map_test.cc \
temporal40ee5512008-07-10 02:12:20 +0000457 google/protobuf/message_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800458 google/protobuf/no_field_presence_test.cc \
459 google/protobuf/preserve_unknown_enum_test.cc \
460 google/protobuf/proto3_arena_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000461 google/protobuf/reflection_ops_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000462 google/protobuf/repeated_field_reflection_unittest.cc \
Feng Xiao6ef984a2014-11-10 17:34:54 -0800463 google/protobuf/repeated_field_unittest.cc \
temporal40ee5512008-07-10 02:12:20 +0000464 google/protobuf/text_format_unittest.cc \
465 google/protobuf/unknown_field_set_unittest.cc \
466 google/protobuf/wire_format_unittest.cc \
467 google/protobuf/io/coded_stream_unittest.cc \
468 google/protobuf/io/printer_unittest.cc \
469 google/protobuf/io/tokenizer_unittest.cc \
470 google/protobuf/io/zero_copy_stream_unittest.cc \
471 google/protobuf/compiler/command_line_interface_unittest.cc \
472 google/protobuf/compiler/importer_unittest.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000473 google/protobuf/compiler/mock_code_generator.cc \
474 google/protobuf/compiler/mock_code_generator.h \
temporal40ee5512008-07-10 02:12:20 +0000475 google/protobuf/compiler/parser_unittest.cc \
476 google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000477 google/protobuf/compiler/cpp/cpp_unittest.h \
temporal40ee5512008-07-10 02:12:20 +0000478 google/protobuf/compiler/cpp/cpp_unittest.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000479 google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \
480 google/protobuf/compiler/java/java_plugin_unittest.cc \
xiaofeng@google.comb55a20f2012-09-22 02:40:50 +0000481 google/protobuf/compiler/java/java_doc_comment_unittest.cc \
kenton@google.comfccb1462009-12-18 02:11:36 +0000482 google/protobuf/compiler/python/python_plugin_unittest.cc \
Chris Fallin3f3820d2015-01-14 15:44:46 -0800483 google/protobuf/compiler/ruby/ruby_generator_unittest.cc \
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000484 $(COMMON_TEST_SOURCES)
485nodist_protobuf_test_SOURCES = $(protoc_outputs)
486
487# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
488protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
jieluo@google.com4de8f552014-07-18 00:47:59 +0000489 libprotoc.la \
490 $(top_builddir)/gtest/lib/libgtest.la \
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000491 $(top_builddir)/gtest/lib/libgtest_main.la
492protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
493 -I$(top_builddir)/gtest/include \
494 -DPROTOBUF_TEST_NO_DESCRIPTORS
kenton@google.com4f3491e2009-07-29 21:33:08 +0000495protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
kenton@google.comc5ff06c2009-04-28 03:06:41 +0000496protobuf_lazy_descriptor_test_SOURCES = \
497 google/protobuf/compiler/cpp/cpp_unittest.cc \
498 $(COMMON_TEST_SOURCES)
499nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs)
temporal40ee5512008-07-10 02:12:20 +0000500
kenton@google.com80b1d622009-07-29 01:13:20 +0000501# Build lite_unittest separately, since it doesn't use gtest.
kenton@google.com858a22b2009-07-29 02:21:47 +0000502protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la
kenton@google.com4f3491e2009-07-29 21:33:08 +0000503protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
kenton@google.com80b1d622009-07-29 01:13:20 +0000504protobuf_lite_test_SOURCES = \
505 google/protobuf/lite_unittest.cc \
506 google/protobuf/test_util_lite.cc \
507 google/protobuf/test_util_lite.h
508nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs)
509
kenton@google.comfccb1462009-12-18 02:11:36 +0000510# Test plugin binary.
511test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
512 $(top_builddir)/gtest/lib/libgtest.la
kenton@google.com83ad01e2009-12-18 02:40:43 +0000513test_plugin_CPPFLAGS = -I$(top_srcdir)/gtest/include \
514 -I$(top_builddir)/gtest/include
kenton@google.comfccb1462009-12-18 02:11:36 +0000515test_plugin_SOURCES = \
516 google/protobuf/compiler/mock_code_generator.cc \
517 google/protobuf/testing/file.cc \
518 google/protobuf/testing/file.h \
519 google/protobuf/compiler/test_plugin.cc
520
kenton@google.come59427a2009-04-16 22:30:56 +0000521if HAVE_ZLIB
522zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
523zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc
524
525zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
526zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc
527endif
528
kenton@google.comd2fcbba2010-01-04 19:47:18 +0000529TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
530 google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS)