From 28446802df095b07c229d3176c79ff1c1228ec54 Mon Sep 17 00:00:00 2001 From: Andy Tao Date: Sun, 27 Sep 2020 16:34:30 +0800 Subject: [PATCH 1/4] Update Makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a8d37a2eb..7c6d76443 100644 --- a/Makefile +++ b/Makefile @@ -50,8 +50,8 @@ DEBUG_FLAGS?= -g -ggdb REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CPPFLAGS) $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) REAL_LDFLAGS=$(LDFLAGS) -DYLIBSUFFIX=so -STLIBSUFFIX=a +DYLIBSUFFIX=$(if $(WINDIR),dll,so) +STLIBSUFFIX=$(if $(WINDIR),lib,a) DYLIB_MINOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(HIREDIS_SONAME) DYLIB_MAJOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(HIREDIS_MAJOR) DYLIBNAME=$(LIBNAME).$(DYLIBSUFFIX) From de6f9700f827225e68f5b1bec44dff26cce54e8e Mon Sep 17 00:00:00 2001 From: taozuhong Date: Sat, 9 Jan 2021 13:41:10 +0800 Subject: [PATCH 2/4] add MSYS2 support --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7c6d76443..939680f5d 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # This file is released under the BSD license, see the COPYING file OBJ=alloc.o net.o hiredis.o sds.o async.o read.o sockcompat.o -SSL_OBJ=ssl.o +SSL_OBJ=alloc.o net.o hiredis.o sds.o async.o read.o sockcompat.o ssl.o EXAMPLES=hiredis-example hiredis-example-libevent hiredis-example-libev hiredis-example-glib hiredis-example-push ifeq ($(USE_SSL),1) EXAMPLES+=hiredis-example-ssl hiredis-example-libevent-ssl @@ -81,7 +81,13 @@ ifeq ($(uname_S),Linux) else OPENSSL_PREFIX?=/usr/local/opt/openssl CFLAGS+=-I$(OPENSSL_PREFIX)/include - SSL_LDFLAGS+=-L$(OPENSSL_PREFIX)/lib -lssl -lcrypto +endif + +ifeq ($(findstring MINGW64,$(uname_S)),MINGW64) + OPENSSL_PREFIX?=/mingw64 + CFLAGS+=-I$(OPENSSL_PREFIX)/include/openssl + REAL_LDFLAGS+= -lwsock32 -lws2_32 + SSL_LDFLAGS+=-L$(OPENSSL_PREFIX)/lib -lssl -lcrypto -lcrypt32 endif ifeq ($(uname_S),SunOS) From a6a7e6dd3a623fb5adc4ea4fc88b63c28f10b5e2 Mon Sep 17 00:00:00 2001 From: taozuhong Date: Sat, 9 Jan 2021 15:38:41 +0800 Subject: [PATCH 3/4] back to origin setting --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 939680f5d..a3163fed8 100644 --- a/Makefile +++ b/Makefile @@ -81,6 +81,7 @@ ifeq ($(uname_S),Linux) else OPENSSL_PREFIX?=/usr/local/opt/openssl CFLAGS+=-I$(OPENSSL_PREFIX)/include + SSL_LDFLAGS+=-L$(OPENSSL_PREFIX)/lib -lssl -lcrypto endif ifeq ($(findstring MINGW64,$(uname_S)),MINGW64) From 34ebd62d480d76631d9df9741d1b33f02c835211 Mon Sep 17 00:00:00 2001 From: taozuhong Date: Sat, 9 Jan 2021 15:46:31 +0800 Subject: [PATCH 4/4] MSYS2 32 and 64 bit support --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a3163fed8..a1f7d879a 100644 --- a/Makefile +++ b/Makefile @@ -84,8 +84,8 @@ else SSL_LDFLAGS+=-L$(OPENSSL_PREFIX)/lib -lssl -lcrypto endif -ifeq ($(findstring MINGW64,$(uname_S)),MINGW64) - OPENSSL_PREFIX?=/mingw64 +ifeq ($(findstring MINGW,$(uname_S)),MINGW) + OPENSSL_PREFIX?=$(MINGW_PREFIX) CFLAGS+=-I$(OPENSSL_PREFIX)/include/openssl REAL_LDFLAGS+= -lwsock32 -lws2_32 SSL_LDFLAGS+=-L$(OPENSSL_PREFIX)/lib -lssl -lcrypto -lcrypt32