aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorGravatar Jon Skeet <skeet@pobox.com>2015-06-17 15:03:47 +0100
committerGravatar Jon Skeet <skeet@pobox.com>2015-06-17 15:03:47 +0100
commite2acd854250b449a3fdeef2ad52402c4c5d78259 (patch)
treea08126762b6c76d56fde8ce443f8dff36408b6e0 /src/Makefile.am
parentd9dc05e500807a6f0cd10d4637c599acc9a6aecf (diff)
parentb36395b2bac88f70070544c325bc09234cb1f1a6 (diff)
Merged master
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am41
1 files changed, 18 insertions, 23 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 0dc18916..3c2d244f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,17 +4,25 @@ if HAVE_ZLIB
GZCHECKPROGRAMS = zcgzip zcgunzip
GZHEADERS = google/protobuf/io/gzip_stream.h
GZTESTS = google/protobuf/io/gzip_stream_unittest.sh
+ZLIB_DEF = -DHAVE_ZLIB=1
else
GZCHECKPROGRAMS =
GZHEADERS =
GZTESTS =
+ZLIB_DEF =
+endif
+
+if HAVE_PTHREAD
+PTHREAD_DEF = -DHAVE_PTHREAD=1
+else
+PTHREAD_DEF =
endif
if GCC
# These are good warnings to turn on by default
-NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare
+NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare
else
-NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS)
+NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF)
endif
AM_CXXFLAGS = $(NO_OPT_CXXFLAGS) $(PROTOBUF_OPT_FLAG)
@@ -41,24 +49,12 @@ nobase_dist_proto_DATA = google/protobuf/descriptor.proto \
clean-local:
rm -f *.loT
-public_config = google/protobuf/stubs/pbconfig.h
-
-CLEANFILES = $(protoc_outputs) $(public_config) unittest_proto_middleman \
+CLEANFILES = $(protoc_outputs) unittest_proto_middleman \
testzip.jar testzip.list testzip.proto testzip.zip
MAINTAINERCLEANFILES = \
Makefile.in
-# Generate and distribute a minimum config.h file to make hash_map work.
-# The autoheader config has too much info, which might conflict with other
-# macros applications might include. Thus, we create a stubs/pbconfig.h, that
-# only #defines what we really need, and prefix it with GOOGLE_PROTOBUF_ to
-# avoid conflicts.
-$(public_config): $(top_builddir)/config.h $(top_srcdir)/config.h.include
- echo "// Note: Google Protobuf internal only. Do NOT include." > $@
- cat $(top_builddir)/config.h | grep -f $(top_srcdir)/config.h.include | \
- sed 's,#define , #define GOOGLE_PROTOBUF_,' >> $@
-
nobase_include_HEADERS = \
google/protobuf/stubs/atomic_sequence_num.h \
google/protobuf/stubs/atomicops.h \
@@ -80,6 +76,7 @@ nobase_include_HEADERS = \
google/protobuf/stubs/fastmem.h \
google/protobuf/stubs/hash.h \
google/protobuf/stubs/once.h \
+ google/protobuf/stubs/pbconfig.h \
google/protobuf/stubs/platform_macros.h \
google/protobuf/stubs/shared_ptr.h \
google/protobuf/stubs/singleton.h \
@@ -147,14 +144,11 @@ nobase_include_HEADERS = \
google/protobuf/compiler/java/java_names.h \
google/protobuf/compiler/javanano/javanano_generator.h \
google/protobuf/compiler/objectivec/objectivec_generator.h \
- google/protobuf/compiler/objectivec/objectivec_helpers.h \
+ google/protobuf/compiler/objectivec/objectivec_helpers.h \
google/protobuf/compiler/python/python_generator.h \
google/protobuf/compiler/ruby/ruby_generator.h \
google/protobuf/compiler/csharp/csharp_generator.h
-nobase_nodist_include_HEADERS = \
- $(public_config)
-
lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
@@ -180,7 +174,6 @@ libprotobuf_lite_la_SOURCES = \
google/protobuf/io/coded_stream_inl.h \
google/protobuf/io/zero_copy_stream.cc \
google/protobuf/io/zero_copy_stream_impl_lite.cc
-nodist_libprotobuf_lite_la_SOURCES = $(public_config)
libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
libprotobuf_la_LDFLAGS = -version-info 10:0:0 -export-dynamic -no-undefined
@@ -408,6 +401,7 @@ protoc_inputs = \
google/protobuf/unittest_drop_unknown_fields.proto \
google/protobuf/unittest_embed_optimize_for.proto \
google/protobuf/unittest_empty.proto \
+ google/protobuf/unittest_enormous_descriptor.proto \
google/protobuf/unittest_import_lite.proto \
google/protobuf/unittest_import.proto \
google/protobuf/unittest_import_public_lite.proto \
@@ -449,8 +443,7 @@ EXTRA_DIST = \
google/protobuf/compiler/ruby/ruby_generated_code.proto \
google/protobuf/compiler/ruby/ruby_generated_code.rb \
google/protobuf/compiler/package_info.h \
- google/protobuf/compiler/zip_output_unittest.sh \
- google/protobuf/unittest_enormous_descriptor.proto
+ google/protobuf/compiler/zip_output_unittest.sh
protoc_lite_outputs = \
google/protobuf/map_lite_unittest.pb.cc \
@@ -482,6 +475,8 @@ protoc_outputs = \
google/protobuf/unittest_embed_optimize_for.pb.h \
google/protobuf/unittest_empty.pb.cc \
google/protobuf/unittest_empty.pb.h \
+ google/protobuf/unittest_enormous_descriptor.pb.cc \
+ google/protobuf/unittest_enormous_descriptor.pb.h \
google/protobuf/unittest_import.pb.cc \
google/protobuf/unittest_import.pb.h \
google/protobuf/unittest_import_public.pb.cc \
@@ -513,7 +508,7 @@ protoc_outputs = \
google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \
google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h
-BUILT_SOURCES = $(public_config) $(protoc_outputs)
+BUILT_SOURCES = $(protoc_outputs)
if USE_EXTERNAL_PROTOC