From 716b5fe1fa1de30498b997d9eedc06b610450d4b Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 11 Mar 2015 22:35:57 +0100 Subject: Disabling installing shared libraries under MacOS for the time being. --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8c6fc3220d..8b204760c2 100644 --- a/Makefile +++ b/Makefile @@ -2036,10 +2036,10 @@ ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(prefix)/lib/gpr.$(SHARED_EXT) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgpr-imp.a $(prefix)/lib/libgpr-imp.a else +ifneq ($(SYSTEM),Darwin) $(E) "[INSTALL] Installing libgpr.$(SHARED_EXT)" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(prefix)/lib/libgpr.$(SHARED_EXT) -ifneq ($(SYSTEM),Darwin) $(Q) ln -sf libgpr.$(SHARED_EXT) $(prefix)/lib/libgpr.so endif endif @@ -2049,10 +2049,10 @@ ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(prefix)/lib/grpc.$(SHARED_EXT) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc-imp.a $(prefix)/lib/libgrpc-imp.a else +ifneq ($(SYSTEM),Darwin) $(E) "[INSTALL] Installing libgrpc.$(SHARED_EXT)" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(prefix)/lib/libgrpc.$(SHARED_EXT) -ifneq ($(SYSTEM),Darwin) $(Q) ln -sf libgrpc.$(SHARED_EXT) $(prefix)/lib/libgrpc.so endif endif @@ -2062,10 +2062,10 @@ ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/grpc_unsecure.$(SHARED_EXT) $(prefix)/lib/grpc_unsecure.$(SHARED_EXT) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure-imp.a $(prefix)/lib/libgrpc_unsecure-imp.a else +ifneq ($(SYSTEM),Darwin) $(E) "[INSTALL] Installing libgrpc_unsecure.$(SHARED_EXT)" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) $(prefix)/lib/libgrpc_unsecure.$(SHARED_EXT) -ifneq ($(SYSTEM),Darwin) $(Q) ln -sf libgrpc_unsecure.$(SHARED_EXT) $(prefix)/lib/libgrpc_unsecure.so endif endif @@ -2083,10 +2083,10 @@ ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/grpc++.$(SHARED_EXT) $(prefix)/lib/grpc++.$(SHARED_EXT) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++-imp.a $(prefix)/lib/libgrpc++-imp.a else +ifneq ($(SYSTEM),Darwin) $(E) "[INSTALL] Installing libgrpc++.$(SHARED_EXT)" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT) $(prefix)/lib/libgrpc++.$(SHARED_EXT) -ifneq ($(SYSTEM),Darwin) $(Q) ln -sf libgrpc++.$(SHARED_EXT) $(prefix)/lib/libgrpc++.so endif endif @@ -2096,10 +2096,10 @@ ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/grpc++_unsecure.$(SHARED_EXT) $(prefix)/lib/grpc++_unsecure.$(SHARED_EXT) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure-imp.a $(prefix)/lib/libgrpc++_unsecure-imp.a else +ifneq ($(SYSTEM),Darwin) $(E) "[INSTALL] Installing libgrpc++_unsecure.$(SHARED_EXT)" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.$(SHARED_EXT) $(prefix)/lib/libgrpc++_unsecure.$(SHARED_EXT) -ifneq ($(SYSTEM),Darwin) $(Q) ln -sf libgrpc++_unsecure.$(SHARED_EXT) $(prefix)/lib/libgrpc++_unsecure.so endif endif @@ -2117,10 +2117,10 @@ ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/grpc_csharp_ext.$(SHARED_EXT) $(prefix)/lib/grpc_csharp_ext.$(SHARED_EXT) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext-imp.a $(prefix)/lib/libgrpc_csharp_ext-imp.a else +ifneq ($(SYSTEM),Darwin) $(E) "[INSTALL] Installing libgrpc_csharp_ext.$(SHARED_EXT)" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.$(SHARED_EXT) $(prefix)/lib/libgrpc_csharp_ext.$(SHARED_EXT) -ifneq ($(SYSTEM),Darwin) $(Q) ln -sf libgrpc_csharp_ext.$(SHARED_EXT) $(prefix)/lib/libgrpc_csharp_ext.so endif endif -- cgit v1.2.3 From e758ed16aa0fe3ec085f45a4c1ad642b8ddd50fc Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 11 Mar 2015 22:51:39 +0100 Subject: Trying to make the MacOS experience better by removing various spurious messages, and increasing coverage of library paths. --- Makefile | 35 ++++++++++++++++++++++++++++------- templates/Makefile.template | 35 ++++++++++++++++++++++++++++------- 2 files changed, 56 insertions(+), 14 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8b204760c2..3e1efc7646 100644 --- a/Makefile +++ b/Makefile @@ -159,9 +159,14 @@ ifndef VALID_CONFIG_$(CONFIG) $(error Invalid CONFIG value '$(CONFIG)') endif +ifeq ($(SYSTEM),Linux) +TMPOUT = /dev/null +else +TMPOUT = `mktemp /tmp/test-out-XXXXXX` +endif # Detect if we can use C++11 -CXX11_CHECK_CMD = $(CXX) -std=c++11 -o /dev/null -c test/build/c++11.cc +CXX11_CHECK_CMD = $(CXX) -std=c++11 -o $(TMPOUT) -c test/build/c++11.cc HAS_CXX11 = $(shell $(CXX11_CHECK_CMD) 2> /dev/null && echo true || echo false) # The HOST compiler settings are used to compile the protoc plugins. @@ -194,9 +199,25 @@ LDFLAGS += -g -fPIC INCLUDES = . include $(GENDIR) ifeq ($(SYSTEM),Darwin) -INCLUDES += /usr/local/ssl/include /opt/local/include +ifneq ($(wildcard /usr/local/ssl/include),) +INCLUDES += /usr/local/ssl/include +endif +ifneq ($(wildcard /opt/local/include),) +INCLUDES += /opt/local/include +endif +ifneq ($(wildcard /usr/local/include),) +INCLUDES += /usr/local/include +endif LIBS = m z -LDFLAGS += -L/usr/local/ssl/lib -L/opt/local/lib +ifneq ($(wildcard /usr/local/ssl/lib),) +LDFLAGS += -L/usr/local/ssl/lib +endif +ifneq ($(wildcard /opt/local/lib),) +LDFLAGS += -L/opt/local/lib +endif +ifneq ($(wildcard /usr/local/lib),) +LDFLAGS += -L/usr/local/lib +endif else LIBS = rt m z pthread LDFLAGS += -pthread @@ -251,10 +272,10 @@ else IS_GIT_FOLDER = true endif -OPENSSL_ALPN_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o /dev/null test/build/openssl-alpn.c -lssl -lcrypto -ldl $(LDFLAGS) -ZLIB_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o /dev/null test/build/zlib.c -lz $(LDFLAGS) -PERFTOOLS_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o /dev/null test/build/perftools.c -lprofiler $(LDFLAGS) -PROTOBUF_CHECK_CMD = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o /dev/null test/build/protobuf.cc -lprotobuf $(LDFLAGS) +OPENSSL_ALPN_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/openssl-alpn.c -lssl -lcrypto -ldl $(LDFLAGS) +ZLIB_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/zlib.c -lz $(LDFLAGS) +PERFTOOLS_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/perftools.c -lprofiler $(LDFLAGS) +PROTOBUF_CHECK_CMD = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/protobuf.cc -lprotobuf $(LDFLAGS) PROTOC_CMD = which protoc PROTOC_CHECK_CMD = protoc --version | grep -q libprotoc.3 diff --git a/templates/Makefile.template b/templates/Makefile.template index d4028aaf65..a69c7a7f2f 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -176,9 +176,14 @@ ifndef VALID_CONFIG_$(CONFIG) $(error Invalid CONFIG value '$(CONFIG)') endif +ifeq ($(SYSTEM),Linux) +TMPOUT = /dev/null +else +TMPOUT = `mktemp /tmp/test-out-XXXXXX` +endif # Detect if we can use C++11 -CXX11_CHECK_CMD = $(CXX) -std=c++11 -o /dev/null -c test/build/c++11.cc +CXX11_CHECK_CMD = $(CXX) -std=c++11 -o $(TMPOUT) -c test/build/c++11.cc HAS_CXX11 = $(shell $(CXX11_CHECK_CMD) 2> /dev/null && echo true || echo false) # The HOST compiler settings are used to compile the protoc plugins. @@ -211,9 +216,25 @@ LDFLAGS += -g -fPIC INCLUDES = . include $(GENDIR) ifeq ($(SYSTEM),Darwin) -INCLUDES += /usr/local/ssl/include /opt/local/include +ifneq ($(wildcard /usr/local/ssl/include),) +INCLUDES += /usr/local/ssl/include +endif +ifneq ($(wildcard /opt/local/include),) +INCLUDES += /opt/local/include +endif +ifneq ($(wildcard /usr/local/include),) +INCLUDES += /usr/local/include +endif LIBS = m z -LDFLAGS += -L/usr/local/ssl/lib -L/opt/local/lib +ifneq ($(wildcard /usr/local/ssl/lib),) +LDFLAGS += -L/usr/local/ssl/lib +endif +ifneq ($(wildcard /opt/local/lib),) +LDFLAGS += -L/opt/local/lib +endif +ifneq ($(wildcard /usr/local/lib),) +LDFLAGS += -L/usr/local/lib +endif else LIBS = rt m z pthread LDFLAGS += -pthread @@ -268,10 +289,10 @@ else IS_GIT_FOLDER = true endif -OPENSSL_ALPN_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o /dev/null test/build/openssl-alpn.c -lssl -lcrypto -ldl $(LDFLAGS) -ZLIB_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o /dev/null test/build/zlib.c -lz $(LDFLAGS) -PERFTOOLS_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o /dev/null test/build/perftools.c -lprofiler $(LDFLAGS) -PROTOBUF_CHECK_CMD = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o /dev/null test/build/protobuf.cc -lprotobuf $(LDFLAGS) +OPENSSL_ALPN_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/openssl-alpn.c -lssl -lcrypto -ldl $(LDFLAGS) +ZLIB_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/zlib.c -lz $(LDFLAGS) +PERFTOOLS_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/perftools.c -lprofiler $(LDFLAGS) +PROTOBUF_CHECK_CMD = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/protobuf.cc -lprotobuf $(LDFLAGS) PROTOC_CMD = which protoc PROTOC_CHECK_CMD = protoc --version | grep -q libprotoc.3 -- cgit v1.2.3