Anonymous avatar Anonymous committed 386d18f

Define libprotobuf-lite in Makefile.am.

TODO: Compile conditionally? Provide a way to omit ExtensionSet?
Should libprotobuf depend on libprotobuf-lite instead of being a
stand-alone lib?

Comments (0)

Files changed (1)

   google/protobuf/compiler/java/java_generator.h               \
   google/protobuf/compiler/python/python_generator.h
 
-lib_LTLIBRARIES = libprotobuf.la libprotoc.la
+lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
 
-# TODO(kenton):  Separate lite and full libraries.  Also make sure lite_unittest
-#   only links against the lite lib.
-libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
-libprotobuf_la_LDFLAGS = -version-info 3:0:0
-libprotobuf_la_SOURCES =                                       \
+libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
+libprotobuf_lite_la_LDFLAGS = -version-info 3:0:0
+libprotobuf_lite_la_SOURCES =                                  \
   google/protobuf/stubs/common.cc                              \
   google/protobuf/stubs/once.cc                                \
   google/protobuf/stubs/hash.cc                                \
   google/protobuf/stubs/map-util.h                             \
   google/protobuf/stubs/stl_util-inl.cc                        \
   google/protobuf/stubs/stl_util-inl.h                         \
+  google/protobuf/stubs/strutil.cc                             \
+  google/protobuf/stubs/strutil.h                              \
   google/protobuf/stubs/substitute.cc                          \
   google/protobuf/stubs/substitute.h                           \
-  google/protobuf/stubs/strutil.cc                             \
-  google/protobuf/stubs/strutil.h                              \
+  google/protobuf/extension_set.cc                             \
+  google/protobuf/generated_message_util.cc                    \
+  google/protobuf/message_lite.cc                              \
+  google/protobuf/repeated_field.cc                            \
+  google/protobuf/wire_format_lite.cc                          \
+  google/protobuf/io/coded_stream.cc                           \
+  google/protobuf/io/zero_copy_stream.cc                       \
+  google/protobuf/io/zero_copy_stream_impl_lite.cc
+
+libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
+libprotobuf_la_LDFLAGS = -version-info 3:0:0
+libprotobuf_la_SOURCES =                                       \
+  $(libprotobuf_lite_la_SOURCES)                               \
   google/protobuf/stubs/structurally_valid.cc                  \
   google/protobuf/descriptor.cc                                \
   google/protobuf/descriptor.pb.cc                             \
   google/protobuf/descriptor_database.cc                       \
   google/protobuf/dynamic_message.cc                           \
-  google/protobuf/extension_set.cc                             \
   google/protobuf/extension_set_heavy.cc                       \
-  google/protobuf/generated_message_util.cc                    \
   google/protobuf/generated_message_reflection.cc              \
   google/protobuf/message.cc                                   \
-  google/protobuf/message_lite.cc                              \
   google/protobuf/reflection_ops.cc                            \
-  google/protobuf/repeated_field.cc                            \
   google/protobuf/service.cc                                   \
   google/protobuf/text_format.cc                               \
   google/protobuf/unknown_field_set.cc                         \
   google/protobuf/wire_format.cc                               \
-  google/protobuf/wire_format_lite.cc                          \
-  google/protobuf/io/coded_stream.cc                           \
   google/protobuf/io/gzip_stream.cc                            \
   google/protobuf/io/printer.cc                                \
   google/protobuf/io/tokenizer.cc                              \
-  google/protobuf/io/zero_copy_stream.cc                       \
   google/protobuf/io/zero_copy_stream_impl.cc                  \
-  google/protobuf/io/zero_copy_stream_impl_lite.cc             \
   google/protobuf/compiler/importer.cc                         \
   google/protobuf/compiler/parser.cc
 
 nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs)
 
 # Build lite_unittest separately, since it doesn't use gtest.
-protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la
+protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la
 protobuf_lite_test_SOURCES =                                           \
   google/protobuf/lite_unittest.cc                                     \
   google/protobuf/test_util_lite.cc                                    \
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.