New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/Makefile.m32: allow customizing dll suffixes #1942

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@vszakats
Member

vszakats commented Oct 4, 2017

  • New CURL_DLL_SUFFIX envvar will add a suffix to the generated
    libcurl dll name. Useful to add -x64 to 64-bit builds so that
    it can live in the same directory as the 32-bit one. By default
    this is empty.

  • New CURL_DLL_A_SUFFIX envvar to customize the suffix of the
    generated import library (implib) for libcurl .dll. It defaults
    to dll, and it's useful to modify that to .dll to have the
    standard naming scheme for mingw-built .dlls, i.e. libcurl.dll.a.

lib/Makefile.m32: allow customizing dll suffixes
- New `CURL_DLL_SUFFIX` envvar will add a suffix to the generated
  libcurl dll name. Useful to add `-x64` to 64-bit builds so that
  it can live in the same directory as the 32-bit one. By default
  this is empty.

- New `CURL_DLL_A_SUFFIX` envvar to customize the suffix of the
  generated import library (implib) for libcurl .dll. It defaults
  to `dll`, and it's useful to modify that to `.dll` to have the
  standard naming scheme for mingw-built .dlls, i.e. `libcurl.dll.a`.
@vszakats

This comment has been minimized.

Show comment
Hide comment
@vszakats

vszakats Oct 4, 2017

Member

Or, it may be even better to just make the -x64 and .dll.a. suffixes the defaults in lib/Makefile.m32,
as follows:

diff --git a/lib/Makefile.m32 b/lib/Makefile.m32
index 22efbdee0..bda2fa05f 100644
--- a/lib/Makefile.m32
+++ b/lib/Makefile.m32
@@ -313,8 +313,12 @@ DLL_LIBS += -lws2_32
 # Makefile.inc provides the CSOURCES and HHEADERS defines
 include Makefile.inc
 
+ifeq ($(ARCH),w64)
+libcurl_dll_LIBRARY = libcurl-x64.dll
+else
 libcurl_dll_LIBRARY = libcurl.dll
-libcurl_dll_a_LIBRARY = libcurldll.a
+endif
+libcurl_dll_a_LIBRARY = libcurl.dll.a
 libcurl_a_LIBRARY = libcurl.a
 
 libcurl_a_OBJECTS := $(patsubst %.c,%.o,$(strip $(CSOURCES)))
Member

vszakats commented Oct 4, 2017

Or, it may be even better to just make the -x64 and .dll.a. suffixes the defaults in lib/Makefile.m32,
as follows:

diff --git a/lib/Makefile.m32 b/lib/Makefile.m32
index 22efbdee0..bda2fa05f 100644
--- a/lib/Makefile.m32
+++ b/lib/Makefile.m32
@@ -313,8 +313,12 @@ DLL_LIBS += -lws2_32
 # Makefile.inc provides the CSOURCES and HHEADERS defines
 include Makefile.inc
 
+ifeq ($(ARCH),w64)
+libcurl_dll_LIBRARY = libcurl-x64.dll
+else
 libcurl_dll_LIBRARY = libcurl.dll
-libcurl_dll_a_LIBRARY = libcurldll.a
+endif
+libcurl_dll_a_LIBRARY = libcurl.dll.a
 libcurl_a_LIBRARY = libcurl.a
 
 libcurl_a_OBJECTS := $(patsubst %.c,%.o,$(strip $(CSOURCES)))
@bagder

bagder approved these changes Oct 4, 2017

Sounds like a plan, and really you know this file best so I'm good with your judgement on how this is best done!

@vszakats

This comment has been minimized.

Show comment
Hide comment
@vszakats

vszakats Oct 4, 2017

Member

Thanks! Let's go with the generic/customizable solution first, and change the defaults in a separate update later. In the meantime I'm testing the -x64, .dll.a scheme with the 7.56.0 binaries built today.

Member

vszakats commented Oct 4, 2017

Thanks! Let's go with the generic/customizable solution first, and change the defaults in a separate update later. In the meantime I'm testing the -x64, .dll.a scheme with the 7.56.0 binaries built today.

@vszakats vszakats closed this in aaa16f8 Oct 4, 2017

@vszakats vszakats deleted the vszakats:dllsuffix branch Oct 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment