temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1 | ## Process this file with automake to produce Makefile.in |
| 2 | |
kenton@google.com | e59427a | 2009-04-16 22:30:56 +0000 | [diff] [blame] | 3 | if HAVE_ZLIB |
| 4 | GZCHECKPROGRAMS = zcgzip zcgunzip |
| 5 | GZHEADERS = google/protobuf/io/gzip_stream.h |
| 6 | GZTESTS = google/protobuf/io/gzip_stream_unittest.sh |
| 7 | else |
| 8 | GZCHECKPROGRAMS = |
| 9 | GZHEADERS = |
| 10 | GZTESTS = |
| 11 | endif |
| 12 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 13 | if GCC |
| 14 | # These are good warnings to turn on by default |
kenton@google.com | 42c81e1 | 2009-05-06 01:15:06 +0000 | [diff] [blame] | 15 | NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 16 | else |
kenton@google.com | 42c81e1 | 2009-05-06 01:15:06 +0000 | [diff] [blame] | 17 | NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 18 | endif |
| 19 | |
kenton@google.com | 42c81e1 | 2009-05-06 01:15:06 +0000 | [diff] [blame] | 20 | AM_CXXFLAGS = $(NO_OPT_CXXFLAGS) $(PROTOBUF_OPT_FLAG) |
| 21 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 22 | AM_LDFLAGS = $(PTHREAD_CFLAGS) |
| 23 | |
| 24 | # If I say "dist_include_DATA", automake complains that $(includedir) is not |
| 25 | # a "legitimate" directory for DATA. Screw you, automake. |
| 26 | protodir = $(includedir) |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 27 | nobase_dist_proto_DATA = google/protobuf/descriptor.proto \ |
| 28 | google/protobuf/compiler/plugin.proto |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 29 | |
| 30 | # Not sure why these don't get cleaned automatically. |
| 31 | clean-local: |
| 32 | rm -f *.loT |
| 33 | |
kenton@google.com | d2fcbba | 2010-01-04 19:47:18 +0000 | [diff] [blame] | 34 | CLEANFILES = $(protoc_outputs) unittest_proto_middleman \ |
| 35 | testzip.jar testzip.list testzip.proto testzip.zip |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 36 | |
| 37 | MAINTAINERCLEANFILES = \ |
| 38 | Makefile.in |
| 39 | |
| 40 | nobase_include_HEADERS = \ |
| 41 | google/protobuf/stubs/common.h \ |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 42 | google/protobuf/stubs/once.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 43 | google/protobuf/descriptor.h \ |
| 44 | google/protobuf/descriptor.pb.h \ |
| 45 | google/protobuf/descriptor_database.h \ |
| 46 | google/protobuf/dynamic_message.h \ |
| 47 | google/protobuf/extension_set.h \ |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 48 | google/protobuf/generated_message_util.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 49 | google/protobuf/generated_message_reflection.h \ |
| 50 | google/protobuf/message.h \ |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 51 | google/protobuf/message_lite.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 52 | google/protobuf/reflection_ops.h \ |
| 53 | google/protobuf/repeated_field.h \ |
| 54 | google/protobuf/service.h \ |
| 55 | google/protobuf/text_format.h \ |
| 56 | google/protobuf/unknown_field_set.h \ |
| 57 | google/protobuf/wire_format.h \ |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 58 | google/protobuf/wire_format_lite.h \ |
| 59 | google/protobuf/wire_format_lite_inl.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 60 | google/protobuf/io/coded_stream.h \ |
kenton@google.com | e59427a | 2009-04-16 22:30:56 +0000 | [diff] [blame] | 61 | $(GZHEADERS) \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 62 | google/protobuf/io/printer.h \ |
| 63 | google/protobuf/io/tokenizer.h \ |
| 64 | google/protobuf/io/zero_copy_stream.h \ |
| 65 | google/protobuf/io/zero_copy_stream_impl.h \ |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 66 | google/protobuf/io/zero_copy_stream_impl_lite.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 67 | google/protobuf/compiler/code_generator.h \ |
| 68 | google/protobuf/compiler/command_line_interface.h \ |
| 69 | google/protobuf/compiler/importer.h \ |
| 70 | google/protobuf/compiler/parser.h \ |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 71 | google/protobuf/compiler/plugin.h \ |
| 72 | google/protobuf/compiler/plugin.pb.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 73 | google/protobuf/compiler/cpp/cpp_generator.h \ |
| 74 | google/protobuf/compiler/java/java_generator.h \ |
| 75 | google/protobuf/compiler/python/python_generator.h |
| 76 | |
kenton@google.com | 858a22b | 2009-07-29 02:21:47 +0000 | [diff] [blame] | 77 | lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 78 | |
kenton@google.com | 858a22b | 2009-07-29 02:21:47 +0000 | [diff] [blame] | 79 | libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) |
kenton@google.com | c0ee4d2 | 2009-12-22 02:05:33 +0000 | [diff] [blame] | 80 | libprotobuf_lite_la_LDFLAGS = -version-info 6:0:0 -export-dynamic -no-undefined |
kenton@google.com | 858a22b | 2009-07-29 02:21:47 +0000 | [diff] [blame] | 81 | libprotobuf_lite_la_SOURCES = \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 82 | google/protobuf/stubs/common.cc \ |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 83 | google/protobuf/stubs/once.cc \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 84 | google/protobuf/stubs/hash.cc \ |
| 85 | google/protobuf/stubs/hash.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 86 | google/protobuf/stubs/map-util.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 87 | google/protobuf/stubs/stl_util-inl.h \ |
kenton@google.com | 858a22b | 2009-07-29 02:21:47 +0000 | [diff] [blame] | 88 | google/protobuf/extension_set.cc \ |
| 89 | google/protobuf/generated_message_util.cc \ |
| 90 | google/protobuf/message_lite.cc \ |
| 91 | google/protobuf/repeated_field.cc \ |
| 92 | google/protobuf/wire_format_lite.cc \ |
| 93 | google/protobuf/io/coded_stream.cc \ |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 94 | google/protobuf/io/coded_stream_inl.h \ |
kenton@google.com | 858a22b | 2009-07-29 02:21:47 +0000 | [diff] [blame] | 95 | google/protobuf/io/zero_copy_stream.cc \ |
| 96 | google/protobuf/io/zero_copy_stream_impl_lite.cc |
| 97 | |
| 98 | libprotobuf_la_LIBADD = $(PTHREAD_LIBS) |
kenton@google.com | c0ee4d2 | 2009-12-22 02:05:33 +0000 | [diff] [blame] | 99 | libprotobuf_la_LDFLAGS = -version-info 6:0:0 -export-dynamic -no-undefined |
kenton@google.com | 858a22b | 2009-07-29 02:21:47 +0000 | [diff] [blame] | 100 | libprotobuf_la_SOURCES = \ |
| 101 | $(libprotobuf_lite_la_SOURCES) \ |
kenton@google.com | 4f3491e | 2009-07-29 21:33:08 +0000 | [diff] [blame] | 102 | google/protobuf/stubs/strutil.cc \ |
| 103 | google/protobuf/stubs/strutil.h \ |
| 104 | google/protobuf/stubs/substitute.cc \ |
| 105 | google/protobuf/stubs/substitute.h \ |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 106 | google/protobuf/stubs/structurally_valid.cc \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 107 | google/protobuf/descriptor.cc \ |
| 108 | google/protobuf/descriptor.pb.cc \ |
| 109 | google/protobuf/descriptor_database.cc \ |
| 110 | google/protobuf/dynamic_message.cc \ |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 111 | google/protobuf/extension_set_heavy.cc \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 112 | google/protobuf/generated_message_reflection.cc \ |
| 113 | google/protobuf/message.cc \ |
| 114 | google/protobuf/reflection_ops.cc \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 115 | google/protobuf/service.cc \ |
| 116 | google/protobuf/text_format.cc \ |
| 117 | google/protobuf/unknown_field_set.cc \ |
| 118 | google/protobuf/wire_format.cc \ |
kenton@google.com | e59427a | 2009-04-16 22:30:56 +0000 | [diff] [blame] | 119 | google/protobuf/io/gzip_stream.cc \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 120 | google/protobuf/io/printer.cc \ |
| 121 | google/protobuf/io/tokenizer.cc \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 122 | google/protobuf/io/zero_copy_stream_impl.cc \ |
| 123 | google/protobuf/compiler/importer.cc \ |
| 124 | google/protobuf/compiler/parser.cc |
| 125 | |
| 126 | libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la |
kenton@google.com | c0ee4d2 | 2009-12-22 02:05:33 +0000 | [diff] [blame] | 127 | libprotoc_la_LDFLAGS = -version-info 6:0:0 -export-dynamic -no-undefined |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 128 | libprotoc_la_SOURCES = \ |
| 129 | google/protobuf/compiler/code_generator.cc \ |
| 130 | google/protobuf/compiler/command_line_interface.cc \ |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 131 | google/protobuf/compiler/plugin.cc \ |
| 132 | google/protobuf/compiler/plugin.pb.cc \ |
| 133 | google/protobuf/compiler/subprocess.cc \ |
| 134 | google/protobuf/compiler/subprocess.h \ |
kenton@google.com | 5066322 | 2009-12-24 02:12:15 +0000 | [diff] [blame] | 135 | google/protobuf/compiler/zip_writer.cc \ |
| 136 | google/protobuf/compiler/zip_writer.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 137 | google/protobuf/compiler/cpp/cpp_enum.cc \ |
| 138 | google/protobuf/compiler/cpp/cpp_enum.h \ |
| 139 | google/protobuf/compiler/cpp/cpp_enum_field.cc \ |
| 140 | google/protobuf/compiler/cpp/cpp_enum_field.h \ |
| 141 | google/protobuf/compiler/cpp/cpp_extension.cc \ |
| 142 | google/protobuf/compiler/cpp/cpp_extension.h \ |
| 143 | google/protobuf/compiler/cpp/cpp_field.cc \ |
| 144 | google/protobuf/compiler/cpp/cpp_field.h \ |
| 145 | google/protobuf/compiler/cpp/cpp_file.cc \ |
| 146 | google/protobuf/compiler/cpp/cpp_file.h \ |
| 147 | google/protobuf/compiler/cpp/cpp_generator.cc \ |
| 148 | google/protobuf/compiler/cpp/cpp_helpers.cc \ |
| 149 | google/protobuf/compiler/cpp/cpp_helpers.h \ |
| 150 | google/protobuf/compiler/cpp/cpp_message.cc \ |
| 151 | google/protobuf/compiler/cpp/cpp_message.h \ |
| 152 | google/protobuf/compiler/cpp/cpp_message_field.cc \ |
| 153 | google/protobuf/compiler/cpp/cpp_message_field.h \ |
| 154 | google/protobuf/compiler/cpp/cpp_primitive_field.cc \ |
| 155 | google/protobuf/compiler/cpp/cpp_primitive_field.h \ |
| 156 | google/protobuf/compiler/cpp/cpp_service.cc \ |
| 157 | google/protobuf/compiler/cpp/cpp_service.h \ |
| 158 | google/protobuf/compiler/cpp/cpp_string_field.cc \ |
| 159 | google/protobuf/compiler/cpp/cpp_string_field.h \ |
| 160 | google/protobuf/compiler/java/java_enum.cc \ |
| 161 | google/protobuf/compiler/java/java_enum.h \ |
| 162 | google/protobuf/compiler/java/java_enum_field.cc \ |
| 163 | google/protobuf/compiler/java/java_enum_field.h \ |
| 164 | google/protobuf/compiler/java/java_extension.cc \ |
| 165 | google/protobuf/compiler/java/java_extension.h \ |
| 166 | google/protobuf/compiler/java/java_field.cc \ |
| 167 | google/protobuf/compiler/java/java_field.h \ |
| 168 | google/protobuf/compiler/java/java_file.cc \ |
| 169 | google/protobuf/compiler/java/java_file.h \ |
| 170 | google/protobuf/compiler/java/java_generator.cc \ |
| 171 | google/protobuf/compiler/java/java_helpers.cc \ |
| 172 | google/protobuf/compiler/java/java_helpers.h \ |
| 173 | google/protobuf/compiler/java/java_message.cc \ |
| 174 | google/protobuf/compiler/java/java_message.h \ |
| 175 | google/protobuf/compiler/java/java_message_field.cc \ |
| 176 | google/protobuf/compiler/java/java_message_field.h \ |
| 177 | google/protobuf/compiler/java/java_primitive_field.cc \ |
| 178 | google/protobuf/compiler/java/java_primitive_field.h \ |
| 179 | google/protobuf/compiler/java/java_service.cc \ |
| 180 | google/protobuf/compiler/java/java_service.h \ |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame^] | 181 | google/protobuf/compiler/java/java_string_field.cc \ |
| 182 | google/protobuf/compiler/java/java_string_field.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 183 | google/protobuf/compiler/python/python_generator.cc |
| 184 | |
| 185 | bin_PROGRAMS = protoc |
| 186 | protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la |
| 187 | protoc_SOURCES = google/protobuf/compiler/main.cc |
| 188 | |
| 189 | # Tests ============================================================== |
| 190 | |
| 191 | protoc_inputs = \ |
| 192 | google/protobuf/unittest.proto \ |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 193 | google/protobuf/unittest_empty.proto \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 194 | google/protobuf/unittest_import.proto \ |
| 195 | google/protobuf/unittest_mset.proto \ |
| 196 | google/protobuf/unittest_optimize_for.proto \ |
| 197 | google/protobuf/unittest_embed_optimize_for.proto \ |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 198 | google/protobuf/unittest_custom_options.proto \ |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 199 | google/protobuf/unittest_lite.proto \ |
| 200 | google/protobuf/unittest_import_lite.proto \ |
| 201 | google/protobuf/unittest_lite_imports_nonlite.proto \ |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 202 | google/protobuf/unittest_no_generic_services.proto \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 203 | google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto |
| 204 | |
| 205 | EXTRA_DIST = \ |
| 206 | $(protoc_inputs) \ |
| 207 | solaris/libstdc++.la \ |
kenton@google.com | e59427a | 2009-04-16 22:30:56 +0000 | [diff] [blame] | 208 | google/protobuf/io/gzip_stream.h \ |
| 209 | google/protobuf/io/gzip_stream_unittest.sh \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 210 | google/protobuf/testdata/golden_message \ |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 211 | google/protobuf/testdata/golden_packed_fields_message \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 212 | google/protobuf/testdata/text_format_unittest_data.txt \ |
| 213 | google/protobuf/testdata/text_format_unittest_extensions_data.txt \ |
| 214 | google/protobuf/package_info.h \ |
| 215 | google/protobuf/io/package_info.h \ |
kenton@google.com | 8aae2a2 | 2009-08-11 00:23:25 +0000 | [diff] [blame] | 216 | google/protobuf/compiler/package_info.h \ |
kenton@google.com | 2773bdf | 2010-01-07 04:14:34 +0000 | [diff] [blame] | 217 | google/protobuf/compiler/zip_output_unittest.sh \ |
kenton@google.com | 8aae2a2 | 2009-08-11 00:23:25 +0000 | [diff] [blame] | 218 | google/protobuf/unittest_enormous_descriptor.proto |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 219 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 220 | protoc_lite_outputs = \ |
| 221 | google/protobuf/unittest_lite.pb.cc \ |
| 222 | google/protobuf/unittest_lite.pb.h \ |
| 223 | google/protobuf/unittest_import_lite.pb.cc \ |
| 224 | google/protobuf/unittest_import_lite.pb.h |
| 225 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 226 | protoc_outputs = \ |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 227 | $(protoc_lite_outputs) \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 228 | google/protobuf/unittest.pb.cc \ |
| 229 | google/protobuf/unittest.pb.h \ |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 230 | google/protobuf/unittest_empty.pb.cc \ |
| 231 | google/protobuf/unittest_empty.pb.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 232 | google/protobuf/unittest_import.pb.cc \ |
| 233 | google/protobuf/unittest_import.pb.h \ |
| 234 | google/protobuf/unittest_mset.pb.cc \ |
| 235 | google/protobuf/unittest_mset.pb.h \ |
| 236 | google/protobuf/unittest_optimize_for.pb.cc \ |
| 237 | google/protobuf/unittest_optimize_for.pb.h \ |
| 238 | google/protobuf/unittest_embed_optimize_for.pb.cc \ |
| 239 | google/protobuf/unittest_embed_optimize_for.pb.h \ |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 240 | google/protobuf/unittest_custom_options.pb.cc \ |
| 241 | google/protobuf/unittest_custom_options.pb.h \ |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 242 | google/protobuf/unittest_lite_imports_nonlite.pb.cc \ |
| 243 | google/protobuf/unittest_lite_imports_nonlite.pb.h \ |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 244 | google/protobuf/unittest_no_generic_services.pb.cc \ |
| 245 | google/protobuf/unittest_no_generic_services.pb.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 246 | google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \ |
| 247 | google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h |
| 248 | |
| 249 | BUILT_SOURCES = $(protoc_outputs) |
| 250 | |
kenton@google.com | 9824eda | 2009-05-06 17:49:37 +0000 | [diff] [blame] | 251 | if USE_EXTERNAL_PROTOC |
| 252 | |
| 253 | unittest_proto_middleman: $(protoc_inputs) |
kenton@google.com | 721995d | 2009-09-11 22:08:40 +0000 | [diff] [blame] | 254 | $(PROTOC) -I$(srcdir) --cpp_out=. $^ |
kenton@google.com | 9824eda | 2009-05-06 17:49:37 +0000 | [diff] [blame] | 255 | touch unittest_proto_middleman |
| 256 | |
| 257 | else |
| 258 | |
kenton@google.com | 38fcd39 | 2010-01-08 04:48:19 +0000 | [diff] [blame] | 259 | # We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is |
| 260 | # relative to srcdir, which may not be the same as the current directory when |
| 261 | # building out-of-tree. |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 262 | unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs) |
kenton@google.com | 38fcd39 | 2010-01-08 04:48:19 +0000 | [diff] [blame] | 263 | oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) ) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 264 | touch unittest_proto_middleman |
| 265 | |
kenton@google.com | 9824eda | 2009-05-06 17:49:37 +0000 | [diff] [blame] | 266 | endif |
| 267 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 268 | $(protoc_outputs): unittest_proto_middleman |
| 269 | |
kenton@google.com | c5ff06c | 2009-04-28 03:06:41 +0000 | [diff] [blame] | 270 | COMMON_TEST_SOURCES = \ |
| 271 | google/protobuf/test_util.cc \ |
| 272 | google/protobuf/test_util.h \ |
| 273 | google/protobuf/testing/googletest.cc \ |
| 274 | google/protobuf/testing/googletest.h \ |
| 275 | google/protobuf/testing/file.cc \ |
| 276 | google/protobuf/testing/file.h |
| 277 | |
kenton@google.com | d2fcbba | 2010-01-04 19:47:18 +0000 | [diff] [blame] | 278 | check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ |
| 279 | protobuf-lite-test test_plugin $(GZCHECKPROGRAMS) |
kenton@google.com | 37ad00d | 2009-04-21 21:00:39 +0000 | [diff] [blame] | 280 | protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ |
| 281 | $(top_builddir)/gtest/lib/libgtest.la \ |
| 282 | $(top_builddir)/gtest/lib/libgtest_main.la |
| 283 | protobuf_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \ |
| 284 | -I$(top_builddir)/gtest/include |
kenton@google.com | 42c81e1 | 2009-05-06 01:15:06 +0000 | [diff] [blame] | 285 | # Disable optimization for tests unless the user explicitly asked for it, |
| 286 | # since test_util.cc takes forever to compile with optimization (with GCC). |
| 287 | # See configure.ac for more info. |
| 288 | protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 289 | protobuf_test_SOURCES = \ |
| 290 | google/protobuf/stubs/common_unittest.cc \ |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 291 | google/protobuf/stubs/once_unittest.cc \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 292 | google/protobuf/stubs/strutil_unittest.cc \ |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 293 | google/protobuf/stubs/structurally_valid_unittest.cc \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 294 | google/protobuf/descriptor_database_unittest.cc \ |
| 295 | google/protobuf/descriptor_unittest.cc \ |
| 296 | google/protobuf/dynamic_message_unittest.cc \ |
| 297 | google/protobuf/extension_set_unittest.cc \ |
| 298 | google/protobuf/generated_message_reflection_unittest.cc \ |
| 299 | google/protobuf/message_unittest.cc \ |
| 300 | google/protobuf/reflection_ops_unittest.cc \ |
| 301 | google/protobuf/repeated_field_unittest.cc \ |
| 302 | google/protobuf/text_format_unittest.cc \ |
| 303 | google/protobuf/unknown_field_set_unittest.cc \ |
| 304 | google/protobuf/wire_format_unittest.cc \ |
| 305 | google/protobuf/io/coded_stream_unittest.cc \ |
| 306 | google/protobuf/io/printer_unittest.cc \ |
| 307 | google/protobuf/io/tokenizer_unittest.cc \ |
| 308 | google/protobuf/io/zero_copy_stream_unittest.cc \ |
| 309 | google/protobuf/compiler/command_line_interface_unittest.cc \ |
| 310 | google/protobuf/compiler/importer_unittest.cc \ |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 311 | google/protobuf/compiler/mock_code_generator.cc \ |
| 312 | google/protobuf/compiler/mock_code_generator.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 313 | google/protobuf/compiler/parser_unittest.cc \ |
| 314 | google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \ |
| 315 | google/protobuf/compiler/cpp/cpp_unittest.cc \ |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 316 | google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \ |
| 317 | google/protobuf/compiler/java/java_plugin_unittest.cc \ |
| 318 | google/protobuf/compiler/python/python_plugin_unittest.cc \ |
kenton@google.com | c5ff06c | 2009-04-28 03:06:41 +0000 | [diff] [blame] | 319 | $(COMMON_TEST_SOURCES) |
| 320 | nodist_protobuf_test_SOURCES = $(protoc_outputs) |
| 321 | |
| 322 | # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. |
| 323 | protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ |
| 324 | $(top_builddir)/gtest/lib/libgtest.la \ |
| 325 | $(top_builddir)/gtest/lib/libgtest_main.la |
| 326 | protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \ |
| 327 | -I$(top_builddir)/gtest/include \ |
| 328 | -DPROTOBUF_TEST_NO_DESCRIPTORS |
kenton@google.com | 4f3491e | 2009-07-29 21:33:08 +0000 | [diff] [blame] | 329 | protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) |
kenton@google.com | c5ff06c | 2009-04-28 03:06:41 +0000 | [diff] [blame] | 330 | protobuf_lazy_descriptor_test_SOURCES = \ |
| 331 | google/protobuf/compiler/cpp/cpp_unittest.cc \ |
| 332 | $(COMMON_TEST_SOURCES) |
| 333 | nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 334 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 335 | # Build lite_unittest separately, since it doesn't use gtest. |
kenton@google.com | 858a22b | 2009-07-29 02:21:47 +0000 | [diff] [blame] | 336 | protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la |
kenton@google.com | 4f3491e | 2009-07-29 21:33:08 +0000 | [diff] [blame] | 337 | protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 338 | protobuf_lite_test_SOURCES = \ |
| 339 | google/protobuf/lite_unittest.cc \ |
| 340 | google/protobuf/test_util_lite.cc \ |
| 341 | google/protobuf/test_util_lite.h |
| 342 | nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs) |
| 343 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 344 | # Test plugin binary. |
| 345 | test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ |
| 346 | $(top_builddir)/gtest/lib/libgtest.la |
kenton@google.com | 83ad01e | 2009-12-18 02:40:43 +0000 | [diff] [blame] | 347 | test_plugin_CPPFLAGS = -I$(top_srcdir)/gtest/include \ |
| 348 | -I$(top_builddir)/gtest/include |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 349 | test_plugin_SOURCES = \ |
| 350 | google/protobuf/compiler/mock_code_generator.cc \ |
| 351 | google/protobuf/testing/file.cc \ |
| 352 | google/protobuf/testing/file.h \ |
| 353 | google/protobuf/compiler/test_plugin.cc |
| 354 | |
kenton@google.com | e59427a | 2009-04-16 22:30:56 +0000 | [diff] [blame] | 355 | if HAVE_ZLIB |
| 356 | zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la |
| 357 | zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc |
| 358 | |
| 359 | zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la |
| 360 | zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc |
| 361 | endif |
| 362 | |
kenton@google.com | d2fcbba | 2010-01-04 19:47:18 +0000 | [diff] [blame] | 363 | TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \ |
| 364 | google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) |