~ubuntu-branches/debian/squeeze/protobuf/squeeze

« back to all changes in this revision

Viewing changes to src/Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Robert S. Edmonds
  • Date: 2010-01-25 18:14:49 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100125181449-98wvlw14imerlej8
Tags: 2.3.0-1
* New upstream version.
* Split out libprotobuf-lite from the libprotobuf package.
* Add CFLAGS specific to sh4; closes: #560322.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
# If I say "dist_include_DATA", automake complains that $(includedir) is not
25
25
# a "legitimate" directory for DATA.  Screw you, automake.
26
26
protodir = $(includedir)
27
 
nobase_dist_proto_DATA = google/protobuf/descriptor.proto
 
27
nobase_dist_proto_DATA = google/protobuf/descriptor.proto \
 
28
                         google/protobuf/compiler/plugin.proto
28
29
 
29
30
# Not sure why these don't get cleaned automatically.
30
31
clean-local:
31
32
        rm -f *.loT
32
33
 
33
 
CLEANFILES = $(protoc_outputs) unittest_proto_middleman
 
34
CLEANFILES = $(protoc_outputs) unittest_proto_middleman \
 
35
             testzip.jar testzip.list testzip.proto testzip.zip
34
36
 
35
37
MAINTAINERCLEANFILES =   \
36
38
  Makefile.in
66
68
  google/protobuf/compiler/command_line_interface.h            \
67
69
  google/protobuf/compiler/importer.h                          \
68
70
  google/protobuf/compiler/parser.h                            \
 
71
  google/protobuf/compiler/plugin.h                            \
 
72
  google/protobuf/compiler/plugin.pb.h                         \
69
73
  google/protobuf/compiler/cpp/cpp_generator.h                 \
70
74
  google/protobuf/compiler/java/java_generator.h               \
71
75
  google/protobuf/compiler/python/python_generator.h
73
77
lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
74
78
 
75
79
libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
76
 
libprotobuf_lite_la_LDFLAGS = -version-info 5:0:0
 
80
libprotobuf_lite_la_LDFLAGS = -version-info 6:0:0 -export-dynamic -no-undefined
77
81
libprotobuf_lite_la_SOURCES =                                  \
78
82
  google/protobuf/stubs/common.cc                              \
79
83
  google/protobuf/stubs/once.cc                                \
87
91
  google/protobuf/repeated_field.cc                            \
88
92
  google/protobuf/wire_format_lite.cc                          \
89
93
  google/protobuf/io/coded_stream.cc                           \
 
94
  google/protobuf/io/coded_stream_inl.h                        \
90
95
  google/protobuf/io/zero_copy_stream.cc                       \
91
96
  google/protobuf/io/zero_copy_stream_impl_lite.cc
92
97
 
93
98
libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
94
 
libprotobuf_la_LDFLAGS = -version-info 5:0:0
 
99
libprotobuf_la_LDFLAGS = -version-info 6:0:0 -export-dynamic -no-undefined
95
100
libprotobuf_la_SOURCES =                                       \
96
101
  $(libprotobuf_lite_la_SOURCES)                               \
97
102
  google/protobuf/stubs/strutil.cc                             \
119
124
  google/protobuf/compiler/parser.cc
120
125
 
121
126
libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
122
 
libprotoc_la_LDFLAGS = -version-info 5:0:0
 
127
libprotoc_la_LDFLAGS = -version-info 6:0:0 -export-dynamic -no-undefined
123
128
libprotoc_la_SOURCES =                                         \
124
129
  google/protobuf/compiler/code_generator.cc                   \
125
130
  google/protobuf/compiler/command_line_interface.cc           \
 
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                        \
 
135
  google/protobuf/compiler/zip_writer.cc                       \
 
136
  google/protobuf/compiler/zip_writer.h                        \
126
137
  google/protobuf/compiler/cpp/cpp_enum.cc                     \
127
138
  google/protobuf/compiler/cpp/cpp_enum.h                      \
128
139
  google/protobuf/compiler/cpp/cpp_enum_field.cc               \
186
197
  google/protobuf/unittest_lite.proto                          \
187
198
  google/protobuf/unittest_import_lite.proto                   \
188
199
  google/protobuf/unittest_lite_imports_nonlite.proto          \
 
200
  google/protobuf/unittest_no_generic_services.proto           \
189
201
  google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto
190
202
 
191
203
EXTRA_DIST =                                                   \
200
212
  google/protobuf/package_info.h                               \
201
213
  google/protobuf/io/package_info.h                            \
