Skip to content

Instantly share code, notes, and snippets.

@rkitover
Created April 23, 2012 17:21
Show Gist options
  • Select an option

  • Save rkitover/2472468 to your computer and use it in GitHub Desktop.

Select an option

Save rkitover/2472468 to your computer and use it in GitHub Desktop.
From ee19ec82cd5800e18a53428b88eaa8c910ba525a Mon Sep 17 00:00:00 2001
From: Rafael Kitover <[email protected]>
Date: Mon, 23 Apr 2012 13:19:31 -0400
Subject: [PATCH] update win32/GNUmakefile for new OpenSSL
libcrypto on win32 now depends on gdi32.dll, so move the OpenSSL LDLIBS
block to before compiler definitions block, because -lgdi32 has to come
after libcrypto, then and add -lgdi32 to LDLIBS for gcc.
---
win32/GNUmakefile | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/win32/GNUmakefile b/win32/GNUmakefile
index 696f661..59a3452 100644
--- a/win32/GNUmakefile
+++ b/win32/GNUmakefile
@@ -16,7 +16,7 @@ WITH_ZLIB = 1
# Edit the path below to point to the base of your OpenSSL package.
ifndef OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8v
+OPENSSL_PATH = ../../openssl-1.0.1a
endif
# Edit the var below to set to your architecture or set environment var.
@@ -95,6 +95,12 @@ ifeq ($(ARCH),w64)
CFLAGS += -D_AMD64_
endif
+ifdef LINK_STATIC
+LDLIBS += $(OPENSSL_PATH)/out/libcrypto.$(LIBEXT) $(OPENSSL_PATH)/out/libssl.$(LIBEXT)
+else
+LDLIBS += $(OPENSSL_PATH)/out/libeay32.$(LIBEXT) $(OPENSSL_PATH)/out/libssl32.$(LIBEXT)
+endif
+
ifeq ($(CC),mwcc)
LD = mwld
RC = mwwinrc
@@ -119,7 +125,7 @@ ARFLAGS = -cq
LIBEXT = a
RANLIB = $(CROSSPREFIX)ranlib
#LDLIBS += -lwsock32
-LDLIBS += -lws2_32
+LDLIBS += -lws2_32 -lgdi32
RCFLAGS = -I. -I ../include -O coff -i
CFLAGS += -fno-strict-aliasing
CFLAGS += -Wall # -pedantic
@@ -128,12 +134,6 @@ endif
INCLUDES = -I. -I../include
INCLUDES += -I$(OPENSSL_PATH)/outinc -I$(OPENSSL_PATH)/outinc/openssl
-ifdef LINK_STATIC
-LDLIBS += $(OPENSSL_PATH)/out/libcrypto.$(LIBEXT) $(OPENSSL_PATH)/out/libssl.$(LIBEXT)
-else
-LDLIBS += $(OPENSSL_PATH)/out/libeay32.$(LIBEXT) $(OPENSSL_PATH)/out/libssl32.$(LIBEXT)
-endif
-
ifdef WITH_ZLIB
INCLUDES += -I$(ZLIB_PATH)
LDLIBS += $(ZLIB_PATH)/libz.$(LIBEXT)
--
1.7.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment