Makefile.am 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899
  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. ZLIB_DEF = -DHAVE_ZLIB=1
  7. else
  8. GZCHECKPROGRAMS =
  9. GZHEADERS =
  10. GZTESTS =
  11. ZLIB_DEF =
  12. endif
  13. if HAVE_PTHREAD
  14. PTHREAD_DEF = -DHAVE_PTHREAD=1
  15. else
  16. PTHREAD_DEF =
  17. endif
  18. PROTOBUF_VERSION = 26:6:0
  19. if GCC
  20. # Turn on all warnings except for sign comparison (we ignore sign comparison
  21. # in Google so our code base have tons of such warnings).
  22. NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) -Wall -Wno-sign-compare
  23. else
  24. NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF)
  25. endif
  26. AM_CXXFLAGS = $(NO_OPT_CXXFLAGS) $(PROTOBUF_OPT_FLAG)
  27. AM_LDFLAGS = $(PTHREAD_CFLAGS)
  28. # If I say "dist_include_DATA", automake complains that $(includedir) is not
  29. # a "legitimate" directory for DATA. Screw you, automake.
  30. protodir = $(includedir)
  31. # If you are adding new files here, also remember to change the build files for
  32. # all other languages, //protoc-artifacts/build-zip.sh and run
  33. # //update_file_list.sh for bazel.
  34. nobase_dist_proto_DATA = google/protobuf/descriptor.proto \
  35. google/protobuf/any.proto \
  36. google/protobuf/api.proto \
  37. google/protobuf/duration.proto \
  38. google/protobuf/empty.proto \
  39. google/protobuf/field_mask.proto \
  40. google/protobuf/source_context.proto \
  41. google/protobuf/struct.proto \
  42. google/protobuf/timestamp.proto \
  43. google/protobuf/type.proto \
  44. google/protobuf/wrappers.proto \
  45. google/protobuf/compiler/plugin.proto
  46. # Not sure why these don't get cleaned automatically.
  47. clean-local:
  48. rm -f *.loT
  49. CLEANFILES = $(protoc_outputs) unittest_proto_middleman \
  50. testzip.jar testzip.list testzip.proto testzip.zip \
  51. no_warning_test.cc
  52. MAINTAINERCLEANFILES = \
  53. Makefile.in
  54. nobase_include_HEADERS = \
  55. google/protobuf/stubs/callback.h \
  56. google/protobuf/stubs/bytestream.h \
  57. google/protobuf/stubs/casts.h \
  58. google/protobuf/stubs/common.h \
  59. google/protobuf/stubs/hash.h \
  60. google/protobuf/stubs/logging.h \
  61. google/protobuf/stubs/macros.h \
  62. google/protobuf/stubs/map_util.h \
  63. google/protobuf/stubs/mutex.h \
  64. google/protobuf/stubs/once.h \
  65. google/protobuf/stubs/platform_macros.h \
  66. google/protobuf/stubs/port.h \
  67. google/protobuf/stubs/status.h \
  68. google/protobuf/stubs/stl_util.h \
  69. google/protobuf/stubs/stringpiece.h \
  70. google/protobuf/stubs/strutil.h \
  71. google/protobuf/stubs/template_util.h \
  72. google/protobuf/any.pb.h \
  73. google/protobuf/api.pb.h \
  74. google/protobuf/any.h \
  75. google/protobuf/arena.h \
  76. google/protobuf/arena_impl.h \
  77. google/protobuf/arenastring.h \
  78. google/protobuf/descriptor_database.h \
  79. google/protobuf/descriptor.h \
  80. google/protobuf/descriptor.pb.h \
  81. google/protobuf/duration.pb.h \
  82. google/protobuf/dynamic_message.h \
  83. google/protobuf/empty.pb.h \
  84. google/protobuf/extension_set.h \
  85. google/protobuf/extension_set_inl.h \
  86. google/protobuf/field_mask.pb.h \
  87. google/protobuf/generated_enum_reflection.h \
  88. google/protobuf/generated_enum_util.h \
  89. google/protobuf/generated_message_reflection.h \
  90. google/protobuf/generated_message_table_driven.h \
  91. google/protobuf/generated_message_util.h \
  92. google/protobuf/has_bits.h \
  93. google/protobuf/implicit_weak_message.h \
  94. google/protobuf/io/io_win32.h \
  95. google/protobuf/map_entry.h \
  96. google/protobuf/map_entry_lite.h \
  97. google/protobuf/map_field.h \
  98. google/protobuf/map_field_inl.h \
  99. google/protobuf/map_field_lite.h \
  100. google/protobuf/map.h \
  101. google/protobuf/map_type_handler.h \
  102. google/protobuf/message.h \
  103. google/protobuf/message_lite.h \
  104. google/protobuf/metadata.h \
  105. google/protobuf/metadata_lite.h \
  106. google/protobuf/parse_context.h \
  107. google/protobuf/port.h \
  108. google/protobuf/port_def.inc \
  109. google/protobuf/port_undef.inc \
  110. google/protobuf/reflection.h \
  111. google/protobuf/reflection_ops.h \
  112. google/protobuf/repeated_field.h \
  113. google/protobuf/service.h \
  114. google/protobuf/source_context.pb.h \
  115. google/protobuf/struct.pb.h \
  116. google/protobuf/text_format.h \
  117. google/protobuf/timestamp.pb.h \
  118. google/protobuf/type.pb.h \
  119. google/protobuf/unknown_field_set.h \
  120. google/protobuf/wire_format.h \
  121. google/protobuf/wire_format_lite.h \
  122. google/protobuf/wrappers.pb.h \
  123. google/protobuf/io/coded_stream.h \
  124. $(GZHEADERS) \
  125. google/protobuf/io/printer.h \
  126. google/protobuf/io/strtod.h \
  127. google/protobuf/io/tokenizer.h \
  128. google/protobuf/io/zero_copy_stream.h \
  129. google/protobuf/io/zero_copy_stream_impl.h \
  130. google/protobuf/io/zero_copy_stream_impl_lite.h \
  131. google/protobuf/compiler/code_generator.h \
  132. google/protobuf/compiler/command_line_interface.h \
  133. google/protobuf/compiler/importer.h \
  134. google/protobuf/compiler/parser.h \
  135. google/protobuf/compiler/plugin.h \
  136. google/protobuf/compiler/plugin.pb.h \
  137. google/protobuf/compiler/cpp/cpp_generator.h \
  138. google/protobuf/compiler/csharp/csharp_generator.h \
  139. google/protobuf/compiler/csharp/csharp_names.h \
  140. google/protobuf/compiler/java/java_generator.h \
  141. google/protobuf/compiler/java/java_names.h \
  142. google/protobuf/compiler/js/js_generator.h \
  143. google/protobuf/compiler/js/well_known_types_embed.h \
  144. google/protobuf/compiler/objectivec/objectivec_generator.h \
  145. google/protobuf/compiler/objectivec/objectivec_helpers.h \
  146. google/protobuf/compiler/php/php_generator.h \
  147. google/protobuf/compiler/python/python_generator.h \
  148. google/protobuf/compiler/ruby/ruby_generator.h \
  149. google/protobuf/util/type_resolver.h \
  150. google/protobuf/util/delimited_message_util.h \
  151. google/protobuf/util/field_comparator.h \
  152. google/protobuf/util/field_mask_util.h \
  153. google/protobuf/util/json_util.h \
  154. google/protobuf/util/time_util.h \
  155. google/protobuf/util/type_resolver_util.h \
  156. google/protobuf/util/message_differencer.h
  157. lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
  158. libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
  159. libprotobuf_lite_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined
  160. if HAVE_LD_VERSION_SCRIPT
  161. libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map
  162. EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map
  163. endif
  164. libprotobuf_lite_la_SOURCES = \
  165. google/protobuf/stubs/bytestream.cc \
  166. google/protobuf/stubs/bytestream.h \
  167. google/protobuf/stubs/common.cc \
  168. google/protobuf/stubs/hash.h \
  169. google/protobuf/stubs/int128.cc \
  170. google/protobuf/stubs/int128.h \
  171. google/protobuf/io/io_win32.cc \
  172. google/protobuf/stubs/map_util.h \
  173. google/protobuf/stubs/mathutil.h \
  174. google/protobuf/stubs/status.cc \
  175. google/protobuf/stubs/status.h \
  176. google/protobuf/stubs/status_macros.h \
  177. google/protobuf/stubs/statusor.cc \
  178. google/protobuf/stubs/statusor.h \
  179. google/protobuf/stubs/stringpiece.cc \
  180. google/protobuf/stubs/stringpiece.h \
  181. google/protobuf/stubs/stringprintf.cc \
  182. google/protobuf/stubs/stringprintf.h \
  183. google/protobuf/stubs/structurally_valid.cc \
  184. google/protobuf/stubs/strutil.cc \
  185. google/protobuf/stubs/time.cc \
  186. google/protobuf/stubs/time.h \
  187. google/protobuf/any_lite.cc \
  188. google/protobuf/arena.cc \
  189. google/protobuf/arenastring.cc \
  190. google/protobuf/extension_set.cc \
  191. google/protobuf/generated_enum_util.cc \
  192. google/protobuf/generated_message_util.cc \
  193. google/protobuf/generated_message_table_driven_lite.h \
  194. google/protobuf/generated_message_table_driven_lite.cc \
  195. google/protobuf/implicit_weak_message.cc \
  196. google/protobuf/map.cc \
  197. google/protobuf/message_lite.cc \
  198. google/protobuf/parse_context.cc \
  199. google/protobuf/repeated_field.cc \
  200. google/protobuf/wire_format_lite.cc \
  201. google/protobuf/io/coded_stream.cc \
  202. google/protobuf/io/strtod.cc \
  203. google/protobuf/io/zero_copy_stream.cc \
  204. google/protobuf/io/zero_copy_stream_impl.cc \
  205. google/protobuf/io/zero_copy_stream_impl_lite.cc
  206. libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
  207. libprotobuf_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined
  208. if HAVE_LD_VERSION_SCRIPT
  209. libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map
  210. EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map
  211. endif
  212. libprotobuf_la_SOURCES = \
  213. $(libprotobuf_lite_la_SOURCES) \
  214. google/protobuf/any.pb.cc \
  215. google/protobuf/api.pb.cc \
  216. google/protobuf/any.cc \
  217. google/protobuf/descriptor.cc \
  218. google/protobuf/descriptor_database.cc \
  219. google/protobuf/descriptor.pb.cc \
  220. google/protobuf/duration.pb.cc \
  221. google/protobuf/dynamic_message.cc \
  222. google/protobuf/empty.pb.cc \
  223. google/protobuf/extension_set_heavy.cc \
  224. google/protobuf/field_mask.pb.cc \
  225. google/protobuf/generated_message_reflection.cc \
  226. google/protobuf/generated_message_table_driven_lite.h \
  227. google/protobuf/generated_message_table_driven.cc \
  228. google/protobuf/map_field.cc \
  229. google/protobuf/message.cc \
  230. google/protobuf/reflection_internal.h \
  231. google/protobuf/reflection_ops.cc \
  232. google/protobuf/service.cc \
  233. google/protobuf/source_context.pb.cc \
  234. google/protobuf/struct.pb.cc \
  235. google/protobuf/stubs/substitute.cc \
  236. google/protobuf/stubs/substitute.h \
  237. google/protobuf/text_format.cc \
  238. google/protobuf/timestamp.pb.cc \
  239. google/protobuf/type.pb.cc \
  240. google/protobuf/unknown_field_set.cc \
  241. google/protobuf/wire_format.cc \
  242. google/protobuf/wrappers.pb.cc \
  243. google/protobuf/io/gzip_stream.cc \
  244. google/protobuf/io/printer.cc \
  245. google/protobuf/io/tokenizer.cc \
  246. google/protobuf/compiler/importer.cc \
  247. google/protobuf/compiler/parser.cc \
  248. google/protobuf/util/delimited_message_util.cc \
  249. google/protobuf/util/field_comparator.cc \
  250. google/protobuf/util/field_mask_util.cc \
  251. google/protobuf/util/internal/constants.h \
  252. google/protobuf/util/internal/datapiece.cc \
  253. google/protobuf/util/internal/datapiece.h \
  254. google/protobuf/util/internal/default_value_objectwriter.cc \
  255. google/protobuf/util/internal/default_value_objectwriter.h \
  256. google/protobuf/util/internal/error_listener.cc \
  257. google/protobuf/util/internal/error_listener.h \
  258. google/protobuf/util/internal/expecting_objectwriter.h \
  259. google/protobuf/util/internal/field_mask_utility.cc \
  260. google/protobuf/util/internal/field_mask_utility.h \
  261. google/protobuf/util/internal/json_escaping.cc \
  262. google/protobuf/util/internal/json_escaping.h \
  263. google/protobuf/util/internal/json_objectwriter.cc \
  264. google/protobuf/util/internal/json_objectwriter.h \
  265. google/protobuf/util/internal/json_stream_parser.cc \
  266. google/protobuf/util/internal/json_stream_parser.h \
  267. google/protobuf/util/internal/location_tracker.h \
  268. google/protobuf/util/internal/mock_error_listener.h \
  269. google/protobuf/util/internal/object_location_tracker.h \
  270. google/protobuf/util/internal/object_source.h \
  271. google/protobuf/util/internal/object_writer.cc \
  272. google/protobuf/util/internal/object_writer.h \
  273. google/protobuf/util/internal/protostream_objectsource.cc \
  274. google/protobuf/util/internal/protostream_objectsource.h \
  275. google/protobuf/util/internal/protostream_objectwriter.cc \
  276. google/protobuf/util/internal/protostream_objectwriter.h \
  277. google/protobuf/util/internal/proto_writer.cc \
  278. google/protobuf/util/internal/proto_writer.h \
  279. google/protobuf/util/internal/structured_objectwriter.h \
  280. google/protobuf/util/internal/type_info.cc \
  281. google/protobuf/util/internal/type_info.h \
  282. google/protobuf/util/internal/type_info_test_helper.cc \
  283. google/protobuf/util/internal/type_info_test_helper.h \
  284. google/protobuf/util/internal/utility.cc \
  285. google/protobuf/util/internal/utility.h \
  286. google/protobuf/util/json_util.cc \
  287. google/protobuf/util/message_differencer.cc \
  288. google/protobuf/util/time_util.cc \
  289. google/protobuf/util/type_resolver_util.cc
  290. nodist_libprotobuf_la_SOURCES = $(nodist_libprotobuf_lite_la_SOURCES)
  291. libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
  292. libprotoc_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined
  293. if HAVE_LD_VERSION_SCRIPT
  294. libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map
  295. EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map
  296. endif
  297. libprotoc_la_SOURCES = \
  298. google/protobuf/compiler/code_generator.cc \
  299. google/protobuf/compiler/command_line_interface.cc \
  300. google/protobuf/compiler/plugin.cc \
  301. google/protobuf/compiler/plugin.pb.cc \
  302. google/protobuf/compiler/scc.h \
  303. google/protobuf/compiler/subprocess.cc \
  304. google/protobuf/compiler/subprocess.h \
  305. google/protobuf/compiler/zip_writer.cc \
  306. google/protobuf/compiler/zip_writer.h \
  307. google/protobuf/compiler/cpp/cpp_enum.cc \
  308. google/protobuf/compiler/cpp/cpp_enum.h \
  309. google/protobuf/compiler/cpp/cpp_enum_field.cc \
  310. google/protobuf/compiler/cpp/cpp_enum_field.h \
  311. google/protobuf/compiler/cpp/cpp_extension.cc \
  312. google/protobuf/compiler/cpp/cpp_extension.h \
  313. google/protobuf/compiler/cpp/cpp_field.cc \
  314. google/protobuf/compiler/cpp/cpp_field.h \
  315. google/protobuf/compiler/cpp/cpp_file.cc \
  316. google/protobuf/compiler/cpp/cpp_file.h \
  317. google/protobuf/compiler/cpp/cpp_generator.cc \
  318. google/protobuf/compiler/cpp/cpp_helpers.cc \
  319. google/protobuf/compiler/cpp/cpp_helpers.h \
  320. google/protobuf/compiler/cpp/cpp_map_field.cc \
  321. google/protobuf/compiler/cpp/cpp_map_field.h \
  322. google/protobuf/compiler/cpp/cpp_message.cc \
  323. google/protobuf/compiler/cpp/cpp_message.h \
  324. google/protobuf/compiler/cpp/cpp_message_field.cc \
  325. google/protobuf/compiler/cpp/cpp_message_field.h \
  326. google/protobuf/compiler/cpp/cpp_message_layout_helper.h \
  327. google/protobuf/compiler/cpp/cpp_names.h \
  328. google/protobuf/compiler/cpp/cpp_options.h \
  329. google/protobuf/compiler/cpp/cpp_padding_optimizer.cc \
  330. google/protobuf/compiler/cpp/cpp_padding_optimizer.h \
  331. google/protobuf/compiler/cpp/cpp_primitive_field.cc \
  332. google/protobuf/compiler/cpp/cpp_primitive_field.h \
  333. google/protobuf/compiler/cpp/cpp_service.cc \
  334. google/protobuf/compiler/cpp/cpp_service.h \
  335. google/protobuf/compiler/cpp/cpp_string_field.cc \
  336. google/protobuf/compiler/cpp/cpp_string_field.h \
  337. google/protobuf/compiler/java/java_context.cc \
  338. google/protobuf/compiler/java/java_context.h \
  339. google/protobuf/compiler/java/java_enum.cc \
  340. google/protobuf/compiler/java/java_enum_lite.cc \
  341. google/protobuf/compiler/java/java_enum_field.cc \
  342. google/protobuf/compiler/java/java_enum_field.h \
  343. google/protobuf/compiler/java/java_enum_field_lite.cc \
  344. google/protobuf/compiler/java/java_enum_field_lite.h \
  345. google/protobuf/compiler/java/java_enum.h \
  346. google/protobuf/compiler/java/java_enum_lite.h \
  347. google/protobuf/compiler/java/java_extension.cc \
  348. google/protobuf/compiler/java/java_extension.h \
  349. google/protobuf/compiler/java/java_extension_lite.cc \
  350. google/protobuf/compiler/java/java_extension_lite.h \
  351. google/protobuf/compiler/java/java_field.cc \
  352. google/protobuf/compiler/java/java_field.h \
  353. google/protobuf/compiler/java/java_file.cc \
  354. google/protobuf/compiler/java/java_file.h \
  355. google/protobuf/compiler/java/java_generator.cc \
  356. google/protobuf/compiler/java/java_generator_factory.cc \
  357. google/protobuf/compiler/java/java_generator_factory.h \
  358. google/protobuf/compiler/java/java_helpers.cc \
  359. google/protobuf/compiler/java/java_helpers.h \
  360. google/protobuf/compiler/java/java_map_field.cc \
  361. google/protobuf/compiler/java/java_map_field.h \
  362. google/protobuf/compiler/java/java_map_field_lite.cc \
  363. google/protobuf/compiler/java/java_map_field_lite.h \
  364. google/protobuf/compiler/java/java_message.cc \
  365. google/protobuf/compiler/java/java_message_lite.cc \
  366. google/protobuf/compiler/java/java_message_builder.cc \
  367. google/protobuf/compiler/java/java_message_builder_lite.cc \
  368. google/protobuf/compiler/java/java_message_field.cc \
  369. google/protobuf/compiler/java/java_message_field.h \
  370. google/protobuf/compiler/java/java_message_field_lite.cc \
  371. google/protobuf/compiler/java/java_message_field_lite.h \
  372. google/protobuf/compiler/java/java_message.h \
  373. google/protobuf/compiler/java/java_message_lite.h \
  374. google/protobuf/compiler/java/java_message_builder.h \
  375. google/protobuf/compiler/java/java_message_builder_lite.h \
  376. google/protobuf/compiler/java/java_name_resolver.cc \
  377. google/protobuf/compiler/java/java_name_resolver.h \
  378. google/protobuf/compiler/java/java_options.h \
  379. google/protobuf/compiler/java/java_primitive_field.cc \
  380. google/protobuf/compiler/java/java_primitive_field.h \
  381. google/protobuf/compiler/java/java_primitive_field_lite.cc \
  382. google/protobuf/compiler/java/java_primitive_field_lite.h \
  383. google/protobuf/compiler/java/java_shared_code_generator.cc \
  384. google/protobuf/compiler/java/java_shared_code_generator.h \
  385. google/protobuf/compiler/java/java_service.cc \
  386. google/protobuf/compiler/java/java_service.h \
  387. google/protobuf/compiler/java/java_string_field.cc \
  388. google/protobuf/compiler/java/java_string_field.h \
  389. google/protobuf/compiler/java/java_string_field_lite.cc \
  390. google/protobuf/compiler/java/java_string_field_lite.h \
  391. google/protobuf/compiler/java/java_doc_comment.cc \
  392. google/protobuf/compiler/java/java_doc_comment.h \
  393. google/protobuf/compiler/js/js_generator.cc \
  394. google/protobuf/compiler/js/well_known_types_embed.cc \
  395. google/protobuf/compiler/objectivec/objectivec_enum.cc \
  396. google/protobuf/compiler/objectivec/objectivec_enum.h \
  397. google/protobuf/compiler/objectivec/objectivec_enum_field.cc \
  398. google/protobuf/compiler/objectivec/objectivec_enum_field.h \
  399. google/protobuf/compiler/objectivec/objectivec_extension.cc \
  400. google/protobuf/compiler/objectivec/objectivec_extension.h \
  401. google/protobuf/compiler/objectivec/objectivec_field.cc \
  402. google/protobuf/compiler/objectivec/objectivec_field.h \
  403. google/protobuf/compiler/objectivec/objectivec_file.cc \
  404. google/protobuf/compiler/objectivec/objectivec_file.h \
  405. google/protobuf/compiler/objectivec/objectivec_generator.cc \
  406. google/protobuf/compiler/objectivec/objectivec_helpers.cc \
  407. google/protobuf/compiler/objectivec/objectivec_helpers.h \
  408. google/protobuf/compiler/objectivec/objectivec_map_field.cc \
  409. google/protobuf/compiler/objectivec/objectivec_map_field.h \
  410. google/protobuf/compiler/objectivec/objectivec_message.cc \
  411. google/protobuf/compiler/objectivec/objectivec_message.h \
  412. google/protobuf/compiler/objectivec/objectivec_message_field.cc \
  413. google/protobuf/compiler/objectivec/objectivec_message_field.h \
  414. google/protobuf/compiler/objectivec/objectivec_nsobject_methods.h \
  415. google/protobuf/compiler/objectivec/objectivec_oneof.cc \
  416. google/protobuf/compiler/objectivec/objectivec_oneof.h \
  417. google/protobuf/compiler/objectivec/objectivec_primitive_field.cc \
  418. google/protobuf/compiler/objectivec/objectivec_primitive_field.h \
  419. google/protobuf/compiler/php/php_generator.cc \
  420. google/protobuf/compiler/python/python_generator.cc \
  421. google/protobuf/compiler/ruby/ruby_generator.cc \
  422. google/protobuf/compiler/csharp/csharp_doc_comment.cc \
  423. google/protobuf/compiler/csharp/csharp_doc_comment.h \
  424. google/protobuf/compiler/csharp/csharp_enum.cc \
  425. google/protobuf/compiler/csharp/csharp_enum.h \
  426. google/protobuf/compiler/csharp/csharp_enum_field.cc \
  427. google/protobuf/compiler/csharp/csharp_enum_field.h \
  428. google/protobuf/compiler/csharp/csharp_field_base.cc \
  429. google/protobuf/compiler/csharp/csharp_field_base.h \
  430. google/protobuf/compiler/csharp/csharp_generator.cc \
  431. google/protobuf/compiler/csharp/csharp_helpers.cc \
  432. google/protobuf/compiler/csharp/csharp_helpers.h \
  433. google/protobuf/compiler/csharp/csharp_map_field.cc \
  434. google/protobuf/compiler/csharp/csharp_map_field.h \
  435. google/protobuf/compiler/csharp/csharp_message.cc \
  436. google/protobuf/compiler/csharp/csharp_message.h \
  437. google/protobuf/compiler/csharp/csharp_message_field.cc \
  438. google/protobuf/compiler/csharp/csharp_message_field.h \
  439. google/protobuf/compiler/csharp/csharp_options.h \
  440. google/protobuf/compiler/csharp/csharp_primitive_field.cc \
  441. google/protobuf/compiler/csharp/csharp_primitive_field.h \
  442. google/protobuf/compiler/csharp/csharp_reflection_class.cc \
  443. google/protobuf/compiler/csharp/csharp_reflection_class.h \
  444. google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc \
  445. google/protobuf/compiler/csharp/csharp_repeated_enum_field.h \
  446. google/protobuf/compiler/csharp/csharp_repeated_message_field.cc \
  447. google/protobuf/compiler/csharp/csharp_repeated_message_field.h \
  448. google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc \
  449. google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h \
  450. google/protobuf/compiler/csharp/csharp_source_generator_base.cc \
  451. google/protobuf/compiler/csharp/csharp_source_generator_base.h \
  452. google/protobuf/compiler/csharp/csharp_wrapper_field.cc \
  453. google/protobuf/compiler/csharp/csharp_wrapper_field.h
  454. bin_PROGRAMS = protoc
  455. protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
  456. protoc_SOURCES = google/protobuf/compiler/main.cc
  457. # Tests ==============================================================
  458. protoc_inputs = \
  459. google/protobuf/any_test.proto \
  460. google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto \
  461. google/protobuf/map_lite_unittest.proto \
  462. google/protobuf/map_proto2_unittest.proto \
  463. google/protobuf/map_unittest.proto \
  464. google/protobuf/unittest_arena.proto \
  465. google/protobuf/unittest_custom_options.proto \
  466. google/protobuf/unittest_drop_unknown_fields.proto \
  467. google/protobuf/unittest_embed_optimize_for.proto \
  468. google/protobuf/unittest_empty.proto \
  469. google/protobuf/unittest_enormous_descriptor.proto \
  470. google/protobuf/unittest_import_lite.proto \
  471. google/protobuf/unittest_import.proto \
  472. google/protobuf/unittest_import_public_lite.proto \
  473. google/protobuf/unittest_import_public.proto \
  474. google/protobuf/unittest_lazy_dependencies.proto \
  475. google/protobuf/unittest_lazy_dependencies_custom_option.proto \
  476. google/protobuf/unittest_lazy_dependencies_enum.proto \
  477. google/protobuf/unittest_lite_imports_nonlite.proto \
  478. google/protobuf/unittest_lite.proto \
  479. google/protobuf/unittest_mset.proto \
  480. google/protobuf/unittest_mset_wire_format.proto \
  481. google/protobuf/unittest_no_field_presence.proto \
  482. google/protobuf/unittest_no_generic_services.proto \
  483. google/protobuf/unittest_optimize_for.proto \
  484. google/protobuf/unittest_preserve_unknown_enum2.proto \
  485. google/protobuf/unittest_preserve_unknown_enum.proto \
  486. google/protobuf/unittest.proto \
  487. google/protobuf/unittest_proto3.proto \
  488. google/protobuf/unittest_proto3_arena.proto \
  489. google/protobuf/unittest_proto3_arena_lite.proto \
  490. google/protobuf/unittest_proto3_lite.proto \
  491. google/protobuf/unittest_proto3_optional.proto \
  492. google/protobuf/unittest_well_known_types.proto \
  493. google/protobuf/util/internal/testdata/anys.proto \
  494. google/protobuf/util/internal/testdata/books.proto \
  495. google/protobuf/util/internal/testdata/default_value.proto \
  496. google/protobuf/util/internal/testdata/default_value_test.proto \
  497. google/protobuf/util/internal/testdata/field_mask.proto \
  498. google/protobuf/util/internal/testdata/maps.proto \
  499. google/protobuf/util/internal/testdata/oneofs.proto \
  500. google/protobuf/util/internal/testdata/proto3.proto \
  501. google/protobuf/util/internal/testdata/struct.proto \
  502. google/protobuf/util/internal/testdata/timestamp_duration.proto \
  503. google/protobuf/util/internal/testdata/wrappers.proto \
  504. google/protobuf/util/json_format.proto \
  505. google/protobuf/util/json_format_proto3.proto \
  506. google/protobuf/util/message_differencer_unittest.proto \
  507. google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto
  508. EXTRA_DIST = \
  509. $(protoc_inputs) \
  510. solaris/libstdc++.la \
  511. google/protobuf/test_messages_proto3.proto \
  512. google/protobuf/test_messages_proto2.proto \
  513. google/protobuf/io/gzip_stream.h \
  514. google/protobuf/io/gzip_stream_unittest.sh \
  515. google/protobuf/testdata/golden_message \
  516. google/protobuf/testdata/golden_message_maps \
  517. google/protobuf/testdata/golden_message_oneof_implemented \
  518. google/protobuf/testdata/golden_message_proto3 \
  519. google/protobuf/testdata/golden_packed_fields_message \
  520. google/protobuf/testdata/bad_utf8_string \
  521. google/protobuf/testdata/map_test_data.txt \
  522. google/protobuf/testdata/text_format_unittest_data.txt \
  523. google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt \
  524. google/protobuf/testdata/text_format_unittest_data_pointy.txt \
  525. google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt \
  526. google/protobuf/testdata/text_format_unittest_extensions_data.txt \
  527. google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \
  528. google/protobuf/package_info.h \
  529. google/protobuf/io/package_info.h \
  530. google/protobuf/util/package_info.h \
  531. google/protobuf/compiler/ruby/ruby_generated_code.proto \
  532. google/protobuf/compiler/ruby/ruby_generated_code_pb.rb \
  533. google/protobuf/compiler/ruby/ruby_generated_code_proto2.proto \
  534. google/protobuf/compiler/ruby/ruby_generated_code_proto2_pb.rb \
  535. google/protobuf/compiler/ruby/ruby_generated_pkg_explicit.proto \
  536. google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy.proto \
  537. google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb \
  538. google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb \
  539. google/protobuf/compiler/ruby/ruby_generated_pkg_implicit.proto \
  540. google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb \
  541. google/protobuf/compiler/package_info.h \
  542. google/protobuf/compiler/zip_output_unittest.sh \
  543. libprotobuf-lite.map \
  544. libprotobuf.map \
  545. libprotoc.map \
  546. README.md
  547. protoc_lite_outputs = \
  548. google/protobuf/map_lite_unittest.pb.cc \
  549. google/protobuf/map_lite_unittest.pb.h \
  550. google/protobuf/unittest_lite.pb.cc \
  551. google/protobuf/unittest_lite.pb.h \
  552. google/protobuf/unittest_import_lite.pb.cc \
  553. google/protobuf/unittest_import_lite.pb.h \
  554. google/protobuf/unittest_import_public_lite.pb.cc \
  555. google/protobuf/unittest_import_public_lite.pb.h
  556. protoc_outputs = \
  557. $(protoc_lite_outputs) \
  558. google/protobuf/any_test.pb.cc \
  559. google/protobuf/any_test.pb.h \
  560. google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \
  561. google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h \
  562. google/protobuf/compiler/cpp/cpp_test_large_enum_value.pb.cc \
  563. google/protobuf/compiler/cpp/cpp_test_large_enum_value.pb.h \
  564. google/protobuf/map_proto2_unittest.pb.cc \
  565. google/protobuf/map_proto2_unittest.pb.h \
  566. google/protobuf/map_unittest.pb.cc \
  567. google/protobuf/map_unittest.pb.h \
  568. google/protobuf/unittest_arena.pb.cc \
  569. google/protobuf/unittest_arena.pb.h \
  570. google/protobuf/unittest_custom_options.pb.cc \
  571. google/protobuf/unittest_custom_options.pb.h \
  572. google/protobuf/unittest_drop_unknown_fields.pb.cc \
  573. google/protobuf/unittest_drop_unknown_fields.pb.h \
  574. google/protobuf/unittest_embed_optimize_for.pb.cc \
  575. google/protobuf/unittest_embed_optimize_for.pb.h \
  576. google/protobuf/unittest_empty.pb.cc \
  577. google/protobuf/unittest_empty.pb.h \
  578. google/protobuf/unittest_enormous_descriptor.pb.cc \
  579. google/protobuf/unittest_enormous_descriptor.pb.h \
  580. google/protobuf/unittest_import.pb.cc \
  581. google/protobuf/unittest_import.pb.h \
  582. google/protobuf/unittest_import_public.pb.cc \
  583. google/protobuf/unittest_import_public.pb.h \
  584. google/protobuf/unittest_lazy_dependencies.pb.cc \
  585. google/protobuf/unittest_lazy_dependencies.pb.h \
  586. google/protobuf/unittest_lazy_dependencies_custom_option.pb.cc \
  587. google/protobuf/unittest_lazy_dependencies_custom_option.pb.h \
  588. google/protobuf/unittest_lazy_dependencies_enum.pb.cc \
  589. google/protobuf/unittest_lazy_dependencies_enum.pb.h \
  590. google/protobuf/unittest_lite_imports_nonlite.pb.cc \
  591. google/protobuf/unittest_lite_imports_nonlite.pb.h \
  592. google/protobuf/unittest_mset.pb.cc \
  593. google/protobuf/unittest_mset.pb.h \
  594. google/protobuf/unittest_mset_wire_format.pb.cc \
  595. google/protobuf/unittest_mset_wire_format.pb.h \
  596. google/protobuf/unittest_no_field_presence.pb.cc \
  597. google/protobuf/unittest_no_field_presence.pb.h \
  598. google/protobuf/unittest_no_generic_services.pb.cc \
  599. google/protobuf/unittest_no_generic_services.pb.h \
  600. google/protobuf/unittest_optimize_for.pb.cc \
  601. google/protobuf/unittest_optimize_for.pb.h \
  602. google/protobuf/unittest.pb.cc \
  603. google/protobuf/unittest.pb.h \
  604. google/protobuf/unittest_preserve_unknown_enum2.pb.cc \
  605. google/protobuf/unittest_preserve_unknown_enum2.pb.h \
  606. google/protobuf/unittest_preserve_unknown_enum.pb.cc \
  607. google/protobuf/unittest_preserve_unknown_enum.pb.h \
  608. google/protobuf/unittest_proto3.pb.cc \
  609. google/protobuf/unittest_proto3.pb.h \
  610. google/protobuf/unittest_proto3_arena.pb.cc \
  611. google/protobuf/unittest_proto3_arena.pb.h \
  612. google/protobuf/unittest_proto3_arena_lite.pb.cc \
  613. google/protobuf/unittest_proto3_arena_lite.pb.h \
  614. google/protobuf/unittest_proto3_lite.pb.cc \
  615. google/protobuf/unittest_proto3_lite.pb.h \
  616. google/protobuf/unittest_proto3_optional.pb.cc \
  617. google/protobuf/unittest_proto3_optional.pb.h \
  618. google/protobuf/unittest_well_known_types.pb.cc \
  619. google/protobuf/unittest_well_known_types.pb.h \
  620. google/protobuf/util/internal/testdata/anys.pb.cc \
  621. google/protobuf/util/internal/testdata/anys.pb.h \
  622. google/protobuf/util/internal/testdata/books.pb.cc \
  623. google/protobuf/util/internal/testdata/books.pb.h \
  624. google/protobuf/util/internal/testdata/default_value.pb.cc \
  625. google/protobuf/util/internal/testdata/default_value.pb.h \
  626. google/protobuf/util/internal/testdata/default_value_test.pb.cc \
  627. google/protobuf/util/internal/testdata/default_value_test.pb.h \
  628. google/protobuf/util/internal/testdata/field_mask.pb.cc \
  629. google/protobuf/util/internal/testdata/field_mask.pb.h \
  630. google/protobuf/util/internal/testdata/maps.pb.cc \
  631. google/protobuf/util/internal/testdata/maps.pb.h \
  632. google/protobuf/util/internal/testdata/oneofs.pb.cc \
  633. google/protobuf/util/internal/testdata/oneofs.pb.h \
  634. google/protobuf/util/internal/testdata/proto3.pb.cc \
  635. google/protobuf/util/internal/testdata/proto3.pb.h \
  636. google/protobuf/util/internal/testdata/struct.pb.cc \
  637. google/protobuf/util/internal/testdata/struct.pb.h \
  638. google/protobuf/util/internal/testdata/timestamp_duration.pb.cc \
  639. google/protobuf/util/internal/testdata/timestamp_duration.pb.h \
  640. google/protobuf/util/internal/testdata/wrappers.pb.cc \
  641. google/protobuf/util/internal/testdata/wrappers.pb.h \
  642. google/protobuf/util/json_format.pb.cc \
  643. google/protobuf/util/json_format.pb.h \
  644. google/protobuf/util/json_format_proto3.pb.cc \
  645. google/protobuf/util/json_format_proto3.pb.h \
  646. google/protobuf/util/message_differencer_unittest.pb.cc \
  647. google/protobuf/util/message_differencer_unittest.pb.h
  648. if USE_EXTERNAL_PROTOC
  649. unittest_proto_middleman: $(protoc_inputs)
  650. $(PROTOC) -I$(srcdir) --cpp_out=. $^
  651. touch unittest_proto_middleman
  652. else
  653. # We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is
  654. # relative to srcdir, which may not be the same as the current directory when
  655. # building out-of-tree.
  656. unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs)
  657. oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) --experimental_allow_proto3_optional )
  658. touch unittest_proto_middleman
  659. endif
  660. $(protoc_outputs): unittest_proto_middleman
  661. COMMON_TEST_SOURCES = \
  662. google/protobuf/arena_test_util.cc \
  663. google/protobuf/arena_test_util.h \
  664. google/protobuf/map_test_util.inc \
  665. google/protobuf/map_test_util.h \
  666. google/protobuf/map_test_util_impl.h \
  667. google/protobuf/test_util.cc \
  668. google/protobuf/test_util.h \
  669. google/protobuf/test_util.inc \
  670. google/protobuf/test_util2.h \
  671. google/protobuf/testing/googletest.cc \
  672. google/protobuf/testing/googletest.h \
  673. google/protobuf/testing/file.cc \
  674. google/protobuf/testing/file.h
  675. GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
  676. GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
  677. GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
  678. GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
  679. check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
  680. protobuf-lite-test test_plugin protobuf-lite-arena-test \
  681. no-warning-test $(GZCHECKPROGRAMS)
  682. protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
  683. $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
  684. $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
  685. $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
  686. protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
  687. -I$(GOOGLEMOCK_SRC_DIR)/include
  688. # Disable optimization for tests unless the user explicitly asked for it,
  689. # since test_util.cc takes forever to compile with optimization (with GCC).
  690. # See configure.ac for more info.
  691. protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
  692. # Doesn't pass on Windows with MSVC
  693. NON_MSVC_TEST_SOURCES = \
  694. google/protobuf/compiler/command_line_interface_unittest.cc
  695. protobuf_test_SOURCES = \
  696. google/protobuf/stubs/bytestream_unittest.cc \
  697. google/protobuf/stubs/common_unittest.cc \
  698. google/protobuf/stubs/int128_unittest.cc \
  699. google/protobuf/io/io_win32_unittest.cc \
  700. google/protobuf/stubs/statusor_test.cc \
  701. google/protobuf/stubs/status_test.cc \
  702. google/protobuf/stubs/stringpiece_unittest.cc \
  703. google/protobuf/stubs/stringprintf_unittest.cc \
  704. google/protobuf/stubs/structurally_valid_unittest.cc \
  705. google/protobuf/stubs/strutil_unittest.cc \
  706. google/protobuf/stubs/template_util_unittest.cc \
  707. google/protobuf/stubs/time_test.cc \
  708. google/protobuf/any_test.cc \
  709. google/protobuf/arenastring_unittest.cc \
  710. google/protobuf/arena_unittest.cc \
  711. google/protobuf/descriptor_database_unittest.cc \
  712. google/protobuf/descriptor_unittest.cc \
  713. google/protobuf/drop_unknown_fields_test.cc \
  714. google/protobuf/dynamic_message_unittest.cc \
  715. google/protobuf/extension_set_unittest.cc \
  716. google/protobuf/generated_message_reflection_unittest.cc \
  717. google/protobuf/map_field_test.cc \
  718. google/protobuf/map_test.cc \
  719. google/protobuf/message_unittest.cc \
  720. google/protobuf/message_unittest.inc \
  721. google/protobuf/no_field_presence_test.cc \
  722. google/protobuf/preserve_unknown_enum_test.cc \
  723. google/protobuf/proto3_arena_lite_unittest.cc \
  724. google/protobuf/proto3_arena_unittest.cc \
  725. google/protobuf/proto3_lite_unittest.cc \
  726. google/protobuf/proto3_lite_unittest.inc \
  727. google/protobuf/reflection_ops_unittest.cc \
  728. google/protobuf/repeated_field_reflection_unittest.cc \
  729. google/protobuf/repeated_field_unittest.cc \
  730. google/protobuf/text_format_unittest.cc \
  731. google/protobuf/unknown_field_set_unittest.cc \
  732. google/protobuf/well_known_types_unittest.cc \
  733. google/protobuf/wire_format_unittest.cc \
  734. google/protobuf/io/coded_stream_unittest.cc \
  735. google/protobuf/io/printer_unittest.cc \
  736. google/protobuf/io/tokenizer_unittest.cc \
  737. google/protobuf/io/zero_copy_stream_unittest.cc \
  738. google/protobuf/compiler/annotation_test_util.h \
  739. google/protobuf/compiler/annotation_test_util.cc \
  740. google/protobuf/compiler/importer_unittest.cc \
  741. google/protobuf/compiler/mock_code_generator.cc \
  742. google/protobuf/compiler/mock_code_generator.h \
  743. google/protobuf/compiler/parser_unittest.cc \
  744. google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \
  745. google/protobuf/compiler/cpp/cpp_move_unittest.cc \
  746. google/protobuf/compiler/cpp/cpp_unittest.h \
  747. google/protobuf/compiler/cpp/cpp_unittest.cc \
  748. google/protobuf/compiler/cpp/cpp_unittest.inc \
  749. google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \
  750. google/protobuf/compiler/cpp/metadata_test.cc \
  751. google/protobuf/compiler/java/java_plugin_unittest.cc \
  752. google/protobuf/compiler/java/java_doc_comment_unittest.cc \
  753. google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc \
  754. google/protobuf/compiler/python/python_plugin_unittest.cc \
  755. google/protobuf/compiler/ruby/ruby_generator_unittest.cc \
  756. google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc \
  757. google/protobuf/compiler/csharp/csharp_generator_unittest.cc \
  758. google/protobuf/util/delimited_message_util_test.cc \
  759. google/protobuf/util/field_comparator_test.cc \
  760. google/protobuf/util/field_mask_util_test.cc \
  761. google/protobuf/util/internal/default_value_objectwriter_test.cc \
  762. google/protobuf/util/internal/json_objectwriter_test.cc \
  763. google/protobuf/util/internal/json_stream_parser_test.cc \
  764. google/protobuf/util/internal/protostream_objectsource_test.cc \
  765. google/protobuf/util/internal/protostream_objectwriter_test.cc \
  766. google/protobuf/util/internal/type_info_test_helper.cc \
  767. google/protobuf/util/json_util_test.cc \
  768. google/protobuf/util/message_differencer_unittest.cc \
  769. google/protobuf/util/time_util_test.cc \
  770. google/protobuf/util/type_resolver_util_test.cc \
  771. $(NON_MSVC_TEST_SOURCES) \
  772. $(COMMON_TEST_SOURCES)
  773. nodist_protobuf_test_SOURCES = $(protoc_outputs)
  774. $(am_protobuf_test_OBJECTS): unittest_proto_middleman
  775. # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
  776. protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
  777. libprotoc.la \
  778. $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
  779. $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
  780. $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
  781. protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
  782. -I$(GOOGLETEST_SRC_DIR)/include \
  783. -DPROTOBUF_TEST_NO_DESCRIPTORS
  784. protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
  785. protobuf_lazy_descriptor_test_SOURCES = \
  786. google/protobuf/compiler/cpp/cpp_unittest.cc \
  787. $(COMMON_TEST_SOURCES)
  788. nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs)
  789. $(am_protobuf_lazy_descriptor_test_OBJECTS): unittest_proto_middleman
  790. COMMON_LITE_TEST_SOURCES = \
  791. google/protobuf/arena_test_util.cc \
  792. google/protobuf/arena_test_util.h \
  793. google/protobuf/map_lite_test_util.cc \
  794. google/protobuf/map_lite_test_util.h \
  795. google/protobuf/test_util_lite.cc \
  796. google/protobuf/test_util_lite.h
  797. # Build lite_unittest separately, since it doesn't use gtest. It can't
  798. # depend on gtest because our internal version of gtest depend on proto
  799. # full runtime and we want to make sure this test builds without full
  800. # runtime.
  801. protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
  802. $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
  803. $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
  804. $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
  805. protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
  806. -I$(GOOGLETEST_SRC_DIR)/include
  807. protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
  808. protobuf_lite_test_SOURCES = \
  809. google/protobuf/lite_unittest.cc \
  810. $(COMMON_LITE_TEST_SOURCES)
  811. nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs)
  812. $(am_protobuf_lite_test_OBJECTS): unittest_proto_middleman
  813. # lite_arena_unittest depends on gtest because teboring@ found that without
  814. # gtest when building the test internally our memory sanitizer doesn't detect
  815. # memory leaks (don't know why).
  816. protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
  817. $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
  818. $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
  819. $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
  820. protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
  821. -I$(GOOGLETEST_SRC_DIR)/include
  822. protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
  823. protobuf_lite_arena_test_SOURCES = \
  824. google/protobuf/lite_arena_unittest.cc \
  825. $(COMMON_LITE_TEST_SOURCES)
  826. nodist_protobuf_lite_arena_test_SOURCES = $(protoc_lite_outputs)
  827. $(am_protobuf_lite_arena_test_OBJECTS): unittest_proto_middleman
  828. # Test plugin binary.
  829. test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
  830. $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
  831. test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
  832. test_plugin_SOURCES = \
  833. google/protobuf/compiler/mock_code_generator.cc \
  834. google/protobuf/testing/file.cc \
  835. google/protobuf/testing/file.h \
  836. google/protobuf/compiler/test_plugin.cc
  837. if HAVE_ZLIB
  838. zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
  839. zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc
  840. zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
  841. zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc
  842. endif
  843. # This test target is to ensure all our public header files and generated
  844. # code is free from warnings. We have to be more pedantic about these
  845. # files because they are compiled by users with different compiler flags.
  846. no_warning_test.cc:
  847. echo "// Generated from Makefile.am" > no_warning_test.cc
  848. for FILE in $(nobase_include_HEADERS); do \
  849. echo "#include <$${FILE}>" >> no_warning_test.cc; \
  850. done
  851. echo "int main(int, char**) { return 0; }" >> no_warning_test.cc
  852. no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
  853. no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \
  854. -Wall -Wextra -Werror -Wno-unused-parameter
  855. nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs)
  856. TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
  857. google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
  858. protobuf-lite-arena-test no-warning-test