-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Makefile.m32: deduplicate build rules #9642
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This makes it more likely to work without having to specify a correct `CURL_DLL_SUFFIX`. The implib should be updated in sync with the .dll, so this won't cause issues for most cases.
This makes the build work without having to point to every single dependent static libs with *_PATH envvars. The downside is that the .dll must be copied to examples directory, but at that point at least we have the .exe built.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After this patch, we reduce the three copies of most
Makefile.m32
logicto one. This now resides in
lib/Makefile.m32
. It makes future updateseasier, the code shorter, with a small amount of added complexity.
Makefile.m32
reduction:Details:
Change rules to create objects for the
v*
subdirs in thelib
dir.This allows to use a shared compile rule and assumes that filenames
are not (and will not be) colliding across these directories.
Makefile.m32
now also stores a list of these subdirs. They arechanging rarely though.
Sync as much as possible between the three
Makefile.m32
scripts'rules and their source/target sections.
After this patch
CPPFLAGS
are all applied to thesrc
sources onceagain. This matches the behaviour of cmake/autotools. Only zlib ones
are actually required there.
Use
.rc
names fromMakefile.inc
instead of keeping a duplicate.Change examples to link
libcurl.dll
by default. This makes buildingtrivial, even as a cross-build:
CC=x86_64-w64-mingw32-gcc make -f Makefile.m32
To run them, you need to move/copy or add-to-path
libcurl.dll
.You can select static mode via
CFG=-static
.List more of the
Makefile.m32
config variables.Drop
.rc
support from examples. It made it more fragile without muchbenefit.
Include a necessary system lib for the
externalsocket.c
example.Exclude unnecessary systems libs when building in
-dyn
mode.Closes #9642