Files
nethack/sys/windows/Makefile.gcc
nhmall 9bb96322a8 compile NetHack-3.7 without makedefs-generated .h files
This evolves and hopefully eases the game-build requirements by
removing game-compile dependencies on any header files generated
by the makedefs utility, including:

date.h dependency and its inclusion is removed and comparable functionality
is produced at runtime via new file src/date.c.

pm.h dependency and its inclusion is removed and comparable functionality is
produced by moving the monster definitions from monst.c into new header
file called monsters.h and altering them slightly. The former pm.h header
file #define PM_ values are now replaced with appropriate emitted enum
entries during the compiler preprocessing.

onames.h dependency and	its inclusion is removed and comparable functionality
is produced by moving the object definitions from objects.c into new header
file called objects.h and altering them slightly. The former onames.h header
file #define values are now replaced with appropriate emitted enum entries
during the compiler preprocessing.

artilist.h has been slightly altered, and the former onames.h artifact-related
header file #define ART_ values are now replaced with appropriate emitted enum
entries during the compiler preprocessing.

makedefs can still produce date.h (makedefs -v), pm.h (makedefs -p), and
onames.h (makedefs -o) for reference purposes. They won't be used during
the compiler.

The other uses for makedefs remain. They are used to prepare external
file content that the game utilizes, not prerequisite code for the
compile:
    makedefs -d    (database)
    makedefs -r    (rumors)
    makedefs -h    (oracles)
    makedefs -s    (epitaphs, engravings, bogusmons)

date.c

Pull the code for date/time stamping from mdlib.c into date.c.
Set date.o to be dependent on source files, header files, and .o files
so that date.o is rebuilt from date.c when any of those changes, thus
ensuring an accurate date/time stamp. It also includes git sha
functionality formerly done by makedefs writing #define directives
into include/date.h. For unix it passes the git info on
the compile line for date.c (via sys/unix/hints/linux.2020, macOS.2020)

nethack --dumpenums (optional, but on by default)

Allow developer to obtain some internal enum values from NetHack
without having to resort to an external utility such as
makedefs.

Uncomment #define NODUMPENUMS in config.h to disable this.

The updates to sys/windows/Makefile.gcc have not been tested yet.
2021-08-21 07:59:18 -04:00

1789 lines
62 KiB
Makefile

