Skip to content
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 from
Closed

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

wants to merge 1 commit into from

Conversation

vszakats
Copy link
Member

@vszakats 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.

- 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
Copy link
Member Author

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)))

Copy link
Member

@bagder bagder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member Author

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 dllsuffix branch October 15, 2017 23:15
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants