Makefile.am 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. ## Process this file with automake to produce Makefile.in
  2. if HAVE_ZLIB
  3. GZCHECKPROGRAMS = zcgzip zcgunzip
  4. GZHEADERS = google/protobuf/io/gzip_stream.h
  5. GZTESTS = google/protobuf/io/gzip_stream_unittest.sh
  6. else
  7. GZCHECKPROGRAMS =
  8. GZHEADERS =
  9. GZTESTS =
  10. endif
  11. if GCC
  12. # These are good warnings to turn on by default
  13. NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare
  14. else
  15. NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS)
  16. endif
  17. AM_CXXFLAGS = $(NO_OPT_CXXFLAGS) $(PROTOBUF_OPT_FLAG)
  18. AM_LDFLAGS = $(PTHREAD_CFLAGS)
  19. # If I say "dist_include_DATA", automake complains that $(includedir) is not
  20. # a "legitimate" directory for DATA. Screw you, automake.
  21. protodir = $(includedir)
  22. nobase_dist_proto_DATA = google/protobuf/descriptor.proto \
  23. google/protobuf/compiler/plugin.proto
  24. # Not sure why these don't get cleaned automatically.
  25. clean-local:
  26. rm -f *.loT
  27. public_config = google/protobuf/stubs/pbconfig.h
  28. CLEANFILES = $(protoc_outputs) $(public_config) unittest_proto_middleman \
  29. testzip.jar testzip.list testzip.proto testzip.zip
  30. MAINTAINERCLEANFILES = \
  31. Makefile.in
  32. # Generate and distribute a minimum config.h file to make hash_map work.
  33. # The autoheader config has too much info, which might conflict with other
  34. # macros applications might include. Thus, we create a stubs/pbconfig.h, that
  35. # only #defines what we really need, and prefix it with GOOGLE_PROTOBUF_ to
  36. # avoid conflicts.
  37. $(public_config): $(top_builddir)/config.h $(top_srcdir)/config.h.include
  38. echo "// Note: Google Protobuf internal only. Do NOT include." > $@
  39. cat $(top_builddir)/config.h | grep -f $(top_srcdir)/config.h.include | \
  40. sed 's,#define , #define GOOGLE_PROTOBUF_,' >> $@
  41. nobase_include_HEADERS = \
  42. google/protobuf/stubs/atomic_sequence_num.h \
  43. google/protobuf/stubs/atomicops.h \
  44. google/protobuf/stubs/atomicops_internals_aix.h \
  45. google/protobuf/stubs/atomicops_internals_arm64_gcc.h \
  46. google/protobuf/stubs/atomicops_internals_arm_gcc.h \
  47. google/protobuf/stubs/atomicops_internals_arm_qnx.h \
  48. google/protobuf/stubs/atomicops_internals_atomicword_compat.h \
  49. google/protobuf/stubs/atomicops_internals_generic_gcc.h \
  50. google/protobuf/stubs/atomicops_internals_macosx.h \
  51. google/protobuf/stubs/atomicops_internals_mips_gcc.h \
  52. google/protobuf/stubs/atomicops_internals_pnacl.h \
  53. google/protobuf/stubs/atomicops_internals_solaris.h \
  54. google/protobuf/stubs/atomicops_internals_tsan.h \
  55. google/protobuf/stubs/atomicops_internals_x86_gcc.h \
  56. google/protobuf/stubs/atomicops_internals_x86_msvc.h \
  57. google/protobuf/stubs/casts.h \
  58. google/protobuf/stubs/common.h \
  59. google/protobuf/stubs/fastmem.h \
  60. google/protobuf/stubs/hash.h \
  61. google/protobuf/stubs/once.h \
  62. google/protobuf/stubs/platform_macros.h \
  63. google/protobuf/stubs/shared_ptr.h \
  64. google/protobuf/stubs/singleton.h \
  65. google/protobuf/stubs/stl_util.h \
  66. google/protobuf/stubs/template_util.h \
  67. google/protobuf/stubs/type_traits.h \
  68. google/protobuf/arena.h \
  69. google/protobuf/arenastring.h \
  70. google/protobuf/descriptor_database.h \
  71. google/protobuf/descriptor.h \
  72. google/protobuf/descriptor.pb.h \
  73. google/protobuf/dynamic_message.h \
  74. google/protobuf/extension_set.h \
  75. google/protobuf/generated_enum_reflection.h \
  76. google/protobuf/generated_enum_util.h \
  77. google/protobuf/generated_message_reflection.h \
  78. google/protobuf/generated_message_util.h \
  79. google/protobuf/map_entry.h \
  80. google/protobuf/map_entry_lite.h \
  81. google/protobuf/map_field.h \
  82. google/protobuf/map_field_lite.h \
  83. google/protobuf/map_field_inl.h \
  84. google/protobuf/map.h \
  85. google/protobuf/map_type_handler.h \
  86. google/protobuf/message.h \
  87. google/protobuf/message_lite.h \
  88. google/protobuf/metadata.h \
  89. google/protobuf/reflection.h \
  90. google/protobuf/reflection_ops.h \
  91. google/protobuf/repeated_field.h \
  92. google/protobuf/repeated_field_reflection.h \
  93. google/protobuf/service.h \
  94. google/protobuf/text_format.h \
  95. google/protobuf/unknown_field_set.h \
  96. google/protobuf/wire_format.h \
  97. google/protobuf/wire_format_lite.h \
  98. google/protobuf/wire_format_lite_inl.h \
  99. google/protobuf/io/coded_stream.h \
  100. $(GZHEADERS) \
  101. google/protobuf/io/printer.h \
  102. google/protobuf/io/strtod.h \
  103. google/protobuf/io/tokenizer.h \
  104. google/protobuf/io/zero_copy_stream.h \
  105. google/protobuf/io/zero_copy_stream_impl.h \
  106. google/protobuf/io/zero_copy_stream_impl_lite.h \
  107. google/protobuf/compiler/code_generator.h \
  108. google/protobuf/compiler/command_line_interface.h \
  109. google/protobuf/compiler/importer.h \
  110. google/protobuf/compiler/parser.h \
  111. google/protobuf/compiler/plugin.h \
  112. google/protobuf/compiler/plugin.pb.h \
  113. google/protobuf/compiler/cpp/cpp_generator.h \
  114. google/protobuf/compiler/java/java_generator.h \
  115. google/protobuf/compiler/java/java_names.h \
  116. google/protobuf/compiler/javanano/javanano_generator.h \
  117. google/protobuf/compiler/python/python_generator.h \
  118. google/protobuf/compiler/ruby/ruby_generator.h \
  119. google/protobuf/compiler/csharp/csharp_generator.h
  120. nobase_nodist_include_HEADERS = \
  121. $(public_config)
  122. lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
  123. libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
  124. libprotobuf_lite_la_LDFLAGS = -version-info 10:0:0 -export-dynamic -no-undefined
  125. libprotobuf_lite_la_SOURCES = \
  126. google/protobuf/stubs/atomicops_internals_x86_gcc.cc \
  127. google/protobuf/stubs/atomicops_internals_x86_msvc.cc \
  128. google/protobuf/stubs/common.cc \
  129. google/protobuf/stubs/once.cc \
  130. google/protobuf/stubs/hash.h \
  131. google/protobuf/stubs/map_util.h \
  132. google/protobuf/stubs/shared_ptr.h \
  133. google/protobuf/stubs/stringprintf.cc \
  134. google/protobuf/stubs/stringprintf.h \
  135. google/protobuf/arena.cc \
  136. google/protobuf/arenastring.cc \
  137. google/protobuf/extension_set.cc \
  138. google/protobuf/generated_message_util.cc \
  139. google/protobuf/message_lite.cc \
  140. google/protobuf/repeated_field.cc \
  141. google/protobuf/wire_format_lite.cc \
  142. google/protobuf/io/coded_stream.cc \
  143. google/protobuf/io/coded_stream_inl.h \
  144. google/protobuf/io/zero_copy_stream.cc \
  145. google/protobuf/io/zero_copy_stream_impl_lite.cc
  146. nodist_libprotobuf_lite_la_SOURCES = $(public_config)
  147. libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
  148. libprotobuf_la_LDFLAGS = -version-info 10:0:0 -export-dynamic -no-undefined
  149. libprotobuf_la_SOURCES = \
  150. $(libprotobuf_lite_la_SOURCES) \
  151. google/protobuf/stubs/strutil.cc \
  152. google/protobuf/stubs/strutil.h \
  153. google/protobuf/stubs/substitute.cc \
  154. google/protobuf/stubs/substitute.h \
  155. google/protobuf/stubs/structurally_valid.cc \
  156. google/protobuf/descriptor.cc \
  157. google/protobuf/descriptor_database.cc \
  158. google/protobuf/descriptor.pb.cc \
  159. google/protobuf/dynamic_message.cc \
  160. google/protobuf/extension_set_heavy.cc \
  161. google/protobuf/generated_message_reflection.cc \
  162. google/protobuf/map_field.cc \
  163. google/protobuf/message.cc \
  164. google/protobuf/reflection_internal.h \
  165. google/protobuf/reflection_ops.cc \
  166. google/protobuf/service.cc \
  167. google/protobuf/text_format.cc \
  168. google/protobuf/unknown_field_set.cc \
  169. google/protobuf/wire_format.cc \
  170. google/protobuf/io/gzip_stream.cc \
  171. google/protobuf/io/printer.cc \
  172. google/protobuf/io/strtod.cc \
  173. google/protobuf/io/tokenizer.cc \
  174. google/protobuf/io/zero_copy_stream_impl.cc \
  175. google/protobuf/compiler/importer.cc \
  176. google/protobuf/compiler/parser.cc
  177. nodist_libprotobuf_la_SOURCES = $(nodist_libprotobuf_lite_la_SOURCES)
  178. libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
  179. libprotoc_la_LDFLAGS = -version-info 10:0:0 -export-dynamic -no-undefined
  180. libprotoc_la_SOURCES = \
  181. google/protobuf/compiler/code_generator.cc \
  182. google/protobuf/compiler/command_line_interface.cc \
  183. google/protobuf/compiler/plugin.cc \
  184. google/protobuf/compiler/plugin.pb.cc \
  185. google/protobuf/compiler/subprocess.cc \
  186. google/protobuf/compiler/subprocess.h \
  187. google/protobuf/compiler/zip_writer.cc \
  188. google/protobuf/compiler/zip_writer.h \
  189. google/protobuf/compiler/cpp/cpp_enum.cc \
  190. google/protobuf/compiler/cpp/cpp_enum.h \
  191. google/protobuf/compiler/cpp/cpp_enum_field.cc \
  192. google/protobuf/compiler/cpp/cpp_enum_field.h \
  193. google/protobuf/compiler/cpp/cpp_extension.cc \
  194. google/protobuf/compiler/cpp/cpp_extension.h \
  195. google/protobuf/compiler/cpp/cpp_field.cc \
  196. google/protobuf/compiler/cpp/cpp_field.h \
  197. google/protobuf/compiler/cpp/cpp_file.cc \
  198. google/protobuf/compiler/cpp/cpp_file.h \
  199. google/protobuf/compiler/cpp/cpp_generator.cc \
  200. google/protobuf/compiler/cpp/cpp_helpers.cc \
  201. google/protobuf/compiler/cpp/cpp_helpers.h \
  202. google/protobuf/compiler/cpp/cpp_map_field.cc \
  203. google/protobuf/compiler/cpp/cpp_map_field.h \
  204. google/protobuf/compiler/cpp/cpp_message.cc \
  205. google/protobuf/compiler/cpp/cpp_message.h \
  206. google/protobuf/compiler/cpp/cpp_message_field.cc \
  207. google/protobuf/compiler/cpp/cpp_message_field.h \
  208. google/protobuf/compiler/cpp/cpp_options.h \
  209. google/protobuf/compiler/cpp/cpp_primitive_field.cc \
  210. google/protobuf/compiler/cpp/cpp_primitive_field.h \
  211. google/protobuf/compiler/cpp/cpp_service.cc \
  212. google/protobuf/compiler/cpp/cpp_service.h \
  213. google/protobuf/compiler/cpp/cpp_string_field.cc \
  214. google/protobuf/compiler/cpp/cpp_string_field.h \
  215. google/protobuf/compiler/java/java_context.cc \
  216. google/protobuf/compiler/java/java_context.h \
  217. google/protobuf/compiler/java/java_enum.cc \
  218. google/protobuf/compiler/java/java_enum_field.cc \
  219. google/protobuf/compiler/java/java_enum_field.h \
  220. google/protobuf/compiler/java/java_enum.h \
  221. google/protobuf/compiler/java/java_extension.cc \
  222. google/protobuf/compiler/java/java_extension.h \
  223. google/protobuf/compiler/java/java_field.cc \
  224. google/protobuf/compiler/java/java_field.h \
  225. google/protobuf/compiler/java/java_file.cc \
  226. google/protobuf/compiler/java/java_file.h \
  227. google/protobuf/compiler/java/java_generator.cc \
  228. google/protobuf/compiler/java/java_generator_factory.cc \
  229. google/protobuf/compiler/java/java_generator_factory.h \
  230. google/protobuf/compiler/java/java_helpers.cc \
  231. google/protobuf/compiler/java/java_helpers.h \
  232. google/protobuf/compiler/java/java_lazy_message_field.cc \
  233. google/protobuf/compiler/java/java_lazy_message_field.h \
  234. google/protobuf/compiler/java/java_map_field.cc \
  235. google/protobuf/compiler/java/java_map_field.h \
  236. google/protobuf/compiler/java/java_message.cc \
  237. google/protobuf/compiler/java/java_message_field.cc \
  238. google/protobuf/compiler/java/java_message_field.h \
  239. google/protobuf/compiler/java/java_message.h \
  240. google/protobuf/compiler/java/java_name_resolver.cc \
  241. google/protobuf/compiler/java/java_name_resolver.h \
  242. google/protobuf/compiler/java/java_primitive_field.cc \
  243. google/protobuf/compiler/java/java_primitive_field.h \
  244. google/protobuf/compiler/java/java_shared_code_generator.cc \
  245. google/protobuf/compiler/java/java_shared_code_generator.h \
  246. google/protobuf/compiler/java/java_service.cc \
  247. google/protobuf/compiler/java/java_service.h \
  248. google/protobuf/compiler/java/java_string_field.cc \
  249. google/protobuf/compiler/java/java_string_field.h \
  250. google/protobuf/compiler/java/java_doc_comment.cc \
  251. google/protobuf/compiler/java/java_doc_comment.h \
  252. google/protobuf/compiler/javanano/javanano_enum.cc \
  253. google/protobuf/compiler/javanano/javanano_enum.h \
  254. google/protobuf/compiler/javanano/javanano_enum_field.cc \
  255. google/protobuf/compiler/javanano/javanano_enum_field.h \
  256. google/protobuf/compiler/javanano/javanano_extension.cc \
  257. google/protobuf/compiler/javanano/javanano_extension.h \
  258. google/protobuf/compiler/javanano/javanano_field.cc \
  259. google/protobuf/compiler/javanano/javanano_field.h \
  260. google/protobuf/compiler/javanano/javanano_file.cc \
  261. google/protobuf/compiler/javanano/javanano_file.h \
  262. google/protobuf/compiler/javanano/javanano_generator.cc \
  263. google/protobuf/compiler/javanano/javanano_generator.h \
  264. google/protobuf/compiler/javanano/javanano_helpers.cc \
  265. google/protobuf/compiler/javanano/javanano_helpers.h \
  266. google/protobuf/compiler/javanano/javanano_map_field.cc \
  267. google/protobuf/compiler/javanano/javanano_map_field.h \
  268. google/protobuf/compiler/javanano/javanano_message.cc \
  269. google/protobuf/compiler/javanano/javanano_message.h \
  270. google/protobuf/compiler/javanano/javanano_message_field.cc \
  271. google/protobuf/compiler/javanano/javanano_message_field.h \
  272. google/protobuf/compiler/javanano/javanano_params.h \
  273. google/protobuf/compiler/javanano/javanano_primitive_field.cc \
  274. google/protobuf/compiler/javanano/javanano_primitive_field.h \
  275. google/protobuf/compiler/python/python_generator.cc \
  276. google/protobuf/compiler/ruby/ruby_generator.cc \
  277. google/protobuf/compiler/csharp/csharp_enum.cc \
  278. google/protobuf/compiler/csharp/csharp_enum.h \
  279. google/protobuf/compiler/csharp/csharp_enum_field.cc \
  280. google/protobuf/compiler/csharp/csharp_enum_field.h \
  281. google/protobuf/compiler/csharp/csharp_extension.cc \
  282. google/protobuf/compiler/csharp/csharp_extension.h \
  283. google/protobuf/compiler/csharp/csharp_field_base.cc \
  284. google/protobuf/compiler/csharp/csharp_field_base.h \
  285. google/protobuf/compiler/csharp/csharp_generator.cc \
  286. google/protobuf/compiler/csharp/csharp_helpers.cc \
  287. google/protobuf/compiler/csharp/csharp_helpers.h \
  288. google/protobuf/compiler/csharp/csharp_message.cc \
  289. google/protobuf/compiler/csharp/csharp_message.h \
  290. google/protobuf/compiler/csharp/csharp_message_field.cc \
  291. google/protobuf/compiler/csharp/csharp_message_field.h \
  292. google/protobuf/compiler/csharp/csharp_primitive_field.cc \
  293. google/protobuf/compiler/csharp/csharp_primitive_field.h \
  294. google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc \
  295. google/protobuf/compiler/csharp/csharp_repeated_enum_field.h \
  296. google/protobuf/compiler/csharp/csharp_repeated_message_field.cc \
  297. google/protobuf/compiler/csharp/csharp_repeated_message_field.h \
  298. google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc \
  299. google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h \
  300. google/protobuf/compiler/csharp/csharp_source_generator_base.cc \
  301. google/protobuf/compiler/csharp/csharp_source_generator_base.h \
  302. google/protobuf/compiler/csharp/csharp_umbrella_class.cc \
  303. google/protobuf/compiler/csharp/csharp_umbrella_class.h \
  304. google/protobuf/compiler/csharp/csharp_writer.cc \
  305. google/protobuf/compiler/csharp/csharp_writer.h
  306. bin_PROGRAMS = protoc
  307. protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
  308. protoc_SOURCES = google/protobuf/compiler/main.cc
  309. # Tests ==============================================================
  310. protoc_inputs = \
  311. google/protobuf/map_lite_unittest.proto \
  312. google/protobuf/map_proto2_unittest.proto \
  313. google/protobuf/map_unittest.proto \
  314. google/protobuf/unittest.proto \
  315. google/protobuf/unittest_arena.proto \
  316. google/protobuf/unittest_custom_options.proto \
  317. google/protobuf/unittest_drop_unknown_fields.proto \
  318. google/protobuf/unittest_embed_optimize_for.proto \
  319. google/protobuf/unittest_empty.proto \
  320. google/protobuf/unittest_import_lite.proto \
  321. google/protobuf/unittest_import.proto \
  322. google/protobuf/unittest_import_public_lite.proto \
  323. google/protobuf/unittest_import_public.proto \
  324. google/protobuf/unittest_lite_imports_nonlite.proto \
  325. google/protobuf/unittest_lite.proto \
  326. google/protobuf/unittest_mset.proto \
  327. google/protobuf/unittest_no_arena_import.proto \
  328. google/protobuf/unittest_no_arena.proto \
  329. google/protobuf/unittest_no_field_presence.proto \
  330. google/protobuf/unittest_no_generic_services.proto \
  331. google/protobuf/unittest_optimize_for.proto \
  332. google/protobuf/unittest_preserve_unknown_enum.proto \
  333. google/protobuf/unittest_preserve_unknown_enum2.proto \
  334. google/protobuf/unittest_proto3_arena.proto \
  335. google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto \
  336. google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto
  337. EXTRA_DIST = \
  338. $(protoc_inputs) \
  339. solaris/libstdc++.la \
  340. google/protobuf/io/gzip_stream.h \
  341. google/protobuf/io/gzip_stream_unittest.sh \
  342. google/protobuf/testdata/golden_message \
  343. google/protobuf/testdata/golden_message_oneof_implemented \
  344. google/protobuf/testdata/golden_message_proto3 \
  345. google/protobuf/testdata/golden_packed_fields_message \
  346. google/protobuf/testdata/bad_utf8_string \
  347. google/protobuf/testdata/text_format_unittest_data.txt \
  348. google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt \
  349. google/protobuf/testdata/text_format_unittest_data_pointy.txt \
  350. google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt \
  351. google/protobuf/testdata/text_format_unittest_extensions_data.txt \
  352. google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \
  353. google/protobuf/package_info.h \
  354. google/protobuf/io/package_info.h \
  355. google/protobuf/compiler/package_info.h \
  356. google/protobuf/compiler/zip_output_unittest.sh \
  357. google/protobuf/unittest_enormous_descriptor.proto
  358. protoc_lite_outputs = \
  359. google/protobuf/map_lite_unittest.pb.cc \
  360. google/protobuf/map_lite_unittest.pb.h \
  361. google/protobuf/unittest_lite.pb.cc \
  362. google/protobuf/unittest_lite.pb.h \
  363. google/protobuf/unittest_import_lite.pb.cc \
  364. google/protobuf/unittest_import_lite.pb.h \
  365. google/protobuf/unittest_import_public_lite.pb.cc \
  366. google/protobuf/unittest_import_public_lite.pb.h
  367. protoc_outputs = \
  368. $(protoc_lite_outputs) \
  369. google/protobuf/map_proto2_unittest.pb.cc \
  370. google/protobuf/map_proto2_unittest.pb.h \
  371. google/protobuf/map_unittest.pb.cc \
  372. google/protobuf/map_unittest.pb.h \
  373. google/protobuf/unittest.pb.cc \
  374. google/protobuf/unittest.pb.h \
  375. google/protobuf/unittest_arena.pb.cc \
  376. google/protobuf/unittest_arena.pb.h \
  377. google/protobuf/unittest_custom_options.pb.cc \
  378. google/protobuf/unittest_custom_options.pb.h \
  379. google/protobuf/unittest_drop_unknown_fields.pb.cc \
  380. google/protobuf/unittest_drop_unknown_fields.pb.h \
  381. google/protobuf/unittest_embed_optimize_for.pb.cc \
  382. google/protobuf/unittest_embed_optimize_for.pb.h \
  383. google/protobuf/unittest_empty.pb.cc \
  384. google/protobuf/unittest_empty.pb.h \
  385. google/protobuf/unittest_import.pb.cc \
  386. google/protobuf/unittest_import.pb.h \
  387. google/protobuf/unittest_import_public.pb.cc \
  388. google/protobuf/unittest_import_public.pb.h \
  389. google/protobuf/unittest_lite_imports_nonlite.pb.cc \
  390. google/protobuf/unittest_lite_imports_nonlite.pb.h \
  391. google/protobuf/unittest_mset.pb.cc \
  392. google/protobuf/unittest_mset.pb.h \
  393. google/protobuf/unittest_no_arena.pb.cc \
  394. google/protobuf/unittest_no_arena.pb.h \
  395. google/protobuf/unittest_no_arena_import.pb.cc \
  396. google/protobuf/unittest_no_arena_import.pb.h \
  397. google/protobuf/unittest_no_field_presence.pb.cc \
  398. google/protobuf/unittest_no_field_presence.pb.h \
  399. google/protobuf/unittest_no_generic_services.pb.cc \
  400. google/protobuf/unittest_no_generic_services.pb.h \
  401. google/protobuf/unittest_optimize_for.pb.cc \
  402. google/protobuf/unittest_optimize_for.pb.h \
  403. google/protobuf/unittest_preserve_unknown_enum.pb.cc \
  404. google/protobuf/unittest_preserve_unknown_enum.pb.h \
  405. google/protobuf/unittest_preserve_unknown_enum2.pb.cc \
  406. google/protobuf/unittest_preserve_unknown_enum2.pb.h \
  407. google/protobuf/unittest_proto3_arena.pb.cc \
  408. google/protobuf/unittest_proto3_arena.pb.h \
  409. google/protobuf/compiler/cpp/cpp_test_large_enum_value.pb.cc \
  410. google/protobuf/compiler/cpp/cpp_test_large_enum_value.pb.h \
  411. google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \
  412. google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h
  413. BUILT_SOURCES = $(public_config) $(protoc_outputs)
  414. if USE_EXTERNAL_PROTOC
  415. unittest_proto_middleman: $(protoc_inputs)
  416. $(PROTOC) -I$(srcdir) --cpp_out=. $^
  417. touch unittest_proto_middleman
  418. else
  419. # We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is
  420. # relative to srcdir, which may not be the same as the current directory when
  421. # building out-of-tree.
  422. unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs)
  423. oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) )
  424. touch unittest_proto_middleman
  425. endif
  426. $(protoc_outputs): unittest_proto_middleman
  427. COMMON_TEST_SOURCES = \
  428. google/protobuf/arena_test_util.cc \
  429. google/protobuf/arena_test_util.h \
  430. google/protobuf/map_test_util.cc \
  431. google/protobuf/map_test_util.h \
  432. google/protobuf/map_test_util_impl.h \
  433. google/protobuf/test_util.cc \
  434. google/protobuf/test_util.h \
  435. google/protobuf/testing/googletest.cc \
  436. google/protobuf/testing/googletest.h \
  437. google/protobuf/testing/file.cc \
  438. google/protobuf/testing/file.h
  439. check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
  440. protobuf-lite-test test_plugin $(GZCHECKPROGRAMS)
  441. protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
  442. $(top_builddir)/gtest/lib/libgtest.la \
  443. $(top_builddir)/gtest/lib/libgtest_main.la
  444. protobuf_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
  445. -I$(top_builddir)/gtest/include
  446. # Disable optimization for tests unless the user explicitly asked for it,
  447. # since test_util.cc takes forever to compile with optimization (with GCC).
  448. # See configure.ac for more info.
  449. protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
  450. protobuf_test_SOURCES = \
  451. google/protobuf/stubs/common_unittest.cc \
  452. google/protobuf/stubs/once_unittest.cc \
  453. google/protobuf/stubs/strutil_unittest.cc \
  454. google/protobuf/stubs/structurally_valid_unittest.cc \
  455. google/protobuf/stubs/stringprintf_unittest.cc \
  456. google/protobuf/stubs/template_util_unittest.cc \
  457. google/protobuf/stubs/type_traits_unittest.cc \
  458. google/protobuf/arenastring_unittest.cc \
  459. google/protobuf/arena_unittest.cc \
  460. google/protobuf/descriptor_database_unittest.cc \
  461. google/protobuf/descriptor_unittest.cc \
  462. google/protobuf/drop_unknown_fields_test.cc \
  463. google/protobuf/dynamic_message_unittest.cc \
  464. google/protobuf/extension_set_unittest.cc \
  465. google/protobuf/generated_message_reflection_unittest.cc \
  466. google/protobuf/map_field_test.cc \
  467. google/protobuf/map_test.cc \
  468. google/protobuf/message_unittest.cc \
  469. google/protobuf/no_field_presence_test.cc \
  470. google/protobuf/preserve_unknown_enum_test.cc \
  471. google/protobuf/proto3_arena_unittest.cc \
  472. google/protobuf/reflection_ops_unittest.cc \
  473. google/protobuf/repeated_field_reflection_unittest.cc \
  474. google/protobuf/repeated_field_unittest.cc \
  475. google/protobuf/text_format_unittest.cc \
  476. google/protobuf/unknown_field_set_unittest.cc \
  477. google/protobuf/wire_format_unittest.cc \
  478. google/protobuf/io/coded_stream_unittest.cc \
  479. google/protobuf/io/printer_unittest.cc \
  480. google/protobuf/io/tokenizer_unittest.cc \
  481. google/protobuf/io/zero_copy_stream_unittest.cc \
  482. google/protobuf/compiler/command_line_interface_unittest.cc \
  483. google/protobuf/compiler/importer_unittest.cc \
  484. google/protobuf/compiler/mock_code_generator.cc \
  485. google/protobuf/compiler/mock_code_generator.h \
  486. google/protobuf/compiler/parser_unittest.cc \
  487. google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \
  488. google/protobuf/compiler/cpp/cpp_unittest.h \
  489. google/protobuf/compiler/cpp/cpp_unittest.cc \
  490. google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \
  491. google/protobuf/compiler/java/java_plugin_unittest.cc \
  492. google/protobuf/compiler/java/java_doc_comment_unittest.cc \
  493. google/protobuf/compiler/python/python_plugin_unittest.cc \
  494. google/protobuf/compiler/ruby/ruby_generator_unittest.cc \
  495. google/protobuf/compiler/csharp/csharp_generator_unittest.cc \
  496. $(COMMON_TEST_SOURCES)
  497. nodist_protobuf_test_SOURCES = $(protoc_outputs)
  498. # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
  499. protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
  500. libprotoc.la \
  501. $(top_builddir)/gtest/lib/libgtest.la \
  502. $(top_builddir)/gtest/lib/libgtest_main.la
  503. protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
  504. -I$(top_builddir)/gtest/include \
  505. -DPROTOBUF_TEST_NO_DESCRIPTORS
  506. protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
  507. protobuf_lazy_descriptor_test_SOURCES = \
  508. google/protobuf/compiler/cpp/cpp_unittest.cc \
  509. $(COMMON_TEST_SOURCES)
  510. nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs)
  511. # Build lite_unittest separately, since it doesn't use gtest.
  512. protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la
  513. protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
  514. protobuf_lite_test_SOURCES = \
  515. google/protobuf/lite_unittest.cc \
  516. google/protobuf/map_lite_test_util.cc \
  517. google/protobuf/map_lite_test_util.h \
  518. google/protobuf/test_util_lite.cc \
  519. google/protobuf/test_util_lite.h
  520. # TODO(teboring) add the file back and make the test build.
  521. # google/protobuf/map_lite_test.cc
  522. nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs)
  523. # Test plugin binary.
  524. test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
  525. $(top_builddir)/gtest/lib/libgtest.la
  526. test_plugin_CPPFLAGS = -I$(top_srcdir)/gtest/include \
  527. -I$(top_builddir)/gtest/include
  528. test_plugin_SOURCES = \
  529. google/protobuf/compiler/mock_code_generator.cc \
  530. google/protobuf/testing/file.cc \
  531. google/protobuf/testing/file.h \
  532. google/protobuf/compiler/test_plugin.cc
  533. if HAVE_ZLIB
  534. zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
  535. zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc
  536. zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
  537. zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc
  538. endif
  539. TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
  540. google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS)