Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2018-11-20 22:50:52 -05:00
85 changed files with 11384 additions and 307 deletions

View File

@@ -5,7 +5,7 @@
NetHack 3.6 on a Windows system
(Windows 7/8.x/10 or later only. XP may work but is untested)
==============================================================
Last revision: $NHDT-Date: 1524317622 2018/04/21 13:33:42 $
Last revision: $NHDT-Date: 1542545993 2018/11/18 12:59:53 $
Credit for the porting of NetHack to the Win32 Console Subsystem goes to
the NT Porting Team started by Michael Allison.
@@ -33,6 +33,24 @@ version. You can use one of the following build environments:
Earlier versions of MinGW will not allow you to build the Windows
Graphical version.
/---------------------------------------------\
| Directories for a Win32 NetHack build |
\---------------------------------------------/
(NetHack-top) ----------------------(optional-pdcurses-top)
| |
---------------------------------------------- --------------
| | | | | | | | |
util dat doc include src sys win pdcurses wincon
| |
------ --------
| | | |
share winnt tty win32
|
vs2017
/--------------------------------------------------------\
| Building And Running Using Visual Studio 2017 |
\--------------------------------------------------------/
@@ -47,6 +65,10 @@ of NetHack you wish to run.
The Visual Studio 2017 NetHack solution file can be found here:
win\win32\vs2017\NetHack.sln
Before executing the steps to build listed in the next paragraph,
decide if you want to include optional curses window-port. See
the note just below entitled "Optional curses window-port support."
So the steps are:
1. Launch the IDE.
2. Open the appropriate solution file.
@@ -60,9 +82,32 @@ using a "build.bat" batch file found in the same directory as the solution.
Open a developer command prompt for the version of Visual Studio you are
using. Change to the directory win\win32\vs2017 and run "build.bat".
/-----------------------------------\
| Building Using Make |
\-----------------------------------/
* Optional curses window-port support *
Starting with 3.6.2, the community patch for a window-port that uses
curses was 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
repository/source-tree
OR
Place the PDCurses folder alongside the NetHack source repository prior
to proceeding with steps 1 through 5 above.
/-------------------------------------------\
| Building From the Command Line Using Make |
\-------------------------------------------/
--------------------------------------------------------------------------
-- 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.
@@ -77,9 +122,8 @@ From a Windows explorer window:
If you wish to build from the command line, proceed to "BUILDING FROM
THE COMMAND LINE."
/--------------------------------\
| BUILDING FROM THE COMMAND LINE |
\--------------------------------/
-- end of prerequisite step --
--------------------------------------------------------------------------
Two different versions of NetHack will be built for Windows from the
command line using the Makefile approach:
@@ -151,48 +195,39 @@ Setting Up
source tree.
cd src
2. Make sure all the NetHack files are in the appropriate directory
structure. You should have a main directory with subdirectories
dat, doc, include, src, sys\share, sys\winnt, util, and binary (The
"binary" directory was created by nhsetup.bat earlier if you
followed the steps appropriately).
2. Starting with 3.6.2, the community patch for an optional curses
window-port was 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
available for Windows, Mac OS X, and Unix (and also DOS).
For Console NetHack you need win\tty in addition to these; for
Graphical NetHack you need win\win32 in addition to these.
If you want to include the optional curses window-port support in your
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
make in there, uncomment these two lines:
ADD_CURSES=Y
PDCURSES_TOP=..\..\pdcurses
Other subdirectories may also be included in your distribution, but
they are not necessary for building the TTY version for the Win32
console subsystem. You can delete them to save space.
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.
Required Directories for a Win32 Console NetHack:
3. Make sure all the necessary files are in the appropriate directory
structure. You should have a main NetHack top directory with
subdirectories dat, doc, include, src, sys\share, sys\winnt,
win\tty, util.
top
|
----------------------------------------------------/ /-----
| | | | | | | |
util dat doc include src sys win binary
| |
------ -----
| | |
share winnt tty
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.
Required Directories for a Win32 Graphical NetHack:
top
|
----------------------------------------------------/ /-----
| | | | | | | |
util dat doc include src sys win binary
| |
------ -----
| | |
share winnt win32
Check the file "Files" in your top level directory for a more
complete listing of what file is in which directory. In order for
the Makefiles to work, all the source files must be in the proper
locations.
(You can check the file "Files" in your top level directory for a
more complete listing of what file is in which directory.)
If you downloaded or ftp'd the sources from a UNIX system, the lines
will probably end in UNIX-style newlines, instead of the carriage
@@ -200,18 +235,6 @@ Setting Up
trouble with them, so you may need to convert them. The compiler
should not have any problems with them however.
3. Now go to the include subdirectory to check a couple of the header
files there. Things *should* work as they are, but since you have
probably set up your system in some sort of custom configuration it
doesn't hurt to check out the following:
First check config.h according to the comments to match your system
and desired set of features. Mostly you need to check section 4 and
5.
You may include all or as few of the special game features as you
wish (they are located last in the file).
4. Edit your Makefile if you wish, but it is not required unless
you are altering the build options.
@@ -276,6 +299,9 @@ Notes:
- 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.

