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".
100 KiB
100 KiB