head	1.4;
access;
symbols
	SLASHEM_0_0_6E3F1:1.1.1.1 WAC:1.1.1;
locks; strict;
comment	@# @;


1.4
date	2000.08.28.22.12.43;	author jrn;	state dead;
branches;
next	1.3;

1.3
date	2000.08.25.22.23.13;	author jrn;	state Exp;
branches;
next	1.2;

1.2
date	2000.08.22.22.53.25;	author jrn;	state dead;
branches;
next	1.1;

1.1
date	2000.08.15.19.42.29;	author wacko;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.08.15.19.42.29;	author wacko;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Remove src/makefile (again, I don't know why it keeps on getting added)...
@
text
@#	Mingw32 under Win95, modified for use with SLASH'EM
#
#	This version uses DOS-style Directory separators only!
#
#	Requires Gnu gcc compiler for Win32 (Mingw32 or Cygwin)
#	Also requires Gnu Make utility, either Mingw32 or Cygwin version
#
#	For questions or comments: karlgarrison@@earthlink.net
#
#	In addition to your C compiler, you will need a workalike for the
#       UNIX yacc and lex utilities.  Theoretically, you should be able to
#       compile without them, but I ran into errors when I tried to do this.
#
#	Note that flex (workalike for lex) and bison (workalike for yacc) are
#       included with the Cygwin package (full version only).  There may be
#       other ports of these tools available for Win32, but these are the only
#       ones I am aware of.
#

# Directory Seperator
#

# Game Installation Variables
# NOTE: Make sure GAMEDIR exists before make is started.

GAME = slashem
# The GNU Make has a problem if you include a drive spec below (unfortunately).
GAMEDIR = /slam32d

#
# Directories
#

# These are for Mingw32's GCC,  which gets confused by \ 
DDAT  = ../dat
DUTIL = ../util
DSRC  = ../src
DINCL = ../include

# Normal dos commands get confused by \\ JRN change
DAT  = ../dat
DOC  = ../doc
INCL = ../include
WSYS = ../sys/winnt
SRC  = ../src
SSHR = ../sys/share
UTIL = ../util
WTTY = ../win/tty
WGTK = ../win/gtk
WSHR = ../win/share

#
#  Executables.

CC    = gcc
LINK  = gcc
MAKEBIN  = make

# The copy, del and echo commands don't seem to work from a makefile since
# it's part of the shell rather than an external utility.  We can get around
# this by specifying an external utility that performs the same function like
# the cp and rm commands from Cygwin32, or xcopy for copy.  Another way to do
# it is to call the shell explicitly and use the /c option to run the built-in
# command.  All of these examples appear below.

#COPY = command.com /c copy
#COPY = cmd.exe /c copy	# Same as above, but for Windows NT
#COPY = xcopy
COPY = cp		# UNIX copy command
#COPY = copy		# MSDOS copy command
#DEL = command.com /c del
#DEL = cmd.exe /c del	# Same as above, but for Windows NT
DEL = rm -f 		#UNIX del command
#DEL = del 		#MSDOS del command
#ECHO = command.com /c echo     # For some reason this doesn't seem to work
#ECHO = cmd.exe /c $(ECHO)	# Same as above, but for Windows NT
#ECHO = echo.exe # UNIX echo command
ECHO = echo # MSDOS echo command
LS = ls -1		# ls.exe from djgpp distribution
#LS = dir /l/b/-p           # DOS command WAC - disable pause for dos6
#LS = *dir /l/b/z        # 4DOS command - cuts through ALIASes

# if you have a uudecode program, add its name here
# otherwise leave blank
UUDECODE =

#
#  Yacc/Lex ... if you got 'em.
#
# If you have yacc/lex or a work-alike set YACC_LEX to Y
#
YACC_LEX = Y

# If YACC_LEX is Y above, set the following to values appropriate for
# your tools.
#
YACC   = bison -y
LEX    = flex
# Win32 versions
YTABC  = y.tab.c
YTABH  = y.tab.h
LEXYYC = lex.yy.c
# DJGPP bison/lex doesn't use LFN
#YTABC  = y_tab.c
#YTABH  = y_tab.h
#LEXYYC = lexyy.c

#
# Uncomment the line below if you want to store all the level files,
# help files, etc. in a single library file.

USE_DLB = Y

# To build a binary without any graphics
# suitable for blind players,
# set SUPPRESS_GRAPHICS to Y
# (Note: binary will require ANSI.SYS driver or equivalent loaded)
# SUPPRESS_GRAPHICS = Y
SUPPRESS_GRAPHICS = 


#############################################################################
#
# nothing below this line should have to be changed
#

#Do not uncomment these for 3.3.0
#TILEGAME  = $(OBJ)/tile.o
#TILEDEF   = -DTILES
#TILEHDR   =
#SOUND = $(OBJ)/ntsound.o

GAMEFILE = $(GAMEDIR)/$(GAME).exe

# Changing this conditional block is not recommended
ifeq ($(USE_DLB),Y)
DLBFLG = -DDLB
else
DLBFLG =
endif

#
#  Flags.
#
ifeq ($(SUPPRESS_GRAPHICS),Y)
TERMLIB =
# Build NetHack suitable for blind players

# Debugging
#CFLAGS = -pg -c -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS
#LFLAGS = -pg

CFLAGS = -c -O -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS
LFLAGS =

else

# Debugging
#CFLAGS = -pg -c -I../include -I../sys/winnt $(DLBFLG) -DWIN32CON
#LFLAGS = -pg

#    Normal
CFLAGS = -ggdb -funsigned-char -c -O -I../include -I../sys/winnt \
	$(DLBFLG) -DWIN32CON
LFLAGS =
endif

# Select Windowing system(s) below
# GTK windowing system
#WINGTKCFLAGS=`gtk-config --cflags`
#WINGTKCFLAGS=-Ic:/mingw32/src/gtk+ -Ic:/mingw32/src/glib -Ic:/mingw32/src/gtk+/gdk
#WINGTKCFLAGS=-Ic:/mingw32/src/

# Set the WINSRC, WINOBJ, and WINLIB lines to correspond to your desired
# combination of windowing systems.  Also set windowing systems in config.h.
#
# files for a straight tty port using no native windowing system
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 a GTK port
# (tile.c is included in the defn. for WINCSRC, below)
WINGTKSRC = ../win/gtk/gtk.c ../win/gtk/gtkgetlin.c ../win/gtk/gtkstatus.c \
	../win/gtk/gtkmenu.c ../win/gtk/gtkyn.c ../win/gtk/gtkextcmd.c \
	../win/gtk/gtkmap.c ../win/gtk/gtkmessage.c ../win/gtk/gtkmisc.c \
	../win/gtk/xshmmap.c ../win/gtk/xshm.c
WINGTKOBJ = gtk.o gtkgetlin.o gtkstatus.o gtkmenu.o gtkyn.o gtkextcmd.o \
	gtkmap.o gtkmessage.o gtkmisc.o xshmmap.o xshm.o nhwin.a

# Use these declarations if you only want to support the TTY windowing system
WINSRC = $(WINTTYSRC)
WINOBJ = $(WINTTYOBJ)
# Use these declarations if you want to support the GTK windowing system
# WINSRC = $(WINTTYSRC) $(WINGTKSRC)
# WINOBJ = $(WINTTYOBJ) $(WINGTKOBJ)
#
# You must also change the definition of WINLIB (below) to match these

WINTTYLIB = 
# libraries for GTK
# WINGTKLIB = `gtk-config --libs`
WINGTKLIB = /mingw32/src/gtk+/gtk/libgtk~1.a /mingw32/src/gtk+/gdk/libgdk~1.a 

# Use this declaration if you only want to support the TTY windowing system
WINLIB = $(WINTTYLIB)


# Shareable (architecture independent) data files which are not candidates
# for inclusion in DLB libraries (ND) and which are (D). Port specific files
# per discussions in Install.X11, Install.Qt and Install.GTK
CNF_SHARE_GTKND = x11bigtiles x11tiles rip.xpm credit.xpm

#Uncomment below to build tiles needed for GTK distrib
#CNF_SHARE_DATND = $(CNF_SHARE_GTKND)
CNF_SHARE_DATND =

#
#  Utility Objects.
#

MAKESRC	    = makedefs.c

SPLEVSRC    = lev_yacc.c  lev_$(LEX).c	 lev_main.c  panic.c

DGNCOMPSRC  = dgn_yacc.c  dgn_$(LEX).c	 dgn_main.c

MAKEOBJS    = makedefs.o  monst.o	 objects.o

SPLEVOBJS   = lev_yacc.o  lev_$(LEX).o	lev_main.o  alloc.o	\
		monst.o	    objects.o	    panic.o  \
		drawing.o	decl.o

DGNCOMPOBJS = dgn_yacc.o  dgn_$(LEX).o	dgn_main.o  alloc.o	 \
		panic.o

RECOVOBJS   = recover.o


#  Tile related object files.

ifeq ($(SUPPRESS_GRAPHICS),Y)
TILOBJ       =
TEXTIO       =
TEXTIO2      =
PLANAR_TIB   =
OVERVIEW_TIB =
TILEUTIL     = 
TILEFILES    = 
TILEFILES2   = 
GIFREADERS   = 
GIFREAD2     = 
PPMWRITERS   = 
PPMWRIT2     = 

else

TEXTIO      = tiletext.o tiletxt.o drawing.o decl.o monst.o objects.o

TEXTIO2     = tiletex2.o tiletxt2.o drawing.o decl.o monst.o objects.o


PLANAR_TIB  = NetHack1.tib

OVERVIEW_TIB = NetHacko.tib

DLBOBJ = dlb.o
endif


#  Object files for the game itself.

VOBJ01 = allmain.o  alloc.o    apply.o	  artifact.o attrib.o
VOBJ02 = ball.o	    bones.o    borg.o	  botl.o     cmd.o 	dbridge.o
VOBJ03 = decl.o	    detect.o   display.o  do.o	     do_name.o
VOBJ04 = do_wear.o  dog.o      dogmove.o  dokick.o   dothrow.o
VOBJ05 = drawing.o  dungeon.o  eat.o	  end.o	     engrave.o
VOBJ06 = exper.o    explode.o  extralev.o files.o    fountain.o
VOBJ07 = hack.o     hacklib.o  invent.o   lock.o
VOBJ08 = mail.o	    main.o     makemon.o  mcastu.o   mhitm.o
VOBJ09 = mhitu.o    minion.o   mkmap.o	  mklev.o    mkmaze.o
VOBJ10 = mkobj.o    mkroom.o   mon.o	  mondata.o  monmove.o
VOBJ11 = monst.o    monstr.o   mplayer.o  mthrowu.o  muse.o
VOBJ12 = music.o    o_init.o   objects.o  objnam.o   options.o
VOBJ13 = pickup.o   pline.o    polyself.o potion.o   quest.o
VOBJ14 = questpgr.o pager.o    pray.o	  priest.o   read.o
VOBJ15 = rect.o	    restore.o  rip.o	  rnd.o	     role.o
VOBJ16 = rumors.o   save.o	   shk.o      shknam.o	 sit.o
VOBJ17 = sounds.o   sp_lev.o   spell.o    steal.o	 steed.o
VOBJ18 = timeout.o  topten.o   track.o
VOBJ19 = trap.o     u_init.o   uhitm.o    vault.o    vision.o
VOBJ20 = vis_tab.o  weapon.o   were.o	  wield.o    windows.o
VOBJ21 = wizard.o   worm.o	  worn.o     write.o
VOBJ22 = zap.o	    light.o    dlb.o      dig.o      teleport.o
VOBJ23 = region.o   tech.o     gypsy.o

SOBJ   = winnt.o    sys.o      unix.o     nttty.o
#	 $(SOUND)   mapimail.o nhlan.o random.o

VVOBJ  = version.o

VOBJ   = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
	$(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \
	$(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \
	$(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \
	$(VOBJ21) $(VOBJ22) $(VOBJ23)

ALLOBJ = $(VOBJ) $(SOBJ) $(VVOBJ) $(WINOBJ)

#
#  Header Objects.
#

DGN_FILE_H = $(INCL)/align.h	$(INCL)/dgn_file.h
DUNGEON_H  = $(INCL)/align.h	$(INCL)/dungeon.h
EMIN_H	   = $(DUNGEON_H)	$(INCL)/emin.h
EPRI_H	   = $(DUNGEON_H)	$(INCL)/align.h	    $(INCL)/epri.h
ESHK_H	   = $(DUNGEON_H)	$(INCL)/eshk.h
MONDATA_H  = $(INCL)/align.h	$(INCL)/mondata.h
MONST_H	   = $(INCL)/align.h	$(INCL)/monst.h
NHLAN_H     = $(INCL)/nhlan.h
PERMONST_H = $(INCL)/monattk.h	$(INCL)/monflag.h   $(INCL)/align.h   \
	    $(INCL)/permonst.h
REGION_H   = $(INCL)/region.h
RM_H	   = $(INCL)/align.h	$(INCL)/rm.h
SKILLS_H   = $(INCL)/skills.h
SP_LEV_H   = $(INCL)/align.h	$(INCL)/sp_lev.h
VAULT_H	   = $(DUNGEON_H)	$(INCL)/vault.h
YOUPROP_H  = $(PERMONST_H)	$(MONDATA_H)	    $(INCL)/prop.h    \
	    $(INCL)/pm.h       $(INCL)/youprop.h
YOU_H	   = $(MONST_H)		$(YOUPROP_H)	    $(INCL)/align.h   \
	     $(INCL)/attrib.h	$(INCL)/you.h
DISPLAY_H  = $(MONDATA_H)	$(INCL)/vision.h    $(INCL)/display.h
NTCONF_H   = $(INCL)/micro.h	$(INCL)/system.h    $(INCL)/ntconf.h
CONFIG_H   = $(GLOBAL_H)	$(INCL)/tradstdc.h  $(INCL)/config1.h \
	    $(INCL)/config.h
DECL_H	   = $(YOU_H)		$(INCL)/spell.h	    $(INCL)/color.h   \
	     $(INCL)/obj.h	$(INCL)/onames.h    $(INCL)/pm.h      \
	      $(INCL)/decl.h
GLOBAL_H   = $(NTCONF_H)	$(INCL)/coord.h	    $(INCL)/global.h
HACK_H	   = $(CONFIG_H)	$(DUNGEON_H)	    $(DECL_H)	      \
	       $(DISPLAY_H)	  $(INCL)/monsym.h    $(INCL)/mkroom.h	\
	      $(INCL)/objclass.h $(INCL)/trap.h	  $(INCL)/flag.h    \
	      $(RM_H)		 $(INCL)/vision.h    $(INCL)/wintype.h \
	      $(INCL)/engrave.h	 $(INCL)/rect.h	  \
	       $(INCL)/trampoli.h $(INCL)/hack.h $(REGION_H)
DLB_H      = $(INCL)/dlb.h

#ifeq ($(SUPPRESS_GRAPHICS),Y)
#TILE_H     =
#else
#TILE_H	   = $(INCL)/tile.h $(INCL)/pctiles.h
#endif

ifeq ($(USE_DLB),Y)
DLB = $(DAT)/nhshare $(DAT)/nhushare
DLBOBJS = dlb_main.o dlb.o alloc.o panic.o
else
DLB =
DLBOBJS =
endif

#
#  Make Rules.
#

.SUFFIXES:  .exe .o .c .y .l

.c.o:
	$(CC) $(CFLAGS) -o$@@ $<

#.phony: dlb

#
#  Primary Targets.
#

#  The default target.

default: $(GAMEFILE)

all: install.tag

util: utility.tag

install: install.tag

utility.tag: $(INCL)/date.h $(INCL)/trap.h    $(INCL)/onames.h	       \
	$(INCL)/pm.h	  monstr.c   vis_tab.c	$(INCL)/filename.h\
	lev_comp.exe	 dgn_comp.exe	 recover.exe $(TILEUTIL)
	$(ECHO) utilities made > utility.tag

install.tag: dat.tag $(GAMEFILE)
ifeq ($(USE_DLB),Y)
	$(COPY) $(DAT)/nhshare         $(GAMEDIR)
	$(COPY) $(DAT)/nhushare         $(GAMEDIR)
	$(COPY) $(DAT)/license       $(GAMEDIR)
else
	$(COPY) $(DAT)/*.            $(GAMEDIR)
	$(COPY) $(DAT)/*.dat         $(GAMEDIR)
	$(COPY) $(DAT)/*.lev         $(GAMEDIR)
#	$(DEL) $(GAMEDIR)/makefile.
endif
#	$(COPY) *.tib                $(GAMEDIR)
	$(COPY) $(SSHR)/NetHack.cnf  $(GAMEDIR)/defaults.nh
	$(COPY) ../sys/msdos/NHAccess.nh  $(GAMEDIR)
	$(COPY) recover.exe          $(GAMEDIR)
	$(COPY) $(DOC)/guidebook.txt   $(GAMEDIR)
	$(COPY) $(DOC)/recover.txt $(GAMEDIR)
	$(COPY) $(DOC)/slashem.txt $(GAMEDIR)
	$(ECHO) install done > install.tag

#  The main target.


$(GAMEFILE): utility.tag $(ALLOBJ) $(GAME).lnk
	$(LINK) $(LFLAGS) -o$(GAME).exe $(GAME).lnk
	$(COPY) $(GAME).exe $(GAMEFILE)
	$(DEL) $(GAME).exe

$(GAME).lnk: $(ALLOBJ)
	@@echo INPUT\( $(VOBJ01) \)> $@@
	@@echo INPUT\( $(VOBJ02) \)>> $@@
	@@echo INPUT\( $(VOBJ03) \)>> $@@
	@@echo INPUT\( $(VOBJ04) \)>> $@@
	@@echo INPUT\( $(VOBJ05) \)>> $@@
	@@echo INPUT\( $(VOBJ06) \)>> $@@
	@@echo INPUT\( $(VOBJ07) \)>> $@@
	@@echo INPUT\( $(VOBJ08) \)>> $@@
	@@echo INPUT\( $(VOBJ09) \)>> $@@
	@@echo INPUT\( $(VOBJ10) \)>> $@@
	@@echo INPUT\( $(VOBJ11) \)>> $@@
	@@echo INPUT\( $(VOBJ12) \)>> $@@
	@@echo INPUT\( $(VOBJ13) \)>> $@@
	@@echo INPUT\( $(VOBJ14) \)>> $@@
	@@echo INPUT\( $(VOBJ15) \)>> $@@
	@@echo INPUT\( $(VOBJ16) \)>> $@@
	@@echo INPUT\( $(VOBJ17) \)>> $@@
	@@echo INPUT\( $(VOBJ18) \)>> $@@
	@@echo INPUT\( $(VOBJ19) \)>> $@@
	@@echo INPUT\( $(VOBJ20) \)>> $@@
	@@echo INPUT\( $(VOBJ21) \)>> $@@
	@@echo INPUT\( $(VOBJ22) \)>> $@@
	@@echo INPUT\( $(VOBJ23) \)>> $@@
	@@echo INPUT\( $(SOBJ)   \)>> $@@
	@@echo INPUT\( $(VVOBJ)  \)>> $@@
	@@echo INPUT\( $(WINOBJ) \)>> $@@

#
#  Housekeeping.
#

clean:
	$(DEL) *.o
	$(DEL) *.map
	$(DEL) dlb_main.exe

spotless: clean
	$(DEL) utility.tag
	$(DEL) install.tag
	$(DEL) dat.tag
	$(DEL) $(GAME).lnk
	$(DEL) makedefs.exe
	$(DEL) lev_comp.exe
	$(DEL) dgn_comp.exe
	$(DEL) txtmerge.exe
	$(DEL) magtile.exe
	$(DEL) tile2x11.exe
	$(DEL) x11bigtiles
	$(DEL) x11tiles
	$(DEL) tiletext.c
	$(DEL) txtmerge.c
	$(DEL) magtile.c
	$(DEL) x11tiles
	$(DEL) lev_flex.c
	$(DEL) lev_yacc.c
	$(DEL) dgn_flex.c
	$(DEL) dgn_yacc.c
	$(DEL) recover.exe
	$(DEL) $(INCL)/onames.h
	$(DEL) $(INCL)/pm.h
	$(DEL) $(INCL)/vis_tab.h
	$(DEL) $(INCL)/pcvideo.h
	$(DEL) $(INCL)/pctiles.h
	$(DEL) $(INCL)/portio.h
	$(DEL) $(INCL)/tile.h
	$(DEL) monstr.c
	$(DEL) vis_tab.c
	$(DEL) $(SRC)/panic.c
	$(DEL) $(SRC)/makedefs.c
	$(DEL) $(SRC)/recover.c
	$(DEL) $(SRC)/lev_main.c
	$(DEL) $(SRC)/dlb_main.c
	$(DEL) $(SRC)/dgn_main.c
	$(DEL) $(SRC)/wintty.c
	$(DEL) $(SRC)/topl.c
	$(DEL) $(SRC)/getline.c
	$(DEL) $(SRC)/termcap.c
	$(DEL) $(SRC)/tile2bin.c
	$(DEL) $(SRC)/msdos.c
	$(DEL) $(SRC)/pckeys.c
	$(DEL) $(SRC)/video.c
	$(DEL) $(SRC)/sound.c
	$(DEL) $(SRC)/tilemap.c
	$(DEL) $(SRC)/gifread.c
	$(DEL) $(SRC)/ppmwrite.c
	$(DEL) $(SRC)/pcmain.c
	$(DEL) $(SRC)/pcunix.c
	$(DEL) $(SRC)/pcsys.c
	$(DEL) $(SRC)/tile.c
	$(DEL) $(SRC)/gtk*.c
	$(DEL) $(SRC)/xshmmap.c
	$(DEL) $(SRC)/xshm.c
	$(DEL) $(INCL)/date.h
	$(DEL) $(INCL)/onames.h
	$(DEL) $(INCL)/pm.h
	$(DEL) $(INCL)/vis_tab.h
	$(DEL) $(SRC)/nhlan.c
	$(DEL) $(SRC)/winnt.c
	$(DEL) $(SRC)/nttty.c
	$(DEL) $(SRC)/ntsound.c
	$(DEL) $(SRC)/mapimail.c
	$(DEL) vis_tab.c
	$(DEL) random.c
	$(DEL) nhlan.c
	$(DEL) *.lnk
	$(DEL) *.def
	$(DEL) *.map
	$(DEL) *.lev
	$(DEL) a.out
	$(DEL) tilemap.exe
	$(DEL) tile2bin.exe
	$(DEL) $(DAT)/data
	$(DEL) $(DAT)/*.lev
	$(DEL) $(DAT)/data
	$(DEL) $(DAT)/dungeon
	$(DEL) $(DAT)/options
	$(DEL) $(DAT)/oracles
	$(DEL) $(DAT)/rumors
	$(DEL) $(DAT)/quest.dat
	$(DEL) $(DAT)/nhshare
	$(DEL) $(DAT)/nhushare
	$(DEL) $(DAT)/dlb.lst
	$(DEL) $(DAT)/msdoshlp.txt
	$(DEL) $(DAT)/dlb_main.exe
	$(DEL) $(DAT)/lev_comp.exe
	$(DEL) $(DAT)/dgn_comp.exe
	$(DEL) sp_lev.tag
	$(DEL) $(PLANAR_TIB)
	$(DEL) $(OVERVIEW_TIB)


#
#  Secondary Targets.
#
#  The following include files depend on makedefs to be created.
#
#  date.h should be remade every time any of the source or include
#  files is modified.


$(INCL)/date.h : makedefs.exe
	-./makedefs -v

$(INCL)/onames.h: makedefs.exe
	-./makedefs -o

$(INCL)/pm.h: makedefs.exe
	-./makedefs -p

monstr.c: makedefs.exe
	-./makedefs -m

$(INCL)/vis_tab.h: makedefs.exe
	-./makedefs -z

vis_tab.c: makedefs.exe
	-./makedefs -z

$(INCL)/filename.h: makedefs.exe
	-./makedefs -f

#
#  Makedefs Stuff
#

makedefs.exe:  $(MAKEOBJS)
	$(LINK) $(LFLAGS) -omakedefs.exe $(MAKEOBJS)

makedefs.c: $(UTIL)/makedefs.c
	$(COPY) $(UTIL)/makedefs.c .

makedefs.o:  $(CONFIG_H)	$(PERMONST_H)	   $(INCL)/objclass.h \
		$(INCL)/monsym.h   $(INCL)/qtext.h makedefs.c

#
#  Level Compiler Dependencies
#

lev_comp.exe:  $(SPLEVOBJS)
	$(LINK) $(LFLAGS) -olev_comp.exe $(SPLEVOBJS)

ifeq ($(YACC_LEX),Y)

lev_yacc.o:  $(HACK_H)	 $(SP_LEV_H)	lev_yacc.c
	$(CC) $(CFLAGS) -o$@@ lev_yacc.c

else

lev_yacc.o:  $(HACK_H)	 $(SP_LEV_H) $(INCL)/lev_comp.h lev_yacc.c
	$(CC) $(CFLAGS) -o$@@ lev_yacc.c

endif

lev_$(LEX).o:  $(HACK_H)   $(SP_LEV_H)	  $(INCL)/lev_comp.h \
	lev_$(LEX).c
	$(CC) $(CFLAGS) -o$@@ lev_$(LEX).c

lev_main.c:  $(UTIL)/lev_main.c
	$(COPY) $(UTIL)/lev_main.c .

lev_main.o:  $(HACK_H) lev_main.c

$(INCL)/lev_comp.h: lev_yacc.c

ifeq ($(YACC_LEX),Y)

lev_yacc.c:  $(UTIL)/lev_comp.y
	$(YACC) -d $(DUTIL)/lev_comp.y
	$(COPY) $(YTABC) $@@
	$(COPY) $(YTABH) $(INCL)/lev_comp.h
	$(DEL) $(YTABC)
	$(DEL) $(YTABH)

lev_$(LEX).c:  $(UTIL)/lev_comp.l
	$(LEX) $(DUTIL)/lev_comp.l
	$(COPY) $(LEXYYC) $@@
	$(DEL) $(LEXYYC)
else

lev_yacc.c: $(SSHR)/lev_yacc.c
	$(COPY) $(SSHR)/lev_yacc.c $@@

$(INCL)/lev_comp.h: $(SSHR)/lev_comp.h
	$(COPY) $(SSHR)/lev_comp.h $@@
	touch $(DINCL)/lev_comp.h

lev_$(LEX).c: $(SSHR)/lev_lex.c
	$(COPY) $(SSHR)/lev_lex.c $@@

endif



#
#  Dungeon Dependencies
#

dgn_comp.exe:  $(DGNCOMPOBJS)
	$(LINK) $(LFLAGS) -odgn_comp.exe $(DGNCOMPOBJS)

ifeq ($(YACC_LEX),Y)

dgn_yacc.o:  $(HACK_H)	 $(DGN_FILE_H)	dgn_yacc.c
	$(CC) $(CFLAGS) -o$@@ dgn_yacc.c

else

dgn_yacc.o:  $(HACK_H)	 $(DGN_FILE_H)	$(INCL)/dgn_comp.h dgn_yacc.c
	$(CC) $(CFLAGS) -o$@@ dgn_yacc.c

endif

dgn_$(LEX).o:  $(HACK_H)   $(DGN_FILE_H)  $(INCL)/dgn_comp.h \
	dgn_$(LEX).c
	$(CC) $(CFLAGS) -o$@@ dgn_$(LEX).c

dgn_main.c:  $(UTIL)/dgn_main.c
	$(COPY) $(UTIL)/dgn_main.c .

dgn_main.o:  $(HACK_H)

$(INCL)/dgn_comp.h:  dgn_yacc.c

ifeq ($(YACC_LEX),Y)

dgn_yacc.c: $(UTIL)/dgn_comp.y
	$(YACC) -d $(DUTIL)/dgn_comp.y
	$(COPY) $(YTABC) $@@
	$(COPY) $(YTABH) $(INCL)/dgn_comp.h
	$(DEL) $(YTABC)
	$(DEL) $(YTABH)

dgn_$(LEX).c:  $(UTIL)/dgn_comp.l
	$(LEX) $(DUTIL)/dgn_comp.l
	$(COPY) $(LEXYYC) $@@
	$(DEL) $(LEXYYC)

else

dgn_yacc.c: $(SSHR)/dgn_yacc.c
	$(COPY) $(SSHR)/dgn_yacc.c $@@

$(INCL)/dgn_comp.h: $(SSHR)/dgn_comp.h
	$(COPY) $(SSHR)/dgn_comp.h $@@
	touch $(DINCL)/dgn_comp.h

dgn_$(LEX).c: $(SSHR)/dgn_lex.c
	$(COPY) $(SSHR)/dgn_lex.c $@@
 
endif

#
#  Recover Utility
#

recover.exe:   $(RECOVOBJS)
	$(LINK) $(LFLAGS) -orecover.exe recover.o

recover.c:  $(UTIL)/recover.c
	$(COPY) $(UTIL)/recover.c .

recover.o:   $(CONFIG_H) recover.c
	$(CC) $(CFLAGS) -o$@@ recover.c

#
#  Tiles
#

#  Headers

$(INCL)/tile.h: $(WSHR)/tile.h tilemap.exe
	./tilemap.exe

#  Utilities

txtmerge.exe: txtmerge.o $(TEXTIO)
	$(CC) $(LFLAGS) -otxtmerge.exe txtmerge.o $(TEXTIO)

tile2x11.exe: tile2x11.o $(TEXTIO)
	$(CC) $(LFLAGS) -otile2x11.exe tile2x11.o $(TEXTIO)

magtile.exe: magtile.o $(TEXTIO)
	$(CC) $(LFLAGS) -omagtile.exe magtile.o $(TEXTIO)

tilemap.exe: tilemap.o
	$(CC) $(LFLAGS) -o tilemap.exe tilemap.o

tilemap.c: $(WSHR)/tilemap.c
	copy $(WSHR)/tilemap.c .

tilemap.o: $(WSHR)/tilemap.c $(HACK_H)
	$(CC) $(CFLAGS) -c ../win/share/tilemap.c


magtile.o: $(WSHR)/magtile.c $(INCL)/config.h $(INCL)/tile.h
	$(COPY) $(WSHR)/magtile.c .
	$(CC) $(CFLAGS) -c magtile.c

txtmerge.o: $(WSHR)/txtmerge.c $(INCL)/config.h $(INCL)/tile.h
	$(CC) $(CFLAGS) -c ../win/share/txtmerge.c

tile2x11.o: ../win/X11/tile2x11.c $(INCL)/hack.h $(INCL)/tile.h \
						$(INCL)/tile2x11.h
	$(CC) $(CFLAGS) -c ../win/X11/tile2x11.c


x11tiles: tile2x11.exe $(WSHR)/monsters.txt $(WSHR)/objects.txt \
				$(WSHR)/other.txt
	./tile2x11 ../win/share/monsters.txt ../win/share/objects.txt \
				../win/share/other.txt

x11bigtiles:	tile2x11.exe $(WSHR)/mon32.txt $(WSHR)/obj32.txt \
		$(WSHR)/oth32.txt
	./tile2x11 -o x11bigtiles ../win/share/mon32.txt \
		../win/share/obj32.txt ../win/share/oth32.txt

$(WSHR)/monmag.txt:	magtile.exe $(WSHR)/monsters.txt
	./magtile.exe

$(WSHR)/objmag.txt:	magtile.exe $(WSHR)/objects.txt
	./magtile.exe

$(WSHR)/othmag.txt:	magtile.exe $(WSHR)/other.txt
	./magtile.exe

$(WSHR)/mon32.txt:	txtmerge.exe $(WSHR)/monmag.txt $(WSHR)/mon32mi.txt
	./txtmerge ../win/share/mon32.txt ..\\win\\share\\monmag.txt -b204040 ..\\win\\share\\mon32mi.txt 

$(WSHR)/obj32.txt:	txtmerge.exe $(WSHR)/objmag.txt \
		../win/share/obj32mi.txt ../win/share/obj32se.txt
	./txtmerge ../win/share/obj32.txt ../win/share/objmag.txt \
		-b204040 ../win/share/obj32mi.txt -b ../win/share/obj32se.txt

$(WSHR)/oth32.txt:	txtmerge.exe $(WSHR)/othmag.txt \
		../win/share/oth32mi.txt ../win/share/oth32se.txt
	./txtmerge ../win/share/oth32.txt ../win/share/othmag.txt \
		-b204040 ../win/share/oth32mi.txt -b ../win/share/oth32se.txt

pet_mark.xbm: ../win/X11/pet_mark.xbm
	$(COPY) ../win/X11/pet_mark.xbm pet_mark.xbm

rip.xpm: ../win/X11/rip.xpm
	$(COPY) ../win/X11/rip.xpm rip.xpm

credit.xpm: ../dat/credit.xpm
	$(COPY) ../dat/credit.xpm credit.xpm

tiletext.o:  $(CONFIG_H) $(INCL)/tile.h $(WSHR)/tiletext.c
	$(COPY) $(WSHR)/tiletext.c .
	$(CC) $(CFLAGS) -o$@@ tiletext.c

tiletxt.o: $(CONFIG_H)	$(INCL)/tile.h tilemap.c
	$(CC) $(CFLAGS) -DTILETEXT -o$@@ tilemap.c
  


#
#  Other Util Dependencies.
#

alloc.o: $(CONFIG_H)	 alloc.c
	$(CC) $(CFLAGS) -oalloc.o alloc.c

drawing.o: $(CONFIG_H) drawing.c
	$(CC) $(CFLAGS) -odrawing.o drawing.c

decl.o: $(CONFIG_H) decl.c
	$(CC) $(CFLAGS) -odecl.o decl.c

monst.o: $(CONFIG_H)	     $(PERMONST_H)	$(ESHK_H)	   \
	$(EPRI_H)	      $(VAULT_H)	 $(INCL)/monsym.h   \
	$(INCL)/color.h	 monst.c
	$(CC) $(CFLAGS) -omonst.o monst.c

objects.o: $(CONFIG_H)	      $(INCL)/obj.h	 $(INCL)/objclass.h \
	$(INCL)/prop.h	    $(INCL)/color.h    objects.c
	$(CC) $(CFLAGS) -oobjects.o objects.c

panic.c:  $(UTIL)/panic.c
	$(COPY) $(UTIL)/panic.c .

panic.o:   $(CONFIG_H)	  panic.c

random.c: $(SSHR)/random.c
	$(COPY) $(SSHR)/random.c .

random.o: $(HACK_H) random.c
	$(CC) $(CFLAGS) -orandom.o random.c

nhlan.c: $(SSHR)/nhlan.c
	$(COPY) $(SSHR)/nhlan.c .

nhlan.o: $(HACK_H) $(NHLAN_H) $(SSHR)/nhlan.c
	$(COPY) $(SSHR)/nhlan.c .
	$(CC) $(CFLAGS) -o$@@ nhlan.c

DATABASE = $(DAT)/data.base

dat.tag: $(DAT)/nhshare $(DAT)/nhushare $(CNF_SHARE_DATND)
	@@echo dat done >dat.tag

$(DAT)/data:	 utility.tag	$(DATABASE)
	-./makedefs -d

$(DAT)/rumors:	     utility.tag    $(DAT)/rumors.tru	$(DAT)/rumors.fal
	-./makedefs -r

$(DAT)/quest.dat: utility.tag  $(DAT)/quest.txt
	-./makedefs -q

$(DAT)/oracles:	     utility.tag    $(DAT)/oracles.txt
	-./makedefs -h

sp_lev.tag: utility.tag     $(DAT)/beholder.des $(DAT)/bigroom.des \
	$(DAT)/blkmar.des   $(DAT)/castle.des   $(DAT)/caves.des \
	$(DAT)/dragons.des  $(DAT)/endgame.des \
	$(DAT)/gehennom.des $(DAT)/giants.des   $(DAT)/guild.des \
	$(DAT)/knox.des     $(DAT)/kobold-1.des $(DAT)/kobold-2.des \
	$(DAT)/lich.des     $(DAT)/mall-1.des   $(DAT)/mall-2.des \
	$(DAT)/medusa.des   $(DAT)/sokoban.des \
	$(DAT)/mines.des    $(DAT)/mtemple.des  $(DAT)/newmall.des \
	$(DAT)/nymph.des    $(DAT)/oracle.des   $(DAT)/rats.des \
	$(DAT)/sea.des      $(DAT)/spiders.des  $(DAT)/stor-1.des \
	$(DAT)/stor-2.des   $(DAT)/stor-3.des   $(DAT)/tomb.des \
	$(DAT)/tower.des    $(DAT)/yendor.des \
	$(DAT)/arch.des     $(DAT)/barb.des 	$(DAT)/caveman.des \
	$(DAT)/flame.des \
	$(DAT)/healer.des   $(DAT)/ice.des \
	$(DAT)/knight.des   $(DAT)/monk.des \
	$(DAT)/necro.des    $(DAT)/priest.des   $(DAT)/rogue.des \
	$(DAT)/samurai.des  $(DAT)/tourist.des  $(DAT)/slayer.des \
	$(DAT)/valkyrie.des $(DAT)/wizard.des   $(DAT)/yeoman.des \
	$(DAT)/frnknstn.des $(DAT)/nightmar.des $(DAT)/ranger.des 

	./lev_comp $(DDAT)/beholder.des
	./lev_comp $(DDAT)/bigroom.des
	./lev_comp $(DDAT)/blkmar.des
	./lev_comp $(DDAT)/castle.des
	./lev_comp $(DDAT)/caves.des
#	./lev_comp $(DDAT)/darkelf.des
	./lev_comp $(DDAT)/dragons.des
	./lev_comp $(DDAT)/endgame.des
	./lev_comp $(DDAT)/gehennom.des
	./lev_comp $(DDAT)/giants.des
	./lev_comp $(DDAT)/guild.des
	./lev_comp $(DDAT)/knox.des
	./lev_comp $(DDAT)/kobold-1.des
	./lev_comp $(DDAT)/kobold-2.des
	./lev_comp $(DDAT)/lich.des
	./lev_comp $(DDAT)/mall-1.des
	./lev_comp $(DDAT)/mall-2.des
	./lev_comp $(DDAT)/medusa.des
	./lev_comp $(DDAT)/sokoban.des
	./lev_comp $(DDAT)/mines.des
	./lev_comp $(DDAT)/mtemple.des
	./lev_comp $(DDAT)/newmall.des
	./lev_comp $(DDAT)/nymph.des
	./lev_comp $(DDAT)/oracle.des
	./lev_comp $(DDAT)/rats.des
	./lev_comp $(DDAT)/sea.des
	./lev_comp $(DDAT)/spiders.des
	./lev_comp $(DDAT)/stor-1.des
	./lev_comp $(DDAT)/stor-2.des
	./lev_comp $(DDAT)/stor-3.des
	./lev_comp $(DDAT)/tomb.des
	./lev_comp $(DDAT)/tower.des
	./lev_comp $(DDAT)/yendor.des
	./lev_comp $(DDAT)/arch.des
	./lev_comp $(DDAT)/barb.des
	./lev_comp $(DDAT)/caveman.des
#	./lev_comp $(DDAT)/dopp.des
#	./lev_comp $(DDAT)/elf.des
	./lev_comp $(DDAT)/flame.des
#	./lev_comp $(DDAT)/gnome.des
	./lev_comp $(DDAT)/healer.des
	./lev_comp $(DDAT)/ice.des
	./lev_comp $(DDAT)/knight.des
#	./lev_comp $(DDAT)/lycn.des
	./lev_comp $(DDAT)/monk.des
	./lev_comp $(DDAT)/necro.des
	./lev_comp $(DDAT)/priest.des
	./lev_comp $(DDAT)/rogue.des
	./lev_comp $(DDAT)/samurai.des
	./lev_comp $(DDAT)/tourist.des
	./lev_comp $(DDAT)/slayer.des
	./lev_comp $(DDAT)/valkyrie.des
	./lev_comp $(DDAT)/wizard.des
	./lev_comp $(DDAT)/yeoman.des
#	./lev_comp $(DDAT)/hobbit.des
	./lev_comp $(DDAT)/frnknstn.des
#	./lev_comp $(DDAT)/dwarf.des
	./lev_comp $(DDAT)/nightmar.des
	./lev_comp $(DDAT)/ranger.des
	$(COPY) ./*.lev $(DAT)
	$(ECHO) sp_levs done > sp_lev.tag
	
$(DAT)/dungeon:	  utility.tag  $(DAT)/dungeon.def
	@@$(COPY) $(SRC)/dgn_comp.exe $(DAT)/dgn_comp.exe
	-./makedefs -e
	( cd $(DAT); ./dgn_comp dungeon.pdf )
#
# DLB stuff
#
$(DAT)/nhshare:	dlb_main.exe $(DAT)/data $(DAT)/rumors $(DAT)/dungeon \
	    $(DAT)/oracles $(DAT)/quest.dat sp_lev.tag
	$(ECHO) data >$(DAT)/dlb.lst
	$(ECHO) oracles >>$(DAT)/dlb.lst
	$(ECHO) options >>$(DAT)/dlb.lst
	$(ECHO) rumors >>$(DAT)/dlb.lst
	$(ECHO) help >>$(DAT)/dlb.lst
	$(ECHO) hh >>$(DAT)/dlb.lst
	$(ECHO) cmdhelp >>$(DAT)/dlb.lst
	$(ECHO) history >>$(DAT)/dlb.lst
	$(ECHO) opthelp >>$(DAT)/dlb.lst
	$(ECHO) wizhelp >>$(DAT)/dlb.lst
	$(ECHO) license >>$(DAT)/dlb.lst
# The line above works, but the line below doesn't.  I can't figure-out why.
# WAC - for some reason, this is OK under the DJGPP make...
	( cd $(DAT) ; ./dlb_main cvIf dlb.lst nhshare )
	cd $(SRC)

$(DAT)/nhushare:	dlb_main.exe $(DAT)/dungeon $(DAT)/quest.dat sp_lev.tag
	$(ECHO) dungeon > $(DAT)/dlb2.lst
	$(ECHO) quest.dat >>$(DAT)/dlb2.lst
	cd $(DAT) ; $(LS) *.lev >>dlb2.lst ; ./dlb_main cvIf dlb2.lst nhushare
	cd $(SRC)


dlb_main.exe: $(DLBOBJS)
	$(LINK) $(LFLAGS) -odlb_main.exe $(DLBOBJS)
	$(COPY) $@@ $(DAT)/dlb_main.exe


dlb_main.o: $(UTIL)/dlb_main.c $(INCL)/config.h $(DLB_H)
	$(COPY) $(UTIL)/dlb_main.c .
	$(CC) $(CFLAGS) -odlb_main.o dlb_main.c

# Game Dependencies

# sys/share
main.o:	 $(HACK_H) $(DLB_H) $(SSHR)/pcmain.c
	$(COPY) $(SSHR)/pcmain.c .
	$(CC) $(CFLAGS) -o$@@ pcmain.c

unix.o:	 $(HACK_H) $(SSHR)/pcunix.c
	$(COPY) $(SSHR)/pcunix.c .
	$(CC) $(CFLAGS) -o$@@ pcunix.c

sys.o : $(HACK_H) $(SSHR)/pcsys.c
	$(COPY) $(SSHR)/pcsys.c .
	$(CC) $(CFLAGS) -o$@@ pcsys.c

# sys/winnt
winnt.o : $(HACK_H)  $(WSYS)/winnt.c
	$(COPY) $(WSYS)/winnt.c .
	$(COPY) $(WSYS)/win32api.h ../include
	$(CC) $(CFLAGS) -o$@@ winnt.c

nttty.o : $(HACK_H)  $(WSYS)/nttty.c
	$(COPY) $(WSYS)/nttty.c .
	$(CC) $(CFLAGS) -o$@@ nttty.c

ntsound.o: $(PCH) $(WSYS)/ntsound.c   $(HACK_H)
	$(COPY) $(WSYS)/ntsound.c .
	$(CC) $(CFLAGS) -o$@@ ntsound.c

mapimail.o: $(PCH) $(WSYS)/mapimail.c   $(HACK_H) $(NHLAN_H)
	$(COPY) $(WSYS)/mapimail.c .
	$(CC) $(CFLAGS) -DMAPI_VERBOSE -o$@@ mapimail.c


# win/tty
getline.o : $(HACK_H) $(INCL)/wintty.h $(WTTY)/getline.c
	$(COPY) $(WTTY)/getline.c .
	$(CC) $(CFLAGS) -o$@@ getline.c

termcap.o : $(CONFIG_H) $(WTTY)/termcap.c
	$(COPY) $(WTTY)/termcap.c .
	$(CC) $(CFLAGS) -o$@@ termcap.c

topl.o : $(CONFIG_H) $(WTTY)/topl.c
	$(COPY) $(WTTY)/topl.c .
	$(CC) $(CFLAGS) -o$@@ topl.c

wintty.o : $(HACK_H) $(WTTY)/wintty.c
	$(COPY) $(WTTY)/wintty.c .
	$(CC) $(CFLAGS) -o$@@ wintty.c

# win/gtk
gtk.o: ../win/gtk/gtk.c ../include/winGTK.h $(HACK_H) ../include/func_tab.h \
		../include/dlb.h ../include/patchlevel.h
	$(COPY) $(WGTK)/gtk.c .
	$(CC) $(CFLAGS) $(WINGTKCFLAGS) -c ../win/gtk/gtk.c
gtkgetlin.o: ../win/gtk/gtkgetlin.c ../include/winGTK.h $(HACK_H)
	$(COPY) $(WGTK)/gtkgetlin.c .
	$(CC) $(CFLAGS) $(WINGTKCFLAGS) -c ../win/gtk/gtkgetlin.c
gtkstatus.o: ../win/gtk/gtkstatus.c ../include/winGTK.h $(HACK_H)
	$(COPY) $(WGTK)/gtkstatus.c .
	$(CC) $(CFLAGS) $(WINGTKCFLAGS) -c ../win/gtk/gtkstatus.c
gtkmenu.o: ../win/gtk/gtkmenu.c ../include/winGTK.h $(HACK_H)
	$(COPY) $(WGTK)/gtkmenu.c .
	$(CC) $(CFLAGS) $(WINGTKCFLAGS) -c ../win/gtk/gtkmenu.c
gtkyn.o: ../win/gtk/gtkyn.c ../include/winGTK.h $(HACK_H)
	$(COPY) $(WGTK)/gtkyn.c .
	$(CC) $(CFLAGS) $(WINGTKCFLAGS) -c ../win/gtk/gtkyn.c
gtkextcmd.o: ../win/gtk/gtkextcmd.c ../include/winGTK.h $(HACK_H) \
		../include/func_tab.h
	$(COPY) $(WGTK)/gtkextcmd.c .
	$(CC) $(CFLAGS) $(WINGTKCFLAGS) -c ../win/gtk/gtkextcmd.c
gtkmap.o: ../win/gtk/gtkmap.c ../include/winGTK.h $(HACK_H) ../include/dlb.h \
		../include/patchlevel.h
	$(COPY) $(WGTK)/gtkmap.c .
	$(CC) $(CFLAGS) $(WINGTKCFLAGS) -c ../win/gtk/gtkmap.c
gtkmessage.o: ../win/gtk/gtkmessage.c ../include/winGTK.h $(HACK_H)
	$(COPY) $(WGTK)/gtkmessage.c .
	$(CC) $(CFLAGS) $(WINGTKCFLAGS) -c ../win/gtk/gtkmessage.c
gtkmisc.o: ../win/gtk/gtkmisc.c ../include/winGTK.h $(HACK_H)
	$(COPY) $(WGTK)/gtkmisc.c .
	$(CC) $(CFLAGS) $(WINGTKCFLAGS) -c ../win/gtk/gtkmisc.c
xshmmap.o: ../win/gtk/xshmmap.c ../include/winGTK.h $(HACK_H) ../include/xshm.h
	$(COPY) $(WGTK)/xshmmap.c .
	$(CC) $(CFLAGS) $(WINGTKCFLAGS) -c ../win/gtk/xshmmap.c
xshm.o: ../win/gtk/xshm.c ../include/xshm.h
	$(COPY) $(WGTK)/xshm.c .
	$(CC) $(CFLAGS) $(WINGTKCFLAGS) -c ../win/gtk/xshm.c

# src dependencies
allmain.o:  $(HACK_H)
alloc.o:    $(CONFIG_H)
apply.o:    $(HACK_H) $(INCL)/edog.h
artifact.o: $(HACK_H) $(INCL)/artifact.h $(INCL)/artilist.h
attrib.o:   $(HACK_H) $(INCL)/artifact.h
ball.o:	    $(HACK_H)
bones.o:    $(HACK_H) $(INCL)/lev.h
botl.o:	    $(HACK_H)
cmd.o:	    $(HACK_H) $(INCL)/func_tab.h
dbridge.o:  $(HACK_H)
decl.o:	    $(HACK_H) $(INCL)/quest.h
detect.o:   $(HACK_H) $(INCL)/artifact.h
dig.o:      $(HACK_H)
display.o:  $(HACK_H)
dlb.o:      $(HACK_H) $(DLB_H)
do.o:	    $(HACK_H) $(INCL)/lev.h
do_name.o:  $(HACK_H)
do_wear.o:  $(HACK_H)
dog.o:	    $(HACK_H) $(INCL)/edog.h
dogmove.o:  $(HACK_H) $(INCL)/mfndpos.h $(INCL)/edog.h
dokick.o:   $(HACK_H) $(ESHK_H)
dothrow.o:  $(HACK_H)
drawing.o:  $(HACK_H) $(INCL)/tcap.h
dungeon.o:  $(HACK_H) $(INCL)/dgn_file.h
eat.o:	    $(HACK_H)
end.o:	    $(HACK_H) $(ESHK_H)
engrave.o:  $(HACK_H) $(INCL)/lev.h
exper.o:    $(HACK_H)
explode.o:  $(HACK_H)
extralev.o:  $(HACK_H)
files.o:     $(HACK_H)
fountain.o:  $(HACK_H)
gypsy.o:     $(HACK_H)
hack.o:	     $(HACK_H)
hacklib.o:   $(HACK_H)
invent.o:    $(HACK_H) $(INCL)/artifact.h
light.o:     $(HACK_H) $(INCL)/lev.h
lock.o:	     $(HACK_H)
mail.o:	     $(HACK_H) $(INCL)/mail.h
makemon.o:   $(HACK_H) $(EPRI_H) $(EMIN_H) $(INCL)/edog.h
mcastu.o:    $(HACK_H)
mhitm.o:     $(HACK_H) $(INCL)/artifact.h $(INCL)/edog.h
mhitu.o:     $(HACK_H) $(INCL)/artifact.h $(INCL)/edog.h
minion.o:    $(HACK_H) $(EMIN_H) $(EPRI_H)
mklev.o:     $(HACK_H)
mkmap.o:     $(HACK_H) $(INCL)/sp_lev.h
mkmaze.o:    $(HACK_H) $(INCL)/sp_lev.h
mkobj.o:     $(HACK_H) $(INCL)/artifact.h $(INCL)/prop.h
mkroom.o:    $(HACK_H)
mon.o:	     $(HACK_H) $(INCL)/mfndpos.h $(INCL)/edog.h
mondata.o:   $(HACK_H) $(ESHK_H) $(EPRI_H)
monmove.o:   $(HACK_H) $(INCL)/mfndpos.h $(INCL)/artifact.h
monst.o:     $(CONFIG_H) $(PERM_H) $(ESHK_H) $(EPRI_H) \
	  $(INCL)/color.h $(INCL)/monsym.h $(INCL)/vault.h
mplayer.o:   $(HACK_H)
mthrowu.o:   $(HACK_H)
muse.o:	     $(HACK_H)
music.o:     $(HACK_H)
o_init.o:    $(HACK_H)
objects.o:   $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \
	       $(INCL)/prop.h $(SKILLS_H) $(INCL)/color.h
objnam.o:    $(HACK_H)
options.o:   $(CONFIG_H) $(HACK_H) $(INCL)/objclass.h $(INCL)/flag.h \
	      $(INCL)/tcap.h
pager.o:     $(HACK_H)
pickup.o:    $(HACK_H)
pline.o:     $(HACK_H) $(EPRI_H)
polyself.o:  $(HACK_H)
potion.o:    $(HACK_H)
pray.o:	     $(HACK_H) $(EPRI_H)
priest.o:    $(HACK_H) $(INCL)/mfndpos.h $(ESHK_H) $(EPRI_H) $(EMIN_H)
quest.o:     $(HACK_H) $(INCL)/quest.h $(INCL)/qtext.h
questpgr.o:  $(HACK_H) $(INCL)/qtext.h
read.o:	     $(HACK_H)
rect.o:	     $(HACK_H)
region.o:    $(HACK_H)
restore.o:   $(HACK_H) $(INCL)/lev.h $(INCL)/tcap.h $(INCL)/quest.h
rip.o:	     $(HACK_H)
role.o:	     $(HACK_H)
rnd.o:	     $(HACK_H)
rumors.o:    $(HACK_H)
save.o:	     $(HACK_H) $(INCL)/lev.h $(INCL)/quest.h
shk.o:	     $(HACK_H) $(ESHK_H)
shknam.o:    $(HACK_H) $(ESHK_H)
sit.o:	     $(HACK_H) $(INCL)/artifact.h
sounds.o:    $(HACK_H) $(INCL)/edog.h
sp_lev.o:    $(HACK_H) $(INCL)/sp_lev.h $(INCL)/align.h $(INCL)/rect.h
spell.o:     $(HACK_H)
steal.o:     $(HACK_H)
steed.o:     $(HACK_H)
teleport.o:  $(HACK_H)
tech.o:	     $(HACK_H) $(INCL)/tech.h
tile.o:	     $(HACK_H) $(TILE_H)
timeout.o:   $(HACK_H)
topten.o:    $(HACK_H)
track.o:     $(HACK_H)
trap.o:	     $(HACK_H)
u_init.o:    $(HACK_H)
uhitm.o:     $(HACK_H)
vault.o:     $(HACK_H) $(INCL)/vault.h
version.o:   $(HACK_H) $(INCL)/patchlevel.h
vision.o:    $(HACK_H) $(INCL)/vis_tab.h
weapon.o:    $(HACK_H)
were.o:	     $(HACK_H)
wield.o:     $(HACK_H)
windows.o:   $(HACK_H) $(INCL)/wintty.h
wizard.o:    $(HACK_H) $(INCL)/qtext.h
worm.o:	     $(HACK_H) $(INCL)/lev.h
worn.o:	     $(HACK_H)
write.o:     $(HACK_H)
zap.o:	     $(HACK_H)

# end of file
@


1.3
log
@Got WinNT port to compile in cygwin.

Forgot to include the Makefile I used to do so (oops) and dont know how to stop a commit in progress, so expect another commit to come very soon now.
@
text
@@


1.2
log
@* Removed copy of DOS makefile in src
* Added stackwep onto the TODO/TOFIX list, #112520 fixed to the changes in readme.
@
text
@d1 21
a21 22
#	SCCS Id: @@(#)Makefile.GCC	      3.3     1999/11/06
#	Copyright (c) NetHack PC Development Team 1996.
#	PC NetHack 3.3 Makefile for djgpp V2
#
#	Gnu gcc compiler for msdos (djgpp)
#	Requires Gnu Make utility (V3.79 or greater) supplied with djgpp V2.03
#	WAC: 	PLEASE NOTE THE CHANGE IN VERSION OF THE MAKE UTILITY
#		OLDER VERSIONS WILL NOT WORK DUE TO PROBLEMS PARSING 
#		FORWARD/BACK SLASHES
#
#	For questions or comments: devteam@@nethack.org
#
#	In addition to your C compiler,
#
#  if you want to change   you will need a
#  files with suffix   workalike for
#	  .y	     yacc
#	  .l	     lex
#
#	Note that flex (lex) and bison (yacc) are included with the
#	djgpp distribution and work quite well.	 This makefile assumes
#	you have them installed correctly.
a26 1
#GAME = nethack
d28 1
a28 2
GAMEDIR = \games\slashemd
#GAMEDIR = \games\nethackd
d31 1
a31 4
# Directories, gcc likes unix style directory specs
# JRN: But, with DJGPP, I don't think it needs them.
#   Keeping these there for compatibility with old rules, but they're
#    unneeded
d34 1
d40 11
a50 11
# But we must use dos directory specs to find src files, so....

DAT  = ..\dat
DOC  = ..\doc
INCL = ..\include
MSYS = ..\sys\msdos
SRC  = ..\src
SSHR = ..\sys\share
UTIL = ..\util
WIN  = ..\win\tty
WSHR = ..\win\share
a55 2
#CC    = redir -ea cerrors.out gcc
#LINK  = gcc
d59 24
d85 1
a85 20
UUDECODE = uudecode

#
# Special libraries and how to link them in.
# NOTE lwmemu has a panic.o in its library,  so it can't be used :(

LIBS = -lpc -lemu

# WAC
# if you have an executable compressor (DJP for DJGPP),  place it here
EXECOMPRESS =
#EXECOMPRESS = UPX -9
#EXECOMPRESS = DJP -0

# If TERMLIB is defined in pcconf.h, comment out the upper line and
# uncomment the lower.	Note that you must build the termc library
# and place it in djgpp's lib directory.  See termcap.zip for details

TERMLIB =
#TERMLIB = -ltermc
d97 1
a97 1
YACC   = bison -y -o y_tab.c
d99 8
a106 3
YTABC  = y_tab.c
YTABH  = y_tab.h
LEXYYC = lexyy.c
a113 14
# djgpp ships with an ls.exe command in filutils (or is it shlutils?)
# Anyway, if you have it, change it, if you don't, don't.

LS = dir /l/b/-p # DOS command WAC - disable pause for dos6
#LS = ls -1        # ls.exe from djgpp distribution
#LS = *dir /l/b/z        # 4DOS command - cuts through ALIASes

# slowly adjusting to 'update' for fun
# if you want to try it, uncomment the top and comment the uncommented one
#UPD = update # update.exe from djgpp
#UPD = cp    # cp.exe from filutils
UPD = copy  # copy from DOS


a120 19
# set USE_VGA to Y to use the VGA tiles
# you also need to uncomment SCREEN_VGA in pcconf.h
USE_VGA = Y
#USE_VGA

# set USE_ALLEGRO to Y to use the allegro library
# set USE_AALIB to Y to use anti-aliasing library
# BE SURE TO ALSO UNCOMMENT OUT the #define ALLEG_FX in pcconf.h

#USE_ALLEGRO =
USE_ALLEGRO = Y

#USE_AALIB = 
USE_AALIB = Y

#
# set USE_BIG_BMP to Y to have one big BMP rather than many small ones
#USE_BIG_BMP =
USE_BIG_BMP = Y
d127 5
a131 19
GAMEFILE = $(GAMEDIR)\$(GAME).exe

ifeq ($(USE_ALLEGRO),Y)
ifeq ($(USE_AALIB),Y)
LIBALLEGRO = -lalleg -laastr
AAFLAG = -DALLEGRO_USE_AA
else
LIBALLEGRO = -lalleg
AAFLAG =
endif
ifeq ($(USE_BIG_BMP),Y)
txt2bmp_FLG = -b
else
txt2bmp_FLG = -f
endif
else
LIBALLEGRO =
txt2bmp_FLG =
endif
d133 1
a133 1
LIBRARIES = $(LIBS) $(TERMLIB) $(LIBALLEGRO)
d135 1
d142 3
d147 1
d149 1
a149 1
# Debugging flags for suppressed graphics
a157 3
#
#  Flags.
#
d159 1
a159 2
#CFLAGS = -pg -c -I../include $(DLBFLG) -DUSE_TILES

a160 1
#LFLAGS = -pg -lemu
d163 4
a166 14
#CFLAGS = -c -O -I../include $(DLBFLG) -DUSE_TILES 
#LFLAGS =

#   Optimize
#
# PGCC should be able to optimize up to -O6.  Use at your own risk.
#CFLAGS = -c -O6 -I../include $(DLBFLG) -DUSE_TILES 
# GCC (and PGCC) can optimize up to -O2 safely
CFLAGS = -c -O2 -I../include $(DLBFLG) -DUSE_TILES
# JRN: I like to do things differently (Optimize and Debug =)
#CFLAGS = -Wall -W -ggdb -c -O3 -I../include $(DLBFLG) -DUSE_TILES
# -s removes debugging symbols.
LFLAGS = 
#LFLAGS = -s -lemu
d168 49
a216 1
endif
d222 1
a222 5
ifeq ($(USE_ALLEGRO),Y)
ALLEGROOBJ      = vidalleg.o 2xsai.o
else
ALLEGROOBJ      =
endif
d224 1
a224 5
ifeq ($(USE_VGA),Y)
VGAOBJ      = vidvga.o 
else
VGAOBJ      =
endif
d226 1
a226 1
VIDEOOBJ = $(VGAOBJ) $(ALLEGROOBJ)
d232 1
a232 1
		drawing.o	decl.o	stubvid.o
d239 1
d243 1
d245 1
a245 1
TILOBJ       =
a250 1
IGIFREADERS  =
d252 1
d254 2
a256 1
TEXTIO      = tiletext.o tiletxt.o drawing.o decl.o monst.o objects.o stubvid.o
d258 4
a261 9
ifeq ($(USE_ALLEGRO),Y)
ALLEG_TILOBJ      = $(ALLEGROOBJ)
ALLEG_TILEUTIL    = $(TILOBJ) allegro.tag alltiles.tag
ALLEG_IGIFREADERS  = igifread.o alloc.o panic.o
else
ALLEG_TILOBJ      = 
ALLEG_TILEUTIL    = 
ALLEG_IGIFREADERS  = 
endif
d263 1
a263 15
ifeq ($(USE_VGA),Y)
VGA_TILOBJ      = pctiles.o $(VGAOBJ)
VGA_PLANAR_TIB  = $(GAME)1.tib
VGA_OVERVIEW_TIB = $(GAME)o.tib
VGA_TILEUTIL    = $(TILOBJ) tile2bin.exe til2bin2.exe $(PLANAR_TIB) $(OVERVIEW_TIB)
VGA_TILEFILES   = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt
VGA_TILEFILES2  = $(WSHR)\monthin.txt $(WSHR)\objthin.txt $(WSHR)\oththin.txt
else
VGA_TILOBJ      =
VGA_PLANAR_TIB  =
VGA_OVERVIEW_TIB =
VGA_TILEUTIL    =
VGA_TILEFILES   =
VGA_TILEFILES2  =
endif
d265 1
a265 7
TILOBJ      = tile.o $(ALLEG_TILOBJ) $(VGA_TILOBJ)
PLANAR_TIB  = $(VGA_PLANAR_TIB)
OVERVIEW_TIB = $(VGA_OVERVIEW_TIB)
TILEUTIL    = $(ALLEG_TILEUTIL) $(VGA_TILEUTIL)
TILEFILES   = $(VGA_TILEFILES)
TILEFILES2  = $(VGA_TILEFILES2)
IGIFREADERS  = $(ALLEG_IGIFREADERS)
d267 1
a267 2
GIFREADERS  = gifread.o alloc.o panic.o
PPMWRITERS  = ppmwrite.o alloc.o panic.o
d269 1
a269 2
  
DLBOBJ = dlb.o
d279 1
a279 1
VOBJ07 = getline.o  hack.o     hacklib.o  invent.o   lock.o
d290 1
a290 1
VOBJ18 = termcap.o  timeout.o  topl.o	  topten.o   track.o
d293 1
a293 1
VOBJ21 = wintty.o   wizard.o   worm.o	  worn.o     write.o
d297 2
a298 2
SOBJ   = msdos.o    sound.o    sys.o	  tty.o	     unix.o    video.o \
	vidtxt.o    pckeys.o
d308 1
a308 1
ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(VVOBJ)
d314 27
a340 27
DGN_FILE_H = $(INCL)\align.h	$(INCL)\dgn_file.h
DUNGEON_H  = $(INCL)\align.h	$(INCL)\dungeon.h
EMIN_H	   = $(DUNGEON_H)	$(INCL)\emin.h
EPRI_H	   = $(DUNGEON_H)	$(INCL)\align.h	    $(INCL)\epri.h
ESHK_H	   = $(DUNGEON_H)	$(INCL)\eshk.h
MONDATA_H  = $(INCL)\align.h	$(INCL)\mondata.h
MONST_H	   = $(INCL)\align.h	$(INCL)\monst.h
PERMONST_H = $(INCL)\monattk.h	$(INCL)\monflag.h   $(INCL)\align.h   \
	    $(INCL)\permonst.h
REGION_H   = $(INCL)\region.h
RM_H	   = $(INCL)\align.h	$(INCL)\rm.h
SKILLS_H   = $(INCL)\skills.h
SP_LEV_H   = $(INCL)\align.h	$(INCL)\sp_lev.h
VAULT_H	   = $(DUNGEON_H)	$(INCL)\vault.h
YOUPROP_H  = $(PERMONST_H)	$(MONDATA_H)	    $(INCL)\prop.h    \
	    $(INCL)\pm.h       $(INCL)\youprop.h
YOU_H	   = $(MONST_H)		$(YOUPROP_H)	    $(INCL)\align.h   \
	     $(INCL)\attrib.h	$(INCL)\you.h
DISPLAY_H  = $(MONDATA_H)	$(INCL)\vision.h    $(INCL)\display.h
PCCONF_H   = $(INCL)\micro.h	$(INCL)\system.h    $(INCL)\pcconf.h \
	    $(INCL)\pcvideo.h
CONFIG_H   = $(GLOBAL_H)	$(INCL)\tradstdc.h  $(INCL)\config1.h \
	    $(INCL)\config.h
DECL_H	   = $(YOU_H)		$(INCL)\spell.h	    $(INCL)\color.h   \
	     $(INCL)\obj.h	$(INCL)\onames.h    $(INCL)\pm.h      \
	      $(INCL)\decl.h
GLOBAL_H   = $(PCCONF_H)	$(INCL)\coord.h	    $(INCL)\global.h
d342 12
a353 12
	       $(DISPLAY_H)	  $(INCL)\monsym.h    $(INCL)\mkroom.h	\
	      $(INCL)\objclass.h $(INCL)\trap.h	     $(INCL)\flag.h    \
	      $(RM_H)		 $(INCL)\vision.h    $(INCL)\wintype.h \
	      $(INCL)\engrave.h	 $(INCL)\rect.h	  \
	       $(INCL)\trampoli.h $(INCL)\hack.h $(REGION_H)
DLB_H      = $(INCL)\dlb.h

ifeq ($(SUPPRESS_GRAPHICS),Y)
TILE_H     =
else
TILE_H	   = $(INCL)\tile.h $(INCL)\pctiles.h
endif
d356 1
a356 1
DLB = dlb
a362 5
ifdef DJGPP
DJ1 = $(dir $(DJGPP))
CWSDPMI = $(subst /,\,$(DJ1))bin\CWSDPMI.*
endif

a368 2
C = $(CC) $(CFLAGS) -o$@@ $<

d370 1
a370 1
	$C
d388 2
a389 2
utility.tag: $(INCL)\date.h $(INCL)\trap.h    $(INCL)\onames.h	       \
	$(INCL)\pm.h	  monstr.c   vis_tab.c	$(INCL)\filename.h \
d391 1
a391 8
	echo utilities made > utility.tag

tileutil: gif2txt.exe txt2ppm.exe
	@@echo Optional tile development utilities are up to date.

gamedir.tag:
	if not exist $(GAMEDIR)\NUL md $(GAMEDIR)
	echo $(GAMEDIR)\ made > gamedir.tag
d393 1
a393 1
install.tag: dat.tag gamedir.tag $(GAMEFILE)
d395 3
a397 3
	$(UPD) $(DAT)\nhshare       $(GAMEDIR)\nhshare
	$(UPD) $(DAT)\nhushare     $(GAMEDIR)\nhushare
	$(UPD) $(DAT)\license       $(GAMEDIR)\license
d399 13
a411 44
	copy $(DAT)\*.            $(GAMEDIR)
	copy $(DAT)\*.dat         $(GAMEDIR)
	copy $(DAT)\*.lev         $(GAMEDIR)
	$(UPD) $(MSYS)\msdoshlp.txt $(GAMEDIR)\msdoshlp.txt
	if exist $(GAMEDIR)\makefile. del $(GAMEDIR)\makefile.
endif
ifdef TERMLIB
	$(UPD) $(SSHR)\termcap	  $(GAMEDIR)\termcap
endif
	if exist *.tib copy *.tib                $(GAMEDIR)
	$(UPD) $(SSHR)\NetHack.cnf  $(GAMEDIR)\defaults.nh
	$(UPD) $(MSYS)\NHAccess.nh  $(GAMEDIR)\NHAccess.nh
#	copy $(SSHR)\NetHack.cnf  $(GAMEDIR)\$(GAME).cnf
ifeq ($(USE_ALLEGRO),Y)
	$(UPD) $(MSYS)\alleg.cnf  $(GAMEDIR)\alleg.cnf
	$(UPD) $(MSYS)\anethack.fnt $(GAMEDIR)\anethack.fnt
	if not exist $(GAMEDIR)\tiles\NUL md $(GAMEDIR)\tiles
ifeq ($(USE_BIG_BMP),Y)
	copy slam??.bmp $(GAMEDIR)
else
	$(UPD) index $(GAMEDIR)\tiles\index
	copy *.bmp $(GAMEDIR)\tiles
endif
	if not exist $(GAMEDIR)\tiles\spfx\NUL md $(GAMEDIR)\tiles\spfx
	if not exist $(GAMEDIR)\tiles\subs\NUL md $(GAMEDIR)\tiles\subs
	copy $(MSYS)\tiles\*.* $(GAMEDIR)\tiles
	copy $(MSYS)\tiles\spfx\*.* $(GAMEDIR)\tiles\spfx
	copy $(MSYS)\tiles\subs\*.* $(GAMEDIR)\tiles\subs
endif
	$(UPD) recover.exe          $(GAMEDIR)\recover.exe
	copy $(DOC)\guidebo*.txt   $(GAMEDIR)
	if exist $(DOC)\recover.txt \
		$(UPD) $(DOC)\recover.txt $(GAMEDIR)\recover.txt
	if exist $(DOC)\$(GAME).txt \
		$(UPD) $(DOC)\$(GAME).txt $(GAMEDIR)\$(GAME).txt
	if exist ..\readme.txt $(UPD) ..\readme.txt $(GAMEDIR)\readme.txt
	if exist ..\slamfaq.txt $(UPD) ..\slamfaq.txt $(GAMEDIR)\slamfaq.txt
	if exist ..\history.txt $(UPD) ..\history.txt $(GAMEDIR)\history.txt
ifdef CWSDPMI
	if exist $(CWSDPMI) copy $(CWSDPMI) $(GAMEDIR)
else
	echo Could not find a copy of CWSDPMI.EXE to put into $(GAMEDIR)
endif
	echo install done > install.tag
d416 4
a419 8
$(GAMEFILE): utility.tag gamedir.tag $(GAME).lnk
	$(LINK) $(LFLAGS) -o$(GAME).exe @@$(GAME).lnk $(LIBRARIES)
	stubedit $(GAME).exe minstack=2048K argv0=$(GAME)
ifdef EXECOMPRESS 
		$(EXECOMPRESS) $(GAME).exe
endif
	$(UPD) $(GAME).exe $(GAMEFILE)
	del $(GAME).exe
d422 26
a447 27
	@@echo $(VOBJ01) > $@@
	@@echo $(VOBJ02) >> $@@
	@@echo $(VOBJ03) >> $@@
	@@echo $(VOBJ04) >> $@@
	@@echo $(VOBJ05) >> $@@
	@@echo $(VOBJ06) >> $@@
	@@echo $(VOBJ07) >> $@@
	@@echo $(VOBJ08) >> $@@
	@@echo $(VOBJ09) >> $@@
	@@echo $(VOBJ10) >> $@@
	@@echo $(VOBJ11) >> $@@
	@@echo $(VOBJ12) >> $@@
	@@echo $(VOBJ13) >> $@@
	@@echo $(VOBJ14) >> $@@
	@@echo $(VOBJ15) >> $@@
	@@echo $(VOBJ16) >> $@@
	@@echo $(VOBJ17) >> $@@
	@@echo $(VOBJ18) >> $@@
	@@echo $(VOBJ19) >> $@@
	@@echo $(VOBJ20) >> $@@
	@@echo $(VOBJ21) >> $@@
	@@echo $(VOBJ22) >> $@@
	@@echo $(VOBJ23) >> $@@
	@@echo $(SOBJ)   >> $@@
	@@echo $(TILOBJ) >> $@@
	@@echo $(VVOBJ)  >> $@@

d454 3
a456 3
	del *.o
	del *.map
	del dlb_main.exe
a457 1
# JRN: cleaned out 'clean' and 'spotless'
d459 93
a551 79
	del *.exe
	del *.tag
	if exist $(GAME).lnk	   del $(GAME).lnk
# yacc/bison, $(LEX), $(UPD): parsers for dungeon/level compiler
	if exist $(SRC)\lev_$(LEX).c  del $(SRC)\lev_$(LEX).c
	if exist $(SRC)\lev_yacc.c del $(SRC)\lev_yacc.c
	if exist $(INCL)\lev_comp.h del $(INCL)\lev_comp.h
	if exist $(SRC)\dgn_$(LEX).c  del $(SRC)\dgn_$(LEX).c
	if exist $(SRC)\dgn_yacc.c del $(SRC)\dgn_yacc.c
	if exist $(INCL)\dgn_comp.h del $(INCL)\dgn_comp.h
# makedefs: makedefs-generated source and headers
	if exist $(INCL)\date.h	   del $(INCL)\date.h
	if exist $(INCL)\onames.h  del $(INCL)\onames.h
	if exist $(INCL)\pm.h	   del $(INCL)\pm.h
	if exist $(SRC)\monstr.c   del $(SRC)\monstr.c
	if exist $(INCL)\vis_tab.h del $(INCL)\vis_tab.h
	if exist $(SRC)\vis_tab.c  del $(SRC)\vis_tab.c
	if exist $(INCL)\filename.h del $(INCL)\filename.h
# makedefs: makedefs-generated datafiles
	if exist $(DAT)\options	   del $(DAT)\options
	if exist $(DAT)\data	   del $(DAT)\data
	if exist $(DAT)\rumors	   del $(DAT)\rumors
	if exist $(DAT)\quest.dat  del $(DAT)\quest.dat
	if exist $(DAT)\oracles	   del $(DAT)\oracles
	if exist $(DAT)\dungeon.pdf del $(DAT)\dungeon.pdf
# $(UPD): headers for tile support
	if exist $(INCL)\tile.h	   del $(INCL)\tile.h
	if exist $(INCL)\pctiles.h del $(INCL)\pctiles.h
	if exist $(INCL)\pcvideo.h del $(INCL)\pcvideo.h
	if exist $(INCL)\portio.h  del $(INCL)\portio.h
# $(UPD): copied to dat for convenience
	if exist $(DAT)\lev_comp.exe del $(DAT)\lev_comp.exe
	if exist $(DAT)\msdoshlp.txt del $(DAT)\msdoshlp.txt
	if exist $(DAT)\dlb_main.exe del $(DAT)\dlb_main.exe
# $(UPD): copied to src out of necessity
#	[left intentionally blank]
# $(CC), $(LINK): evil messy compilers' trash
	if exist *.def		   del *.def
	if exist a.out		   del a.out
# txt2bmp: bitmap tiles
	if exist index             del index
	if exist $(INCL)\allegfx.h del $(INCL)\allegfx.h
	if exist *.bmp             del *.bmp
# lev_comp, dgn_comp: level and dungeon compiler compiled data
	if exist $(DAT)\*.lev      del $(DAT)\*.lev
	if exist $(DAT)\dungeon	   del $(DAT)\dungeon
# dlb_main: data library stuff
	if exist $(DAT)\nhshare    del $(DAT)\nhshare
	if exist $(DAT)\nhushare  del $(DAT)\nhushare
	if exist $(DAT)\dlb.lst    del $(DAT)\dlb.lst
	if exist $(DAT)\dlb2.lst    del $(DAT)\dlb2.lst
# tile2bin: datafiles for the standard VGA mode
	if exist *.tib		   del *.tib
	if exist $(DAT)\*.tib	   del $(DAT)\*.tib
# thintile: thin (overview) tiles
	if exist $(WSHR)\monthin.txt del $(WSHR)\monthin.txt
	if exist $(WSHR)\objthin.txt del $(WSHR)\objthin.txt
	if exist $(WSHR)\oththin.txt del $(WSHR)\oththin.txt
# txtmerge: merged 32x32 tile files
	if exist $(WSHR)\mon32.txt del $(WSHR)\mon32.txt
	if exist $(WSHR)\obj32.txt del $(WSHR)\obj32.txt
	if exist $(WSHR)\oth32.txt del $(WSHR)\oth32.txt
# magtile: magnified tile files (16x16 tiles -> 32x32 tiles)
	if exist $(WSHR)\monmag.txt del $(WSHR)\monmag.txt
	if exist $(WSHR)\objmag.txt del $(WSHR)\objmag.txt
	if exist $(WSHR)\othmag.txt del $(WSHR)\othmag.txt
# bigtile: recentered tile files (32x32 tiles -> 48x64 tiles)
	if exist $(WSHR)\monbig.txt del $(WSHR)\monbig.txt
	if exist $(WSHR)\objbig.txt del $(WSHR)\objbig.txt
	if exist $(WSHR)\othbig.txt del $(WSHR)\othbig.txt
# txtmerge: merged 3d (48x64) tile files
	if exist $(WSHR)\mon3d.txt del $(WSHR)\mon3d.txt
	if exist $(WSHR)\obj3d.txt del $(WSHR)\obj3d.txt
	if exist $(WSHR)\oth3d.txt del $(WSHR)\oth3d.txt
# redir/gcc: C warnings captured from -Wall -W if you're me
	if exist cerrors.out	   del cerrors.out
# tilemap: tile.c ??
	if exist tile.c		   del tile.c
	@@echo All clean, hopefully!  If you get any cruft, e-mail WACko or me
a560 3
# For the Makefile surfer
#	(or strange person who goes 'make ../dat/options'):
$(DAT)\options : $(INCL)\date.h
d562 2
a563 2
$(INCL)\date.h : makedefs.exe
	-makedefs -v
d565 2
a566 2
$(INCL)\onames.h: makedefs.exe
	-makedefs -o
d568 2
a569 2
$(INCL)\pm.h: makedefs.exe
	-makedefs -p
d572 1
a572 1
	-makedefs -m
d574 2
a575 2
$(INCL)\vis_tab.h: makedefs.exe
	-makedefs -z
d578 1
a578 1
	-makedefs -z
d580 2
a581 2
$(INCL)\filename.h: makedefs.exe
	-makedefs -f
d590 5
a594 3
makedefs.o:  $(UTIL)\makedefs.c $(CONFIG_H)	$(PERMONST_H) \
	$(INCL)\objclass.h $(INCL)\monsym.h   $(INCL)\qtext.h 
	$C
a602 7
lev_yacc.o:	$(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h 
lev_$(LEX).o:	$(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h	
lev_main.o:  $(UTIL)\lev_main.c $(HACK_H)
	$C

$(INCL)\lev_comp.h: lev_yacc.c

a603 20
lev_yacc.c:  $(UTIL)\lev_comp.y
	$(YACC) -d $(DUTIL)/lev_comp.y
	$(UPD) $(YTABC) $@@
	$(UPD) $(YTABH) $(INCL)\lev_comp.h
	del $(YTABC)
	del $(YTABH)
$(INCL)\lev_comp.h: lev_yacc.c
lev_$(LEX).c:  $(UTIL)\lev_comp.l
	$(LEX) $(DUTIL)/lev_comp.l 
	$(UPD) $(LEXYYC) $@@
	del $(LEXYYC)
else
lev_yacc.c: $(SSHR)\lev_yacc.c
	$(UPD) $(SSHR)\lev_yacc.c $@@
$(INCL)\lev_comp.h: $(SSHR)\lev_comp.h
	$(UPD) $(SSHR)\lev_comp.h $@@
	touch $(DINCL)/lev_comp.h
lev_$(LEX).c: $(SSHR)\lev_lex.c
	$(UPD) $(SSHR)\lev_lex.c $@@
endif
d605 2
a606 10
#
#  Dungeon Dependencies
#

dgn_comp.exe:  $(DGNCOMPOBJS)
	$(LINK) $(LFLAGS) -odgn_comp.exe $(DGNCOMPOBJS)
dgn_yacc.o:	$(HACK_H) $(DGN_FILE_H)	$(INCL)\dgn_comp.h 
dgn_$(LEX).o:	$(HACK_H)   $(DGN_FILE_H)  $(INCL)\dgn_comp.h
dgn_main.o:	$(UTIL)\dgn_main.c $(HACK_H)
	$C
a607 12
ifeq ($(YACC_LEX),Y)
dgn_yacc.c: $(UTIL)\dgn_comp.y
	$(YACC) -d $(DUTIL)/dgn_comp.y
	$(UPD) $(YTABC) $@@
	$(UPD) $(YTABH) $(INCL)\dgn_comp.h
	del $(YTABC)
	del $(YTABH)
$(INCL)\dgn_comp.h: dgn_yacc.c
dgn_$(LEX).c:  $(UTIL)\dgn_comp.l
	$(LEX) $(DUTIL)/dgn_comp.l
	$(UPD) $(LEXYYC) $@@
	del $(LEXYYC)
a608 2
dgn_yacc.c: $(SSHR)\dgn_yacc.c
	$(UPD) $(SSHR)\dgn_yacc.c $@@
d610 2
a611 3
$(INCL)\dgn_comp.h: $(SSHR)\dgn_comp.h
	$(UPD) $(SSHR)\dgn_comp.h $@@
	touch $(DINCL)/dgn_comp.h
a612 2
dgn_$(LEX).c: $(SSHR)\dgn_lex.c
	$(UPD) $(SSHR)\dgn_lex.c $@@
d615 6
a620 3
#
#  Recover Utility
#
d622 1
a622 5
recover.exe:   $(RECOVOBJS)
	$(LINK) $(LFLAGS) -orecover.exe recover.o
ifdef EXECOMPRESS
	$(EXECOMPRESS) recover.exe
endif
d624 1
a624 2
recover.o:   $(UTIL)\recover.c $(CONFIG_H)
	$C
d626 1
a626 4
#
#  Header file moves required for tile support
#
ifeq ($(SUPPRESS_GRAPHICS),Y)
d628 11
d641 2
a642 2
$(INCL)\tile.h: $(WSHR)\tile.h
	$(UPD) $< $@@
d644 3
a646 2
$(INCL)\pctiles.h: $(MSYS)\pctiles.h
	$(UPD) $< $@@
d648 2
a649 2
$(INCL)\pcvideo.h: $(MSYS)\pcvideo.h
	$(UPD) $< $@@
d651 1
a651 2
$(INCL)\portio.h: $(MSYS)\portio.h
	$(UPD) $< $@@
a652 3
#
#  Tile Mapping
#
a653 6
tile.c: tilemap.exe
	tilemap.exe
	@@echo A new $@@ has been created

tilemap.exe: tilemap.o
	$(LINK) $(LFLAGS) -otilemap.exe tilemap.o
a654 2
tilemap.o: $(WSHR)\tilemap.c $(HACK_H) $(TILE_H)
	$C
d656 1
a656 4
#   Tile Utilities
#
#
#  Required for tile support
d659 2
a660 3
$(GAME)1.tib: $(TILEFILES) tile2bin.exe
	@@echo Creating binary tile files (this may take some time)
	@@tile2bin
d662 1
a662 3
$(GAME)o.tib: thintile.tag $(TILEFILES2) til2bin2.exe
	@@echo Creating overview binary tile files (this may take some time)
	@@til2bin2
d664 2
a665 2
tile2bin.exe: tile2bin.o $(TEXTIO)
	$(LINK) $(LFLAGS) -otile2bin.exe tile2bin.o $(TEXTIO)
d667 1
a667 2
til2bin2.exe: til2bin2.o $(TEXTIO)
	$(LINK) $(LFLAGS) -otil2bin2.exe til2bin2.o $(TEXTIO)
d669 2
a670 2
thintile.exe: thintile.o $(TEXTIO)
	$(LINK) $(LFLAGS) -othintile.exe thintile.o $(TEXTIO)
d672 1
a672 2
thintile.o: $(WSHR)\thintile.c $(HACK_H) $(INCL)\tile.h
	$C
d674 3
a676 4
# thintiles = $(TILEFILES2)
thintile.tag: thintile.exe $(TILEFILES)
	thintile
	@@echo thintiles created >thintile.tag
d678 2
a679 3
tile2bin.o: $(MSYS)\tile2bin.c $(HACK_H) $(INCL)\tile.h $(INCL)\pctiles.h \
	$(INCL)\pcvideo.h
	$C
d681 1
a681 3
til2bin2.o:  $(HACK_H) $(INCL)\tile.h $(INCL)\pctiles.h $(INCL)\pcvideo.h \
	$(MSYS)\tile2bin.c
	$(CC) $(CFLAGS) -DTILE_X=8 -DOVERVIEW_FILE -o$@@ $(MSYS)\tile2bin.c
d683 1
a683 2
tiletext.o:  $(WSHR)\tiletext.c $(CONFIG_H) $(INCL)\tile.h
	$C
d685 8
a692 8
tiletex2.o:  $(WSHR)\tiletext.c $(CONFIG_H) $(INCL)\tile.h
	$(CC) $(CFLAGS) -DTILE_X=8 -o$@@ $<
  
tiletxt.o:  $(WSHR)\tilemap.c $(CONFIG_H) $(INCL)\tile.h
	$(CC) $(CFLAGS) -DTILETEXT -o$@@ $<
  
tiletxt2.o: $(WSHR)\tilemap.c $(CONFIG_H) $(INCL)\tile.h
	$(CC) $(CFLAGS) -DTILETEXT -DTILE_X=8 -o$@@ $<
d694 4
a697 3
#
# Allegro Tile Support
#
d699 1
a699 2
txt2bmp.o:  $(MSYS)\txt2bmp.c $(HACK_H) $(INCL)\tile.h $(INCL)\portio.h
	$C
d701 2
a702 2
txt2bmp.exe: txt2bmp.o $(TEXTIO) tile.c
	$(LINK) $(LFLAGS) -o$@@ $< -lalleg $(TEXTIO)
d704 3
a706 2
idx2bmp.o:  $(MSYS)\idx2bmp.c $(HACK_H) $(INCL)\tile.h $(INCL)\portio.h
	$C
d708 4
a711 2
idx2bmp.exe: idx2bmp.o $(TEXTIO)
	$(LINK) $(LFLAGS) -o$@@ $< -lalleg $(TEXTIO)
d713 3
a715 2
bmp2txt.o:  $(MSYS)\bmp2txt.c $(HACK_H) $(INCL)\tile.h $(INCL)\portio.h
	$C
d717 2
a718 2
bmp2txt.exe: bmp2txt.o $(TEXTIO)
	$(LINK) $(LFLAGS) -obmp2txt.exe bmp2txt.o -lalleg $(TEXTIO)
d720 2
a721 2
allegro.tag: txt2bmp.exe alltiles.tag
	echo allegro tiles made > allegro.tag
d723 2
a724 2
index: txt2bmp.exe
	txt2bmp.exe -i
d727 1
a727 1
# 32x32 Tile Support
d730 1
a730 2
txtmerge.exe: txtmerge.o $(TEXTIO)
	$(LINK) $(LFLAGS) -otxtmerge.exe txtmerge.o $(TEXTIO)
d732 2
a733 2
magtile.exe: magtile.o $(TEXTIO)
	$(LINK) $(LFLAGS) -omagtile.exe magtile.o $(TEXTIO)
d735 1
a735 2
magtile.o: $(WSHR)\magtile.c $(INCL)\config.h $(INCL)\tile.h
	$C
d737 2
a738 2
bigtile.exe: bigtile.o $(TEXTIO)
	$(LINK) $(LFLAGS) -obigtile.exe bigtile.o $(TEXTIO)
d740 2
a741 2
bigtile.o: $(WSHR)\bigtile.c $(INCL)\config.h $(INCL)\tile.h
	$C
d743 2
a744 2
txtmerge.o: $(WSHR)\txtmerge.c $(INCL)\config.h $(INCL)\tile.h
	$C
d746 2
a747 2
$(WSHR)\monmag.txt:	magtile.exe $(WSHR)\monsters.txt
	magtile
d749 2
a750 2
$(WSHR)\objmag.txt:	magtile.exe $(WSHR)\objects.txt
	magtile
d752 2
a753 2
$(WSHR)\othmag.txt:	magtile.exe $(WSHR)\other.txt
	magtile
a754 8
$(WSHR)\mon32.txt:	txtmerge.exe $(WSHR)\monmag.txt $(WSHR)\mon32mi.txt \
			$(WSHR)\mon32alg.txt $(WSHR)\mon32al2.txt \
			$(WSHR)\mon32aw.txt
	txtmerge $(WSHR)\mon32.txt $(WSHR)\monmag.txt -b204040 $(WSHR)\mon32mi.txt \
		-b204040 $(WSHR)\mon32alg.txt \
		-b204040 $(WSHR)\mon32al2.txt \
		-b204040 $(WSHR)\mon32aw.txt 
			
d756 3
a758 7
$(WSHR)\obj32.txt:	txtmerge.exe $(WSHR)\objmag.txt $(WSHR)\obj32mi.txt \
			$(WSHR)\obj32se.txt $(WSHR)\obj32alg.txt \
			$(WSHR)\obj32al2.txt
	txtmerge $(WSHR)\obj32.txt $(WSHR)\objmag.txt \
		-b204040 $(WSHR)\obj32mi.txt -b $(WSHR)\obj32se.txt \
		-b204040 $(WSHR)\obj32alg.txt \
		-b204040 $(WSHR)\obj32al2.txt
d760 2
a761 8
$(WSHR)\oth32.txt:	txtmerge.exe $(WSHR)\othmag.txt \
		$(WSHR)\oth32mi.txt $(WSHR)\oth32se.txt \
		$(WSHR)\oth32fl.txt $(WSHR)\oth32alg.txt \
		$(WSHR)\oth32al2.txt
	txtmerge $(WSHR)\oth32.txt $(WSHR)\othmag.txt \
		-b204040 ../win/share/oth32mi.txt $(WSHR)\oth32se.txt \
		$(WSHR)\oth32fl.txt $(WSHR)\oth32alg.txt \
		$(WSHR)\oth32al2.txt
d763 3
a765 2
$(WSHR)\monbig.txt:	bigtile.exe $(WSHR)\mon32.txt
	bigtile
a766 2
$(WSHR)\objbig.txt:	bigtile.exe $(WSHR)\obj32.txt
	bigtile
d768 4
a771 2
$(WSHR)\othbig.txt:	bigtile.exe $(WSHR)\oth32.txt
	bigtile
d773 4
a776 3
$(WSHR)\mon3d.txt:	txtmerge.exe $(WSHR)\monbig.txt $(WSHR)\mon-2kmi.txt
	txtmerge ../win/share/mon3d.txt ../win/share/monbig.txt \
		../win/share/mon-2kmi.txt 
d778 2
a779 2
$(WSHR)\obj3d.txt:	txtmerge.exe $(WSHR)\objbig.txt
	txtmerge ../win/share/obj3d.txt ../win/share/objbig.txt
d781 2
a782 4
$(WSHR)\oth3d.txt:	txtmerge.exe $(WSHR)\othbig.txt \
				../win/share/oth-2kmi.txt
	txtmerge ../win/share/oth3d.txt ../win/share/othbig.txt \
		../win/share/oth-2kmi.txt
d784 2
a785 4
# For makefile greppers that want to know what the heck allegfx.h is
$(INCL)\allegfx.h: txt2bmp.exe
	txt2bmp.exe -h
	echo You just made something completely useless!!  Congrats!
d787 2
a788 3
tiles3d.tag:	$(WSHR)\mon3d.txt $(WSHR)\obj3d.txt $(WSHR)\oth3d.txt txt2bmp.exe
	txt2bmp.exe $(txt2bmp_FLG)3d
	echo tiles3d done > tiles3d.tag
d790 4
a793 3
tiles32.tag:	$(WSHR)\mon32.txt $(WSHR)\obj32.txt $(WSHR)\oth32.txt txt2bmp.exe
	txt2bmp.exe $(txt2bmp_FLG)32
	echo tiles32 done > tiles32.tag
d795 4
a798 3
tiles16.tag:	$(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt txt2bmp.exe
	txt2bmp.exe $(txt2bmp_FLG)16
	echo tiles16 done > tiles16.tag
d800 2
a801 2
alltiles.tag:  tiles32.tag tiles16.tag tiles3d.tag
	echo alltiles done > alltiles.tag
d803 2
a804 3
#
# Optional GIF Utilities (for development)
#
d806 2
a807 2
gif2txt.exe: $(GIFREADERS) $(TEXTIO)
	$(LINK) $(LFLAGS) -ogif2txt.exe $(GIFREADERS) $(TEXTIO)
d809 3
a811 2
igif2txt.exe: $(IGIFREADERS) $(TEXTIO)
	$(LINK) $(LFLAGS) -oigif2txt.exe $(IGIFREADERS) $(TEXTIO)
d813 3
a815 5
txt2ppm.exe: $(PPMWRITERS) $(TEXTIO)
	$(LINK) $(LFLAGS) -otxt2ppm.exe $(PPMWRITERS) $(TEXTIO)

txtfilt.exe: txtfilt.o $(TEXT_IO)
	$(CC) $(LFLAGS) -otxtfilt.exe txtfilt.o $(TEXTIO)
a816 8
gifread.o: $(WSHR)\gifread.c $(CONFIG_H) $(INCL)\tile.h
	$C
igifread.o: $(WSHR)\gifread.c $(CONFIG_H) $(INCL)\tile.h
	$(CC) $(CFLAGS) -DINDEX -o$@@ $<
ppmwrite.o: $(WSHR)\ppmwrite.c $(CONFIG_H) $(INCL)\tile.h
	$C
txtfilt.o: $(WSHR)\txtfilt.c $(INCL)\config.h $(INCL)\tile.h
	$C
d819 1
a819 1
#  Optional tile viewer (development sources only)
d822 8
a829 2
viewtib.exe: viewtib.o
	$(LINK) $(LFLAGS) -oviewtib.exe viewtib.o $(LIBRARIES)
d831 4
a834 2
viewtib.o: $(MSYS)\viewtib.c
	$C
d836 3
a838 1
endif
d840 2
a841 6
#
#  Other Util Dependencies.
#
#JRN huh? removed the the whole thing.  It's weird.  Aren't its
# dependencies at the end with the other "normal" things? And whenever
# monst.o is made, so is objects.o, so why depend?
d843 1
a843 2
panic.o: $(UTIL)\panic.c  $(CONFIG_H)
	$C
d845 2
d848 2
d851 2
a852 3
#
# make data.base an 8.3 filename to prevent an nmake warning
#
d854 3
a856 1
DATABASE = $(DAT)\data.bas
d858 1
d860 1
a860 1
dat.tag: $(DAT)\nhshare $(DAT)\nhushare
d863 2
a864 2
$(DAT)\data:	 utility.tag	$(DATABASE)
	makedefs -d
d866 2
a867 2
$(DAT)\rumors:	     utility.tag    $(DAT)\rumors.tru	$(DAT)\rumors.fal
	makedefs -r
d869 2
a870 2
$(DAT)\quest.dat: utility.tag  $(DAT)\quest.txt
	makedefs -q
d872 85
a956 90
$(DAT)\oracles:	     utility.tag    $(DAT)\oracles.txt
	makedefs -h

$(DAT)\dungeon.pdf: utility.tag $(DAT)\dungeon.def
	makedefs -e

sp_lev.tag: lev_comp.exe     $(DAT)\beholder.des $(DAT)\bigroom.des \
	$(DAT)\blkmar.des   $(DAT)\castle.des   $(DAT)\caves.des \
	$(DAT)\dragons.des  $(DAT)\endgame.des \
	$(DAT)\gehennom.des $(DAT)\giants.des   $(DAT)\guild.des \
	$(DAT)\knox.des     $(DAT)\kobold-1.des $(DAT)\kobold-2.des \
	$(DAT)\lich.des     $(DAT)\mall-1.des   $(DAT)\mall-2.des \
	$(DAT)\medusa.des   $(DAT)\sokoban.des \
	$(DAT)\mines.des    $(DAT)\mtemple.des  $(DAT)\newmall.des \
	$(DAT)\nymph.des    $(DAT)\oracle.des   $(DAT)\rats.des \
	$(DAT)\sea.des      $(DAT)\spiders.des  $(DAT)\stor-1.des \
	$(DAT)\stor-2.des   $(DAT)\stor-3.des   $(DAT)\tomb.des \
	$(DAT)\tower.des    $(DAT)\yendor.des \
	$(DAT)\arch.des     $(DAT)\barb.des 	$(DAT)\caveman.des \
	$(DAT)\flame.des \
	$(DAT)\healer.des 	$(DAT)\ice.des \
	$(DAT)\knight.des   $(DAT)\monk.des \
	$(DAT)\necro.des    $(DAT)\priest.des   $(DAT)\rogue.des \
	$(DAT)\samurai.des  $(DAT)\tourist.des  $(DAT)\slayer.des \
	$(DAT)\valkyrie.des $(DAT)\wizard.des   $(DAT)\yeoman.des \
	$(DAT)\frnknstn.des $(DAT)\nightmar.des $(DAT)\ranger.des 

	$(UPD) $(SRC)\lev_comp.exe $(DAT)\lev_comp.exe
	cd $(DAT)
	lev_comp beholder.des
	lev_comp bigroom.des
	lev_comp blkmar.des
	lev_comp castle.des
	lev_comp caves.des
#	lev_comp darkelf.des
	lev_comp dragons.des
	lev_comp endgame.des
	lev_comp gehennom.des
	lev_comp giants.des
	lev_comp guild.des
	lev_comp knox.des
	lev_comp kobold-1.des
	lev_comp kobold-2.des
	lev_comp lich.des
	lev_comp mall-1.des
	lev_comp mall-2.des
	lev_comp medusa.des
	lev_comp sokoban.des
	lev_comp mines.des
	lev_comp mtemple.des
	lev_comp newmall.des
	lev_comp nymph.des
	lev_comp oracle.des
	lev_comp rats.des
	lev_comp sea.des
	lev_comp spiders.des
	lev_comp stor-1.des
	lev_comp stor-2.des
	lev_comp stor-3.des
	lev_comp tomb.des
	lev_comp tower.des
	lev_comp yendor.des
	lev_comp arch.des
	lev_comp barb.des
	lev_comp caveman.des
#	lev_comp dopp.des
#	lev_comp elf.des
	lev_comp flame.des
#	lev_comp gnome.des
	lev_comp healer.des
	lev_comp ice.des
	lev_comp knight.des
#	lev_comp lycn.des
	lev_comp monk.des
	lev_comp necro.des
	lev_comp priest.des
	lev_comp rogue.des
	lev_comp samurai.des
	lev_comp tourist.des
	lev_comp slayer.des
	lev_comp valkyrie.des
	lev_comp wizard.des
	lev_comp yeoman.des
#	lev_comp hobbit.des
	lev_comp frnknstn.des
#	lev_comp dwarf.des
	lev_comp nightmar.des
	lev_comp ranger.des
	cd $(SRC)
	echo sp_levs done > sp_lev.tag
d958 4
a961 2
$(DAT)\dungeon:	  utility.tag  $(DAT)\dungeon.pdf
	dgn_comp.exe $(DAT)\dungeon.pdf
d965 17
a981 23
#note that dir below assumes bin/dir.exe from djgpp distribution
#
	
$(DAT)\dlb.lst: 
	@@echo data >$@@
	@@echo oracles >>$@@
	@@echo options >>$@@
	@@echo rumors >>$@@
	@@echo help >>$@@
	@@echo hh >>$@@
	@@echo cmdhelp >>$@@
	@@echo history >>$@@
	@@echo opthelp >>$@@
	@@echo wizhelp >>$@@
	@@echo license >>$@@
	@@echo msdoshlp.txt >>$@@
	@@echo gypsy.txt >>$@@
	
$(DAT)\nhshare:	dlb_main.exe $(DAT)\data $(DAT)\rumors \
	    $(DAT)\oracles $(DAT)\dlb.lst
	@@$(UPD) $(MSYS)\msdoshlp.txt $(DAT)\msdoshlp.txt
	dlb_main CcvIf $(DAT) dlb.lst nhshare
	@@cd $(SRC)
d983 5
a987 5
$(DAT)\nhushare:	dlb_main.exe $(DAT)\dungeon $(DAT)\quest.dat sp_lev.tag
	@@cd $(DAT)

	@@echo dungeon >dlb2.lst
	@@echo quest.dat >>dlb2.lst
a988 7
	$(LS) *.lev >>dlb2.lst

#	@@copy $(SRC)\*.tib .
#	$(LS) *.tib >>dlb2.lst

	dlb_main cvIf dlb2.lst nhushare
	@@cd $(SRC)
d992 2
a993 1
	@@$(UPD) $@@ $(DAT)\dlb_main.exe
d995 3
a998 2
dlb_main.o: $(UTIL)\dlb_main.c $(INCL)\config.h $(DLB_H)
	$C
a999 4
# Some files require movement as Gnu make doesn't like unix style '/'
# directory specs and djgcc doesn't like dos style directory specs.
# So we get to copy stuff where we might need it.   Fun eh?
# Unfortunately, JRN spoiled the fun with his little $C thing.  Sorry =)
d1002 30
a1031 34
main.o:	$(SSHR)\pcmain.c $(HACK_H) $(DLB_H)
	$C
tty.o:	 $(SSHR)\pctty.c $(HACK_H) $(INCL)\wintty.h
	$C
unix.o:	 $(SSHR)\pcunix.c $(HACK_H)
	$C
sys.o : $(SSHR)\pcsys.c $(HACK_H)
	$C
# sys/msdos
msdos.o :  $(MSYS)\msdos.c $(HACK_H)
	$C
pckeys.o :  $(MSYS)\pckeys.c $(HACK_H)
	$C
pctiles.o :  $(MSYS)\pctiles.c $(HACK_H) $(INCL)\portio.h
	$C
sound.o :  $(MSYS)\sound.c $(HACK_H) $(INCL)\portio.h
	$C
video.o :  $(MSYS)\video.c $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h
	$C
# JRN: Instead of copying all those header files from $(MSYS), just use -I
vidalleg.o : $(MSYS)\vidalleg.c $(HACK_H)  $(INCL)\pcvideo.h $(INCL)\portio.h \
	$(TILE_H) $(MSYS)\alginit.h $(MSYS)\alfuncs.h $(MSYS)\alnames.h \
		$(MSYS)\loadfont.h $(MSYS)\2xsai.h
	$(CC) $(CFLAGS) -I$(MSYS) -o$@@ $(AAFLAG) $<
2xsai.o: $(MSYS)\2xsai.c $(MSYS)\2xsai.h
	$(CC) $(CFLAGS) -I$(MSYS) $<
vidvga.o : $(MSYS)\vidvga.c $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h \
		$(TILE_H)
	$C
vidtxt.o : $(MSYS)\vidtxt.c $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h \
		$(TILE_H)
	$C
stubvid.o : $(MSYS)\video.c $(HACK_H)
	$(CC) $(CFLAGS) -DSTUBVIDEO -o$@@ $<
d1034 54
a1087 8
getline.o : $(WIN)\getline.c $(HACK_H) $(INCL)\wintty.h
	$C
termcap.o : $(WIN)\termcap.c $(CONFIG_H)
	$C
topl.o : $(WIN)\topl.c $(CONFIG_H)
	$C
wintty.o : $(WIN)\wintty.c $(HACK_H)
	$C
d1091 3
a1093 3
apply.o:    $(HACK_H) $(INCL)\edog.h
artifact.o: $(HACK_H) $(INCL)\artifact.h $(INCL)\artilist.h
attrib.o:   $(HACK_H) $(INCL)\artifact.h
d1095 1
a1095 2
bones.o:    $(HACK_H) $(INCL)\lev.h
borg.o:	    $(HACK_H) $(INCL)\func_tab.h
d1097 1
a1097 1
cmd.o:	    $(HACK_H) $(INCL)\func_tab.h
d1099 2
a1100 2
decl.o:	    $(HACK_H) $(INCL)\quest.h
detect.o:   $(HACK_H) $(INCL)\artifact.h
d1104 1
a1104 1
do.o:	    $(HACK_H) $(INCL)\lev.h
d1107 2
a1108 2
dog.o:	    $(HACK_H) $(INCL)\edog.h
dogmove.o:  $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h
d1111 2
a1112 2
drawing.o:  $(HACK_H) $(INCL)\tcap.h
dungeon.o:  $(HACK_H) $(INCL)\dgn_file.h
d1115 1
a1115 1
engrave.o:  $(HACK_H) $(INCL)\lev.h
d1119 1
a1119 1
files.o:     $(HACK_H) $(INCL)\file.h $(INCL)\filename.h
d1121 1
a1121 1
gypsy.o:     $(HACK_H) $(INCL)\egyp.h $(INCL)\qtext.h
d1124 2
a1125 2
invent.o:    $(HACK_H) $(INCL)\artifact.h
light.o:     $(HACK_H) $(INCL)\lev.h
d1127 2
a1128 2
mail.o:	     $(HACK_H) $(INCL)\mail.h
makemon.o:   $(HACK_H) $(EPRI_H) $(EMIN_H) $(INCL)\edog.h
d1130 2
a1131 2
mhitm.o:     $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h
mhitu.o:     $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h
d1134 3
a1136 3
mkmap.o:     $(HACK_H) $(INCL)\sp_lev.h
mkmaze.o:    $(HACK_H) $(INCL)\sp_lev.h
mkobj.o:     $(HACK_H) $(INCL)\artifact.h $(INCL)\prop.h
d1138 1
a1138 1
mon.o:	     $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h
d1140 3
a1142 3
monmove.o:   $(HACK_H) $(INCL)\mfndpos.h $(INCL)\artifact.h
monst.o:     $(CONFIG_H) $(PERMONST_H) $(ESHK_H) $(EPRI_H) $(VAULT_H) \
	  $(INCL)\color.h $(INCL)\monsym.h
d1148 2
a1149 2
objects.o:   $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \
	       $(INCL)\prop.h $(SKILLS_H) $(INCL)\color.h
d1151 2
a1152 2
options.o:   $(CONFIG_H) $(HACK_H) $(INCL)\objclass.h $(INCL)\flag.h \
	      $(INCL)\tcap.h
d1159 3
a1161 3
priest.o:    $(HACK_H) $(INCL)\mfndpos.h $(ESHK_H) $(EPRI_H) $(EMIN_H)
quest.o:     $(HACK_H) $(INCL)\quest.h $(INCL)\qtext.h
questpgr.o:  $(HACK_H) $(INCL)\qtext.h
d1165 1
a1165 1
restore.o:   $(HACK_H) $(INCL)\lev.h $(INCL)\tcap.h $(INCL)\quest.h
d1170 1
a1170 1
save.o:	     $(HACK_H) $(INCL)\lev.h $(INCL)\quest.h
d1173 3
a1175 3
sit.o:	     $(HACK_H) $(INCL)\artifact.h
sounds.o:    $(HACK_H) $(INCL)\edog.h
sp_lev.o:    $(HACK_H) $(INCL)\sp_lev.h $(INCL)\align.h $(INCL)\rect.h
a1178 1
tech.o:	     $(HACK_H) $(INCL)\tech.h
d1180 1
d1188 4
a1191 4
vault.o:     $(HACK_H) $(INCL)\vault.h
version.o:   $(HACK_H) $(INCL)\patchlev.h
vision.o:    $(HACK_H) $(INCL)\vis_tab.h
weapon.o:    $(HACK_H) $(INCL)\skills.h
d1194 3
a1196 3
windows.o:   $(HACK_H) $(INCL)\wintty.h
wizard.o:    $(HACK_H) $(INCL)\qtext.h
worm.o:	     $(HACK_H) $(INCL)\lev.h
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Incorporates Nethack 3.3.1 codebase
@
text
@@
