From b50d78231c28372a2f4e768fa92ad5ee348984e6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 27 Jan 2022 18:40:53 -0500 Subject: [PATCH] fixes37.0 entry for pr#661 Makefile.mingw32 and Makefile.mingw32.depend are intended to replace Makefile.gcc. To use them: cd /d/prj/NetHack/src cp ../sys/windows/Makefile.mingw32* . mingw32-make -f Makefile.mingw32 clean mingw32-make -f Makefile.mingw32 depend mingw32-make -f Makefile.mingw32 Improvements: Add $(USE_LUADLL) to release lua-5.4.3.dll, instead of link static lua.lib into .exe files. Add windres "--target" option, to fix the NetHackW.exe startup problem. Add "-s" option to $(LDFLAGS) in release mode, to make exe/dll smaller. Add $(CLEAN_DIR) and $(CLEAN_FILE) to track what to clean. Remove *.tag, but use "order-only prerequisites" to make directory before any '.o' is built. Use make variables and functions to improve readability. Each project has its own directory to hold object files, to fix the interference problem between different projects, like NetHack.exe object files were built with "-DTILES". Add "-mconsole" option when linking NetHack.exe, to fix that sometimes GetStdHandle returned with invalid handle error. Add ".PHONY" statements. Use "gcc -E -MM -MT" to implement semi-auto "Prerequisites Generating". --- doc/fixes37.0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 8f7578052..5bc61aa90 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1486,6 +1486,9 @@ use %lu, not %d, in format string in timer_sanity_check() (pr #617 by argrath) bad cast making sp_lev chameleon light source (pr #625 by entrez) add Ray Chason's adaptation of nethack's Qt5 interface to work with Qt6 (issue #525 followup comment by chasonr) +mingw32 build updates and replacement of sys/windows/Makefile.gcc with new + sys/windows/Makefile.mingw32 and sys/windows/Makefile.mingw32.depend + (pr #661 by feiyunw) Code Cleanup and Reorganization