Here is the patch with the Basic.mk.template and mk/Windows32.mk
changes. I tried to keep most of the changes in the Windows-specific
file, but something had to happen in the general one as well, as far as
I could tell.
I deliberately sent only the changes relevant to the Basic.mk approach
here to facilitate review.
The changes are working as far as I can tell, with both
.\gnumake.exe -f Basic.mk TOOLCHAIN=msvc
.\gnumake.exe -f Basic.mk TOOLCHAIN=gcc
(and without TOOLCHAIN at all, of course, defaulting to msvc)
First I had to run
to re-generate Basic.mk after changing Basic.mk.template and mk/Windows32.mk
These produce UTF-8-supporting gnumake.exe binaries in their corresponding
WinRel and GccRel folders.
As you will see, I haven't implemented checking if windres is available on
the path for the TOOLCHAIN=gcc case, as I have never come across a
case where a gcc distribution for Windows doesn't include windres (in all
cases I have seen, it gets distributed with binutils because it needs the
assembler and linker that are not part of gcc, and windres is part of binutils
so it's also there).
Tcc is not supported with the Basic.mk approach anyway, so no need to
worry about the fact that it doesn't ship with windres.
MSVC always has its own resource compiler available.
If you still need the check for windres for the gcc case, please let me know.