View File

@@ -32,11 +32,12 @@
#========================================================================================
# BUILD DECISIONS SECTION
#
# There are currently only 3 decisions that you can choose to make, and none are
# required:
# There are currently only 4 decisions that you can choose to make, and none 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?
# 3. Do you want to explicitly override auto-detection of a 32-bit or 64-bit target?
# 4. Do you want to include the optional curses port?
#
#-----------------------------------------------------------------------------------------
#=========================================================================================
@@ -61,6 +62,20 @@ DEBUGINFO = Y
#TARGET_CPU=x64
#TARGET_CPU=x86
#---------------------------------------------------------------
# OPTIONAL - Curses window port support
#
# 4. Uncomment these and set them appropriately if you want to
# include curses port support alongside TTY support in your
# NetHack.exe binary.
#
# 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.
#
#ADD_CURSES=Y
#PDCURSES_TOP=..\..\pdcurses
#
#==============================================================================
# This marks the end of the BUILD DECISIONS section.
#==============================================================================
@@ -85,16 +100,17 @@ DEBUGINFO = Y
# Source directories. Makedefs hardcodes these, don't change them.
#
INCL = ..\include # NetHack include files
DAT = ..\dat # NetHack data files
DOC = ..\doc # NetHack documentation files
UTIL = ..\util # Utility source
SRC = ..\src # Main source
SSYS = ..\sys\share # Shared system files
MSWSYS= ..\sys\winnt # mswin specific files
TTY = ..\win\tty # window port files (tty)
MSWIN = ..\win\win32 # window port files (WIN32)
WSHR = ..\win\share # Tile support files
INCL = ..\include # NetHack include files
DAT = ..\dat # NetHack data files
DOC = ..\doc # NetHack documentation files
UTIL = ..\util # Utility source
SRC = ..\src # Main source
SSYS = ..\sys\share # Shared system files
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
#
# Object directory.
@@ -201,8 +217,6 @@ VSVER=2999 #untested future version
!include <win32.mak>
! ENDIF
#----------------------------------------------------------------
#These will be in the environment variables with one of the VS2017
#developer command prompts.
#VSCMD_ARG_HOST_ARCH=x64
@@ -232,94 +246,6 @@ CL_RECENT=-sdl
! ENDIF
!ENDIF
ccommon= -c -nologo -D"_CONSOLE" -D"_CRT_NONSTDC_NO_DEPRECATE" -D"_CRT_SECURE_NO_DEPRECATE" \
-D"_LIB" -D"_SCL_SECURE_NO_DEPRECATE" -D"_VC80_UPGRADE=0x0600" -D"DLB" -D"_MBCS" \
-DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -D"NDEBUG" -D"YY_NO_UNISTD_H" -EHsc -fp:precise -Gd -GF -GS -Gy \
$(CL_RECENT) -WX- -Zc:forScope -Zc:wchar_t -Zi
cdebug= -analyze- -D"_DEBUG" -Gm -MTd -RTC1 -Od
crelease= -analyze- -D"_MBCS" -errorReport:prompt -Gm- -MT -O2 -Ot -Ox -Oy
lcommon= /NOLOGO /INCREMENTAL:NO
!IF "$(DEBUGINFO)" == "Y"
ldebug = /DEBUG
cflags1=$(ccommon) $(cdebug)
lflags1=$(lcommon) $(ldebug)
!ELSE
ldebug= /DEBUG
cflags1=$(ccommon) $(crelease)
lflags1=$(lcommon) $(ldebug)
!ENDIF
lflags= $(lflags1)
!IF "$(TARGET_CPU)" == "x86"
cflags = $(cflags1) -D_X86_=1 -DWIN32 -D_WIN32 -W3
scall = -Gz
!ELSEIF "$(TARGET_CPU)" == "x64"
cflags = $(cflags1) -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -W4
scall =
!ENDIF
!IF ($(VSVER) >= 2012)
cflags = $(cflags:-W4=-W3)
!ENDIF
#More verbose warning output options below
#cflags = $(cflags:-W4=-wd4131
#cflags = $(cflags:-W4=-Wall)
#cflags = $(cflags:-W3=-wd4131
#cflags = $(cflags:-W3=-Wall)
# declarations for use on Intel x86 systems
!IF "$(TARGET_CPU)" == "x86"
DLLENTRY = @12
EXEVER=5.01
MACHINE=/MACHINE:X86
!ENDIF
# declarations for use on AMD64 systems
!IF "$(TARGET_CPU)" == "x64"
DLLENTRY =
EXEVER=5.02
MACHINE=/MACHINE:X64
!ENDIF
# for Windows applications
conlflags = $(lflags) -subsystem:console,$(EXEVER)
guilflags = $(lflags) -subsystem:windows,$(EXEVER)
dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
# basic subsystem specific libraries, less the C Run-Time
baselibs = kernel32.lib $(optlibs) $(winsocklibs) advapi32.lib gdi32.lib
winlibs = $(baselibs) user32.lib comdlg32.lib winspool.lib
# for Windows applications that use the C Run-Time libraries
conlibs = $(baselibs)
guilibs = $(winlibs)
#
INCLDIR= /I..\include /I..\sys\winnt
#==========================================
# Util builds
#==========================================
cflagsBuild = $(cflags) $(INCLDIR) $(WINPFLAG) $(DLBFLG)
lflagsBuild = $(lflags) $(conlibs) $(MACHINE)
#==========================================
# - Game build
#==========================================
LIBS= user32.lib winmm.lib $(ZLIB)
! IF ("$(USE_DLB)"=="Y")
DLB = nhdat
! ELSE
DLB =
! ENDIF
#==========================================
#================ MACROS ==================
@@ -406,6 +332,13 @@ REGEX = $(O)cppregex.o
TTYOBJ = $(O)topl.o $(O)getline.o $(O)wintty.o
!IFNDEF ADD_CURSES
CURSESOBJ=
!ELSE
CURSESOBJ= $(O)cursdial.o $(O)cursinit.o $(O)cursinvt.o $(O)cursmain.o \
$(O)cursmesg.o $(O)cursmisc.o $(O)cursstat.o $(O)curswins.o
!ENDIF
SOBJ = $(O)winnt.o $(O)pcsys.o $(O)pcunix.o \
$(SOUND) $(O)nhlan.o
@@ -414,7 +347,8 @@ OBJS = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
$(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \
$(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \
$(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \
$(VOBJ26) $(VOBJ27) $(VOBJ28) $(VOBJ29) $(REGEX)
$(VOBJ26) $(VOBJ27) $(VOBJ28) $(VOBJ29) $(REGEX) \
$(CURSESOBJ)
GUIOBJ = $(O)mhaskyn.o $(O)mhdlg.o \
$(O)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \
@@ -444,6 +378,35 @@ ALLOBJ = $(SOBJ) $(DLBOBJ) $(WOBJ) $(OBJS) $(VVOBJ)
OPTIONS_FILE = $(DAT)\options
!IF "$(ADD_CURSES)" == "Y"
#==========================================
# PDCurses build macros
#==========================================
PDCURSES_CURSES_H = $(PDCURSES_TOP)\curses.h
PDCURSES_CURSPRIV_H = $(PDCURSES_TOP)\curspriv.h
PDCURSES_HEADERS = $(PDCURSES_CURSES_H) $(PDCURSES_CURSPRIV_H)
PDCSRC = $(PDCURSES_TOP)\pdcurses
PDCWINCON = $(PDCURSES_TOP)\wincon
PDCLIBOBJS = $(O)addch.o $(O)addchstr.o $(O)addstr.o $(O)attr.o $(O)beep.o \
$(O)bkgd.o $(O)border.o $(O)clear.o $(O)color.o $(O)delch.o $(O)deleteln.o \
$(O)deprec.o $(O)getch.o $(O)getstr.o $(O)getyx.o $(O)inch.o $(O)inchstr.o \
$(O)initscr.o $(O)inopts.o $(O)insch.o $(O)insstr.o $(O)instr.o $(O)kernel.o \
$(O)keyname.o $(O)mouse.o $(O)move.o $(O)outopts.o $(O)overlay.o $(O)pad.o \
$(O)panel.o $(O)printw.o $(O)refresh.o $(O)scanw.o $(O)scr_dump.o $(O)scroll.o \
$(O)slk.o $(O)termattr.o $(O)terminfo.o $(O)touch.o $(O)util.o $(O)window.o \
$(O)debug.o
PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o $(O)pdcscrn.o \
$(O)pdcsetsc.o $(O)pdcutil.o
PDCLIB = $(O)\pdcurses.lib
PDCINCL = /I$(PDCURSES_TOP) /I$(PDCSRC) /I$(PDCWINCON)
!ELSE
PDCLIB =
!ENDIF
#==========================================
# Header file macros
#==========================================
@@ -481,6 +444,114 @@ TILE_H = ..\win\share\tile.h
DATABASE = $(DAT)\data.base
#==========================================
# More compiler setup post-macros
#==========================================
#----------------------------------------------------------------
!IF "$(ADD_CURSES)" == "Y"
#CURSESDEF=-D"PDC_DLL_BUILD" -D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
!ELSE
CURSDEF=
CURSESLIB=
CURSESINCL=
!ENDIF
ccommon= -c -nologo -D"_CONSOLE" -D"_CRT_NONSTDC_NO_DEPRECATE" -D"_CRT_SECURE_NO_DEPRECATE" \
-D"_LIB" -D"_SCL_SECURE_NO_DEPRECATE" -D"_VC80_UPGRADE=0x0600" -D"DLB" -D"_MBCS" \
-DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -D"NDEBUG" -D"YY_NO_UNISTD_H" $(CURSESDEF) \
-EHsc -fp:precise -Gd -GF -GS -Gy \
$(CL_RECENT) -WX- -Zc:forScope -Zc:wchar_t -Zi
cdebug= -analyze- -D"_DEBUG" -Gm -MTd -RTC1 -Od
crelease= -analyze- -D"_MBCS" -errorReport:prompt -Gm- -MT -O2 -Ot -Ox -Oy
lcommon= /NOLOGO /INCREMENTAL:NO
!IF "$(DEBUGINFO)" == "Y"
ldebug = /DEBUG
cflags1=$(ccommon) $(cdebug)
lflags1=$(lcommon) $(ldebug)
!ELSE
ldebug= /DEBUG
cflags1=$(ccommon) $(crelease)
lflags1=$(lcommon) $(ldebug)
!ENDIF
lflags= $(lflags1)
!IF "$(TARGET_CPU)" == "x86"
cflags = $(cflags1) -D_X86_=1 -DWIN32 -D_WIN32 -W3
scall = -Gz
!ELSEIF "$(TARGET_CPU)" == "x64"
cflags = $(cflags1) -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -W4
scall =
!ENDIF
!IF ($(VSVER) >= 2012)
cflags = $(cflags:-W4=-W3)
!ENDIF
#More verbose warning output options below
#cflags = $(cflags:-W4=-wd4131
#cflags = $(cflags:-W4=-Wall)
#cflags = $(cflags:-W3=-wd4131
#cflags = $(cflags:-W3=-Wall)
# declarations for use on Intel x86 systems
!IF "$(TARGET_CPU)" == "x86"
DLLENTRY = @12
EXEVER=5.01
MACHINE=/MACHINE:X86
!ENDIF
# declarations for use on AMD64 systems
!IF "$(TARGET_CPU)" == "x64"
DLLENTRY =
EXEVER=5.02
MACHINE=/MACHINE:X64
!ENDIF
# for Windows applications
conlflags = $(lflags) -subsystem:console,$(EXEVER)
guilflags = $(lflags) -subsystem:windows,$(EXEVER)
dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
# basic subsystem specific libraries, less the C Run-Time
baselibs = kernel32.lib $(optlibs) $(winsocklibs) advapi32.lib gdi32.lib
winlibs = $(baselibs) user32.lib comdlg32.lib winspool.lib
# for Windows applications that use the C Run-Time libraries
conlibs = $(baselibs)
guilibs = $(winlibs)
#
!IFNDEF ADD_CURSES
INCLDIR= /I..\include /I..\sys\winnt
!ELSE
INCLDIR= /I..\include /I..\sys\winnt /I$(CURSESINCL)
!ENDIF
#==========================================
# Util builds
#==========================================
cflagsBuild = $(cflags) $(INCLDIR) $(WINPFLAG) $(DLBFLG)
lflagsBuild = $(lflags) $(conlibs) $(MACHINE)
#==========================================
# - Game build
#==========================================
LIBS= user32.lib winmm.lib $(ZLIB) $(CURSESLIB)
! IF ("$(USE_DLB)"=="Y")
DLB = nhdat
! ELSE
DLB =
! ENDIF
#==========================================
#================ RULES ==================
#==========================================
@@ -552,6 +623,29 @@ DATABASE = $(DAT)\data.base
{$(MSWIN)}.c{$(OBJ)}.o:
@$(cc) $(cflagsBuild) -Fo$@ $<
#==========================================
# Rules for files in win\curses
#==========================================
{$(WCURSES)}.c{$(OBJ)}.o:
@$(cc) $(PDCINCL) $(cflagsBuild) -Fo$@ $<
#{$(WCURSES)}.txt{$(DAT)}.txt:
# @copy $< $@
#==========================================
# Rules for files in PDCurses
#==========================================
{$(PDCURSES_TOP)}.c{$(OBJ)}.o:
@$(cc) $(PDCINCL) $(cflagsBuild) -Fo$@ $<
{$(PDCSRC)}.c{$(OBJ)}.o:
@$(cc) $(PDCINCL) $(cflagsBuild) -Fo$@ $<
{$(PDCWINCON)}.c{$(OBJ)}.o:
@$(cc) $(PDCINCL) $(cflagsBuild) -Fo$@ $<
#==========================================
#=============== TARGETS ==================
#==========================================
@@ -592,7 +686,7 @@ $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \
if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt
@if exist $(GAMEDIR)\NetHack.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHack.PDB to conserve space
@if exist $(GAMEDIR)\NetHackW.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHackW.PDB to conserve space
-copy $(MSWSYS)\defaults.nh $(GAMEDIR)\defaults.nh
-if not exist $(GAMEDIR)\defaults.nh copy $(MSWSYS)\defaults.nh $(GAMEDIR)\defaults.nh
-if not exist $(GAMEDIR)\record. goto>$(GAMEDIR)\record.
echo install done > $@
@@ -702,12 +796,12 @@ GAMEOBJ=$(GAMEOBJ:^ =^
# objs: $(GAMEOBJ) $(TTYOBJ) $(O)tile.o $(O)guistub.o
$(GAMEDIR)\NetHack.exe : $(O)gamedir.tag $(O)tile.o $(O)nttty.o $(O)guistub.o \
$(GAMEDIR)\NetHack.exe : $(O)gamedir.tag $(PDCLIB) $(O)tile.o $(O)nttty.o $(O)guistub.o \
$(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)console.res $(KEYDLLS)
@if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
@echo Linking $(@:\=/)
$(link) $(lflagsBuild) $(conlflags) /STACK:2048 /PDB:$(GAMEDIR)\$(@B).PDB /MAP:$(O)$(@B).MAP \
$(LIBS) $(conlibs) -out:$@ @<<$(@B).lnk
$(LIBS) $(PDCLIB) $(conlibs) -out:$@ @<<$(@B).lnk
$(GAMEOBJ)
$(TTYOBJ)
$(O)nttty.o
@@ -730,7 +824,7 @@ $(GAMEDIR)\NetHackW.exe : $(O)gamedir.tag $(O)tile.o $(O)ttystub.o \
@if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
@echo Linking $(@:\=/)
$(link) $(lflagsBuild) $(guilflags) /STACK:2048 /PDB:$(GAMEDIR)\$(@B).PDB \
/MAP:$(O)$(@B).MAP $(LIBS) $(guilibs) $(COMCTRL) -out:$@ @<<$(@B).lnk
/MAP:$(O)$(@B).MAP $(LIBS) $(PDCLIB) $(guilibs) $(COMCTRL) -out:$@ @<<$(@B).lnk
$(GAMEOBJ)
$(GUIOBJ)
$(O)tile.o
@@ -987,6 +1081,12 @@ $(O)envchk.tag: $(O)obj.tag
! ELSE
@echo Windows x86 32-bit target build
! ENDIF
!IFDEF TTYOBJ
@echo tty window support included
! IF "$(ADD_CURSES)"=="Y"
@echo curses window support also included
! ENDIF
!ENDIF
! IF "$(CL)"!=""
# @echo Warning, the CL Environment variable is defined:
# @echo CL=$(CL)
@@ -1157,6 +1257,13 @@ $(O)tile2bmp.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h
$(O)til2bm32.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h
@$(cc) $(cflagsBuild) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c
#==========================================
# PDCurses
#==========================================
$(O)\pdcurses.lib : $(PDCLIBOBJS) $(PDCOBJS)
lib -nologo /out:$@ $(PDCLIBOBJS) $(PDCOBJS)
#==========================================
# Housekeeping
#==========================================
@@ -1241,6 +1348,9 @@ spotless: clean
if exist $(U)tilemap.exe del $(U)tilemap.exe
if exist $(U)uudecode.exe del $(U)uudecode.exe
if exist $(U)dlb_main.exe del $(U)dlb_main.exe
!IF "$(ADD_CURSES)" == "Y"
if exist $(O)pdcurses.lib del $(O)pdcurses.lib
!ENDIF
clean:
if exist $(O)*.o del $(O)*.o
if exist $(O)utility.tag del $(O)utility.tag
@@ -1372,6 +1482,17 @@ $(O)panic.o: $(U)panic.c $(CONFIG_H)
(O)cppregex.o: $(O)cppregex.cpp $(HACK_H)
@$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\cppregex.cpp
#
# curses window port dependencies
#
$(O)\cursdial.o: $(WCURSES)\cursdial.c $(WCURSES)\cursdial.h $(INCL)\wincurs.h
$(O)\cursinit.c: $(WCURSES)\cursinit.c $(WCURSES)\cursinit.h $(INCL)\wincurs.h
$(O)\cursinvt.c: $(WCURSES)\cursinvt.c $(WCURSES)\cursinvt.h $(INCL)\wincurs.h
$(O)\cursmain.c: $(WCURSES)\cursmain.c $(WCURSES)\cursmain.h $(INCL)\wincurs.h
$(O)\cursmesg.c: $(WCURSES)\cursmesg.c $(WCURSES)\cursmesg.h $(INCL)\wincurs.h
$(O)\cursmisc.c: $(WCURSES)\cursmisc.c $(WCURSES)\cursmisc.h $(INCL)\wincurs.h
$(O)\cursstat.c: $(WCURSES)\cursstat.c $(WCURSES)\cursstat.h $(INCL)\wincurs.h
$(O)\curswins.c: $(WCURSES)\curswins.c $(WCURSES)\curswins.h $(INCL)\wincurs.h
#
# The rest are stolen from sys/unix/Makefile.src,
# with the following changes:
@@ -1420,9 +1541,9 @@ $(O)topl.o: ..\win\tty\topl.c $(HACK_H) $(INCL)\tcap.h
@$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\topl.c
$(O)wintty.o: ..\win\tty\wintty.c $(HACK_H) $(INCL)\dlb.h $(INCL)\tcap.h
@$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\wintty.c
$(O)Window.o: ..\win\X11\Window.c $(INCL)\xwindowp.h $(INCL)\xwindow.h \
$(CONFIG_H)
@$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\Window.c
#$(O)Window.o: ..\win\X11\Window.c $(INCL)\xwindowp.h $(INCL)\xwindow.h \
# $(CONFIG_H)
# @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\Window.c
$(O)dialogs.o: ..\win\X11\dialogs.c $(CONFIG_H)
@$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\dialogs.c
$(O)winX.o: ..\win\X11\winX.c $(HACK_H) $(INCL)\winX.h $(INCL)\dlb.h \
@@ -1620,7 +1741,7 @@ $(O)vision.o: vision.c $(HACK_H) $(INCL)\vis_tab.h
$(O)weapon.o: weapon.c $(HACK_H)
$(O)were.o: were.c $(HACK_H)
$(O)wield.o: wield.c $(HACK_H)
$(O)windows.o: windows.c $(HACK_H) $(INCL)\wingem.h $(INCL)\winGnome.h
#$(O)windows.o: windows.c $(HACK_H) $(INCL)\wingem.h $(INCL)\winGnome.h
$(O)wizard.o: wizard.c $(HACK_H) $(INCL)\qtext.h
$(O)worm.o: worm.c $(HACK_H) $(INCL)\lev.h
$(O)worn.o: worn.c $(HACK_H)