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 |
| 15 | AM_CXXFLAGS = $(PTHREAD_CFLAGS) -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare |
| 16 | else |
| 17 | AM_CXXFLAGS = $(PTHREAD_CFLAGS) |
| 18 | endif |
| 19 | |
| 20 | AM_LDFLAGS = $(PTHREAD_CFLAGS) |
| 21 | |
| 22 | # If I say "dist_include_DATA", automake complains that $(includedir) is not |
| 23 | # a "legitimate" directory for DATA. Screw you, automake. |
| 24 | protodir = $(includedir) |
| 25 | nobase_dist_proto_DATA = google/protobuf/descriptor.proto |
| 26 | |
| 27 | # Not sure why these don't get cleaned automatically. |
| 28 | clean-local: |
| 29 | rm -f *.loT |
| 30 | |
| 31 | CLEANFILES = $(protoc_outputs) unittest_proto_middleman |
| 32 | |
| 33 | MAINTAINERCLEANFILES = \ |
| 34 | Makefile.in |
| 35 | |
| 36 | nobase_include_HEADERS = \ |
| 37 | google/protobuf/stubs/common.h \ |
| 38 | google/protobuf/descriptor.h \ |
| 39 | google/protobuf/descriptor.pb.h \ |
| 40 | google/protobuf/descriptor_database.h \ |
| 41 | google/protobuf/dynamic_message.h \ |
| 42 | google/protobuf/extension_set.h \ |
| 43 | google/protobuf/generated_message_reflection.h \ |
| 44 | google/protobuf/message.h \ |
| 45 | google/protobuf/reflection_ops.h \ |
| 46 | google/protobuf/repeated_field.h \ |
| 47 | google/protobuf/service.h \ |
| 48 | google/protobuf/text_format.h \ |
| 49 | google/protobuf/unknown_field_set.h \ |
| 50 | google/protobuf/wire_format.h \ |
| 51 | google/protobuf/wire_format_inl.h \ |
| 52 | google/protobuf/io/coded_stream.h \ |
kenton@google.com | e59427a | 2009-04-16 22:30:56 +0000 | [diff] [blame^] | 53 | $(GZHEADERS) \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 54 | google/protobuf/io/printer.h \ |
| 55 | google/protobuf/io/tokenizer.h \ |
| 56 | google/protobuf/io/zero_copy_stream.h \ |
| 57 | google/protobuf/io/zero_copy_stream_impl.h \ |
| 58 | google/protobuf/compiler/code_generator.h \ |
| 59 | google/protobuf/compiler/command_line_interface.h \ |
| 60 | google/protobuf/compiler/importer.h \ |
| 61 | google/protobuf/compiler/parser.h \ |
| 62 | google/protobuf/compiler/cpp/cpp_generator.h \ |
| 63 | google/protobuf/compiler/java/java_generator.h \ |
| 64 | google/protobuf/compiler/python/python_generator.h |
| 65 | |
| 66 | lib_LTLIBRARIES = libprotobuf.la libprotoc.la |
| 67 | |
| 68 | libprotobuf_la_LIBADD = $(PTHREAD_LIBS) |
kenton@google.com | a001ed0 | 2008-12-01 23:47:49 +0000 | [diff] [blame] | 69 | libprotobuf_la_LDFLAGS = -version-info 3:0:0 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 70 | libprotobuf_la_SOURCES = \ |
| 71 | google/protobuf/stubs/common.cc \ |
| 72 | google/protobuf/stubs/hash.cc \ |
| 73 | google/protobuf/stubs/hash.h \ |
| 74 | google/protobuf/stubs/map-util.cc \ |
| 75 | google/protobuf/stubs/map-util.h \ |
| 76 | google/protobuf/stubs/stl_util-inl.cc \ |
| 77 | google/protobuf/stubs/stl_util-inl.h \ |
| 78 | google/protobuf/stubs/substitute.cc \ |
| 79 | google/protobuf/stubs/substitute.h \ |
| 80 | google/protobuf/stubs/strutil.cc \ |
| 81 | google/protobuf/stubs/strutil.h \ |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 82 | google/protobuf/stubs/structurally_valid.cc \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 83 | google/protobuf/descriptor.cc \ |
| 84 | google/protobuf/descriptor.pb.cc \ |
| 85 | google/protobuf/descriptor_database.cc \ |
| 86 | google/protobuf/dynamic_message.cc \ |
| 87 | google/protobuf/extension_set.cc \ |
| 88 | google/protobuf/generated_message_reflection.cc \ |
| 89 | google/protobuf/message.cc \ |
| 90 | google/protobuf/reflection_ops.cc \ |
| 91 | google/protobuf/repeated_field.cc \ |
| 92 | google/protobuf/service.cc \ |
| 93 | google/protobuf/text_format.cc \ |
| 94 | google/protobuf/unknown_field_set.cc \ |
| 95 | google/protobuf/wire_format.cc \ |
| 96 | google/protobuf/io/coded_stream.cc \ |
kenton@google.com | e59427a | 2009-04-16 22:30:56 +0000 | [diff] [blame^] | 97 | google/protobuf/io/gzip_stream.cc \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 98 | google/protobuf/io/printer.cc \ |
| 99 | google/protobuf/io/tokenizer.cc \ |
| 100 | google/protobuf/io/zero_copy_stream.cc \ |
| 101 | google/protobuf/io/zero_copy_stream_impl.cc \ |
| 102 | google/protobuf/compiler/importer.cc \ |
| 103 | google/protobuf/compiler/parser.cc |
| 104 | |
| 105 | libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la |
kenton@google.com | a001ed0 | 2008-12-01 23:47:49 +0000 | [diff] [blame] | 106 | libprotoc_la_LDFLAGS = -version-info 3:0:0 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 107 | libprotoc_la_SOURCES = \ |
| 108 | google/protobuf/compiler/code_generator.cc \ |
| 109 | google/protobuf/compiler/command_line_interface.cc \ |
| 110 | google/protobuf/compiler/cpp/cpp_enum.cc \ |
| 111 | google/protobuf/compiler/cpp/cpp_enum.h \ |
| 112 | google/protobuf/compiler/cpp/cpp_enum_field.cc \ |
| 113 | google/protobuf/compiler/cpp/cpp_enum_field.h \ |
| 114 | google/protobuf/compiler/cpp/cpp_extension.cc \ |
| 115 | google/protobuf/compiler/cpp/cpp_extension.h \ |
| 116 | google/protobuf/compiler/cpp/cpp_field.cc \ |
| 117 | google/protobuf/compiler/cpp/cpp_field.h \ |
| 118 | google/protobuf/compiler/cpp/cpp_file.cc \ |
| 119 | google/protobuf/compiler/cpp/cpp_file.h \ |
| 120 | google/protobuf/compiler/cpp/cpp_generator.cc \ |
| 121 | google/protobuf/compiler/cpp/cpp_helpers.cc \ |
| 122 | google/protobuf/compiler/cpp/cpp_helpers.h \ |
| 123 | google/protobuf/compiler/cpp/cpp_message.cc \ |
| 124 | google/protobuf/compiler/cpp/cpp_message.h \ |
| 125 | google/protobuf/compiler/cpp/cpp_message_field.cc \ |
| 126 | google/protobuf/compiler/cpp/cpp_message_field.h \ |
| 127 | google/protobuf/compiler/cpp/cpp_primitive_field.cc \ |
| 128 | google/protobuf/compiler/cpp/cpp_primitive_field.h \ |
| 129 | google/protobuf/compiler/cpp/cpp_service.cc \ |
| 130 | google/protobuf/compiler/cpp/cpp_service.h \ |
| 131 | google/protobuf/compiler/cpp/cpp_string_field.cc \ |
| 132 | google/protobuf/compiler/cpp/cpp_string_field.h \ |
| 133 | google/protobuf/compiler/java/java_enum.cc \ |
| 134 | google/protobuf/compiler/java/java_enum.h \ |
| 135 | google/protobuf/compiler/java/java_enum_field.cc \ |
| 136 | google/protobuf/compiler/java/java_enum_field.h \ |
| 137 | google/protobuf/compiler/java/java_extension.cc \ |
| 138 | google/protobuf/compiler/java/java_extension.h \ |
| 139 | google/protobuf/compiler/java/java_field.cc \ |
| 140 | google/protobuf/compiler/java/java_field.h \ |
| 141 | google/protobuf/compiler/java/java_file.cc \ |
| 142 | google/protobuf/compiler/java/java_file.h \ |
| 143 | google/protobuf/compiler/java/java_generator.cc \ |
| 144 | google/protobuf/compiler/java/java_helpers.cc \ |
| 145 | google/protobuf/compiler/java/java_helpers.h \ |
| 146 | google/protobuf/compiler/java/java_message.cc \ |
| 147 | google/protobuf/compiler/java/java_message.h \ |
| 148 | google/protobuf/compiler/java/java_message_field.cc \ |
| 149 | google/protobuf/compiler/java/java_message_field.h \ |
| 150 | google/protobuf/compiler/java/java_primitive_field.cc \ |
| 151 | google/protobuf/compiler/java/java_primitive_field.h \ |
| 152 | google/protobuf/compiler/java/java_service.cc \ |
| 153 | google/protobuf/compiler/java/java_service.h \ |
| 154 | google/protobuf/compiler/python/python_generator.cc |
| 155 | |
| 156 | bin_PROGRAMS = protoc |
| 157 | protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la |
| 158 | protoc_SOURCES = google/protobuf/compiler/main.cc |
| 159 | |
| 160 | # Tests ============================================================== |
| 161 | |
| 162 | protoc_inputs = \ |
| 163 | google/protobuf/unittest.proto \ |
| 164 | google/protobuf/unittest_import.proto \ |
| 165 | google/protobuf/unittest_mset.proto \ |
| 166 | google/protobuf/unittest_optimize_for.proto \ |
| 167 | google/protobuf/unittest_embed_optimize_for.proto \ |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 168 | google/protobuf/unittest_custom_options.proto \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 169 | google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto |
| 170 | |
| 171 | EXTRA_DIST = \ |
| 172 | $(protoc_inputs) \ |
| 173 | solaris/libstdc++.la \ |
kenton@google.com | e59427a | 2009-04-16 22:30:56 +0000 | [diff] [blame^] | 174 | google/protobuf/io/gzip_stream.h \ |
| 175 | google/protobuf/io/gzip_stream_unittest.sh \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 176 | google/protobuf/testdata/golden_message \ |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 177 | google/protobuf/testdata/golden_packed_fields_message \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 178 | google/protobuf/testdata/text_format_unittest_data.txt \ |
| 179 | google/protobuf/testdata/text_format_unittest_extensions_data.txt \ |
| 180 | google/protobuf/package_info.h \ |
| 181 | google/protobuf/io/package_info.h \ |
| 182 | google/protobuf/compiler/package_info.h \ |
| 183 | gtest/CHANGES \ |
| 184 | gtest/CONTRIBUTORS \ |
| 185 | gtest/COPYING \ |
| 186 | gtest/README \ |
| 187 | gtest/gen_gtest_pred_impl.py |
| 188 | |
| 189 | protoc_outputs = \ |
| 190 | google/protobuf/unittest.pb.cc \ |
| 191 | google/protobuf/unittest.pb.h \ |
| 192 | google/protobuf/unittest_import.pb.cc \ |
| 193 | google/protobuf/unittest_import.pb.h \ |
| 194 | google/protobuf/unittest_mset.pb.cc \ |
| 195 | google/protobuf/unittest_mset.pb.h \ |
| 196 | google/protobuf/unittest_optimize_for.pb.cc \ |
| 197 | google/protobuf/unittest_optimize_for.pb.h \ |
| 198 | google/protobuf/unittest_embed_optimize_for.pb.cc \ |
| 199 | google/protobuf/unittest_embed_optimize_for.pb.h \ |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 200 | google/protobuf/unittest_custom_options.pb.cc \ |
| 201 | google/protobuf/unittest_custom_options.pb.h \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 202 | google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \ |
| 203 | google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h |
| 204 | |
| 205 | BUILT_SOURCES = $(protoc_outputs) |
| 206 | |
| 207 | # This rule is a little weird. The first prereq is the protoc executable |
| 208 | # and the rest are its inputs. Therefore, $^ -- which expands to the |
| 209 | # list of prereqs -- is actually a valid command. We have to place "./" in |
| 210 | # front of it in case protoc is in the current directory. protoc allows |
| 211 | # flags to appear after input file names, so we happily stick the flags on |
| 212 | # the end. |
| 213 | # |
| 214 | # For reference, if we didn't have to worry about VPATH (i.e., building from |
| 215 | # a directory other than the package root), we could have just written this: |
| 216 | # ./protoc$(EXEEXT) -I$(srcdir) --cpp_out=. $(protoc_inputs) |
| 217 | unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs) |
| 218 | ./$^ -I$(srcdir) --cpp_out=. |
| 219 | touch unittest_proto_middleman |
| 220 | |
| 221 | $(protoc_outputs): unittest_proto_middleman |
| 222 | |
kenton@google.com | e59427a | 2009-04-16 22:30:56 +0000 | [diff] [blame^] | 223 | check_PROGRAMS = protobuf-test $(GZCHECKPROGRAMS) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 224 | protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la |
| 225 | protobuf_test_SOURCES = \ |
| 226 | google/protobuf/stubs/common_unittest.cc \ |
| 227 | google/protobuf/stubs/strutil_unittest.cc \ |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 228 | google/protobuf/stubs/structurally_valid_unittest.cc \ |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 229 | google/protobuf/descriptor_database_unittest.cc \ |
| 230 | google/protobuf/descriptor_unittest.cc \ |
| 231 | google/protobuf/dynamic_message_unittest.cc \ |
| 232 | google/protobuf/extension_set_unittest.cc \ |
| 233 | google/protobuf/generated_message_reflection_unittest.cc \ |
| 234 | google/protobuf/message_unittest.cc \ |
| 235 | google/protobuf/reflection_ops_unittest.cc \ |
| 236 | google/protobuf/repeated_field_unittest.cc \ |
| 237 | google/protobuf/text_format_unittest.cc \ |
| 238 | google/protobuf/unknown_field_set_unittest.cc \ |
| 239 | google/protobuf/wire_format_unittest.cc \ |
| 240 | google/protobuf/io/coded_stream_unittest.cc \ |
| 241 | google/protobuf/io/printer_unittest.cc \ |
| 242 | google/protobuf/io/tokenizer_unittest.cc \ |
| 243 | google/protobuf/io/zero_copy_stream_unittest.cc \ |
| 244 | google/protobuf/compiler/command_line_interface_unittest.cc \ |
| 245 | google/protobuf/compiler/importer_unittest.cc \ |
| 246 | google/protobuf/compiler/parser_unittest.cc \ |
| 247 | google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \ |
| 248 | google/protobuf/compiler/cpp/cpp_unittest.cc \ |
| 249 | google/protobuf/test_util.cc \ |
| 250 | google/protobuf/test_util.h \ |
| 251 | google/protobuf/testing/googletest.cc \ |
| 252 | google/protobuf/testing/googletest.h \ |
| 253 | google/protobuf/testing/file.cc \ |
| 254 | google/protobuf/testing/file.h \ |
| 255 | gtest/gtest.cc \ |
| 256 | gtest/gtest.h \ |
| 257 | gtest/gtest-death-test.cc \ |
| 258 | gtest/gtest-death-test.h \ |
| 259 | gtest/gtest-filepath.cc \ |
| 260 | gtest/gtest-internal-inl.h \ |
| 261 | gtest/gtest-message.h \ |
| 262 | gtest/gtest-port.cc \ |
| 263 | gtest/gtest-spi.h \ |
| 264 | gtest/gtest_main.cc \ |
| 265 | gtest/gtest_pred_impl.h \ |
| 266 | gtest/gtest_prod.h \ |
| 267 | gtest/internal/gtest-death-test-internal.h \ |
| 268 | gtest/internal/gtest-filepath.h \ |
| 269 | gtest/internal/gtest-internal.h \ |
| 270 | gtest/internal/gtest-port.h \ |
| 271 | gtest/internal/gtest-string.h |
| 272 | |
kenton@google.com | e59427a | 2009-04-16 22:30:56 +0000 | [diff] [blame^] | 273 | if HAVE_ZLIB |
| 274 | zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la |
| 275 | zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc |
| 276 | |
| 277 | zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la |
| 278 | zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc |
| 279 | endif |
| 280 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 281 | nodist_protobuf_test_SOURCES = $(protoc_outputs) |
| 282 | |
kenton@google.com | e59427a | 2009-04-16 22:30:56 +0000 | [diff] [blame^] | 283 | TESTS = protobuf-test $(GZTESTS) |