zlib
zlib copied to clipboard
win32/Makefile.gcc doesn't use CROSS_PREFIX nor PREFIX
My host is Linux and I'm building a script for cross compiling for many target platforms (windows, linux-arm, android, ios, etc.).
So for cross compiling for Windows I'm using mingw, then I would like to set the compiler prefix like this:
CROSS_PREFIX="i586-pc-mingw32-"
But win32/Makefile.gcc doesn't use this at all (like ./configure does).
This makefile looks is prepared to use instead the PREFIX var, but includes a line that make impossible to set the var before makefile being invoked:
PREFIX =
I can patch the win32/Makefile.gcc to remove this line but this should be fixed.
MinGW support in stock zlib is at pretty early stage... using win32/Makefile.gcc was a temporary workaround until configure gets full support for MinGW... There is at least three main variations of MinGW using either MSYS or MSYS2 and that makes adding the support to configure pretty complicated.
I had a similar issue and came up with this https://github.com/madler/zlib/pull/220
You might be able to do...
HOST=i586-pc-mingw32 make -fwin32/Makefile.mingw-w64
@Timofonic zlib-ng also has quite long inactive periods. Makes no sense to advertise it on every possible issue on this project.
If CMake with the -DCMAKE_INSTALL_PREFIX=
@jeking3 Apples and Oranges, FYI... Has nothing to do with cmake.
@mtl1979 I am suggesting that static check-in makefiles or project files are not easily maintainable across multiple platforms when a project changes, and that using cmake across the board would solve this problem. If one always generates a project or makefile or whatnot, it will always be provably correct through CI.
@jeking3 cmake has its own problems which are way worse than configure and GNU make together
@ all : Can you try the current devel branch? What are your results?
Thanks in advance.