# NetHack 3.7 Makefile.gcc $NHDT-Date: 1597761345 2020/08/18 14:35:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.114 $
# Copyright (c) 2010 by Michael Allison
# NetHack may be freely redistributed. See license for details.
#
#==============================================================================
#
# Win32 Compilers Tested with this Makefile.gcc:
# mingw-w64
# from:
# https://sourceforge.net/p/mingw-w64/wiki2/GeneralUsageInstructions/
# Toolchain for Windows 32-bit target
#
#
#==============================================================================
# This is used for building two versions of NetHack:
#
# A tty port utilizing the Win32 Console I/O subsystem, Console
# NetHack.
#
# A Win32 native port built on the Windows API, Graphical NetHack or
# NetHackW.
#
# In addition to your C compiler,
#
# if you want to change you will need a
# files with suffix workalike for
# .y yacc (such as bison)
# .l lex (such as flex)
#
# If you have any questions read the sys/windows/Install.windows file included
# with the distribution.
#==============================================================================
# DECISIONS SECTION
#
# Build Options Decisions
#
# 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. Do you have git commands in your path and NetHack in a git repository?
# 2. Where do you want your build results to end up?
# 3. Do you want debug information in the executable?
# 4. Do you want to explicitly override auto-detection of a 32-bit or 64-bit target?
# 5. Do you want to include any optional interfaces in the port?
# 5a) curses
# 5b) Qt
#
# Mandatory LUA source Location
#
# LUA source code or is required to build NetHack-3.7.
# LUATOP must point to the location of the LUA sources.
#
#-----------------------------------------------------------------------------------------
#=========================================================================================
#==============================================================================
#---------------------------------------------------------------
# 1. Where do you want the game to be built (which folder)?
# If not present prior to compilation it gets created.
#
GAMEDIR = ../binary
# 1. 32-bit or 64-bit?
#
#
#---------------------------------------------------------------
# 2. Do you want debug information in the executable?
#
DEBUGINFO = Y
#
#---------------------------------------------------------------
# 3. Do you want to explicitly override auto-detection of a 32-bit
# or 64-bit executable (save files do not interchange currently)?
#
# 64 bit
#TARGET_CPU=x64
#
# 32 bit
TARGET_CPU=x86
#
#
#---------------------------------------------------------------
# 4. Do you want additional GUI interfaces in the executable?
# Make these Y to enable the GUIs. Win32 is always enabled,
# and is the default.
#
#4a 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 which must already be resident on
# your machine.
#
# ADD_CURSES=Y
# PDCURSES_TOP=../lib/pdcurses
#4b Qt
#
#WANT_WIN_QT = N
# WANT_WIN_QT requires Qt 4 or Qt 5, see
# https://www.qt.io/download-open-source/
# Earlier versions of Qt are not compatible with Windows
# For Qt 5, use:
#
#QT_DIRECTORY = c:/Qt/Qt5.9.2/5.9.2/mingw53_32
#HAVE_QT5 = Y
# For Qt 4, comment out the above two lines and use:
#
#QT_DIRECTORY = c:/Qt/4.8.6
#HAVE_QT5 = N
#
# Note that additional GUI interfaces may require external libraries.
# Qt is placed where the official installer places it.
# Other libraries are placed in a subdirectory of your home directory, either
# x86libs or x64libs depending on whether you're building for 64 bits.
#
#---------------------------------------------------------------
ifndef LUA_VERSION
LUAVER=5.4.3
else
LUAVER=$(LUA_VERSION)
endif
#---------------------------------------------------------------
# Location of LUA
#
# Original source needs to be obtained from:
# http://www.lua.org/ftp/lua-5.4.3.tar.gz
#
# This build assumes that the LUA sources are located
# at the specified location. If they are actually elsewhere
# you'll need to specify the correct spot below in order to
# successfully build NetHack-3.7.
#
ifndef ADD_LUA
ADD_LUA=Y
LUATOP=../lib/lua-$(LUAVER)
WANT_LUAC=Y
endif
#
#==============================================================================
# This marks the end of the BUILD DECISIONS section.
#==============================================================================
#
#===============================================
#======= End of Modification Section ===========
#===============================================
#
################################################
# #
# Nothing below here should have to be changed.#
# #
################################################
#
#==============================================================================
SKIP_NETHACKW=Y
#==============================================================================
# The version of the game this Makefile was designed for
NETHACK_VERSION="3.7.0"
# A brief version for use in macros
NHV1=$(subst .,,$(NETHACK_VERSION))
NHV=$(subst ",,$(NHV1))
#
# Source directories. Makedefs hardcodes these, don't change them.
#
# INCL - NetHack include files
# DAT - NetHack data files
# DOC - NetHack documentation files
# UTIL - Utility source
# SRC - Main source
# SSYS - Shared system files
# MSWSYS - mswin specific files
# TTY - window port files (tty)
# MSWIN - window port files (win32)
# WCURSES - window port files (curses)
# WSHR - Tile support files
# QT - QT window support files
INCL =../include
DAT =../dat
DOC =../doc
UTIL =../util
SRC =../src
SSYS =../sys/share
MSWSYS =../sys/windows
TTY =../win/tty
MSWIN =../win/win32
WCURSES =../win/curses
WSHR =../win/share
QT =../win/Qt
#
# Object directory.
#
OBJ = o
#
# Optional high-quality BSD random number generation routines
# (see pcconf.h). Set to nothing if not used.
#
RANDOM = $(OBJ)/random.o
#RANDOM =
BCRYPT=-lbcrypt
WINPFLAG = -DTILES -DMSWIN_GRAPHICS -DWIN32CON -D_WIN32_IE=0x0400 -D_WIN32_WINNT=0x0601 -DWINVER=0x0601
ifeq "$(WANT_WIN_QT)" "Y"
WINPFLAG += -DQT_GRAPHICS -DPIXMAPDIR='"."'
endif
# To store all the level files,
# help files, etc. in a single library file.
# USE_DLB = Y is left uncommented
USE_DLB = Y
ifeq "$(USE_DLB)" "Y"
DLBFLG = -DDLB
else
DLBFLG =
endif
#
# If you defined ZLIB_COMP in include/config.h and you need
# to link with the zlib.lib library, uncomment the line below.
# If necessary, prefix explicit path information to the file name
# otherwise it assumes the NetHack src directory.
#
#ZLIB = zlib.lib
# Have windows path styles available for use in commands
W_OBJ =$(subst /,\, $(OBJ))
W_INCL =$(subst /,\, $(INCL))
W_DAT =$(subst /,\, $(DAT))
W_DOC =$(subst /,\, $(DOC))
W_UTIL =$(subst /,\, $(UTIL))
W_SRC =$(subst /,\, $(SRC))
W_SSYS =$(subst /,\, $(SSYS))
W_MSWSYS =$(subst /,\, $(MSWSYS))
W_TTY =$(subst /,\, $(TTY))
W_MSWIN =$(subst /,\, $(MSWIN))
W_WCURSES =$(subst /,\, $(WCURSES))
W_WSHR =$(subst /,\, $(WSHR))
W_GAMEDIR =$(subst /,\, $(GAMEDIR))
#==========================================
#================ MACROS ==================
#==========================================
# This section creates shorthand macros for many objects
# referenced later on in the Makefile.
#
DEFFILE = $(MSWSYS)/$(GAME).def
#
# Shorten up the location for some files
#
O = $(OBJ)/
U = $(UTIL)/
HACKINCL = $(INCL)/align.h $(INCL)/artifact.h $(INCL)/artilist.h \
$(INCL)/attrib.h $(INCL)/botl.h $(INCL)/color.h $(INCL)/config.h \
$(INCL)/config1.h $(INCL)/context.h $(INCL)/coord.h $(INCL)/decl.h \
$(INCL)/display.h $(INCL)/dlb.h $(INCL)/dungeon.h $(INCL)/engrave.h \
$(INCL)/extern.h $(INCL)/flag.h $(INCL)/fnamesiz.h $(INCL)/func_tab.h \
$(INCL)/global.h $(INCL)/warnings.h $(INCL)/hack.h $(INCL)/lint.h \
$(INCL)/mextra.h $(INCL)/mfndpos.h $(INCL)/micro.h $(INCL)/mkroom.h \
$(INCL)/monattk.h $(INCL)/mondata.h $(INCL)/monflag.h $(INCL)/monst.h \
$(INCL)/monsters.h $(INCL)/obj.h $(INCL)/objects.h $(INCL)/objclass.h \
$(INCL)/optlist.h $(INCL)/patchlevel.h $(INCL)/pcconf.h \
$(INCL)/permonst.h $(INCL)/prop.h $(INCL)/rect.h $(INCL)/region.h \
$(INCL)/sym.h $(INCL)/defsym.h $(INCL)/rm.h $(INCL)/sp_lev.h \
$(INCL)/spell.h $(INCL)/sys.h $(INCL)/system.h $(INCL)/tcap.h \
$(INCL)/timeout.h $(INCL)/tradstdc.h $(INCL)/trap.h \
$(INCL)/unixconf.h $(INCL)/vision.h $(INCL)/vmsconf.h \
$(INCL)/wintty.h $(INCL)/wincurs.h $(INCL)/winX.h \
$(INCL)/winprocs.h $(INCL)/wintype.h $(INCL)/you.h \
$(INCL)/youprop.h
# all .c that are part of the main NetHack program and are not operating- or
# windowing-system specific
HACKCSRC = allmain.c alloc.c apply.c artifact.c attrib.c ball.c bones.c \
botl.c cmd.c dbridge.c decl.c detect.c dig.c display.c dlb.c do.c \
do_name.c do_wear.c dog.c dogmove.c dokick.c dothrow.c drawing.c \
dungeon.c eat.c end.c engrave.c exper.c explode.c extralev.c \
files.c fountain.c hack.c hacklib.c \
insight.c invent.c isaac64.c light.c \
lock.c mail.c makemon.c mcastu.c mdlib.c mhitm.c \
mhitu.c minion.c mklev.c mkmap.c mkmaze.c mkobj.c mkroom.c mon.c \
mondata.c monmove.c monst.c mplayer.c mthrowu.c muse.c music.c \
nhlua.c nhlsel.c nhlobj.c o_init.c objects.c objnam.c \
options.c pager.c pickup.c pline.c polyself.c potion.c pray.c \
priest.c quest.c questpgr.c read.c rect.c region.c restore.c \
rip.c rnd.c role.c rumors.c save.c sfstruct.c \
shk.c shknam.c sit.c sounds.c \
sp_lev.c spell.c steal.c steed.c symbols.c sys.c teleport.c \
timeout.c topten.c track.c trap.c u_init.c \
uhitm.c vault.c version.c vision.c weapon.c were.c wield.c \
windows.c wizard.c worm.c worn.c write.c zap.c
#
# Utility Objects.
#
MAKEDEFSOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o \
$(O)date.o
RECOVOBJS = $(O)recover.o
TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt
#
# These are not invoked during a normal game build in 3.4+
#
TEXT_IO = $(O)tiletext.o $(O)tiletxt.o $(O)drawing.o \
$(O)monst.o $(O)objects.o
TEXT_IO32 = $(O)tilete32.o $(O)tiletx32.o $(O)drawing.o \
$(O)monst.o $(O)objects.o
GIFREADERS = $(O)gifread.o $(O)alloc.o $(O)panic.o
GIFREADERS32 = $(O)gifrd32.o $(O)alloc.o $(O)panic.o
PPMWRITERS = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o
#
# Object files for the game itself.
#
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
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)mdlib.o $(O)mcastu.o $(O)mhitm.o $(O)mhitu.o
VOBJ12 = $(O)minion.o $(O)mklev.o $(O)mkmap.o $(O)mkmaze.o
VOBJ13 = $(O)mkobj.o $(O)mkroom.o $(O)mon.o $(O)mondata.o
VOBJ14 = $(O)monmove.o $(O)monst.o $(O)mplayer.o $(O)mthrowu.o
VOBJ15 = $(O)muse.o $(O)music.o $(O)o_init.o $(O)objects.o
VOBJ16 = $(O)objnam.o $(O)options.o $(O)pager.o $(O)pickup.o
VOBJ17 = $(O)pline.o $(O)polyself.o $(O)potion.o $(O)pray.o
VOBJ18 = $(O)priest.o $(O)quest.o $(O)questpgr.o $(RANDOM)
VOBJ19 = $(O)read.o $(O)rect.o $(O)region.o $(O)restore.o
VOBJ20 = $(O)rip.o $(O)rnd.o $(O)role.o $(O)rumors.o
VOBJ21 = $(O)save.o $(O)sfstruct.o $(O)shk.o $(O)shknam.o
VOBJ22 = $(O)sit.o $(O)sounds.o $(O)sp_lev.o $(O)spell.o
VOBJ23 = $(O)steal.o $(O)steed.o $(O)symbols.o $(O)sys.o
VOBJ24 = $(O)teleport.o $(O)timeout.o $(O)topten.o $(O)track.o
VOBJ25 = $(O)trap.o $(O)u_init.o $(O)uhitm.o $(O)vault.o
VOBJ26 = $(O)vision.o $(O)weapon.o $(O)were.o $(O)wield.o
VOBJ27 = $(O)windows.o $(O)wizard.o $(O)worm.o $(O)worn.o
VOBJ28 = $(O)write.o $(O)zap.o
ifeq "$(ADD_LUA)" "Y"
LUAOBJ = $(O)nhlua.o $(O)nhlsel.o $(O)nhlobj.o
LUA_QTEXT_FILE = "quest.lua"
endif
DLBOBJ = $(O)dlb.o
REGEX = $(O)cppregex.o
TTYOBJ = $(O)topl.o $(O)getline.o $(O)wintty.o
ifeq "$(ADD_CURSES)" "Y"
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
else
CURSESOBJ=
endif
SOBJ = $(O)windmain.o $(O)windsys.o $(O)win10.o \
$(O)safeproc.o $(O)nhlan.o $(SOUND)
OBJS = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
$(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \
$(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \
$(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \
$(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \
$(VOBJ26) $(VOBJ27) $(VOBJ28) $(REGEX) $(CURSESOBJ)
ifneq "$(SKIP_NETHACKW)" "Y"
GUIOBJ = $(O)mhaskyn.o $(O)mhdlg.o \
$(O)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \
$(O)mhmenu.o $(O)mhmsgwnd.o $(O)mhrip.o $(O)mhsplash.o \
$(O)mhstatus.o $(O)mhtext.o $(O)mswproc.o $(O)NetHackW.o
endif
ifeq "$(WANT_WIN_QT)" "Y"
GUIOBJ += $(O)qt_bind.o $(O)qt_click.o $(O)qt_clust.o $(O)qt_delay.o \
$(O)qt_glyph.o $(O)qt_icon.o $(O)qt_inv.o $(O)qt_key.o $(O)qt_line.o \
$(O)qt_main.o $(O)qt_map.o $(O)qt_menu.o $(O)qt_msg.o $(O)qt_plsel.o \
$(O)qt_rip.o $(O)qt_set.o $(O)qt_stat.o $(O)qt_str.o $(O)qt_streq.o \
$(O)qt_svsel.o $(O)qt_win.o $(O)qt_xcmd.o $(O)qt_yndlg.o
endif
ifneq "$(SKIP_NETHACKW)" "Y"
GUIHDR = $(MSWIN)/mhaskyn.h $(MSWIN)/mhdlg.h $(MSWIN)/mhfont.h \
$(MSWIN)/mhinput.h $(MSWIN)/mhmain.h $(MSWIN)/mhmap.h \
$(MSWIN)/mhmenu.h $(MSWIN)/mhmsg.h $(MSWIN)/mhmsgwnd.h \
$(MSWIN)/mhrip.h $(MSWIN)/mhstatus.h \
$(MSWIN)/mhtext.h $(MSWIN)/resource.h $(MSWIN)/winMS.h
endif
ifeq "$(WANT_WIN_QT)" "Y"
GUIHDR += $(QT)/qt_bind.h $(QT)/qt_click.h $(QT)/qt_clust.h \
$(QT)/qt_delay.h $(QT)/qt_glyph.h $(QT)/qt_icon.h $(QT)/qt_inv.h \
$(QT)/qt_kde0.h $(QT)/qt_key.h $(QT)/qt_line.h $(QT)/qt_main.h \
$(QT)/qt_map.h $(QT)/qt_menu.h $(QT)/qt_msg.h $(QT)/qt_plsel.h \
$(QT)/qt_rip.h $(QT)/qt_set.h $(QT)/qt_stat.h $(QT)/qt_str.h \
$(QT)/qt_streq.h $(QT)/qt_svsel.h $(QT)/qt_win.h $(QT)/qt_xcmd.h \
$(QT)/qt_yndlg.h
endif
COMCTRL = comctl32.lib
KEYDLLS = $(GAMEDIR)/nhdefkey.dll $(GAMEDIR)/nh340key.dll \
$(GAMEDIR)/nhraykey.dll
TILEUTIL16 = $(UTIL)/tile2bmp.exe
TILEBMP16 = $(SRC)/tiles.bmp
TILEUTIL32 = $(UTIL)/til2bm32.exe
TILEBMP32 = $(SRC)/tiles32.bmp
SOUND = $(OBJ)/ntsound.o
#SOUND =
VVOBJ = $(O)version.o
ALLOBJ = $(SOBJ) $(DLBOBJ) $(WOBJ) $(OBJS) $(VVOBJ) $(LUAOBJ)
OPTIONS_FILE = $(DAT)\options
#===============-=================================================
# LUA library
# Source from http://www.lua.org/ftp/lua-5.4.3.tar.gz
#=================================================================
ifndef LUAVER
LUAVER = 5.4.3
endif
ifndef LUASRC
LUASRC = $(LUATOP)/src
endif
LUALIB = $(O)lua-$(LUAVER).static.a
LUADLL = $(O)lua-$(LUAVER).a
LUAINCL = -I$(LUASRC)
#LUAFLAGS = unix added -lm here?
ifeq "$(WANT_LUAC)" "Y"
LUATARGETS = lua.exe luac.exe $(LUADLL) $(LUALIB)
else
LUATARGETS = lua.exe $(LUADLL) $(LUALIB)
endif
LUASRCFILES = lapi.c lauxlib.c lbaselib.c lcode.c \
lcorolib.c lctype.c ldblib.c ldebug.c ldo.c \
ldump.c lfunc.c lgc.c linit.c liolib.c llex.c \
lmathlib.c lmem.c loadlib.c lobject.c lopcodes.c \
loslib.c lparser.c lstate.c lstring.c lstrlib.c \
ltable.c ltablib.c ltm.c lundump.c lutf8lib.c \
lvm.c lzio.c
LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o \
$(O)lcode.o $(O)lcorolib.o $(O)lctype.o $(O)ldblib.o \
$(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o \
$(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o \
$(O)lmathlib.o $(O)lmem.o $(O)loadlib.o $(O)lobject.o \
$(O)lopcodes.o $(O)loslib.o $(O)lparser.o $(O)lstate.o \
$(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \
$(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o
ifeq "$(LUAVER)" "5.3.5"
# 5.4.0 added header files ljumptab.h and lopnames.h and removes lbitlib.c
# so we have to tack those on for the previous version (5.3.5)
LUASRCFILES = $(LUASRCFILES) lbitlib.c
LUAOBJFILES = $(LUAOBJFILES) lbitlib.o
endif
ifeq "$(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)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)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.a
PDCINCL = -I$(PDCURSES_TOP) -I$(PDCSRC) -I$(PDCWINCON)
else
PDCLIB =
endif
#==========================================
# Header file macros
#==========================================
ifdef GIT_HASH
GITHASH = -DNETHACK_GIT_SHA=\"$(GIT_HASH)\"
endif
ifdef GIT_BRANCH
GITBRANCH = -DNETHACK_GIT_BRANCH=\"$(GIT_BRANCH)\"
endif
CONFIG_H = $(INCL)/config.h $(INCL)/patchlevel.h \
$(INCL)/config1.h $(INCL)/tradstdc.h \
$(INCL)/global.h $(INCL)/fnamesiz.h $(INCL)/coord.h \
$(INCL)/vmsconf.h $(INCL)/system.h $(INCL)/unixconf.h \
$(INCL)/micro.h $(INCL)/pcconf.h $(INCL)/windconf.h \
$(INCL)/objects.h
HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/align.h $(INCL)/context.h \
$(INCL)/dungeon.h $(INCL)/sym.h $(INCL)/defsym.h \
$(INCL)/mkroom.h $(INCL)/objclass.h $(INCL)/youprop.h \
$(INCL)/prop.h $(INCL)/permonst.h $(INCL)/monattk.h \
$(INCL)/monflag.h $(INCL)/mondata.h $(INCL)/monsters.h \
$(INCL)/wintype.h $(INCL)/decl.h $(INCL)/quest.h \
$(INCL)/spell.h $(INCL)/color.h $(INCL)/obj.h \
$(INCL)/objects.h \
$(INCL)/you.h $(INCL)/attrib.h $(INCL)/monst.h $(INCL)/lint.h \
$(INCL)/mextra.h $(INCL)/skills.h \
$(INCL)/timeout.h $(INCL)/trap.h $(INCL)/flag.h \
$(INCL)/rm.h $(INCL)/vision.h $(INCL)/display.h \
$(INCL)/engrave.h $(INCL)/rect.h $(INCL)/region.h \
$(INCL)/winprocs.h $(INCL)/wintty.h $(INCL)/sys.h
DGN_FILE_H = $(INCL)/dgn_file.h
SP_LEV_H = $(INCL)/sp_lev.h
TILE_H = ../win/share/tile.h
#==========================================
# Miscellaneous
#==========================================
DATABASE = $(DAT)/data.base
#==========================================
# More compiler setup macros
#==========================================
#
ifeq "$(ADD_CURSES)" "Y"
CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
else
CURSDEF=
CURSESLIB=
endif
INCLDIR=-I../include -I../sys/windows $(LUAINCL)
#==========================================
#==========================================
# Setting up the compiler and linker
# macros. All builds include the base ones.
#==========================================
#==========================================
ifndef TRAVIS_COMPILER
cc = i686-w64-mingw32-gcc.exe
cxx = g++
rc = windres
link = i686-w64-mingw32-gcc.exe
else
cc = gcc
cxx = g++
rc = windres
link = gcc
endif
ifeq "$(WANT_WIN_QT)" "Y"
link = g++
endif
cflags = -mms-bitfields $(INCLDIR)
lflags =
ifeq "$(DEBUGINFO)" "Y"
cdebug = -g
linkdebug = -g
else
cdebug =
linkdebug =
endif
CFLAGSBASE = -c $(cflags) $(WINPINC) $(cdebug) $(CURSESDEF)
#LFLAGSBASEC = $(linkdebug)
#LFLAGSBASEG = $(linkdebug) -mwindows
baselibs = -lwinmm -lshell32 -lole32 -luuid
conlibs = -lgdi32 $(baselibs) $(BCRYPT)
guilibs = -lcomctl32 $(baselibs) $(BCRYPT)
ifeq "$(WANT_WIN_QT)" "Y"
# Might be either Qt 4 or Qt 5
ifeq "$(HAVE_QT5)" "Y"
guilibs += $(QT_DIRECTORY)/lib/libQt5Core.a
guilibs += $(QT_DIRECTORY)/lib/libQt5Gui.a
guilibs += $(QT_DIRECTORY)/lib/libQt5Widgets.a
conlibs += $(QT_DIRECTORY)/lib/libQt5Core.a
else
guilibs += $(QT_DIRECTORY)/lib/libQtCore4.a
guilibs += $(QT_DIRECTORY)/lib/libQtGui4.a
conlibs += $(QT_DIRECTORY)/lib/libQtCore4.a
endif
endif
#==========================================
# Extra files needed for some ports
#==========================================
EXTRA_FILES =
ifeq "$(WANT_WIN_QT)" "Y"
ifeq "$(HAVE_QT5)" "Y"
EXTRA_FILES += $(GAMEDIR)/Qt5Core.dll
EXTRA_FILES += $(GAMEDIR)/Qt5Gui.dll
EXTRA_FILES += $(GAMEDIR)/Qt5Widgets.dll
else
# TODO: define QT 4 DLLs here
EXTRA_FILES += $(GAMEDIR)/QtCore4.dll
EXTRA_FILES += $(GAMEDIR)/QtGui4.dll
endif
EXTRA_FILES += $(GAMEDIR)/rip.xpm
endif
#==========================================
# Util builds
#==========================================
CFLAGSU = $(CFLAGSBASE) $(WINPFLAG) $(DLBFLG)
LFLAGSU = $(LFLAGSBASEC)
#==========================================
# - Game build
#==========================================
CFLAGS = $(CFLAGSBASE) $(WINPFLAG) $(DLBFLG) -DSAFEPROCS
lflags = $(LFLAGSBASEC) $(linkdebuf)
CXXFLAGS = $(CFLAGS)
ifeq "$(USE_DLB)" "Y"
DLB = nhdat$(NHV)
else
DLB =
endif
#==========================================
#================ RULES ==================
#==========================================
.SUFFIXES: .exe .o .til .uu .c .y .l .moc
#==========================================
# Rules for files in src
#==========================================
$(OBJ)/%.o : /%.c
$(cc) $(CFLAGS) -o$@ $<
$(OBJ)/%.o : $(SRC)/%.c
$(cc) $(CFLAGS) -o$@ $<
#==========================================
# Rules for files in sys/share
#==========================================
$(OBJ)/%.o : $(SSYS)/%.c
$(cc) $(CFLAGS) -o$@ $<
$(OBJ)/%.o : $(SSYS)/%.cpp
$(cxx) $(CXXFLAGS) -std=c++11 -o$@ $<
#==========================================
# Rules for files in sys/windows
#==========================================
$(OBJ)/%.o : $(MSWSYS)/%.c
$(cc) $(CFLAGS) -o$@ $<
#==========================================
# Rules for files in util
#==========================================
$(OBJ)/%.o : $(UTIL)/%.c
$(cc) $(CFLAGSU) -o$@ $<
#==========================================
# Rules for files in win/share
#==========================================
$(OBJ)/%.o : $(WSHR)/%.c
$(cc) $(CFLAGS) -o$@ $<
#$(INCL)/%.h : $(WSHR)/%.h
# @copy $< $@
#{$(WSHR)}.txt{$(DAT)}.txt:
# @copy $< $@
#==========================================
# Rules for files in win/tty
#==========================================
$(OBJ)/%.o : $(TTY)/%.c
$(cc) $(CFLAGS) -o$@ $<
#==========================================
# Rules for files in win/win32
#==========================================
$(OBJ)/%.o : $(MSWIN)/%.c
$(cc) $(CFLAGS) -o$@ $<
#==========================================
# Rules for files in win/curses
#==========================================
$(OBJ)/%.o : $(WCURSES)/%.c
$(cc) -DPDC_NCMOUSE $(PDCINCL) $(CFLAGS) -o$@ $<
#==========================================
# Rules for files in PDCurses
#==========================================
$(OBJ)/%.o : $(PDCURSES_TOP)/%.c
$(cc) $(PDCINCL) $(CFLAGS) -o$@ $<
$(OBJ)/%.o : $(PDCSRC)/%.c
$(cc) $(PDCINCL) $(CFLAGS) -o$@ $<
$(OBJ)/%.o : $(PDCWINCON)/%.c
$(cc) $(PDCINCL) $(CFLAGS) -o$@ $<
#==========================================
# Rules for LUA files
#==========================================
$(OBJ)/%.o : $(LUASRC)/%.c
$(cc) $(CFLAGS) -o$@ $<
#==========================================
# Rules for files in win/Qt
#==========================================
ifeq "$(HAVE_QT5)" "Y"
QT_CXXFLAGS = -std=c++11
else
QT_CXXFLAGS =
endif
$(OBJ)/%.o : $(QT)/%.cpp
$(cxx) $(CXXFLAGS) $(QT_CXXFLAGS) -I$(MSWIN) -I$(QT_DIRECTORY)/include -o$@ $<
$(QT)/%.moc : $(QT)/%.h
$(QT_DIRECTORY)\bin\moc -o $@ $<
ifeq "$(SKIP_NETHACKW)" "Y"
NETHACKW_EXE =
else
NETHACKW_EXE = $(GAMEDIR)/NetHackW.exe
endif
SHELL=CMD.EXE
#==========================================
#=============== TARGETS ==================
#==========================================
# 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
# more care is taken.
#
# The default make target (so just typing 'nmake' is useful).
#
default : install
#
# Everything
#
all : install
install: $(INCL)/nhlua.h initialchk $(O)utility.tag $(GAMEDIR)/NetHack.exe $(NETHACKW_EXE) \
$(O)install.tag $(EXTRA_FILES)
@echo NetHack is up to date.
@echo Done.
$(O)install.tag: $(DAT)/data $(DAT)/rumors $(DAT)/oracles \
$(O)sp_lev.tag $(DLB)
ifdef TRAVIS_COMPILER
ls -l $(SRC)
ls -l $(DAT)
ls -l $(UTIL)
endif
ifeq "$(USE_DLB)" "Y"
$(subst /,\,copy nhdat$(NHV) $(GAMEDIR))
$(subst /,\,copy $(DAT)/license $(GAMEDIR))
$(subst /,\,copy $(DAT)/opthelp $(GAMEDIR))
else
$(subst /,\,copy $(DAT)/*. $(GAMEDIR))
$(subst /,\,copy $(DAT)/*.dat $(GAMEDIR))
# $(subst /,\,copy $(DAT)/*.lua $(GAMEDIR))
$(subst /,\,if exist $(GAMEDIR)/makefile del $(GAMEDIR)/makefile)
endif
$(subst /,\,if exist $(MSWSYS)/sysconf.template copy $(MSWSYS)/sysconf.template $(GAMEDIR))
$(subst /,\,if exist $(DAT)/symbols copy $(DAT)/symbols $(GAMEDIR)/symbols.template)
$(subst /,\,if exist $(DOC)/guidebook.txt copy $(DOC)/guidebook.txt $(GAMEDIR)/Guidebook.txt)
$(subst /,\,if exist $(DOC)/nethack.txt copy $(DOC)/nethack.txt $(GAMEDIR)/NetHack.txt)
$(subst /,\,if exist $(MSWSYS)/.nethackrc.template copy $(MSWSYS)/.nethackrc.template $(GAMEDIR))
$(subst /,\,-if not exist $(GAMEDIR)/record. echo.>$(GAMEDIR)/record.)
#
#
$(subst /,\,echo install done > $@)
# copy $(MSWSYS)/windsys.hlp $(GAMEDIR)
recover: $(U)recover.exe
$(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
$(subst /,\,echo sp_levs done > $(O)sp_lev.tag)
$(O)utility.tag: $(TILEUTIL16)
$(subst /,\,@echo utilities made >$@)
@echo utilities made.
$(INCL)/nhlua.h:
echo /* nhlua.h - generated by top Makefile */ > $@
@echo #include "$(LUASRC)/lua.h" >> $@
@echo LUA_API int (lua_error) (lua_State *L) NORETURN; >>$@
@echo #include "$(LUASRC)/lualib.h" >> $@
@echo #include "$(LUASRC)/lauxlib.h" >> $@
@echo /*nhlua.h*/ >> $@
tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe
@echo Optional tile development utilities are up to date.
$(O)winres.o: $(TILEBMP16) $(MSWIN)/NetHackW.rc $(MSWIN)/mnsel.bmp \
$(MSWIN)/mnselcnt.bmp $(MSWIN)/mnunsel.bmp \
$(MSWIN)/petmark.bmp $(MSWIN)/pilemark.bmp $(MSWIN)/NetHack.ico $(MSWIN)/rip.bmp \
$(MSWIN)/splash.bmp
$(rc) -o$@ --include-dir $(MSWIN) -i $(MSWIN)/NetHackW.rc
$(O)conres.o: $(MSWSYS)/console.rc $(MSWSYS)/NetHack.ico
$(rc) -o$@ --include-dir $(MSWSYS) -i $(MSWSYS)/console.rc
#==========================================
# The game targets.
#==========================================
gamedir.tag:
test -d $(GAMEDIR) || echo creating directory $(W_GAMEDIR)
test -d $(GAMEDIR) || mkdir $(W_GAMEDIR)
test -d $(GAMEDIR) && echo directory created > $@
$(GAMEDIR)/NetHack.exe : gamedir.tag $(PDCLIB) $(O)tile.o $(O)consoletty.o $(O)guistub.o \
$(ALLOBJ) $(TTYOBJ) $(O)date.o $(GUIOBJ) $(O)conres.o $(KEYDLLS) \
$(LUATARGETS)
@echo Linking $@...
$(link) $(lflags) -o$@ $(ALLOBJ) $(TTYOBJ) $(O)consoletty.o $(O)tile.o \
$(O)guistub.o $(O)date.o $(O)conres.o $(PDCLIB) $(LUALIB) \
$(conlibs) -static -lstdc++
$(subst /,\,@if exist $(O)install.tag del $(O)install.tag)
# NetHackW
# full tty linkage libs:
# libs: $(LIBS) $(guilibs) $(COMCTRL)
# objs: $(GAMEOBJ) $(GUIOBJ) $(TTYOBJ) $(O)tile.o $(O)consoletty.o
# otherwise:
# libs: $(LIBS) $(guilibs) $(COMCTRL)
# objs: $(GAMEOBJ) $(GUIOBJ) $(O)tile.o $(O)ttystub.o
ifneq "$(SKIP_NETHACKW)" "Y"
$(GAMEDIR)/NetHackW.exe : gamedir.tag $(PDCLIB) $(O)tile.o $(O)ttystub.o \
$(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)winres.o $(KEYDLLS) \
$(LUATARGETS)
@echo Linking $@...
$(link) $(lflags) -mwindows -o$@ $(ALLOBJ) $(GUIOBJ) $(O)tile.o \
$(O)ttystub.o $(O)date.o \
$(O)winres.o $(PDCLIB) $(guilibs) $(LUALIB) -static -lstdc++
$(subst /,\,@if exist $(O)install.tag del $(O)install.tag)
endif
$(O)nhdefkey.o:
$(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nhdefkey.c
$(GAMEDIR)/nhdefkey.dll : $(O)nhdefkey.o gamedir.tag
@echo Linking $@
$(cc) -shared -Wl,--export-all-symbols \
-Wl,--add-stdcall-alias -o $@ $<
$(O)nh340key.o:
$(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nh340key.c
$(GAMEDIR)/nh340key.dll : $(O)nh340key.o gamedir.tag
@echo Linking $@
$(cc) -shared -Wl,--export-all-symbols \
-Wl,--add-stdcall-alias -o $@ $<
$(O)nhraykey.o:
$(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nhraykey.c
$(GAMEDIR)/nhraykey.dll : $(O)nhraykey.o gamedir.tag
@echo Linking $@
$(cc) -shared -Wl,--export-all-symbols \
-Wl,--add-stdcall-alias -o $@ $<
$(GAME)_.ico : $(MSWSYS)/$(GAME).ico
$(subst /,\,@copy $(MSWSYS)/$(GAME).ico $@)
#==========================================
# Create directory for holding object files
#==========================================
initialchk: objdir.tag
@echo ----
@echo NOTE: This build will include tile support.
@echo ----
objdir.tag:
@test -d $(OBJ) || echo creating directory $(OBJ)
@test -d $(OBJ) || mkdir $(OBJ)
@test -d $(OBJ) && echo directory created > $@
#==========================================
#=========== SECONDARY TARGETS ============
#==========================================
#==========================================
# Makedefs Stuff
#==========================================
$(U)makedefs.exe: $(MAKEDEFSOBJS)
$(link) $(LFLAGSU) -o$@ $(MAKEDEFSOBJS)
$(O)makedefs.o: $(CONFIG_H) $(INCL)/monattk.h $(INCL)/monflag.h \
$(INCL)/objclass.h $(INCL)/sym.h $(INCL)/defsym.h \
$(U)makedefs.c $(SRC)\mdlib.c
$(cc) $(CFLAGSU) -o$@ $(U)makedefs.c
ifeq "$(GIT_AVAILABLE)" "1"
GIT_HASH := $(shell echo `git rev-parse --verify HEAD` 2>&1)
GIT_BRANCH := $(shell echo `git rev-parse --abbrev-ref HEAD` 2>&1)
ifdef GIT_HASH
GITHASH = -DNETHACK_GIT_SHA=\"$(GIT_HASH)\"
endif
ifdef GIT_BRANCH
GITBRANCH = -DNETHACK_GIT_BRANCH=\"$(GIT_BRANCH)\"
endif
endif
$(O)date.o: $(HACKINCL) $(HACKSRC) $(HACKOBJ) $(ALLOBJ)
$(cc) $(CFLAGS) $(GITHASH) $(GITBRANCH) -o$@ $(SRC)/date.c
#
# if you are making date.h for reference purposes (it isn't required
# for the build anymore), it should be remade every time any of the
# source or include files is modified.
#
$(INCL)/date.h $(OPTIONS_FILE): $(U)makedefs.exe
$(subst /,\,$(U)makedefs -v)
$(INCL)/onames.h : $(U)makedefs.exe
$(subst /,\,$(U)makedefs -o)
$(INCL)/pm.h : $(U)makedefs.exe
$(subst /,\,$(U)makedefs -p)
$(DAT)/data: $(O)utility.tag $(DATABASE)
$(subst /,\,$(U)makedefs -d)
$(DAT)/rumors: $(O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal
$(subst /,\,$(U)makedefs -r)
$(DAT)/oracles: $(O)utility.tag $(DAT)/oracles.txt
$(subst /,\,$(U)makedefs -h)
$(DAT)/engrave: $(DAT)/engrave.txt $(U)makedefs.exe
$(subst /,\,$(U)makedefs -s)
$(DAT)/epitaph: $(DAT)/epitaph.txt $(U)makedefs.exe
$(subst /,\,$(U)makedefs -s)
$(DAT)/bogusmon: $(DAT)/bogusmon.txt $(U)makedefs.exe
$(subst /,\,$(U)makedefs -s)
#==========================================
# uudecode utility and uuencoded targets
#==========================================
$(U)uudecode.exe: $(O)uudecode.o
$(link) $(LFLAGSU) -o$@ $(O)uudecode.o
$(O)uudecode.o: $(SSYS)/uudecode.c
$(MSWSYS)/NetHack.ico : $(U)uudecode.exe $(MSWSYS)/nhico.uu
$(subst /,\,$(U)uudecode.exe $(MSWSYS)/nhico.uu)
copy NetHack.ico $(W_MSWSYS)\NetHack.ico
del NetHack.ico
$(MSWIN)/NetHack.ico : $(MSWSYS)/NetHack.ico
$(subst /,\,copy $< $@)
$(MSWIN)/mnsel.bmp: $(U)uudecode.exe $(MSWIN)/mnsel.uu
$(subst /,\,$(U)uudecode.exe $(MSWIN)/mnsel.uu)
$(subst /,\,copy mnsel.bmp $@)
del mnsel.bmp
$(MSWIN)/mnselcnt.bmp: $(U)uudecode.exe $(MSWIN)/mnselcnt.uu
$(subst /,\,$(U)uudecode.exe $(MSWIN)/mnselcnt.uu)
$(subst /,\,copy mnselcnt.bmp $@)
del mnselcnt.bmp
$(MSWIN)/mnunsel.bmp: $(U)uudecode.exe $(MSWIN)/mnunsel.uu
$(subst /,\,$(U)uudecode.exe $(MSWIN)/mnunsel.uu)
$(subst /,\,copy mnunsel.bmp $@)
del mnunsel.bmp
$(MSWIN)/petmark.bmp: $(U)uudecode.exe $(MSWIN)/petmark.uu
$(subst /,\,$(U)uudecode.exe $(MSWIN)/petmark.uu)
$(subst /,\,copy petmark.bmp $@)
del petmark.bmp
$(MSWIN)/pilemark.bmp: $(U)uudecode.exe $(MSWIN)/pilemark.uu
$(subst /,\,$(U)uudecode.exe $(MSWIN)/pilemark.uu)
$(subst /,\,copy pilemark.bmp $@)
del pilemark.bmp
$(MSWIN)/rip.bmp: $(U)uudecode.exe $(MSWIN)/rip.uu
$(subst /,\,$(U)uudecode.exe $(MSWIN)/rip.uu)
$(subst /,\,copy rip.bmp $@)
del rip.bmp
$(MSWIN)/splash.bmp: $(U)uudecode.exe $(MSWIN)/splash.uu
$(subst /,\,$(U)uudecode.exe $(MSWIN)/splash.uu)
$(subst /,\,copy splash.bmp $@)
del splash.bmp
#=================================================
# For a couple of devteam utilities
#=================================================
$(U)nhsizes.exe: $(O)nhsizes.o
@echo Linking $@...
$(link) $(LFLAGSU) -o$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o$(U)nhsizes.exe: $(O)nhsizes.o
$(U)nhsize2.exe: $(O)nhsizes2.o
@echo Linking $@...
$(link) $(LFLAGSU) -o$@ $(O)nhsizes2.o $(O)panic.o $(O)alloc.o
$(O)nhsizes.o: $(CONFIG_H) nhsizes.c
$(cc) $(CFLAGSU) -o$@ nhsizes.c
$(O)nhsizes2.o: $(CONFIG_H) nhsizes2.c
$(cc) $(CFLAGSU) -o$@ nhsizes2.c
#==========================================
# Create directory for holding object files
#==========================================
#==========================================
# DLB utility and nhdat file creation
#==========================================
$(U)dlb_main.exe: $(DLBOBJ) $(O)dlb.o
$(link) $(LFLAGSU) -o$@ $(O)dlb_main.o $(O)dlb.o $(O)alloc.o $(O)panic.o
$(O)dlb.o: $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)/dlb.h
$(cc) $(CFLAGS) -o$@ $(SRC)/dlb.c
$(O)dlb_main.o: $(UTIL)/dlb_main.c $(INCL)/config.h $(INCL)/dlb.h
$(cc) $(CFLAGS) -o$@ $(UTIL)/dlb_main.c
$(DAT)/porthelp: $(MSWSYS)/porthelp
$(subst /,\,@copy $(MSWSYS)/porthelp $@ >nul)
nhdat$(NHV): $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \
$(DAT)/rumors $(DAT)/help $(DAT)/hh $(DAT)/cmdhelp $(DAT)/keyhelp \
$(DAT)/history $(DAT)/opthelp $(DAT)/wizhelp \
$(DAT)/porthelp $(DAT)/license $(DAT)/engrave \
$(DAT)/epitaph $(DAT)/bogusmon $(DAT)/tribute $(O)sp_lev.tag
$(subst /,\,echo data >$(DAT)/dlb.lst)
$(subst /,\,echo oracles >>$(DAT)/dlb.lst)
$(subst /,\,if exist $(DAT)/options echo options >>$(DAT)/dlb.lst)
$(subst /,\,if exist $(DAT)/ttyoptions echo ttyoptions >>$(DAT)/dlb.lst)
$(subst /,\,if exist $(DAT)/guioptions echo guioptions >>$(DAT)/dlb.lst)
$(subst /,\,if exist $(DAT)/porthelp echo porthelp >>$(DAT)/dlb.lst)
$(subst /,\,echo rumors >>$(DAT)/dlb.lst)
$(subst /,\,echo help >>$(DAT)/dlb.lst)
$(subst /,\,echo hh >>$(DAT)/dlb.lst)
$(subst /,\,echo cmdhelp >>$(DAT)/dlb.lst)
$(subst /,\,echo keyhelp >>$(DAT)/dlb.lst)
$(subst /,\,echo history >>$(DAT)/dlb.lst)
$(subst /,\,echo opthelp >>$(DAT)/dlb.lst)
$(subst /,\,echo wizhelp >>$(DAT)/dlb.lst)
$(subst /,\,echo license >>$(DAT)/dlb.lst)
$(subst /,\,echo engrave >>$(DAT)/dlb.lst)
$(subst /,\,echo epitaph >>$(DAT)/dlb.lst)
$(subst /,\,echo bogusmon >>$(DAT)/dlb.lst)
$(subst /,\,echo tribute >>$(DAT)/dlb.lst)
dir /l /b /-p $(subst /,\,$(DAT)/*.lua >>$(DAT)/dlb.lst)
$(subst /,\,$(U)dlb_main CcIf $(DAT) dlb.lst $(SRC)/nhdat)
#==========================================
# Recover Utility
#==========================================
$(U)recover.exe: $(RECOVOBJS)
$(link) $(LFLAGSU) -o$@ $(RECOVOBJS)
$(O)recover.o: $(CONFIG_H) $(U)recover.c $(MSWSYS)/win32api.h
$(cc) $(CFLAGSU) -o$@ $(U)recover.c
#==========================================
# Tile Mapping
#==========================================
$(SRC)/tile.c: $(U)tilemap.exe
@echo A new $@ has been created
@$(U)tilemap
$(U)tilemap.exe: $(O)tilemap.o
$(link) $(LFLAGSU) -o$@ $(O)tilemap.o
$(O)tilemap.o: $(WSHR)/tilemap.c $(HACK_H)
$(cc) $(CFLAGSU) -o$@ $(WSHR)/tilemap.c
$(O)tiletx32.o: $(WSHR)/tilemap.c $(HACK_H)
$(cc) $(CFLAGS) -DTILETEXT -DTILE_X=32 -DTILE_Y=32 -o$@ $(WSHR)/tilemap.c
$(O)tiletxt.o: $(WSHR)/tilemap.c $(HACK_H)
$(cc) $(CFLAGS) -DTILETEXT -o$@ $(WSHR)/tilemap.c
$(O)gifread.o: $(WSHR)/gifread.c $(CONFIG_H) $(TILE_H)
$(cc) $(CFLAGS) -I$(WSHR) -o$@ $(WSHR)/gifread.c
$(O)gifrd32.o: $(WSHR)/gifread.c $(CONFIG_H) $(TILE_H)
$(cc) $(CFLAGS) -I$(WSHR) -DTILE_X=32 -DTILE_Y=32 -o$@ $(WSHR)/gifread.c
$(O)ppmwrite.o: $(WSHR)/ppmwrite.c $(CONFIG_H) $(TILE_H)
$(cc) $(CFLAGS) -I$(WSHR) -o$@ $(WSHR)/ppmwrite.c
$(O)tiletext.o: $(WSHR)/tiletext.c $(CONFIG_H) $(TILE_H)
$(cc) $(CFLAGS) -I$(WSHR) -o$@ $(WSHR)/tiletext.c
$(O)tilete32.o: $(WSHR)/tiletext.c $(CONFIG_H) $(TILE_H)
$(cc) $(CFLAGS) -I$(WSHR) -DTILE_X=32 -DTILE_Y=32 -o$@ $(WSHR)/tiletext.c
#==========================================
# Optional Tile Utilities
#==========================================
$(U)gif2txt.exe: $(GIFREADERS) $(TEXT_IO)
@echo Linking $@...
$(link) $(LFLAGSU) -o$@ $(GIFREADERS) $(TEXT_IO)
$(U)gif2tx32.exe: $(GIFREADERS32) $(TEXT_IO32)
@echo Linking $@...
$(link) $(LFLAGSU) -o$@ $(GIFREADERS32) $(TEXT_IO32)
$(U)txt2ppm.exe: $(PPMWRITERS) $(TEXT_IO)
@echo Linking $@...
$(link) $(LFLAGSU) -o$@ $(PPMWRITERS) $(TEXT_IO)
$(TILEBMP16): $(TILEUTIL16) $(TILEFILES)
@echo Creating 16x16 binary tile files which may take some time
$(subst /,\,@$(U)tile2bmp $(TILEBMP16))
#$(TILEBMP32): $(TILEUTIL32) $(TILEFILES32)
# @echo Creating 32x32 binary tile files which may take some time
# $(subst /,\,@$(U)til2bm32 $(TILEBMP32))
$(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO)
@echo Linking $@...
$(link) $(LFLAGSU) -o$@ $(O)tile2bmp.o $(TEXT_IO)
$(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32)
@echo Linking $@...
$(link) $(LFLAGSU) -o$@ $(O)til2bm32.o $(TEXT_IO32)
$(O)tile2bmp.o: $(WSHR)/tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)/win32api.h
$(cc) $(CFLAGS) -mno-ms-bitfields -I$(WSHR) -o$@ $(WSHR)/tile2bmp.c
$(O)til2bm32.o: $(WSHR)/til2bm32.c $(HACK_H) $(TILE_H) $(MSWSYS)/win32api.h
$(cc) $(CFLAGS) -I$(WSHR) -DTILE_X=32 -DTILE_Y=32 -o$@ $(WSHR)/til2bm32.c
#==========================================
# PDCurses Library
#==========================================
$(O)pdcurses.a : $(PDCLIBOBJS) $(PDCOBJS)
ar rcs $@ $(PDCLIBOBJS) $(PDCOBJS)
#=============================================================
# LUA
#=============================================================
lua.exe: $(O)lua.o $(LUALIB)
$(link) $(LFLAGSU) -o$@ $(O)lua.o $(LUALIB)
luac.exe: $(O)luac.o $(LUALIB)
$(link) $(LFLAGSU) -o$@ $(O)luac.o $(LUALIB)
$(LUADLL): $(LUAOBJFILES)
$(cc) -shared -Wl,--export-all-symbols \
-Wl,--add-stdcall-alias -o $@ $(LUAOBJSFILES)
$(LUALIB): $(LUAOBJFILES)
ar rcs $@ $(LUAOBJFILES)
$(O)lua.o: $(LUASRC)/lua.c
$(O)luac.o: $(LUASRC)/luac.c
#==========================================
# Housekeeping
#==========================================
spotless: clean
if exist o\* del /Q o\*
-test -d o && rd o
if exist objdir.tag del objdir.tag
if exist gamedir.tag del gamedir.tag
ifneq "$(W_GAMEDIR)" ""
if exist $(W_GAMEDIR)\NetHack.exe del $(W_GAMEDIR)\NetHack.exe
if exist $(W_GAMEDIR)\nhdefkey.dll del $(W_GAMEDIR)\nhdefkey.dll
if exist $(W_GAMEDIR)\nh340key.dll del $(W_GAMEDIR)\nh340key.dll
if exist $(W_GAMEDIR)\nhraykey.dll del $(W_GAMEDIR)\nhraykey.dll
if exist $(W_GAMEDIR)\NetHack.exe del $(W_GAMEDIR)\NetHack.exe
if exist $(W_GAMEDIR)\NetHack.pdb del $(W_GAMEDIR)\NetHack.pdb
if exist $(W_GAMEDIR)\nhdat$(NHV) del $(W_GAMEDIR)\nhdat$(NHV)
endif
ifneq "$(W_SRC)" ""
if exist $(W_SRC)\tile.c del $(W_SRC)\tile.c
if exist $(W_SRC)\nhdat$(NHV). del $(W_SRC)\nhdat$(NHV).
endif
ifneq "$(W_DAT)" ""
if exist $(W_DAT)\data del $(W_DAT)\data
if exist $(W_DAT)\rumors del $(W_DAT)\rumors
if exist $(W_DAT)\engrave del $(W_DAT)\engrave
if exist $(W_DAT)\epitaph del $(W_DAT)\epitaph
if exist $(W_DAT)\bogusmon del $(W_DAT)\bogusmon
if exist $(W_DAT)\oracles del $(W_DAT)\oracles
if exist $(W_DAT)\rumors del $(W_DAT)\rumors
if exist $(W_DAT)\data del $(W_DAT)\data
if exist $(W_DAT)\options del $(W_DAT)\options
if exist $(W_DAT)\ttyoptions del $(W_DAT)\ttyoptions
if exist $(W_DAT)\guioptions del $(W_DAT)\guioptions
if exist $(W_DAT)\dlb.lst del $(W_DAT)\dlb.lst
if exist $(W_DAT)\porthelp del $(W_DAT)\porthelp
endif
ifneq "$(W_OBJ)" ""
if exist $(W_OBJ)\sp_lev.tag del $(W_OBJ)\sp_lev.tag
if exist $(W_OBJ)\obj.tag del $(W_OBJ)\obj.tag
if exist $(W_OBJ)\gamedir.tag del $(W_OBJ)\gamedir.tag
if exist $(W_OBJ)\nh*key.lib del $(W_OBJ)\nh*key.lib
if exist $(W_OBJ)\nh*key.exp del $(W_OBJ)\nh*key.exp
endif
ifneq "$(W_MSWIN)" ""
if exist $(W_MSWIN)\mnsel.bmp del $(W_MSWIN)\mnsel.bmp
if exist $(W_MSWIN)\mnselcnt.bmp del $(W_MSWIN)\mnselcnt.bmp
if exist $(W_MSWIN)\mnunsel.bmp del $(W_MSWIN)\mnunsel.bmp
if exist $(W_MSWIN)\petmark.bmp del $(W_MSWIN)\petmark.bmp
if exist $(W_MSWIN)\pilemark.bmp del $(W_MSWIN)\pilemark.bmp
if exist $(W_MSWIN)\rip.bmp del $(W_MSWIN)\rip.bmp
if exist $(W_MSWIN)\splash.bmp del $(W_MSWIN)\splash.bmp
if exist $(W_MSWIN)\nethack.ico del $(W_MSWIN)\nethack.ico
endif
ifneq "$(W_MSWSYS)" ""
if exist $(W_MSWSYS)\nethack.ico del $(W_MSWSYS)\nethack.ico
endif
ifneq "$(W_UTIL)" ""
if exist $(W_UTIL)\*.lnk del $(W_UTIL)\*.lnk
if exist $(W_UTIL)\*.map del $(W_UTIL)\*.map
if exist $(W_UTIL)\recover.exe del $(W_UTIL)\recover.exe
if exist $(W_UTIL)\tile2bmp.exe del $(W_UTIL)\tile2bmp.exe
if exist $(W_UTIL)\tilemap.exe del $(W_UTIL)\tilemap.exe
if exist $(W_UTIL)\uudecode.exe del $(W_UTIL)\uudecode.exe
if exist $(W_UTIL)\dlb_main.exe del $(W_UTIL)\dlb_main.exe
endif
ifneq "$(W_INCL)" ""
if exist $(W_INCL)\date.h del $(W_INCL)\date.h
if exist $(W_INCL)\onames.h del $(W_INCL)\onames.h
if exist $(W_INCL)\pm.h del $(W_INCL)\pm.h
endif
ifeq "$(ADD_CURSES)" "Y"
ifneq "$(W_OBJ)" ""
if exist $(W_OBJ)\pdcurses.lib del $(W_OBJ)\pdcurses.lib
endif
endif
if exist $(W_GAMEDIR)\license. del $(W_GAMEDIR)\license.
if exist $(W_GAMEDIR)\nh340key.dll del $(W_GAMEDIR)\nh340key.dll
if exist $(W_GAMEDIR)\nhdefkey.dll del $(W_GAMEDIR)\nhdefkey.dll
if exist $(W_GAMEDIR)\nhraykey.dll del $(W_GAMEDIR)\nhraykey.dll
-test -d ..\binary && rd ..\binary
clean:
if exist initialchk del initialchk
if exist $(W_INCL)\nhlua.h del $(W_INCL)\nhlua.h
if exist $(W_OBJ)\install.tag del $(W_OBJ)\install.tag
if exist $(W_UTIL)utility.tag del $(W_UTIL)\utility.tag
ifneq "$(W_UTIL)" ""
if exist $(W_UTIL)\makedefs.exe del $(W_UTIL)\makedefs.exe
endif
ifneq "$(W_SRC)" ""
if exist $(W_SRC)\*.lnk del $(W_SRC)\*.lnk
if exist $(W_SRC)\*.map del $(W_SRC)\*.map
endif
ifneq "$(W_OBJ)" ""
if exist $(W_OBJ)\*.o del $(W_OBJ)\*.o
if exist $(W_OBJ)\utility.tag del $(W_OBJ)\utility.tag
if exist $(W_OBJ)\install.tag del $(W_OBJ)\install.tag
if exist $(W_OBJ)\console.res del $(W_OBJ)\console.res
if exist $(W_OBJ)\dlb_main.MAP del $(W_OBJ)\dlb_main.MAP
if exist $(W_OBJ)\dlb_main.PDB del $(W_OBJ)\dlb_main.PDB
if exist $(W_OBJ)\gamedir.tag del $(W_OBJ)\gamedir.tag
if exist $(W_OBJ)\makedefs.MAP del $(W_OBJ)\makedefs.MAP
if exist $(W_OBJ)\makedefs.PDB del $(W_OBJ)\makedefs.PDB
if exist $(W_OBJ)\NetHack.MAP del $(W_OBJ)\NetHack.MAP
if exist $(W_OBJ)\nh340key.def del $(W_OBJ)\nh340key.def
if exist $(W_OBJ)\nh340key.exp del $(W_OBJ)\nh340key.exp
if exist $(W_OBJ)\nh340key.lib del $(W_OBJ)\nh340key.lib
if exist $(W_OBJ)\nh340key.map del $(W_OBJ)\nh340key.map
if exist $(W_OBJ)\nh340key.PDB del $(W_OBJ)\nh340key.PDB
if exist $(W_OBJ)\nhdefkey.def del $(W_OBJ)\nhdefkey.def
if exist $(W_OBJ)\nhdefkey.exp del $(W_OBJ)\nhdefkey.exp
if exist $(W_OBJ)\nhdefkey.lib del $(W_OBJ)\nhdefkey.lib
if exist $(W_OBJ)\nhdefkey.map del $(W_OBJ)\nhdefkey.map
if exist $(W_OBJ)\nhdefkey.PDB del $(W_OBJ)\nhdefkey.PDB
if exist $(W_OBJ)\nhraykey.def del $(W_OBJ)\nhraykey.def
if exist $(W_OBJ)\nhraykey.exp del $(W_OBJ)\nhraykey.exp
if exist $(W_OBJ)\nhraykey.lib del $(W_OBJ)\nhraykey.lib
if exist $(W_OBJ)\nhraykey.map del $(W_OBJ)\nhraykey.map
if exist $(W_OBJ)\nhraykey.PDB del $(W_OBJ)\nhraykey.PDB
if exist $(W_OBJ)\envchk.tag del $(W_OBJ)\envchk.tag
if exist $(W_OBJ)\obj.tag del $(W_OBJ)\obj.tag
if exist $(W_OBJ)\sp_lev.tag del $(W_OBJ)\sp_lev.tag
if exist $(W_OBJ)\uudecode.MAP del $(W_OBJ)\uudecode.MAP
if exist $(W_OBJ)\uudecode.PDB del $(W_OBJ)\uudecode.PDB
endif
$(subst /,\,if exist $(TILEBMP16) del $(TILEBMP16))
$(subst /,\,if exist $(TILEBMP32) del $(TILEBMP32))
#===================================================================
# OTHER DEPENDENCIES
#===================================================================
#
# NT dependencies
#
$(O)consoletty.o: $(HACK_H) $(TILE_H) $(MSWSYS)/win32api.h $(MSWSYS)/consoletty.c
$(cc) $(CFLAGS) -I$(WSHR) -o$@ $(MSWSYS)/consoletty.c
$(O)windsys.o: $(HACK_H) $(MSWSYS)/win32api.h $(MSWSYS)/windsys.c
$(cc) $(CFLAGS) -o$@ $(MSWSYS)/windsys.c
$(O)ntsound.o: $(HACK_H) $(MSWSYS)/ntsound.c
$(cc) $(CFLAGS) -o$@ $(MSWSYS)/ntsound.c
#if you aren't linking in the full gui then
#include the following stub for proper linkage.
$(O)guistub.o: $(HACK_H) $(MSWSYS)/stubs.c
$(cc) $(CFLAGS) -DGUISTUB -o$@ $(MSWSYS)/stubs.c
#if you aren't linking in the full tty then
#include the following stub for proper linkage.
$(O)ttystub.o: $(HACK_H) $(MSWSYS)/stubs.c
$(cc) $(CFLAGS) -DTTYSTUB -o$@ $(MSWSYS)/stubs.c
$(O)tile.o: $(SRC)/tile.c $(HACK_H)
#
# util dependencies
#
$(O)panic.o: $(U)panic.c $(CONFIG_H)
$(cc) $(CFLAGS) -o$@ $(U)panic.c
#
# sys/share dependencies
#
(O)cppregex.o: $(O)cppregex.cpp $(HACK_H)
$(cc) $(CFLAGS) -o$@ ../sys/share/cppregex.cpp
#
# Other dependencies needed by some ports
#
ifeq "$(ADD_CURSES)" "Y"
# curses window port dependencies
$(O)cursdial.o: $(WCURSES)/cursdial.c $(WCURSES)/cursdial.h $(INCL)/wincurs.h
$(O)cursinit.o: $(WCURSES)/cursinit.c $(WCURSES)/cursinit.h $(INCL)/wincurs.h
$(O)cursinvt.o: $(WCURSES)/cursinvt.c $(WCURSES)/cursinvt.h $(INCL)/wincurs.h
$(O)cursmain.o: $(WCURSES)/cursmain.c $(INCL)/wincurs.h
$(O)cursmesg.o: $(WCURSES)/cursmesg.c $(WCURSES)/cursmesg.h $(INCL)/wincurs.h
$(O)cursmisc.o: $(WCURSES)/cursmisc.c $(WCURSES)/cursmisc.h $(INCL)/wincurs.h
$(O)cursstat.o: $(WCURSES)/cursstat.c $(WCURSES)/cursstat.h $(INCL)/wincurs.h
$(O)curswins.o: $(WCURSES)/curswins.c $(WCURSES)/curswins.h $(INCL)/wincurs.h
endif
ifeq "$(WANT_WIN_QT)" "Y"
# Qt dependencies
$(GAMEDIR))/Qt5Core.dll : $(QT_DIRECTORY)/bin/Qt5Core.dll
$(subst /,\,@copy $< $@ >nul)
$(GAMEDIR))/Qt5Gui.dll : $(QT_DIRECTORY)/bin/Qt5Gui.dll
$(subst /,\,@copy $< $@ >nul)
$(GAMEDIR)/Qt5Widgets.dll : $(QT_DIRECTORY)/bin/Qt5Widgets.dll
$(subst /,\,@copy $< $@ >nul)
$(GAMEDIR)/QtCore4.dll : $(QT_DIRECTORY)/bin/QtCore4.dll
$(subst /,\,@copy $< $@ >nul)
$(GAMEDIR)/QtGui4.dll : $(QT_DIRECTORY)/bin/QtGui4.dll
$(subst /,\,@copy $< $@ >nul)
$(GAMEDIR)/nhtiles.bmp : $(SRC)/tiles.bmp
$(subst /,\,@copy $< $@ >nul)
$(GAMEDIR)/rip.xpm : ../win/X11/rip.xpm
$(subst /,\,@copy $< $@ >nul)
# Dependencies on .moc files (for Qt 4 or 5)
$(OBJ)/qt_main.o : $(QT)/qt_main.cpp $(QT)/qt_main.moc $(QT)/qt_kde0.moc
$(OBJ)/qt_map.o : $(QT)/qt_map.cpp $(QT)/qt_map.moc
$(OBJ)/qt_menu.o : $(QT)/qt_menu.cpp $(QT)/qt_menu.moc
$(OBJ)/qt_msg.o : $(QT)/qt_msg.cpp $(QT)/qt_msg.moc
$(OBJ)/qt_plsel.o : $(QT)/qt_plsel.cpp $(QT)/qt_plsel.moc
$(OBJ)/qt_set.o : $(QT)/qt_set.cpp $(QT)/qt_set.moc
$(OBJ)/qt_stat.o : $(QT)/qt_stat.cpp $(QT)/qt_stat.moc
$(OBJ)/qt_xcmd.o : $(QT)/qt_xcmd.cpp $(QT)/qt_xcmd.moc
$(OBJ)/qt_yndlg.o : $(QT)/qt_yndlg.cpp $(QT)/qt_yndlg.moc
endif
#
# The rest are stolen from sys/unix/Makefile.src,
# with the following changes:
# * ../include changed to $(INCL)
# * -c (which is included in CFLAGS) substituted
# with -o$@
# * targets prefixed with $(O)
# * $(CC) changed to $(cc)
# but otherwise untouched.
# That means that there is some irrelevant stuff
# in here, but maintenance should be easier.
#
$(O)tos.o: ../sys/atari/tos.c $(HACK_H) $(INCL)/tcap.h
$(cc) $(CFLAGS) -o$@ ../sys/atari/tos.c
$(O)pcmain.o: ../sys/share/pcmain.c $(HACK_H) $(INCL)/dlb.h \
$(MSWSYS)/win32api.h
$(cc) $(CFLAGS) -o$@ ../sys/share/pcmain.c
$(O)pcsys.o: ../sys/share/pcsys.c $(HACK_H)
$(cc) $(CFLAGS) -o$@ ../sys/share/pcsys.c
$(O)pctty.o: ../sys/share/pctty.c $(HACK_H)
$(cc) $(CFLAGS) -o$@ ../sys/share/pctty.c
$(O)pcunix.o: ../sys/share/pcunix.c $(HACK_H)
$(cc) $(CFLAGS) -o$@ ../sys/share/pcunix.c
$(O)random.o: ../sys/share/random.c $(HACK_H)
$(cc) $(CFLAGS) -o$@ ../sys/share/random.c
$(O)ioctl.o: ../sys/share/ioctl.c $(HACK_H) $(INCL)/tcap.h
$(cc) $(CFLAGS) -o$@ ../sys/share/ioctl.c
$(O)unixtty.o: ../sys/share/unixtty.c $(HACK_H)
$(cc) $(CFLAGS) -o$@ ../sys/share/unixtty.c
$(O)unixmain.o: ../sys/unix/unixmain.c $(HACK_H) $(INCL)/dlb.h
$(cc) $(CFLAGS) -o$@ ../sys/unix/unixmain.c
$(O)unixunix.o: ../sys/unix/unixunix.c $(HACK_H)
$(cc) $(CFLAGS) -o$@ ../sys/unix/unixunix.c
$(O)unixres.o: ../sys/unix/unixres.c $(CONFIG_H)
$(cc) $(CFLAGS) -o$@ ../sys/unix/unixres.c
$(O)bemain.o: ../sys/be/bemain.c $(HACK_H) $(INCL)/dlb.h
$(cc) $(CFLAGS) -o$@ ../sys/be/bemain.c
$(O)getline.o: ../win/tty/getline.c $(HACK_H) $(INCL)/func_tab.h
$(cc) $(CFLAGS) -o$@ ../win/tty/getline.c
$(O)termcap.o: ../win/tty/termcap.c $(HACK_H) $(INCL)/tcap.h
$(cc) $(CFLAGS) -o$@ ../win/tty/termcap.c
$(O)topl.o: ../win/tty/topl.c $(HACK_H) $(INCL)/tcap.h
$(cc) $(CFLAGS) -o$@ ../win/tty/topl.c
$(O)wintty.o: ../win/tty/wintty.c $(HACK_H) $(INCL)/dlb.h \
$(INCL)/tcap.h
$(cc) $(CFLAGS) -o$@ ../win/tty/wintty.c
#$(O)Window.o: ../win/X11/Window.c $(INCL)/xwindowp.h $(INCL)/xwindow.h \
# $(CONFIG_H)
# $(cc) $(CFLAGS) -o$@ ../win/X11/Window.c
$(O)dialogs.o: ../win/X11/dialogs.c $(CONFIG_H)
$(cc) $(CFLAGS) -o$@ ../win/X11/dialogs.c
$(O)winX.o: ../win/X11/winX.c $(HACK_H) $(INCL)/winX.h $(INCL)/dlb.h \
../win/X11/nh72icon ../win/X11/nh56icon ../win/X11/nh32icon
$(cc) $(CFLAGS) -o$@ ../win/X11/winX.c
$(O)winmap.o: ../win/X11/winmap.c $(INCL)/xwindow.h $(HACK_H) $(INCL)/dlb.h \
$(INCL)/winX.h $(INCL)/tile2x11.h
$(cc) $(CFLAGS) -o$@ ../win/X11/winmap.c
$(O)winmenu.o: ../win/X11/winmenu.c $(HACK_H) $(INCL)/winX.h
$(cc) $(CFLAGS) -o$@ ../win/X11/winmenu.c
$(O)winmesg.o: ../win/X11/winmesg.c $(INCL)/xwindow.h $(HACK_H) $(INCL)/winX.h
$(cc) $(CFLAGS) -o$@ ../win/X11/winmesg.c
$(O)winmisc.o: ../win/X11/winmisc.c $(HACK_H) $(INCL)/func_tab.h \
$(INCL)/winX.h
$(cc) $(CFLAGS) -o$@ ../win/X11/winmisc.c
$(O)winstat.o: ../win/X11/winstat.c $(HACK_H) $(INCL)/winX.h
$(cc) $(CFLAGS) -o$@ ../win/X11/winstat.c
$(O)wintext.o: ../win/X11/wintext.c $(HACK_H) $(INCL)/winX.h $(INCL)/xwindow.h
$(cc) $(CFLAGS) -o$@ ../win/X11/wintext.c
$(O)winval.o: ../win/X11/winval.c $(HACK_H) $(INCL)/winX.h
$(cc) $(CFLAGS) -o$@ ../win/X11/winval.c
$(O)tile.o: $(SRC)/tile.c $(HACK_H)
#---
$(O)qt_bind.o: ../win/Qt/qt_bind.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_bind.h ../win/Qt/qt_main.h \
../win/Qt/qt_kde0.h ../win/Qt/qt_click.h ../win/Qt/qt_delay.h \
../win/Qt/qt_xcmd.h ../win/Qt/qt_key.h ../win/Qt/qt_map.h \
../win/Qt/qt_win.h ../win/Qt/qt_clust.h ../win/Qt/qt_menu.h \
../win/Qt/qt_rip.h ../win/Qt/qt_msg.h ../win/Qt/qt_plsel.h \
../win/Qt/qt_svsel.h ../win/Qt/qt_set.h ../win/Qt/qt_stat.h \
../win/Qt/qt_icon.h ../win/Qt/qt_streq.h ../win/Qt/qt_line.h \
../win/Qt/qt_yndlg.h ../win/Qt/qt_str.h ../include/dlb.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_bind.cpp
$(O)qt_click.o: ../win/Qt/qt_click.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_click.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_click.cpp
$(O)qt_clust.o: ../win/Qt/qt_clust.cpp ../win/Qt/qt_clust.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_clust.cpp
$(O)qt_delay.o: ../win/Qt/qt_delay.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_delay.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_delay.cpp
$(O)qt_glyph.o: ../win/Qt/qt_glyph.cpp $(HACK_H) ../include/tile2x11.h \
../win/Qt/qt_pre.h ../win/Qt/qt_post.h ../win/Qt/qt_glyph.h \
../win/Qt/qt_bind.h ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h \
../win/Qt/qt_set.h ../win/Qt/qt_inv.h ../win/Qt/qt_map.h \
../win/Qt/qt_win.h ../win/Qt/qt_clust.h ../win/Qt/qt_str.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_glyph.cpp
$(O)qt_icon.o: ../win/Qt/qt_icon.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_icon.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_icon.cpp
$(O)qt_inv.o: ../win/Qt/qt_inv.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_inv.h ../win/Qt/qt_glyph.h \
../win/Qt/qt_set.h ../win/Qt/qt_bind.h ../win/Qt/qt_main.h \
../win/Qt/qt_kde0.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_inv.cpp
$(O)qt_key.o: ../win/Qt/qt_key.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_key.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_key.cpp
$(O)qt_line.o: ../win/Qt/qt_line.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_line.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_line.cpp
$(O)qt_main.o: ../win/Qt/qt_main.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h \
qt_main.moc ../win/Qt/qt_bind.h ../win/Qt/qt_glyph.h \
../win/Qt/qt_inv.h ../win/Qt/qt_key.h ../win/Qt/qt_map.h \
../win/Qt/qt_win.h ../win/Qt/qt_clust.h ../win/Qt/qt_msg.h \
../win/Qt/qt_set.h ../win/Qt/qt_stat.h ../win/Qt/qt_icon.h \
../win/Qt/qt_str.h qt_kde0.moc
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_main.cpp
$(O)qt_map.o: ../win/Qt/qt_map.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_map.h ../win/Qt/qt_win.h \
../win/Qt/qt_clust.h qt_map.moc ../win/Qt/qt_click.h \
../win/Qt/qt_glyph.h ../win/Qt/qt_xpms.h ../win/Qt/qt_set.h \
../win/Qt/qt_bind.h ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h \
../win/Qt/qt_str.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_map.cpp
$(O)qt_menu.o: ../win/Qt/qt_menu.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_menu.h ../win/Qt/qt_win.h \
../win/Qt/qt_rip.h qt_menu.moc ../win/Qt/qt_glyph.h \
../win/Qt/qt_set.h ../win/Qt/qt_bind.h ../win/Qt/qt_main.h \
../win/Qt/qt_kde0.h ../win/Qt/qt_streq.h ../win/Qt/qt_line.h \
../win/Qt/qt_str.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_menu.cpp
$(O)qt_msg.o: ../win/Qt/qt_msg.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_msg.h ../win/Qt/qt_win.h \
qt_msg.moc ../win/Qt/qt_map.h ../win/Qt/qt_clust.h \
../win/Qt/qt_set.h ../win/Qt/qt_bind.h ../win/Qt/qt_main.h \
../win/Qt/qt_kde0.h ../win/Qt/qt_str.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_msg.cpp
$(O)qt_plsel.o: ../win/Qt/qt_plsel.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_plsel.h qt_plsel.moc \
../win/Qt/qt_bind.h ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h \
../win/Qt/qt_glyph.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_plsel.cpp
$(O)qt_rip.o: ../win/Qt/qt_rip.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_rip.h ../win/Qt/qt_bind.h \
../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_str.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_rip.cpp
$(O)qt_set.o: ../win/Qt/qt_set.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_set.h ../win/Qt/qt_bind.h \
../win/Qt/qt_main.h ../win/Qt/qt_kde0.h qt_set.moc \
../win/Qt/qt_glyph.h ../win/Qt/qt_str.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_set.cpp
$(O)qt_stat.o: ../win/Qt/qt_stat.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_stat.h ../win/Qt/qt_win.h \
../win/Qt/qt_icon.h qt_stat.moc ../win/Qt/qt_set.h \
../win/Qt/qt_bind.h ../win/Qt/qt_main.h ../win/Qt/qt_kde0.h \
../win/Qt/qt_str.h ../win/Qt/qt_xpms.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_stat.cpp
$(O)qt_str.o: ../win/Qt/qt_str.cpp ../win/Qt/qt_str.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_str.cpp
$(O)qt_streq.o: ../win/Qt/qt_streq.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_streq.h ../win/Qt/qt_line.h \
../win/Qt/qt_str.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_streq.cpp
$(O)qt_svsel.o: ../win/Qt/qt_svsel.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_svsel.h ../win/Qt/qt_bind.h \
../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_str.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_svsel.cpp
#$(O)qttableview.o: ../win/Qt/qttableview.cpp $(INCL)/qttableview.h
# $(CXX) $(CXXFLAGS) -o$@ $(QT)/qttableview.cpp
$(O)qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_win.h ../win/Qt/qt_bind.h \
../win/Qt/qt_main.h ../win/Qt/qt_kde0.h ../win/Qt/qt_click.h \
../win/Qt/qt_glyph.h ../win/Qt/qt_inv.h ../win/Qt/qt_key.h \
../win/Qt/qt_icon.h ../win/Qt/qt_map.h ../win/Qt/qt_clust.h \
../win/Qt/qt_menu.h ../win/Qt/qt_rip.h ../win/Qt/qt_msg.h \
../win/Qt/qt_set.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_win.cpp
$(O)qt_xcmd.o: ../win/Qt/qt_xcmd.cpp $(HACK_H) ../include/func_tab.h \
../win/Qt/qt_pre.h ../win/Qt/qt_post.h ../win/Qt/qt_xcmd.h \
# qt_xcmd.moc ../win/Qt/qt_bind.h ../win/Qt/qt_main.h \
# ../win/Qt/qt_kde0.h ../win/Qt/qt_set.h ../win/Qt/qt_str.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_xcmd.cpp
$(O)qt_yndlg.o: ../win/Qt/qt_yndlg.cpp $(HACK_H) ../win/Qt/qt_pre.h \
../win/Qt/qt_post.h ../win/Qt/qt_yndlg.h qt_yndlg.moc \
../win/Qt/qt_str.h
# $(CXX) $(CXXFLAGS) -c -o $@ ../win/Qt/qt_yndlg.cpp
#---
$(O)allmain.o: allmain.c $(HACK_H)
$(O)alloc.o: alloc.c $(CONFIG_H)
$(O)apply.o: apply.c $(HACK_H)
$(O)artifact.o: artifact.c $(HACK_H) $(INCL)/artifact.h $(INCL)/artilist.h
$(O)attrib.o: attrib.c $(HACK_H)
$(O)ball.o: ball.c $(HACK_H)
$(O)bones.o: bones.c $(HACK_H)
$(O)botl.o: botl.c $(HACK_H)
$(O)cmd.o: cmd.c $(HACK_H) $(INCL)/func_tab.h
$(O)dbridge.o: dbridge.c $(HACK_H)
$(O)decl.o: decl.c $(HACK_H)
$(O)detect.o: detect.c $(HACK_H) $(INCL)/artifact.h
$(O)dig.o: dig.c $(HACK_H)
$(O)display.o: display.c $(HACK_H)
$(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)/dlb.h
$(O)do.o: do.c $(HACK_H)
$(O)do_name.o: do_name.c $(HACK_H)
$(O)do_wear.o: do_wear.c $(HACK_H)
$(O)dog.o: dog.c $(HACK_H)
$(O)dogmove.o: dogmove.c $(HACK_H) $(INCL)/mfndpos.h
$(O)dokick.o: dokick.c $(HACK_H)
$(O)dothrow.o: dothrow.c $(HACK_H)
$(O)drawing.o: drawing.c $(CONFIG_H) $(INCL)/color.h $(INCL)/sym.h \
$(INCL)/defsym.h $(INCL)/rm.h \
$(INCL)/objclass.h
$(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)/dgn_file.h $(INCL)/dlb.h
$(O)eat.o: eat.c $(HACK_H)
$(O)end.o: end.c $(HACK_H) $(INCL)/dlb.h
$(O)engrave.o: engrave.c $(HACK_H)
$(O)exper.o: exper.c $(HACK_H)
$(O)explode.o: explode.c $(HACK_H)
$(O)extralev.o: extralev.c $(HACK_H)
$(O)files.o: files.c $(HACK_H) $(INCL)/dlb.h
$(O)fountain.o: fountain.c $(HACK_H)
$(O)hack.o: hack.c $(HACK_H)
$(O)hacklib.o: hacklib.c $(HACK_H)
$(O)insight.o: insight.c $(HACK_H)
$(O)invent.o: invent.c $(HACK_H)
$(O)light.o: light.c $(HACK_H)
$(O)lock.o: lock.c $(HACK_H)
$(O)mail.o: mail.c $(HACK_H) $(INCL)/mail.h
$(O)makemon.o: makemon.c $(HACK_H)
$(O)mcastu.o: mcastu.c $(HACK_H)
$(O)mhitm.o: mhitm.c $(HACK_H) $(INCL)/artifact.h
$(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)/artifact.h
$(O)minion.o: minion.c $(HACK_H)
$(O)mklev.o: mklev.c $(HACK_H)
$(O)mkmap.o: mkmap.c $(HACK_H) $(INCL)/sp_lev.h
$(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)/sp_lev.h
$(O)mkobj.o: mkobj.c $(HACK_H)
$(O)mkroom.o: mkroom.c $(HACK_H)
$(O)mon.o: mon.c $(HACK_H) $(INCL)/mfndpos.h
$(O)mondata.o: mondata.c $(HACK_H)
$(O)monmove.o: monmove.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/artifact.h
$(O)monst.o: monst.c $(CONFIG_H) $(INCL)/permonst.h $(INCL)/align.h \
$(INCL)/monattk.h $(INCL)/monflag.h $(INCL)/color.h
$(O)mplayer.o: mplayer.c $(HACK_H)
$(O)mthrowu.o: mthrowu.c $(HACK_H)
$(O)muse.o: muse.c $(HACK_H)
$(O)music.o: music.c $(HACK_H) #interp.c
$(O)nhlua.o: nhlua.c $(HACK_H)
$(O)nhlsel.o: nhlsel.c $(HACK_H)
$(O)nhlobj.o: nhlobj.c $(HACK_H)
$(O)o_init.o: o_init.c $(HACK_H)
$(O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \
$(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h
$(O)objnam.o: objnam.c $(HACK_H)
$(O)options.o: options.c $(CONFIG_H) $(INCL)/objclass.h $(INCL)/flag.h \
$(HACK_H) $(INCL)/tcap.h
$(O)pager.o: pager.c $(HACK_H) $(INCL)/dlb.h
$(O)pickup.o: pickup.c $(HACK_H)
$(O)pline.o: pline.c $(HACK_H)
$(O)polyself.o: polyself.c $(HACK_H)
$(O)potion.o: potion.c $(HACK_H)
$(O)pray.o: pray.c $(HACK_H)
$(O)priest.o: priest.c $(HACK_H) $(INCL)/mfndpos.h
$(O)quest.o: quest.c $(HACK_H)
$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h
$(O)read.o: read.c $(HACK_H)
$(O)rect.o: rect.c $(HACK_H)
$(O)region.o: region.c $(HACK_H)
$(O)restore.o: restore.c $(HACK_H) $(INCL)/tcap.h
$(O)rip.o: rip.c $(HACK_H)
$(O)rnd.o: rnd.c $(HACK_H)
$(O)role.o: role.c $(HACK_H)
$(O)rumors.o: rumors.c $(HACK_H) $(INCL)/dlb.h
$(O)save.o: save.c $(HACK_H)
$(O)shk.o: shk.c $(HACK_H)
$(O)shknam.o: shknam.c $(HACK_H)
$(O)sit.o: sit.c $(HACK_H) $(INCL)/artifact.h
$(O)sounds.o: sounds.c $(HACK_H)
$(O)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)/dlb.h $(INCL)/sp_lev.h
$(O)spell.o: spell.c $(HACK_H)
$(O)steal.o: steal.c $(HACK_H)
$(O)steed.o: steed.c $(HACK_H)
$(O)symbols.o: symbols.c $(HACK_H) $(INCL)/tcap.h
$(O)sys.o: sys.c $(HACK_H)
$(O)teleport.o: teleport.c $(HACK_H)
$(O)timeout.o: timeout.c $(HACK_H)
$(O)topten.o: topten.c $(HACK_H) $(INCL)/dlb.h
$(O)track.o: track.c $(HACK_H)
$(O)trap.o: trap.c $(HACK_H)
$(O)u_init.o: u_init.c $(HACK_H)
$(O)uhitm.o: uhitm.c $(HACK_H)
$(O)vault.o: vault.c $(HACK_H)
$(O)version.o: version.c $(HACK_H)
$(O)vision.o: vision.c $(HACK_H)
$(O)weapon.o: weapon.c $(HACK_H)
$(O)were.o: were.c $(HACK_H)
$(O)wield.o: wield.c $(HACK_H)
$(O)windmain.o: $(MSWSYS)/windmain.c $(HACK_H)
$(O)windows.o: windows.c $(HACK_H)
$(O)wizard.o: wizard.c $(HACK_H)
$(O)worm.o: worm.c $(HACK_H)
$(O)worn.o: worn.c $(HACK_H)
$(O)write.o: write.c $(HACK_H)
$(O)zap.o: zap.c $(HACK_H)
# end of file