202
214
  google/protobuf/compiler/package_info.h                      \
 
215
  google/protobuf/compiler/zip_output_unittest.sh              \
203
216
  google/protobuf/unittest_enormous_descriptor.proto
204
217
 
205
218
protoc_lite_outputs =                                          \
226
239
  google/protobuf/unittest_custom_options.pb.h                 \
227
240
  google/protobuf/unittest_lite_imports_nonlite.pb.cc          \
228
241
  google/protobuf/unittest_lite_imports_nonlite.pb.h           \
 
242
  google/protobuf/unittest_no_generic_services.pb.cc           \
 
243
  google/protobuf/unittest_no_generic_services.pb.h            \
229
244
  google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc  \
230
245
  google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h
231
246
 
234
249
if USE_EXTERNAL_PROTOC
235
250
 
236
251
unittest_proto_middleman: $(protoc_inputs)
237
 
        $(PROTOC) -I$(srcdir) --cpp_out=. $(protoc_inputs)
 
252
        $(PROTOC) -I$(srcdir) --cpp_out=. $^
238
253
        touch unittest_proto_middleman
239
254
 
240
255
else
241
256
 
242
 
# This rule is a little weird.  The first prereq is the protoc executable
243
 
# and the rest are its inputs.  Therefore, $^ -- which expands to the
244
 
# list of prereqs -- is actually a valid command.  We have to place "./" in
245
 
# front of it in case protoc is in the current directory.  protoc allows
246
 
# flags to appear after input file names, so we happily stick the flags on
247
 
# the end.
248
 
#
249
 
# For reference, if we didn't have to worry about VPATH (i.e., building from
250
 
# a directory other than the package root), we could have just written this:
251
 
#   ./protoc$(EXEEXT) -I$(srcdir) --cpp_out=. $(protoc_inputs)
 
257
# We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is
 
258
# relative to srcdir, which may not be the same as the current directory when
 
259
# building out-of-tree.
252
260
unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs)
253
 
        ./$^ -I$(srcdir) --cpp_out=.
 
261
        oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) )
254
262
        touch unittest_proto_middleman
255
263
 
256
264
endif
265
273
  google/protobuf/testing/file.cc                              \
266
274
  google/protobuf/testing/file.h
267
275
 
268
 
check_PROGRAMS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test $(GZCHECKPROGRAMS)
 
276
check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
 
277
                 protobuf-lite-test test_plugin $(GZCHECKPROGRAMS)
269
278
protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
270
279
                      $(top_builddir)/gtest/lib/libgtest.la       \
271
280
                      $(top_builddir)/gtest/lib/libgtest_main.la
297
306
  google/protobuf/io/zero_copy_stream_unittest.cc              \
298
307
  google/protobuf/compiler/command_line_interface_unittest.cc  \
299
308
  google/protobuf/compiler/importer_unittest.cc                \
 
309
  google/protobuf/compiler/mock_code_generator.cc              \
 
310
  google/protobuf/compiler/mock_code_generator.h               \
300
311
  google/protobuf/compiler/parser_unittest.cc                  \
301
312
  google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc       \
302
313
  google/protobuf/compiler/cpp/cpp_unittest.cc                 \
 
314
  google/protobuf/compiler/cpp/cpp_plugin_unittest.cc          \
 
315
  google/protobuf/compiler/java/java_plugin_unittest.cc        \
 
316
  google/protobuf/compiler/python/python_plugin_unittest.cc    \
303
317
  $(COMMON_TEST_SOURCES)
304
318
nodist_protobuf_test_SOURCES = $(protoc_outputs)
305
319
 
325
339
  google/protobuf/test_util_lite.h
326
340
nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs)
327
341
 
 
342
# Test plugin binary.
 
343
test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
 
344
                    $(top_builddir)/gtest/lib/libgtest.la
 
345
test_plugin_CPPFLAGS = -I$(top_srcdir)/gtest/include         \
 
346
                       -I$(top_builddir)/gtest/include
 
347
test_plugin_SOURCES =                                          \
 
348
  google/protobuf/compiler/mock_code_generator.cc              \
 
349
  google/protobuf/testing/file.cc                              \
 
350
  google/protobuf/testing/file.h                               \
 
351
  google/protobuf/compiler/test_plugin.cc
 
352
 
328
353
if HAVE_ZLIB
329
354
zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
330
355
zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc
333
358
zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc
334
359
endif
335
360
 
336
 
TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test $(GZTESTS)
 
361
TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
 
362
        google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS)