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

@@ -98,8 +98,12 @@ char *argv[];
nethack_enter(argc, argv);
sys_early_init();
#ifdef WIN32
#if defined(WIN32) && defined(TTY_GRAPHICS)
Strcpy(default_window_sys, "tty");
#else
#if defined(CURSES_GRAPHICS)
Strcpy(default_window_sys, "curses");
#endif
#endif
resuming = pcmain(argc, argv);
@@ -173,6 +177,10 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
choose_windows(DEFAULT_WINDOW_SYS);
#else
choose_windows(default_window_sys);
if (argc > 1
&& !strcmpi(default_window_sys, "mswin")
&& strstri(argv[0], "nethackw.exe"))
iflags.windowtype_locked = TRUE;
#endif
#if !defined(AMIGA) && !defined(GNUDOS)
@@ -500,9 +508,9 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
} else {
iflags.use_background_glyph = TRUE;
}
#endif
#endif
#endif
#endif /* TTY_GRAPHICS */
#endif /* WIN32 */
#endif /* MSDOS || WIN32 */
#if defined(MSDOS) || defined(WIN32)
init_nhwindows(&argc, argv);

1
sys/unix/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
XCodeLocal.xcconfig

View File

@@ -146,6 +146,15 @@ SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o unixres.o
#LINK = gcc
#LFLAGS = -Xlinker -soname=_APP_
# Compile with PDCurses installed in a separate directory that doesn't
# conflict with the system curses/ncurses library
#CFLAGS = -O -I../include -I/usr/local/include/pdcurses
# Same as above, but for XCurses
#CFLAGS = -O -DXCURSES -I../include -I/usr/local/include/pdcurses
# Compile against system curses library, such as ncurses
#CFLAGS = -O -I../include
# Only used for the Gnome interface.
# When including the Gnome interface, you need to include gnome specific
# directories. The ones given below is the usual spot for linux systems.
@@ -190,6 +199,14 @@ WINTTYSRC = ../win/tty/getline.c ../win/tty/termcap.c ../win/tty/topl.c \
../win/tty/wintty.c
WINTTYOBJ = getline.o termcap.o topl.o wintty.o
#
# Files for curses interface
WINCURSESSRC = ../win/curses/cursmain.c ../win/curses/curswins.c \
../win/curses/cursmisc.c ../win/curses/cursdial.c \
../win/curses/cursstat.c ../win/curses/cursinit.c \
../win/curses/cursmesg.c ../win/curses/cursinvt.c
WINCURSESOBJ = cursmain.o curswins.o cursmisc.o cursdial.o cursstat.o \
cursinit.o cursmesg.o cursinvt.o
#
# files for an X11 port
# (tile.c is a generated source file)
WINX11SRC = ../win/X11/Window.c ../win/X11/dialogs.c ../win/X11/winX.c \
@@ -243,12 +260,15 @@ WINBEOBJ =
#WINBESRC = ../win/BeOS/winbe.cpp ../win/BeOS/NHWindow.cpp \
# ../win/BeOS/NHMenuWindow.cpp ../win/BeOS/NHMapWindow.cpp tile.c
#WINBEOBJ = winbe.o NHWindow.o NHMenuWindow.o NHMapWindow.o tile.o
#
#
#WINSRC = $(WINTTYSRC)
#WINOBJ = $(WINTTYOBJ)
#
# Curses - Karl Garrison, Tangles
#WINSRC = $(WINCURSESSRC)
#WINOBJ = $(WINCURSESOBJ)
#
# on some systems the termcap library is in -ltermcap or -lcurses
# on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead
# Sysatt uses shared library in lieu of this option
@@ -272,6 +292,7 @@ WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
# WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
# WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0
#
#
# libraries for Qt 3
WINQTLIB = -L$(QTDIR)/lib -lqt
#
@@ -292,9 +313,20 @@ WINGEMLIB = -le_gem -lgem
#
# libraries for BeOS
WINBELIB = -lbe
#
# libraries for curses port
# link with ncurses
WINCURSESLIB = -lncurses
# link with pdcurses for SDL, installed in a separate directory
#WINCURSESLIB = -L/usr/local/lib/pdcurses -lpdcurses -lSDL
# same as above, for XCurses
#WINCURSESLIB = -L/usr/local/lib/pdcurses -lXCurses -lXawM -lXmu -lXext -lXt -lX11
#
#WINLIB = $(WINTTYLIB)
#
# For Curses
#WINLIB = $(WINCURSESLIB)
#
# any other strange libraries your system needs (for Sysunix only -- the more
# specialized targets should already be right)
#
@@ -743,6 +775,29 @@ topl.o: ../win/tty/topl.c $(HACK_H) ../include/tcap.h
$(CC) $(CFLAGS) -c ../win/tty/topl.c
wintty.o: ../win/tty/wintty.c $(HACK_H) ../include/dlb.h ../include/tcap.h
$(CC) $(CFLAGS) -c ../win/tty/wintty.c
cursmain.o: ../win/curses/cursmain.c $(HACK_H) ../include/wincurs.h
$(CC) $(CFLAGS) -c ../win/curses/cursmain.c
curswins.o: ../win/curses/curswins.c $(HACK_H) ../include/func_tab.h \
../include/wincurs.h ../win/curses/curswins.h
$(CC) $(CFLAGS) -c ../win/curses/curswins.c
cursmisc.o: ../win/curses/cursmisc.c $(HACK_H) ../include/wincurs.h \
../win/curses/cursmisc.h
$(CC) $(CFLAGS) -c ../win/curses/cursmisc.c
cursdial.o: ../win/curses/cursdial.c $(HACK_H) ../include/func_tab.h \
../include/wincurs.h ../win/curses/cursdial.h
$(CC) $(CFLAGS) -c ../win/curses/cursdial.c
cursstat.o: ../win/curses/cursstat.c $(HACK_H) ../include/wincurs.h \
../win/curses/cursstat.h
$(CC) $(CFLAGS) -c ../win/curses/cursstat.c
cursinit.o: ../win/curses/cursinit.c $(HACK_H) ../include/wincurs.h \
../win/curses/cursinit.h
$(CC) $(CFLAGS) -c ../win/curses/cursinit.c
cursinvt.o: ../win/curses/cursinvt.c $(HACK_H) ../include/wincurs.h \
../win/curses/cursinvt.h
$(CC) $(CFLAGS) -c ../win/curses/cursinvt.c
cursmesg.o: ../win/curses/cursmesg.c $(HACK_H) ../include/wincurs.h \
../win/curses/cursmesg.h
$(CC) $(CFLAGS) -c ../win/curses/cursmesg.c
Window.o: ../win/X11/Window.c ../include/xwindowp.h ../include/xwindow.h \
$(CONFIG_H) ../include/lint.h
$(CC) $(CFLAGS) -c ../win/X11/Window.c

34
sys/unix/NetHack.xcodeproj/.gitignore vendored Normal file
View File

@@ -0,0 +1,34 @@
# OS X temporary files that should never be committed
#
.DS_Store
.Trashes
*.swp
#*.lock
#
# NB: NIB/XIB files still exist even on Storyboard projects, so we want this...
*~.nib
#
# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData"
DerivedData/
# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build"
build/
# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups)
#
#*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
# NB: also, whitelist the default ones, some projects need to use these
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
####
# Xcode 4 - semi-personal settings
*.xccheckout
# throw away ALL personal settings (including custom schemes!
# - unless they are "shared")
# As per build/ and DerivedData/, this ought to have a trailing slash
xcuserdata/
#
*.moved-aside

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
xcuserdata

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:NetHack.xcodeproj">
</FileRef>
</Workspace>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>

View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3189577021A1FCC100FB2ABE"
BuildableName = "NetHack"
BlueprintName = "NetHack"
ReferencedContainer = "container:NetHack.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3189577021A1FCC100FB2ABE"
BuildableName = "NetHack"
BlueprintName = "NetHack"
ReferencedContainer = "container:NetHack.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3189577021A1FCC100FB2ABE"
BuildableName = "NetHack"
BlueprintName = "NetHack"
ReferencedContainer = "container:NetHack.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3189577021A1FCC100FB2ABE"
BuildableName = "NetHack"
BlueprintName = "NetHack"
ReferencedContainer = "container:NetHack.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3189577E21A1FDA400FB2ABE"
BuildableName = "makedefs"
BlueprintName = "makedefs"
ReferencedContainer = "container:NetHack.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3189577E21A1FDA400FB2ABE"
BuildableName = "makedefs"
BlueprintName = "makedefs"
ReferencedContainer = "container:NetHack.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3189577E21A1FDA400FB2ABE"
BuildableName = "makedefs"
BlueprintName = "makedefs"
ReferencedContainer = "container:NetHack.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3189577E21A1FDA400FB2ABE"
BuildableName = "makedefs"
BlueprintName = "makedefs"
ReferencedContainer = "container:NetHack.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "31B8A44921A26A4B0055BD01"
BuildableName = "recover"
BlueprintName = "recover"
ReferencedContainer = "container:NetHack.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "31B8A44921A26A4B0055BD01"
BuildableName = "recover"
BlueprintName = "recover"
ReferencedContainer = "container:NetHack.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "31B8A44921A26A4B0055BD01"
BuildableName = "recover"
BlueprintName = "recover"
ReferencedContainer = "container:NetHack.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "31B8A44921A26A4B0055BD01"
BuildableName = "recover"
BlueprintName = "recover"
ReferencedContainer = "container:NetHack.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

39
sys/unix/README.xcode Normal file
View File

@@ -0,0 +1,39 @@
This README provides the instructions for building the unofficial Mac
binaries using the Apple provided developer IDE named XCode.
Establish a developer team in XCode
===================================
Your first step should be to establish a developer team within XCode.
Launch XCode and open the preferences diaglog (XCode Menu->Preferences).
Select the "Accounts" tab. Add an account (usually this should just be
your apple ID accoung you used to setup the Mac). After adding the account,
select the account and then add a team (usually this will be just a
personal team for Mac Development).
Obtain your developer team identifier
=====================================
Your DEVELOPMENT_TEAM can be found by opening Keychain Access
(found by Finder->Applications->Utilities). Click on "My Certificates".
Look for your "Mac Developer" certificate. Right click on
the certificate to open a dialog that shows certificate details.
Look for "Organizational Unit" among the details. This ten digit value
is your development team identifier.
Create XCodeLocal.xcconfig file
===============================
Now you need to create the XCodeLocal.xcconfig file that will be used by
XCode to get your development team identifier. Create the file in
sys/unix and add a single line such as:
DEVELOPMENT_TEAM = XXXXXXXXXX
Where XXXXXXXXXX is replaced with your development team identifier.
Open the project and build
==========================
In XCode open the project file sys\unix\NetHack.xcodeproj, select
the product NetHack and build. The build results are placed in
~nethackdir.

38
sys/unix/XCode.xcconfig Normal file
View File

@@ -0,0 +1,38 @@
// XCodeConfig.xcconfig
// NetHack
//
// Created by Groot on 11/19/18.
// Copyright © 2018 Bart House. All rights reserved.
//
// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974
// PLEASE READ
//
// You must define the build configuration setting DEVELOPMENT_TEAM
// in order for the project to build successfully. This setting provides
// the identifier XCode needs in order to sign your builds.
//
// Your DEVELOPMENT_TEAM can be found by opening Keychain Access
// (found by Finder->Applications->Utilities). Click on "My Certificates".
// Look for your "Mac Developer" certificate. Right click on
// the certificate to open a dialog that shows certificate details.
// Look for "Organizational Unit" among the details. This ten digit value
// is your development team identifier.
//
// Once found, you now need to create a file named "XCodeLocal.xcconfig"
// in the same folder as "XCode.xcconfig". This file should contain at
// least one line that defines your DEVELOPMENT_TEAM. The line should have
// the form:
// DEVELOPMENT_TEAM = XXXXXXXXXX
//
// If you know what you are doing, it can also have other build settings
// you wish to override.
//
// This new file is ignored by git and should never be submitted to the
// repository. It is meant to be local to you machine only.
//
// Include locally provided config file that must define DEVELOPMENT_TEAM
#include? "XCodeLocal.xcconfig"

View File

@@ -27,14 +27,15 @@ CFLAGS+=-DTIMED_DELAY
CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
CFLAGS+=-DDUMPLOG
CFLAGS+=-DCONFIG_ERROR_SECURE=FALSE
CFLAGS+=-DCURSES_GRAPHICS
LINK=$(CC)
# Only needed for GLIBC stack trace:
LFLAGS=-rdynamic
WINSRC = $(WINTTYSRC)
WINOBJ = $(WINTTYOBJ)
WINLIB = $(WINTTYLIB)
WINSRC = $(WINTTYSRC) $(WINCURSESSRC)
WINOBJ = $(WINTTYOBJ) $(WINCURSESOBJ)
WINLIB = $(WINTTYLIB) $(WINCURSESLIB)
WINTTYLIB=-lcurses

View File

@@ -21,11 +21,13 @@
WANT_WIN_TTY=1
#WANT_WIN_X11=1
#WANT_WIN_QT=1
#WANT_WIN_CURSES=1
# 1a. What is the default window system?
WANT_DEFAULT=tty
#WANT_DEFAULT=x11
#WANT_DEFAULT=qt
#WANT_DEFAULT=curses
# 1b. If you set WANT_WIN_QT, you need to
# A) set QTDIR either here or in the environment to point to the Qt2 or Qt3
@@ -96,6 +98,13 @@ else # !WANT_WIN_TTY
CFLAGS += -DNOTTYGRAPHICS
endif # !WANT_WIN_TTY
ifdef WANT_WIN_CURSES
CFLAGS += -DCURSES_GRAPHICS
WINSRC += $(WINCURSESSRC)
WINOBJ += $(WINCURSESOBJ)
WINLIB += -lncurses
endif
ifdef WANT_WIN_X11
WINSRC += $(WINX11SRC)
WINOBJ += $(WINX11OBJ)

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)