PageRenderTime 67ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/Makefile.am

http://protobuf-actionscript3.googlecode.com/
Makefile | 358 lines | 304 code | 33 blank | 21 comment | 4 complexity | c82655c24ca9433be9fa1b700a31924f MD5 | raw file
  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. # Not sure why these don't get cleaned automatically.
  24. clean-local:
  25. rm -f *.loT
  26. CLEANFILES = $(protoc_outputs) unittest_proto_middleman
  27. MAINTAINERCLEANFILES = \
  28. Makefile.in
  29. nobase_include_HEADERS = \
  30. google/protobuf/stubs/common.h \
  31. google/protobuf/stubs/once.h \
  32. google/protobuf/descriptor.h \
  33. google/protobuf/descriptor.pb.h \
  34. google/protobuf/descriptor_database.h \
  35. google/protobuf/dynamic_message.h \
  36. google/protobuf/extension_set.h \
  37. google/protobuf/generated_message_util.h \
  38. google/protobuf/generated_message_reflection.h \
  39. google/protobuf/message.h \
  40. google/protobuf/message_lite.h \
  41. google/protobuf/reflection_ops.h \
  42. google/protobuf/repeated_field.h \
  43. google/protobuf/service.h \
  44. google/protobuf/text_format.h \
  45. google/protobuf/unknown_field_set.h \
  46. google/protobuf/wire_format.h \
  47. google/protobuf/wire_format_lite.h \
  48. google/protobuf/wire_format_lite_inl.h \
  49. google/protobuf/io/coded_stream.h \
  50. $(GZHEADERS) \
  51. google/protobuf/io/printer.h \
  52. google/protobuf/io/tokenizer.h \
  53. google/protobuf/io/zero_copy_stream.h \
  54. google/protobuf/io/zero_copy_stream_impl.h \
  55. google/protobuf/io/zero_copy_stream_impl_lite.h \
  56. google/protobuf/compiler/code_generator.h \
  57. google/protobuf/compiler/command_line_interface.h \
  58. google/protobuf/compiler/importer.h \
  59. google/protobuf/compiler/parser.h \
  60. google/protobuf/compiler/cpp/cpp_generator.h \
  61. google/protobuf/compiler/java/java_generator.h \
  62. google/protobuf/compiler/python/python_generator.h \
  63. google/protobuf/compiler/as3/as3_generator.h
  64. lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
  65. libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
  66. libprotobuf_lite_la_LDFLAGS = -version-info 4:0:0
  67. libprotobuf_lite_la_SOURCES = \
  68. google/protobuf/stubs/common.cc \
  69. google/protobuf/stubs/once.cc \
  70. google/protobuf/stubs/hash.cc \
  71. google/protobuf/stubs/hash.h \
  72. google/protobuf/stubs/map-util.h \
  73. google/protobuf/stubs/stl_util-inl.h \
  74. google/protobuf/extension_set.cc \
  75. google/protobuf/generated_message_util.cc \
  76. google/protobuf/message_lite.cc \
  77. google/protobuf/repeated_field.cc \
  78. google/protobuf/wire_format_lite.cc \
  79. google/protobuf/io/coded_stream.cc \
  80. google/protobuf/io/zero_copy_stream.cc \
  81. google/protobuf/io/zero_copy_stream_impl_lite.cc
  82. libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
  83. libprotobuf_la_LDFLAGS = -version-info 4:0:0
  84. libprotobuf_la_SOURCES = \
  85. $(libprotobuf_lite_la_SOURCES) \
  86. google/protobuf/stubs/strutil.cc \
  87. google/protobuf/stubs/strutil.h \
  88. google/protobuf/stubs/substitute.cc \
  89. google/protobuf/stubs/substitute.h \
  90. google/protobuf/stubs/structurally_valid.cc \
  91. google/protobuf/descriptor.cc \
  92. google/protobuf/descriptor.pb.cc \
  93. google/protobuf/descriptor_database.cc \
  94. google/protobuf/dynamic_message.cc \
  95. google/protobuf/extension_set_heavy.cc \
  96. google/protobuf/generated_message_reflection.cc \
  97. google/protobuf/message.cc \
  98. google/protobuf/reflection_ops.cc \
  99. google/protobuf/service.cc \
  100. google/protobuf/text_format.cc \
  101. google/protobuf/unknown_field_set.cc \
  102. google/protobuf/wire_format.cc \
  103. google/protobuf/io/gzip_stream.cc \
  104. google/protobuf/io/printer.cc \
  105. google/protobuf/io/tokenizer.cc \
  106. google/protobuf/io/zero_copy_stream_impl.cc \
  107. google/protobuf/compiler/importer.cc \
  108. google/protobuf/compiler/parser.cc
  109. libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
  110. libprotoc_la_LDFLAGS = -version-info 4:0:0
  111. libprotoc_la_SOURCES = \
  112. google/protobuf/compiler/code_generator.cc \
  113. google/protobuf/compiler/command_line_interface.cc \
  114. google/protobuf/compiler/cpp/cpp_enum.cc \
  115. google/protobuf/compiler/cpp/cpp_enum.h \
  116. google/protobuf/compiler/cpp/cpp_enum_field.cc \
  117. google/protobuf/compiler/cpp/cpp_enum_field.h \
  118. google/protobuf/compiler/cpp/cpp_extension.cc \
  119. google/protobuf/compiler/cpp/cpp_extension.h \
  120. google/protobuf/compiler/cpp/cpp_field.cc \
  121. google/protobuf/compiler/cpp/cpp_field.h \
  122. google/protobuf/compiler/cpp/cpp_file.cc \
  123. google/protobuf/compiler/cpp/cpp_file.h \
  124. google/protobuf/compiler/cpp/cpp_generator.cc \
  125. google/protobuf/compiler/cpp/cpp_helpers.cc \
  126. google/protobuf/compiler/cpp/cpp_helpers.h \
  127. google/protobuf/compiler/cpp/cpp_message.cc \
  128. google/protobuf/compiler/cpp/cpp_message.h \
  129. google/protobuf/compiler/cpp/cpp_message_field.cc \
  130. google/protobuf/compiler/cpp/cpp_message_field.h \
  131. google/protobuf/compiler/cpp/cpp_primitive_field.cc \
  132. google/protobuf/compiler/cpp/cpp_primitive_field.h \
  133. google/protobuf/compiler/cpp/cpp_service.cc \
  134. google/protobuf/compiler/cpp/cpp_service.h \
  135. google/protobuf/compiler/cpp/cpp_string_field.cc \
  136. google/protobuf/compiler/cpp/cpp_string_field.h \
  137. google/protobuf/compiler/java/java_enum.cc \
  138. google/protobuf/compiler/java/java_enum.h \
  139. google/protobuf/compiler/java/java_enum_field.cc \
  140. google/protobuf/compiler/java/java_enum_field.h \
  141. google/protobuf/compiler/java/java_extension.cc \
  142. google/protobuf/compiler/java/java_extension.h \
  143. google/protobuf/compiler/java/java_field.cc \
  144. google/protobuf/compiler/java/java_field.h \
  145. google/protobuf/compiler/java/java_file.cc \
  146. google/protobuf/compiler/java/java_file.h \
  147. google/protobuf/compiler/java/java_generator.cc \
  148. google/protobuf/compiler/java/java_helpers.cc \
  149. google/protobuf/compiler/java/java_helpers.h \
  150. google/protobuf/compiler/java/java_message.cc \
  151. google/protobuf/compiler/java/java_message.h \
  152. google/protobuf/compiler/java/java_message_field.cc \
  153. google/protobuf/compiler/java/java_message_field.h \
  154. google/protobuf/compiler/java/java_primitive_field.cc \
  155. google/protobuf/compiler/java/java_primitive_field.h \
  156. google/protobuf/compiler/java/java_service.cc \
  157. google/protobuf/compiler/java/java_service.h \
  158. google/protobuf/compiler/python/python_generator.cc \
  159. google/protobuf/compiler/as3/as3_enum.cc \
  160. google/protobuf/compiler/as3/as3_enum.h \
  161. google/protobuf/compiler/as3/as3_enum_field.cc \
  162. google/protobuf/compiler/as3/as3_enum_field.h \
  163. google/protobuf/compiler/as3/as3_extension.cc \
  164. google/protobuf/compiler/as3/as3_extension.h \
  165. google/protobuf/compiler/as3/as3_field.cc \
  166. google/protobuf/compiler/as3/as3_field.h \
  167. google/protobuf/compiler/as3/as3_file.cc \
  168. google/protobuf/compiler/as3/as3_file.h \
  169. google/protobuf/compiler/as3/as3_generator.cc \
  170. google/protobuf/compiler/as3/as3_helpers.cc \
  171. google/protobuf/compiler/as3/as3_helpers.h \
  172. google/protobuf/compiler/as3/as3_message.cc \
  173. google/protobuf/compiler/as3/as3_message.h \
  174. google/protobuf/compiler/as3/as3_message_field.cc \
  175. google/protobuf/compiler/as3/as3_message_field.h \
  176. google/protobuf/compiler/as3/as3_primitive_field.cc \
  177. google/protobuf/compiler/as3/as3_primitive_field.h \
  178. google/protobuf/compiler/as3/as3_service.cc \
  179. google/protobuf/compiler/as3/as3_service.h
  180. bin_PROGRAMS = protoc
  181. protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
  182. protoc_SOURCES = google/protobuf/compiler/main.cc
  183. # Tests ==============================================================
  184. protoc_inputs = \
  185. google/protobuf/unittest.proto \
  186. google/protobuf/unittest_empty.proto \
  187. google/protobuf/unittest_import.proto \
  188. google/protobuf/unittest_mset.proto \
  189. google/protobuf/unittest_optimize_for.proto \
  190. google/protobuf/unittest_embed_optimize_for.proto \
  191. google/protobuf/unittest_custom_options.proto \
  192. google/protobuf/unittest_lite.proto \
  193. google/protobuf/unittest_import_lite.proto \
  194. google/protobuf/unittest_lite_imports_nonlite.proto \
  195. google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto
  196. EXTRA_DIST = \
  197. $(protoc_inputs) \
  198. solaris/libstdc++.la \
  199. google/protobuf/io/gzip_stream.h \
  200. google/protobuf/io/gzip_stream_unittest.sh \
  201. google/protobuf/testdata/golden_message \
  202. google/protobuf/testdata/golden_packed_fields_message \
  203. google/protobuf/testdata/text_format_unittest_data.txt \
  204. google/protobuf/testdata/text_format_unittest_extensions_data.txt \
  205. google/protobuf/package_info.h \
  206. google/protobuf/io/package_info.h \
  207. google/protobuf/compiler/package_info.h \
  208. google/protobuf/unittest_enormous_descriptor.proto
  209. protoc_lite_outputs = \
  210. google/protobuf/unittest_lite.pb.cc \
  211. google/protobuf/unittest_lite.pb.h \
  212. google/protobuf/unittest_import_lite.pb.cc \
  213. google/protobuf/unittest_import_lite.pb.h
  214. protoc_outputs = \
  215. $(protoc_lite_outputs) \
  216. google/protobuf/unittest.pb.cc \
  217. google/protobuf/unittest.pb.h \
  218. google/protobuf/unittest_empty.pb.cc \
  219. google/protobuf/unittest_empty.pb.h \
  220. google/protobuf/unittest_import.pb.cc \
  221. google/protobuf/unittest_import.pb.h \
  222. google/protobuf/unittest_mset.pb.cc \
  223. google/protobuf/unittest_mset.pb.h \
  224. google/protobuf/unittest_optimize_for.pb.cc \
  225. google/protobuf/unittest_optimize_for.pb.h \
  226. google/protobuf/unittest_embed_optimize_for.pb.cc \
  227. google/protobuf/unittest_embed_optimize_for.pb.h \
  228. google/protobuf/unittest_custom_options.pb.cc \
  229. google/protobuf/unittest_custom_options.pb.h \
  230. google/protobuf/unittest_lite_imports_nonlite.pb.cc \
  231. google/protobuf/unittest_lite_imports_nonlite.pb.h \
  232. google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \
  233. google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h
  234. BUILT_SOURCES = $(protoc_outputs)
  235. if USE_EXTERNAL_PROTOC
  236. unittest_proto_middleman: $(protoc_inputs)
  237. $(PROTOC) -I$(srcdir) --cpp_out=. $(protoc_inputs)
  238. touch unittest_proto_middleman
  239. else
  240. # This rule is a little weird. The first prereq is the protoc executable
  241. # and the rest are its inputs. Therefore, $^ -- which expands to the
  242. # list of prereqs -- is actually a valid command. We have to place "./" in
  243. # front of it in case protoc is in the current directory. protoc allows
  244. # flags to appear after input file names, so we happily stick the flags on
  245. # the end.
  246. #
  247. # For reference, if we didn't have to worry about VPATH (i.e., building from
  248. # a directory other than the package root), we could have just written this:
  249. # ./protoc$(EXEEXT) -I$(srcdir) --cpp_out=. $(protoc_inputs)
  250. unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs)
  251. ./$^ -I$(srcdir) --cpp_out=.
  252. touch unittest_proto_middleman
  253. endif
  254. $(protoc_outputs): unittest_proto_middleman
  255. COMMON_TEST_SOURCES = \
  256. google/protobuf/test_util.cc \
  257. google/protobuf/test_util.h \
  258. google/protobuf/testing/googletest.cc \
  259. google/protobuf/testing/googletest.h \
  260. google/protobuf/testing/file.cc \
  261. google/protobuf/testing/file.h
  262. check_PROGRAMS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test $(GZCHECKPROGRAMS)
  263. protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
  264. $(top_builddir)/gtest/lib/libgtest.la \
  265. $(top_builddir)/gtest/lib/libgtest_main.la
  266. protobuf_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
  267. -I$(top_builddir)/gtest/include
  268. # Disable optimization for tests unless the user explicitly asked for it,
  269. # since test_util.cc takes forever to compile with optimization (with GCC).
  270. # See configure.ac for more info.
  271. protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
  272. protobuf_test_SOURCES = \
  273. google/protobuf/stubs/common_unittest.cc \
  274. google/protobuf/stubs/once_unittest.cc \
  275. google/protobuf/stubs/strutil_unittest.cc \
  276. google/protobuf/stubs/structurally_valid_unittest.cc \
  277. google/protobuf/descriptor_database_unittest.cc \
  278. google/protobuf/descriptor_unittest.cc \
  279. google/protobuf/dynamic_message_unittest.cc \
  280. google/protobuf/extension_set_unittest.cc \
  281. google/protobuf/generated_message_reflection_unittest.cc \
  282. google/protobuf/message_unittest.cc \
  283. google/protobuf/reflection_ops_unittest.cc \
  284. google/protobuf/repeated_field_unittest.cc \
  285. google/protobuf/text_format_unittest.cc \
  286. google/protobuf/unknown_field_set_unittest.cc \
  287. google/protobuf/wire_format_unittest.cc \
  288. google/protobuf/io/coded_stream_unittest.cc \
  289. google/protobuf/io/printer_unittest.cc \
  290. google/protobuf/io/tokenizer_unittest.cc \
  291. google/protobuf/io/zero_copy_stream_unittest.cc \
  292. google/protobuf/compiler/command_line_interface_unittest.cc \
  293. google/protobuf/compiler/importer_unittest.cc \
  294. google/protobuf/compiler/parser_unittest.cc \
  295. google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \
  296. google/protobuf/compiler/cpp/cpp_unittest.cc \
  297. $(COMMON_TEST_SOURCES)
  298. nodist_protobuf_test_SOURCES = $(protoc_outputs)
  299. # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
  300. protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
  301. $(top_builddir)/gtest/lib/libgtest.la \
  302. $(top_builddir)/gtest/lib/libgtest_main.la
  303. protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
  304. -I$(top_builddir)/gtest/include \
  305. -DPROTOBUF_TEST_NO_DESCRIPTORS
  306. protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
  307. protobuf_lazy_descriptor_test_SOURCES = \
  308. google/protobuf/compiler/cpp/cpp_unittest.cc \
  309. $(COMMON_TEST_SOURCES)
  310. nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs)
  311. # Build lite_unittest separately, since it doesn't use gtest.
  312. protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la
  313. protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
  314. protobuf_lite_test_SOURCES = \
  315. google/protobuf/lite_unittest.cc \
  316. google/protobuf/test_util_lite.cc \
  317. google/protobuf/test_util_lite.h
  318. nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs)
  319. if HAVE_ZLIB
  320. zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
  321. zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc
  322. zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
  323. zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc
  324. endif
  325. TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test $(GZTESTS)