or nethacklib builds. A "shim" pseudo-windowport is included
from pull request 385.
- Result: As mentioned, the wasm cross-compile will end up in
+ Result: As mentioned, the wasm cross-compile will end up in
targets/wasm and the nethacklib.a will end up
src.
have the files in the top directory since you're reading this
one. :-)
- If you will be cross-compiling for your target platform on
+ If you will be cross-compiling for your target platform on
a different platform, you may want to read Cross-compiling
in the Top folder as well.
(a) additional build steps to follow, including some header
files: pm.h, onames.h, date.h.
(b) creation of files, containing information required by,
- or about the game during its execution, that are stored in a
+ or about the game during its execution, that are stored in a
portable, platform-independent way, that need to be inserted
into the final game package.
need to be included in the packaging of the game.
4.3. Lua
-
+
Compile and link into a library, or obtain a prebuilt Lua library for
your platform. Place the Lua source into lib/lua-5.4.1 (or other folder
representing an appropriate Lua version); place the compiled Lua library into
and are inserted into the game package for processing by the embedded Lua
interpreter during game execution.
- 5.2 Level Compiler
+ 5.2 Level Compiler
There is no longer a build-time level compiler. Instead, the level
descriptions have been converted to Lua and are inserted into the game package
of fixes as they are committed.
In short -- there are likely to be bugs. Don't treat NetHack-3.7 branch as
-released code, and if stability is paramount, then the most recent
+released code, and if stability is paramount, then the most recent
NetHack 3.6.6 release is safest for you.
We're making the .0 work-in-progress available so that you can observe, test
included so far, as well as brief mentions of some of the other code changes.
The text in there was written for the development team's own use and is
provided "as is", so please do not ask us to further explain the entries in
-that file. Some entries might be considered "spoilers", particularly in the
+that file. Some entries might be considered "spoilers", particularly in the
"new features" section.
Along with the game improvements and bug fixes, NetHack 3.7 strives to make
-some general architectural improvements to the game or to its building
+some general architectural improvements to the game or to its building
process. Among them:
* Remove barriers to building NetHack on one platform and operating system,
See the file "Cross-compiling" in the top-level folder for more information
on that.
- * Replace the build-time "yacc and lex"-based level compiler, the "yacc and
+ * Replace the build-time "yacc and lex"-based level compiler, the "yacc and
lex"-based dungeon compiler, and the quest text file processing done
- by NetHack's "makedefs" utility, with Lua text alternatives that are
+ by NetHack's "makedefs" utility, with Lua text alternatives that are
loaded and processed by the game during play.
* Write game savefiles and bonesfiles in a more portable and consistent way
their individual fields and save those fields instead of the entire
struct
- savefile: use little-endian format for fields where that makes a difference
-
+
- - - - - - - - - - -
Please read items (1), (2) and (3) BEFORE doing anything with your new code.
OpenVMS (aka VMS) V8.4 on Alpha and on Integrity/Itanium/IA64
Instructions have been provided by way of community contribution on:
- msdos protected mode using djgpp including a Linux-host djgpp
+ msdos protected mode using djgpp including a Linux-host djgpp
cross-compile
Previous versions of NetHack were tested and known to run on the
- Copyright (c) NetHack PC Development Team 1990-2002.
+ Copyright (c) NetHack PC Development Team 1990-2020.
NetHack may be freely redistributed. See license for details.
==============================================================
Instructions for compiling and installing
Last revision: $NHDT-Date: 1596508786 2020/08/04 02:39:46 $
Credit for a runnable full PC NetHack 3.7 goes to the PC Development team
-of Paul Winner, Kevin Smolkowski, Michael Allison, Yitzhak Sapir, Bill Dyer,
-Timo Hakulinen, Yamamoto Keizo, Mike Threepoint, Mike Stephenson,
+of Paul Winner, Kevin Smolkowski, Michael Allison, Yitzhak Sapir, Bill Dyer,
+Timo Hakulinen, Yamamoto Keizo, Mike Threepoint, Mike Stephenson,
Stephen White, Ken Washikita and Janet Walz. The present port is based
on the previous effort of Pierre Martineau, Stephen Spackman, Steve Creps, Mike
Threepoint, Mike Stephenson, Norm Meluch and Don Kneller.
-There has been very little port-specific maintenance for NetHack on DOS since
+There has been very little port-specific maintenance for NetHack on DOS since
NetHack 3.3.0.
CONTENTS:
with 3.5.x.
You may find it useful to obtain copies of lex (flex) and yacc (bison
- or byacc). While not strictly necessary to compile nethack, they are
- required should you desire to make any changes to the level and dungeon
- compilers. Flex and Bison are included with the DJGPP distribution and
- are also available on many archive sites.
+ or byacc). While not strictly necessary to compile nethack, they are
+ required should you desire to make any changes to the level and dungeon
+ compilers. Flex and Bison are included with the DJGPP distribution and
+ are also available on many archive sites.
- Also be sure to pick up djgpp v2gnu/fil41b.zip to get ls.exe and
+ Also be sure to pick up djgpp v2gnu/fil41b.zip to get ls.exe and
touch.exe, since the Makefile uses them by default.
II. To compile your copy of NetHack on a DOS machine:
(top)
|
- -------------------------------------------------
- | | | | | | |
+ -------------------------------------------------
+ | | | | | | |
util dat doc include src sys win
| |
- ------ -----
- | | | |
+ ------ -----
+ | | | |
share msdos tty share
Check the file "Files" in your top level directory for an exact
First check config.h according to the comments to match your system and
desired set of features. Mostly you need to check the WIZARD option,
- and check TERMLIB and COMPRESS. Also be sure to leave DLB support
- commented out in config.h. MSDOS has support for DLB, but it must be
- done through the Makefile, rather than config.h, to ensure that the
+ and check TERMLIB and COMPRESS. Also be sure to leave DLB support
+ commented out in config.h. MSDOS has support for DLB, but it must be
+ done through the Makefile, rather than config.h, to ensure that the
necessary packaging steps are done.
We've managed to enable all the special features. You may include all
occupied for quite some time. If all goes well, you will get an
NetHack executable.
-9. If you chose DLB support (recommended), make sure that the file nhdat
+9. If you chose DLB support (recommended), make sure that the file nhdat
got copied into the game directory.
If you didn't choose DLB support, make sure the support files --
data, rumors, cmdhelp, opthelp, help, hh,history, guidebook.txt
- license, and all the *.lev files -- were copied to the game directory.
- If not, move them there from the dat directory yourself. rumors can
- be created manually be entering "makedefs -r", data by entering
+ license, and all the *.lev files -- were copied to the game directory.
+ If not, move them there from the dat directory yourself. rumors can
+ be created manually be entering "makedefs -r", data by entering
"makedefs -d".
Make sure the files NetHack1.tib and NetHacko.tib made it to your game
speed-dialer, making the file hidden on many machines.
If you changed your build settings to include TERMCAP support, copy
- termcap to your game directory.
+ termcap to your game directory.
Also, make sure the file msdoshlp.txt made it to your game directory.
If it didn't, move it from sys\msdos to your game directory
If you wish to build a copy of NetHack identical to the one that
the pc team distributes, simply do the following:
- The 32-bit Protected Mode DPMI version built with 32-bit djgpp
- compiler V2.03 or greater, make no changes to any of the defines and use
+ The 32-bit Protected Mode DPMI version built with 32-bit djgpp
+ compiler V2.03 or greater, make no changes to any of the defines and use
the Makefile.GCC as distributed, and as moved in step 3.
Paths below are relative to the top of your unpacked
At the time of this release in April 2002, the URL
http://www.delorie.com/djgpp/zip-picker.html/
had information on how to obtain djgpp and what pieces to get.
- Be sure to pick up djgpp v2gnu/fil41b.zip to get ls.exe and
+ Be sure to pick up djgpp v2gnu/fil41b.zip to get ls.exe and
touch.exe, since the Makefile uses them by default (or change
the Makefile to use alternatives).
- Special note for Windows 2000 / Windows XP users: You must have a
+ Special note for Windows 2000 / Windows XP users: You must have a
recent djgpp distribution for the build process, and the generated
executables to work properly on those platforms.
djgpp.
The latest version of djgpp, V2.03 with the most recent refresh
- will produce a binary that will run under Microsoft Windows, or any
- other DPMI provider. djgpp also comes with a DPMI provider called CWSDPMI.
- Place CWSDPMI.EXE in your path and it will be used in the absence of any
+ will produce a binary that will run under Microsoft Windows, or any
+ other DPMI provider. djgpp also comes with a DPMI provider called CWSDPMI.
+ Place CWSDPMI.EXE in your path and it will be used in the absence of any
other DPMI provider.
If you want to use the built-in DJGPP screen routines, uncomment
1) Save files and bones files from versions of NetHack prior to 3.5.0 will not
work with this NetHack. Don't bother trying to keep them.
-2) To install an update of NetHack after changing something, type 'make'
+2) To install an update of NetHack after changing something, type 'make'
for DJGPP from the src directory. If you add, delete, or reorder monsters or
objects, or you change the format of saved level files, delete any save
and bones files. (Trying to use such files sometimes produces amusing
#SHELLDIR = $(PREFIX)/games
# per discussion in Install.X11 and Install.Qt
-#VARDATND =
+#VARDATND =
# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xbm
# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xbm rip.xpm
# for Atari/Gem
# builds and for cross-compiles by overriding these in hints
# files or on the command line.
-TARGETPFX=
+TARGETPFX=
TARGET_CC = $(CC)
TARGET_CFLAGS = $(CFLAGS)
TARGET_CLINK = $(CLINK)
$(TARGETPFX)winchar.o : ../outdated/sys/amiga/winchar.c tile.c $(HACK_H)
$(TARGETPFX)winfuncs.o : ../outdated/sys/amiga/winfuncs.c $(HACK_H)
$(TARGETPFX)winkey.o : ../outdated/sys/amiga/winkey.c $(HACK_H)
-$(TARGETPFX)winamenu.o : ../outdated/sys/amiga/winamenu.c $(HACK_H)
+$(TARGETPFX)winamenu.o : ../outdated/sys/amiga/winamenu.c $(HACK_H)
$(TARGETPFX)winreq.o : ../outdated/sys/amiga/winreq.c \
../outdated/sys/amiga/colorwin.c \
../outdated/sys/amiga/clipwin.c $(HACK_H)
TOOLTOP2 = ../lib/djgpp/i586-pc-msdosdjgpp/bin
override TARGET_CC = $(TOOLTOP1)/i586-pc-msdosdjgpp-gcc
override TARGET_CXX = $(TOOLTOP2)/g++
-override TARGET_AR = $(TOOLTOP1)/i586-pc-msdosdjgpp-gcc-ar
+override TARGET_AR = $(TOOLTOP1)/i586-pc-msdosdjgpp-gcc-ar
override TARGET_STUBEDIT = ../lib/djgpp/i586-pc-msdosdjgpp/bin/stubedit
override TARGET_CFLAGS = -c -O -I../include -I../sys/msdos -I../win/share \
$(LUAINCL) -DDLB $(PDCURSESDEF) \
override REGEXOBJ = $(TARGETPFX)cppregex.o
override TARGET_CC = $(TOOLTOP)/m68k-amigaos-gcc
override TARGET_CXX = $(TOOLTOP)/m68k-amigaos-c++
-override TARGET_AR = $(TOOLTOP)/m68k-amigaos-ar
+override TARGET_AR = $(TOOLTOP)/m68k-amigaos-ar
override TARGET_STUBEDIT=
#override TARGET_CFLAGS = -c -O $(TOOLARCH) -I../include -I../outdated/include
override TARGET_CFLAGS = -c -O $(TOOLARCH) \
WASM_CFLAGS += -DNOTTYGRAPHICS -DSHIM_GRAPHICS -DLIBNH
WASM_CFLAGS += -DCROSSCOMPILE
WASM_TARGET_CFLAGS = -DCROSSCOMPILE_TARGET -DCROSS_TO_WASM
-# For src Makefile
+# For src Makefile
override CFLAGS = $(WASM_CFLAGS)
override TARGET_CFLAGS = $(EMCC_CFLAGS) $(WASM_CFLAGS) $(WASM_TARGET_CFLAGS)
#
$(TARGETPFX)ioctl.o $(TARGETPFX)unixtty.o \
$(TARGETPFX)unixunix.o $(TARGETPFX)unixres.o \
$(TARGETPFX)winshim.o
-override WINLIB = emranlib
+override WINLIB = emranlib
override LUALIB=
override TOPLUALIB=
override REGEXOBJ = $(TARGETPFX)posixregex.o
# NetHack 3.7 linux.2020 $NHDT-Date: 1599687610 2020/09/09 21:40:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
-# NetHack may be freely redistributed. See license for details.
+# NetHack may be freely redistributed. See license for details.
#
#---------------------------------------------------------------------
# Linux hints file with support for multiple window ports (interfaces)
chmod $(VARFILEPERM) $(INSTDIR)/sysconf;
ifneq "$(CCISCLANG)" ""
-# gdb may not be installed if clang is chosen compiler so the game
+# gdb may not be installed if clang is chosen compiler so the game
# won't start in that case due to a sysconf error. Comment out
# relevant lines in sysconf.
POSTINSTALL+= sed -i -e 's;^GDBPATH=/usr/bin/gdb;\#GDBPATH=/usr/bin/gdb;' \
==============================================================
Last revision: $NHDT-Date: 1594155895 2020/07/07 21:04:55 $
-Credit for the porting of NetHack to the Win32 Console Subsystem goes to
+Credit for the porting of NetHack to the Win32 Console Subsystem goes to
the NT Porting Team started by Michael Allison.
Credit for the Win32 Graphical version of NetHack (aka "NetHack for
Pasi Kallinen, Bart House, and Janet Walz contributed to the maintainance
of the tty and graphical windows versions of NetHack 3.7.0.
-You can build a TTY version of NetHack and a Windows Graphical
+You can build a TTY version of NetHack and a Windows Graphical
version. You can use one of the following build environments:
o A copy of Microsoft Visual Studio 2017 Community Edition or
OR
- o (Untested for 3.7) A copy of MinGW. MinGW is a collection of header
- files and import libraries with which native Windows32 programs
- can be built; the MinGW distribution contains the GNU Compiler
+ o (Untested for 3.7) A copy of MinGW. MinGW is a collection of header
+ files and import libraries with which native Windows32 programs
+ can be built; the MinGW distribution contains the GNU Compiler
Collection. You can download MinGW at
http://www.mingw.org/
Earlier versions of MinGW will not allow you to build the Windows
| Directories for a Win32 NetHack build |
\---------------------------------------------/
-
+
(NetHack-top)
|
+-----+-----+------+------+-----+----------+---------~---------+
* Optional curses window-port support *
Since 3.6.2, the community patch for a window-port that uses curses has been
-incorporated into the NetHack source code tree. That window-port, which
+incorporated into the NetHack source code tree. That window-port, which
evolved from work originally done by Karl Garrison, has been used in several
NetHack variants and on nethack.alt.org and on www.hardfought.org/nethack/.
If you want to include the curses window-port support in your Visual Studio
build, you will have to first obtain the PDCurses sources from
https://github.com/wmcbrine/PDCurses
-and have them available prior to building NetHack. There are two ways to
-enable curses window-port support during the VS build: Either set the
-environment variable PDCURSES to a folder containing a PDCurses
+and have them available prior to building NetHack. There are two ways to
+enable curses window-port support during the VS build: Either set the
+environment variable PDCURSES to a folder containing a PDCurses
repository/source-tree
- OR
+ OR
Place the PDCurses folder alongside the NetHack source repository prior
to proceeding with steps 1 through 5 above.
--------------------------------------------------------------------------
-- Beginning of prerequisite step --
-The first step in building either version of NetHack via Makefile is to
-execute sys\winnt\nhsetup.bat to move some files to their required locations.
+The first step in building either version of NetHack via Makefile is to
+execute sys\winnt\nhsetup.bat to move some files to their required locations.
From the command prompt:
cd sys\winnt
NetHackW.
The executable for Console NetHack will be named NetHack.exe. The
-executable for Graphical NetHack will be named NetHackW.exe. The
+executable for Graphical NetHack will be named NetHackW.exe. The
Makefile configuration will build both; NetHackW.exe and NetHack.exe
will be able to use the same datafiles, save files and bones files.
-Since the last official release of NetHack, compilers and computer
+Since the last official release of NetHack, compilers and computer
architectures have evolved and you can now choose whether to build
a 32-bit x86 version, or a 64-bit x64 version. The default Makefile
-is set up for a 32-bit x86 version, but that's only because it will
+is set up for a 32-bit x86 version, but that's only because it will
run on the most number of existing Windows environments.
NetHack's save files and bones files in the 3.7.0 release have not yet
-evolved enough to allow them to interchange between the 32-bit version
+evolved enough to allow them to interchange between the 32-bit version
and the 64-bit version (or between different platforms). Hopefully
that will change in an upcoming release.
I. Dispelling the Myths:
Compiling NetHack for Windows is not as easy as it sounds, nor as hard
- as it looks, however it will behoove you to read this entire section
+ as it looks, however it will behoove you to read this entire section
through before beginning the task.
We have provided a Makefile for each of the following compilers:
The Community Editions are fine and available at no cost
o MinGW 2.0 (with GCC 3.2)
- The Microsoft Visual Studio makefile was created for use
- with MS NMAKE which is provided with the Microsoft compiler.
+ The Microsoft Visual Studio makefile was created for use
+ with MS NMAKE which is provided with the Microsoft compiler.
The supplied Makefile may work with earlier versions of the Microsoft
- compiler, but that has not been tested.
+ compiler, but that has not been tested.
The GCC Makefile was created for use with GNU Make version 3.79.1,
which comes with the MinGW package.
Setting Up
-1. It almost goes without saying that you should make sure that your
+1. It almost goes without saying that you should make sure that your
tools are set up and running correctly. That includes ensuring that
all the necessary environment variables for the compiler environment
- are set correctly.
+ are set correctly.
- Change your current directory to the src subfolder of the nethack
+ Change your current directory to the src subfolder of the nethack
source tree.
cd src
- GCC
+ GCC
- For the GCC Makefile, add <mingw>\bin to your path, where <mingw>
+ For the GCC Makefile, add <mingw>\bin to your path, where <mingw>
is your MinGW root directory.).
- Change your current directory to src subfolder of the nethack
+ Change your current directory to src subfolder of the nethack
source tree.
cd src
2. Since 3.6.2, the community patch for an optional curses window-port
- has been incorporated into the NetHack source code tree. That
+ has been incorporated into the NetHack source code tree. That
window-port, which evolved from work originally done by Karl Garrison,
- has been used in several NetHack variants and on nethack.alt.org and
- on www.hardfought.org/nethack/. The optional curses window-port is
+ has been used in several NetHack variants and on nethack.alt.org and
+ on www.hardfought.org/nethack/. The optional curses window-port is
available for Windows, Mac OS X, and Unix (and also DOS).
If you want to include the optional curses window-port support in your
- command line Makefile build, you will have to first obtain the
+ command line Makefile build, you will have to first obtain the
PDCurses sources from https://github.com/wmcbrine/PDCurses
and have that source code tree available prior to building NetHack.
- Edit your Makefile and in Question 4 of the four decisions you can
+ Edit your Makefile and in Question 4 of the four decisions you can
make in there, uncomment these two lines:
ADD_CURSES=Y
PDCURSES_TOP=..\..\pdcurses
- Adjust the PDCURSES_TOP macro so that it points to the correct
+ Adjust the PDCURSES_TOP macro so that it points to the correct
location for the top of the PDCurses source tree if it differs from
the path shown.
subdirectories dat, doc, include, src, sys\share, sys\winnt,
win\tty, util.
- If you are including the optional Curses window port into your
- build,then you will need the top of the PDCurses sources in a
+ If you are including the optional Curses window port into your
+ build,then you will need the top of the PDCurses sources in a
folder parallel to the top of the NetHack folder (or you will need
to change the value of the PDCURSES_TOP macro in the Makefile to
specify the appropriate location.
5. Now that everything is set up...
For the Visual Studio compiler, as mentioned above, you should now be
- at the command prompt to carry out the build and your current
+ at the command prompt to carry out the build and your current
directory should be the src subdirectory in the NetHack source tree.
In the src subdirectory, issue this command:
particular machine of course, but you should be able to go for lunch
and return to find everything finished. The less memory, and slower
your machine, the longer the lunch you may take. :-)
-
+
In any case, it is likely that the command prompt window where you
are doing the compiling will be occupied for a while. If all goes
well, you will get an NetHack executable.
your current directory to src and issue the appropriate command for
your compiler:
- For Microsoft compiler:
+ For Microsoft compiler:
nmake
For GCC:
have to delete dgn_flex.c, dgn_yacc.c, lev_flex.c, and lev_yacc.c
from the util directory to ensure that they are remade.
-2. Depending on the build and compiler and tools used above, the
+2. Depending on the build and compiler and tools used above, the
executable produced by the TTY build is either:
- - a 32-bit (x86), flat-address space, non-overlayed .exe file,
+ - a 32-bit (x86), flat-address space, non-overlayed .exe file,
which should run on any recent Win32 environment.
or
- - a 64-bit (x64) .exe file,
+ - a 64-bit (x64) .exe file,
which should run on any 64-bit Windows O/S.
Note that saved games are NOT compatible between the 32-bit and the
64-bit versions at this time.
NetHack.exe is the tty version. NetHackW.exe is the graphical version.
-Play NetHack.
+Play NetHack.
PROBLEMS
#
# Build Options Decisions
#
-# There are currently 4 decisions that you can choose to make.
+# There are currently 4 decisions that you can choose to make.
# None of the 4 decisions are absolutely required because defaults are in place:
# 1. Where do you want your build to end up?
# 2. Do you want debug information in the executable?
#
# 4. Uncomment these and set them appropriately if you want to
# include curses port support alongside TTY support in your
-# NetHack.exe binary.
+# NetHack.exe binary.
#
-# You'll have to set PDCURSES_H to the correct location of the
+# You'll have to set PDCURSES_H to the correct location of the
# PDCurses header (.h) files and PDCURSES_C to the location
-# of your PDCurses C files which must already be resident on
+# of your PDCurses C files which must already be resident on
# your machine.
#
# ADD_CURSES=Y
#---------------------------------------------------------------
# Location of LUA
#
-# Original source needs to be obtained from:
+# Original source needs to be obtained from:
# http://www.lua.org/ftp/lua-5.4.1.tar.gz
#
# This build assumes that the LUA sources are located
# MSWSYS - mswin specific files
# TTY - window port files (tty)
# MSWIN - window port files (win32)
-# WCURSES - window port files (curses)
-# WSHR - Tile support files
+# WCURSES - window port files (curses)
+# WSHR - Tile support files
# QT - QT window support files
INCL =../include
#
VOBJ01 = $(O)allmain.o $(O)alloc.o $(O)apply.o $(O)artifact.o
-VOBJ02 = $(O)attrib.o $(O)ball.o $(O)bones.o $(O)botl.o
-VOBJ03 = $(O)cmd.o $(O)dbridge.o $(O)decl.o $(O)detect.o
-VOBJ04 = $(O)dig.o $(O)display.o $(O)do.o $(O)do_name.o
-VOBJ05 = $(O)do_wear.o $(O)dog.o $(O)dogmove.o $(O)dokick.o
-VOBJ06 = $(O)dothrow.o $(O)drawing.o $(O)dungeon.o $(O)eat.o
-VOBJ07 = $(O)end.o $(O)engrave.o $(O)exper.o $(O)explode.o
-VOBJ08 = $(O)extralev.o $(O)files.o $(O)fountain.o $(O)hack.o
+VOBJ02 = $(O)attrib.o $(O)ball.o $(O)bones.o $(O)botl.o
+VOBJ03 = $(O)cmd.o $(O)dbridge.o $(O)decl.o $(O)detect.o
+VOBJ04 = $(O)dig.o $(O)display.o $(O)do.o $(O)do_name.o
+VOBJ05 = $(O)do_wear.o $(O)dog.o $(O)dogmove.o $(O)dokick.o
+VOBJ06 = $(O)dothrow.o $(O)drawing.o $(O)dungeon.o $(O)eat.o
+VOBJ07 = $(O)end.o $(O)engrave.o $(O)exper.o $(O)explode.o
+VOBJ08 = $(O)extralev.o $(O)files.o $(O)fountain.o $(O)hack.o
VOBJ09 = $(O)hacklib.o $(O)insight.o $(O)invent.o $(O)isaac64.o
VOBJ10 = $(O)light.o $(O)lock.o $(O)mail.o $(O)makemon.o
VOBJ11 = $(O)mapglyph.o $(O)mdlib.o $(O)mcastu.o $(O)mhitm.o
endif
SOBJ = $(O)windmain.o $(O)winnt.o $(O)win10.o \
- $(O)safeproc.o $(O)nhlan.o $(SOUND)
+ $(O)safeproc.o $(O)nhlan.o $(SOUND)
OBJS = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
$(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \
PDCINCL = -I$(PDCURSES_TOP) -I$(PDCSRC) -I$(PDCWINCON)
else
-PDCLIB =
+PDCLIB =
endif
#==========================================
# Since DOS doesn't allow / as path separator, and GCC doesn't allow \ as
# path separator, we must change all pathnames when performing DOS commands.
# This is done by blindly applying $(subst /,\, ...) on every command.
-# Where any command contain / for another reason (switch char, a little
+# Where any command contain / for another reason (switch char, a little
# more care is taken.
#
$(subst /,\,if exist $(U)recover.exe copy $(U)recover.exe $(GAMEDIR))
$(subst /,\,if exist $(DOC)/recover.txt copy $(DOC)/recover.txt $(GAMEDIR)/recover.txt)
-$(O)sp_lev.tag: $(O)utility.tag
+$(O)sp_lev.tag: $(O)utility.tag
$(subst /,\,echo sp_levs done > $(O)sp_lev.tag)
$(O)utility.tag: $(INCL)/date.h $(INCL)/onames.h $(INCL)/pm.h \
$(MSWIN)/splash.bmp
$(rc) -o$@ --include-dir $(MSWIN) -i $(MSWIN)/NetHackW.rc
-$(O)conres.o: $(MSWSYS)/console.rc $(MSWSYS)/NetHack.ico
+$(O)conres.o: $(MSWSYS)/console.rc $(MSWSYS)/NetHack.ico
$(rc) -o$@ --include-dir $(MSWSYS) -i $(MSWSYS)/console.rc
#==========================================
endif
$(O)nhdefkey.o:
- $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nhdefkey.c
+ $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nhdefkey.c
$(GAMEDIR)/nhdefkey.dll : $(O)nhdefkey.o gamedir.tag
@echo Linking $@
-Wl,--add-stdcall-alias -o $@ $<
$(O)nh340key.o:
- $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nh340key.c
+ $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nh340key.c
$(GAMEDIR)/nh340key.dll : $(O)nh340key.o gamedir.tag
@echo Linking $@
-Wl,--add-stdcall-alias -o $@ $<
$(O)nhraykey.o:
- $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nhraykey.c
+ $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nhraykey.c
$(GAMEDIR)/nhraykey.dll : $(O)nhraykey.o gamedir.tag
@echo Linking $@
$(O)pdcurses.a : $(PDCLIBOBJS) $(PDCOBJS)
ar rcs $@ $(PDCLIBOBJS) $(PDCOBJS)
-
+
#=============================================================
# LUA
#=============================================================
$(O)panic.o: $(U)panic.c $(CONFIG_H)
$(cc) $(CFLAGS) -o$@ $(U)panic.c
-#
+#
# sys/share dependencies
#
#
# Other dependencies needed by some ports
-#
+#
ifeq "$(ADD_CURSES)" "Y"
# curses window port dependencies
# with -o$@
# * targets prefixed with $(O)
# * $(CC) changed to $(cc)
-# but otherwise untouched.
+# but otherwise untouched.
# That means that there is some irrelevant stuff
# in here, but maintenance should be easier.
#
#==============================================================================
# Build Tools Environment
#
-# NetHack 3.7 Work-in-progress Makefile for
+# NetHack 3.7 Work-in-progress Makefile for
# MS Visual Studio Visual C++ compiler
#
# Visual Studio Compilers Tested:
#
# BEFORE YOU START, in addition to your C compiler and linker,
#
-# o You will need a complete Lua source tree parallel to your
+# o You will need a complete Lua source tree parallel to your
# NetHack source tree. Lua is not an optional requirement,
# it is required in order to process the level and dungeon
-# description files during the game. You can obtain the
-# Lua source from here:
+# description files during the game. You can obtain the
+# Lua source from here:
# https://www.lua.org/download.html
#
# o If you want to include the curses Window port in the non-GUI
# or via git from here:
# git clone https://github.com/wmcbrine/PDCurses.git ../pdcurses
#
-# o If you want your build of NetHack to include support for
+# o If you want your build of NetHack to include support for
# compressing your save files, or to be able to exchange and use
# compressed save files that originated on another platform such
# as Linux or a handheld phone or tablet, then you will need
#
# Build Options Decisions
#
-# There are currently 5 decisions that you can choose to make.
-# none of the 5 decisions are absolutely required because defaults
+# There are currently 5 decisions that you can choose to make.
+# none of the 5 decisions are absolutely required because defaults
# are in place:
#
# 1. Where do you want your build results to end up?
# 2. Do you want to include the optional curses port?
-# 3. Do you want to include compressed savefile support to
+# 3. Do you want to include compressed savefile support to
# transfer compressed savefiles between platforms?
# 4. Do you want debug information in the executable?
-# 5. Do you want to explicitly override auto-detection of
+# 5. Do you want to explicitly override auto-detection of
# a 32-bit or 64-bit target?
#
# Mandatory Lua source Location (not optional)
GAMEDIR = ..\binary # Default game build directory
#
#------------------------------------------------------------------------------
-# OPTIONAL - Curses window port support
+# OPTIONAL - Curses window port support
#
# 2. Uncomment these and set them appropriately if you want to
# include curses port support alongside TTY support in your
-# NetHack.exe binary.
+# NetHack.exe binary.
#
-# You'll have to set PDCURSES_H to the correct location of the
+# You'll have to set PDCURSES_H to the correct location of the
# PDCurses header (.h) files and PDCURSES_C to the location
# of your PDCurses C files.
#
#
#------------------------------------------------------------------------------
# 4. Do you want debug information available to the executable?
-#
+#
DEBUGINFO = Y
#
#------------------------------------------------------------------------------
# 5. This Makefile will attempt to auto-detect your selected target architecture
# based on Visual Studio command prompt configuration settins etc.
-# However, if you want to manually override generation of a
+# However, if you want to manually override generation of a
# 32-bit or 64-bit build target, you can uncomment the apppropriate
# TARGET_CPU line below.
#
#
# Location of LUA
#
-# Original source needs to be obtained from:
+# Original source needs to be obtained from:
# http://www.lua.org/ftp/lua-5.4.1.tar.gz
#
# This build assumes that the LUA sources are located
MSWSYS = ..\sys\winnt # mswin specific files
TTY = ..\win\tty # window port files (tty)
MSWIN = ..\win\win32 # window port files (win32)
-WCURSES = ..\win\curses # window port files (curses)
-WSHR = ..\win\share # Tile support files
+WCURSES = ..\win\curses # window port files (curses)
+WSHR = ..\win\share # Tile support files
QT = ..\win\Qt # QT support files
X11 = ..\win\X11 # X11 support files
#==========================================
# Exe File Info.
#==========================================
-
-#
+
#
# Optional high-quality BSD random number generation routines
# (see pcconf.h). Set to nothing if not used.
#
VOBJ01 = $(O)allmain.o $(O)alloc.o $(O)apply.o $(O)artifact.o
-VOBJ02 = $(O)attrib.o $(O)ball.o $(O)bones.o $(O)botl.o
-VOBJ03 = $(O)cmd.o $(O)dbridge.o $(O)decl.o $(O)detect.o
-VOBJ04 = $(O)dig.o $(O)display.o $(O)do.o $(O)do_name.o
-VOBJ05 = $(O)do_wear.o $(O)dog.o $(O)dogmove.o $(O)dokick.o
-VOBJ06 = $(O)dothrow.o $(O)drawing.o $(O)dungeon.o $(O)eat.o
-VOBJ07 = $(O)end.o $(O)engrave.o $(O)exper.o $(O)explode.o
-VOBJ08 = $(O)extralev.o $(O)files.o $(O)fountain.o $(O)hack.o
+VOBJ02 = $(O)attrib.o $(O)ball.o $(O)bones.o $(O)botl.o
+VOBJ03 = $(O)cmd.o $(O)dbridge.o $(O)decl.o $(O)detect.o
+VOBJ04 = $(O)dig.o $(O)display.o $(O)do.o $(O)do_name.o
+VOBJ05 = $(O)do_wear.o $(O)dog.o $(O)dogmove.o $(O)dokick.o
+VOBJ06 = $(O)dothrow.o $(O)drawing.o $(O)dungeon.o $(O)eat.o
+VOBJ07 = $(O)end.o $(O)engrave.o $(O)exper.o $(O)explode.o
+VOBJ08 = $(O)extralev.o $(O)files.o $(O)fountain.o $(O)hack.o
VOBJ09 = $(O)hacklib.o $(O)insight.o $(O)invent.o $(O)isaac64.o
VOBJ10 = $(O)light.o $(O)lock.o $(O)mail.o $(O)makemon.o
VOBJ11 = $(O)mapglyph.o $(O)mcastu.o $(O)mhitm.o $(O)mhitu.o
!ENDIF
SOBJ = $(O)windmain.o $(O)winnt.o $(O)win10.o \
- $(O)safeproc.o $(O)nhlan.o $(SOUND)
+ $(O)safeproc.o $(O)nhlan.o $(SOUND)
OBJS = $(MDLIB) \
$(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
PDCINCL = /I$(PDCURSES_TOP) /I$(PDCSRC) /I$(PDCWINCON)
!ELSE
-PDCLIB =
+PDCLIB =
!ENDIF
#==========================================
#
TINC = $(INCL:\=/)
TSRC = $(SRC:\=/)
-
+
cc=cl
cpp=cpp
link=link
rc=Rc
-# Before we get started, this section is used to determine the version of
-# Visual Studio we are using. We set VSVER to 0000 to flag any version that
+# Before we get started, this section is used to determine the version of
+# Visual Studio we are using. We set VSVER to 0000 to flag any version that
# is too old or untested.
#
#NMAKE version 1428293340 from latest VS 2019 (November 19, 2020 version 16.8.2)
# Main game targets.
#==========================================
-# The section for linking the NetHack image looks a little strange at
-# first, especially if you are used to UNIX makes, or NDMAKE. It is
-# Microsoft nmake specific, and it gets around the problem of the
-# link command line being too long for the linker. An "in-line" linker
+# The section for linking the NetHack image looks a little strange at
+# first, especially if you are used to UNIX makes, or NDMAKE. It is
+# Microsoft nmake specific, and it gets around the problem of the
+# link command line being too long for the linker. An "in-line" linker
# response file is generated temporarily.
#
# It takes advantage of the following features of nmake:
#
-# Inline files :
+# Inline files :
# Specifying the "<<" means to start an inline file.
-# Another "<<" at the start of a line closes the
+# Another "<<" at the start of a line closes the
# inline file.
#
# Substitution within Macros:
# $(mymacro:string1=string2) replaces every
-# occurrence of string1 with string2 in the
-# macro mymacro. Special ascii key codes may be
-# used in the substitution text by preceding it
+# occurrence of string1 with string2 in the
+# macro mymacro. Special ascii key codes may be
+# used in the substitution text by preceding it
# with ^ as we have done below. Every occurence
-# of a <tab> in $(ALLOBJ) is replaced by
+# of a <tab> in $(ALLOBJ) is replaced by
# <+><return><tab>.
GAMEOBJ=$(ALLOBJ:^ =^
# libs: $(LIBS) $(conlibs) $(guilibs) $(COMCTRL)
# objs: $(GAMEOBJ) $(TTYOBJ) $(O)nttty.o $(O)tile.o $(GUIOBJ)
# otherwise:
-# libs: $(LIBS) $(conlibs)
+# libs: $(LIBS) $(conlibs)
# objs: $(GAMEOBJ) $(TTYOBJ) $(O)tile.o $(O)guistub.o
@echo utilities made >$@
@echo utilities made.
-$(INCL)\nhlua.h:
+$(INCL)\nhlua.h:
@echo /* nhlua.h - generated by Makefile */ > $@
@echo #include "../lib/lua-$(LUAVER)/src/lua.h" >> $@
@echo LUA_API int (lua_error) (lua_State *L) NORETURN; >> $@
#
# Secondary Targets.
#
-
+
#==========================================
# Makedefs Stuff
#==========================================
$(O)uudecode.o: $(SSYS)\uudecode.c
@$(cc) $(cflagsBuild) $(CROSSCOMPILE) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c
-$(MSWSYS)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu
+$(MSWSYS)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu
chdir $(MSWSYS)
..\..\util\uudecode.exe nhico.uu
chdir ..\..\src
-$(MSWIN)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu
+$(MSWIN)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu
chdir $(MSWIN)
..\..\util\uudecode.exe ../../sys/winnt/nhico.uu
chdir ..\..\src
$(O)sfstruct.o: $(HACK_H) $(SRC)\sfstruct.c
# @$(cc) $(cflagsBuild) -Fo$@ $(SRC)\sfstruct.c
-
+
#===============================================================================
# CROSSCOMPILE
#===============================================================================
# OTHER DEPENDENCIES
#===================================================================
#
-# The rest are stolen from sys/unix/Makefile.src,
+# The rest are stolen from sys/unix/Makefile.src,
# with the following changes:
# * ../include changed to $(INCL)
-# * slashes changed to back-slashes
+# * slashes changed to back-slashes
# * -c (which is included in CFLAGS) substituted with -Fo$@
# * $(CFLAGS) replaced with $(cflagsBuild)
# * $(CC) replaced with @$(cc)