From: nethack.allison Date: Sun, 11 Aug 2002 17:23:05 +0000 (+0000) Subject: msdos Makefile.gcc changes for djgpp X-Git-Tag: MOVE2GIT~2543 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02c9ce9214ef69cd49ac34685676a151d0b2df04;p=nethack msdos Makefile.gcc changes for djgpp Add syntax that introduced for the Mingw Makefile.gcc to make it easy to use unix-style path separation throughout the Makefile. Put all the .exe files into ../util Put all the .obj files into o/ --- diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index 0b1b126fd..4d25a55b7 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -1,4 +1,4 @@ -# SCCS Id: @(#)Makefile.GCC 3.4 2002/03/17 +# SCCS Id: @(#)Makefile.GCC 3.4 $Date$ # Copyright (c) NetHack PC Development Team 1996-2002. # PC NetHack 3.4 Makefile for djgpp V2 # @@ -23,28 +23,22 @@ GAME = nethack # The GNU Make has a problem if you include a drive spec below (unfortunately). -GAMEDIR =..\binary +GAMEDIR =../binary # # Directories, gcc likes unix style directory specs # -DDAT = ../dat -DUTIL = ../util -DSRC = ../src -DINCL = ../include - -# 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 +OBJ = o +DAT = ../dat +DOC = ../doc +INCL = ../include +MSYS = ../sys/msdos +SRC = ../src +SSHR = ../sys/share +UTIL = ../util +WIN = ../win/tty +WSHR = ../win/share # # Executables. @@ -106,12 +100,16 @@ LS = ls -1 # ls.exe from djgpp distribution # SUPPRESS_GRAPHICS = Y SUPPRESS_GRAPHICS = -############################################################################# -# -# nothing below this line should have to be changed -# +#=============================================== +#======= End of Modification Section =========== +#=============================================== +################################################ +# # +# Nothing below here should have to be changed.# +# # +################################################ -GAMEFILE = $(GAMEDIR)\$(GAME).exe +GAMEFILE = $(GAMEDIR)/$(GAME).exe # Changing this conditional block is not recommended ifeq ($(USE_DLB),Y) @@ -128,28 +126,98 @@ TERMLIB = # Build NetHack suitable for blind players # Debugging -#CFLAGS = -pg -c -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS +#cflags = -pg -c -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS #LFLAGS = -pg -CFLAGS = -c -O -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS +cflags = -c -O -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS LFLAGS = else # Debugging -#CFLAGS = -pg -c -I../include $(DLBFLG) -DUSE_TILES +#cflags = -pg -c -I../include $(DLBFLG) -DUSE_TILES #LFLAGS = -pg # Normal -CFLAGS = -c -O -I../include $(DLBFLG) -DUSE_TILES +cflags = -c -O -I../include $(DLBFLG) -DUSE_TILES LFLAGS = endif + +#========================================== +#================ RULES ================== +#========================================== + +.SUFFIXES: .exe .o .tib .til .uu .c .y .l + +#========================================== +# 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 : $(SSHR)/%.c + $(CC) $(cflags) -o$@ $< + +#========================================== +# Rules for files in sys/msdos +#========================================== + +$(OBJ)/%.o : $(MSYS)/%.c + $(CC) $(cflags) -I../sys/msdos -o$@ $< + +#========================================== +# Rules for files in util +#========================================== + +$(OBJ)/%.o : $(UTIL)/%.c + $(CC) $(cflags) -o$@ $< + +#========================================== +# Rules for files in win/share +#========================================== + +$(OBJ)/%.o : $(WSHR)/%.c + $(CC) $(cflags) -I../win/share -o$@ $< + +#{$(WSHR)}.txt{$(DAT)}.txt: +# copy $< $@ + +#========================================== +# Rules for files in win/tty +#========================================== + +$(OBJ)/%.o : $(TTY)/%.c + $(CC) $(cflags) -o$@ $< + +#========================================== +#================ MACROS ================== +#========================================== +# This section creates shorthand macros for many objects +# referenced later on in the Makefile. +# +# +# Shorten up the location for some files +# + +O = $(OBJ)/ + +U = $(UTIL)/ + + # # Utility Objects. # -VGAOBJ = vidvga.o +VGAOBJ = $(O)vidvga.o MAKESRC = makedefs.c @@ -157,16 +225,16 @@ 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 +MAKEOBJS = $(O)makedefs.o $(O)monst.o $(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 stubvid.o +SPLEVOBJS = $(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o $(O)alloc.o \ + $(O)monst.o $(O)objects.o $(O)panic.o \ + $(O)drawing.o $(O)decl.o $(O)stubvid.o -DGNCOMPOBJS = dgn_yacc.o dgn_$(LEX).o dgn_main.o alloc.o \ - panic.o +DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o $(O)alloc.o \ + $(O)panic.o -RECOVOBJS = recover.o +RECOVOBJS = $(O)recover.o # Tile related object files. @@ -187,67 +255,69 @@ PPMWRIT2 = else -TILOBJ = tile.o pctiles.o $(VGAOBJ) - -TEXTIO = tiletext.o tiletxt.o drawing.o decl.o monst.o objects.o stubvid.o +TILOBJ = $(O)tile.o $(O)pctiles.o $(VGAOBJ) -TEXTIO2 = tiletex2.o tiletxt2.o drawing.o decl.o monst.o objects.o stubvid.o +TEXTIO = $(O)tiletext.o $(O)tiletxt.o $(O)drawing.o $(O)decl.o $(O)monst.o \ + $(O)objects.o $(O)stubvid.o +TEXTIO2 = $(O)tiletex2.o $(O)tiletxt2.o $(O)drawing.o $(O)decl.o $(O)monst.o \ + $(O)objects.o $(O)stubvid.o -PLANAR_TIB = NetHack1.tib +PLANAR_TIB = $(O)NetHack1.tib -OVERVIEW_TIB = NetHacko.tib +OVERVIEW_TIB = $(O)NetHacko.tib -TILEUTIL = $(TILOBJ) tile2bin.exe til2bin2.exe $(PLANAR_TIB) $(OVERVIEW_TIB) +TILEUTIL = $(TILOBJ) $(U)tile2bin.exe $(U)til2bin2.exe $(PLANAR_TIB) $(OVERVIEW_TIB) -TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt +TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt -TILEFILES2 = $(WSHR)\monthin.txt $(WSHR)\objthin.txt $(WSHR)\oththin.txt +TILEFILES2 = $(WSHR)/monthin.txt $(WSHR)/objthin.txt $(WSHR)/oththin.txt -GIFREADERS = gifread.o alloc.o panic.o +GIFREADERS = $(O)gifread.o $(O)alloc.o $(O)panic.o -GIFREAD2 = gifread2.o alloc.o panic.o +GIFREAD2 = $(O)gifread2.o $(O)alloc.o $(O)panic.o -PPMWRITERS = ppmwrite.o alloc.o panic.o +PPMWRITERS = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o -PPMWRIT2 = ppmwrit2.o alloc.o panic.o +PPMWRIT2 = $(O)ppmwrit2.o $(O)alloc.o $(O)panic.o endif -DLBOBJ = dlb.o +DLBOBJ = $(O)dlb.o # Object files for the game itself. -VOBJ01 = allmain.o alloc.o apply.o artifact.o attrib.o -VOBJ02 = ball.o bones.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 = getline.o hack.o hacklib.o invent.o lock.o -VOBJ08 = mail.o main.o makemon.o mapglyph.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 = termcap.o timeout.o topl.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 = wintty.o wizard.o worm.o worn.o write.o -VOBJ22 = zap.o light.o dlb.o dig.o teleport.o -VOBJ23 = region.o - -SOBJ = msdos.o sound.o sys.o tty.o unix.o video.o \ - vidtxt.o pckeys.o - -VVOBJ = version.o - -VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ + +VOBJ01 = $(O)allmain.o $(O)alloc.o $(O)apply.o $(O)artifact.o $(O)attrib.o +VOBJ02 = $(O)ball.o $(O)bones.o $(O)botl.o $(O)cmd.o $(O)dbridge.o +VOBJ03 = $(O)decl.o $(O)detect.o $(O)display.o $(O)do.o $(O)do_name.o +VOBJ04 = $(O)do_wear.o $(O)dog.o $(O)dogmove.o $(O)dokick.o $(O)dothrow.o +VOBJ05 = $(O)drawing.o $(O)dungeon.o $(O)eat.o $(O)end.o $(O)engrave.o +VOBJ06 = $(O)exper.o $(O)explode.o $(O)extralev.o $(O)files.o $(O)fountain.o +VOBJ07 = $(O)getline.o $(O)hack.o $(O)hacklib.o $(O)invent.o $(O)lock.o +VOBJ08 = $(O)mail.o $(O)main.o $(O)makemon.o $(O)mapglyph.o $(O)mcastu.o $(O)mhitm.o +VOBJ09 = $(O)mhitu.o $(O)minion.o $(O)mkmap.o $(O)mklev.o $(O)mkmaze.o +VOBJ10 = $(O)mkobj.o $(O)mkroom.o $(O)mon.o $(O)mondata.o $(O)monmove.o +VOBJ11 = $(O)monst.o $(O)monstr.o $(O)mplayer.o $(O)mthrowu.o $(O)muse.o +VOBJ12 = $(O)music.o $(O)o_init.o $(O)objects.o $(O)objnam.o $(O)options.o +VOBJ13 = $(O)pickup.o $(O)pline.o $(O)polyself.o $(O)potion.o $(O)quest.o +VOBJ14 = $(O)questpgr.o $(O)pager.o $(O)pray.o $(O)priest.o $(O)read.o +VOBJ15 = $(O)rect.o $(O)restore.o $(O)rip.o $(O)rnd.o $(O)role.o +VOBJ16 = $(O)rumors.o $(O)save.o $(O)shk.o $(O)shknam.o $(O)sit.o +VOBJ17 = $(O)sounds.o $(O)sp_lev.o $(O)spell.o $(O)steal.o $(O)steed.o +VOBJ18 = $(O)termcap.o $(O)timeout.o $(O)topl.o $(O)topten.o $(O)track.o +VOBJ19 = $(O)trap.o $(O)u_init.o $(O)uhitm.o $(O)vault.o $(O)vision.o +VOBJ20 = $(O)vis_tab.o $(O)weapon.o $(O)were.o $(O)wield.o $(O)windows.o +VOBJ21 = $(O)wintty.o $(O)wizard.o $(O)worm.o $(O)worn.o $(O)write.o +VOBJ22 = $(O)zap.o $(O)light.o $(O)dlb.o $(O)dig.o $(O)teleport.o +VOBJ23 = $(O)region.o + +SOBJ = $(O)msdos.o $(O)sound.o $(O)sys.o $(O)tty.o $(O)unix.o \ + $(O)video.o $(O)vidtxt.o $(O)pckeys.o + +VVOBJ = $(O)version.o + +VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \ $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ @@ -255,54 +325,54 @@ VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(VVOBJ) -# -# 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 -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 +#========================================== +# Header file macros +#========================================== + +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 \ + $(MSYS)/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 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 + $(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 +TILE_H = $(WSHR)/tile.h $(MSYS)/pctiles.h endif ifeq ($(USE_DLB),Y) DLB = dlb -DLBOBJS = dlb_main.o dlb.o alloc.o panic.o +DLBOBJS = $(O)dlb_main.o $(O)dlb.o $(O)alloc.o $(O)panic.o else DLB = DLBOBJS = @@ -313,208 +383,213 @@ DJ1 = $(dir $(DJGPP)) CWSDPMI = $(subst /,\,$(DJ1))bin\CWSDPMI.* 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 -all: install.tag +install: $(GAMEFILE) $(O)install.tag + @echo Done. -util: utility.tag +default: $(GAMEFILE) -install: install.tag +util: $(O)utility.tag -utility.tag: $(INCL)\date.h $(INCL)\trap.h $(INCL)\onames.h \ - $(INCL)\pm.h monstr.c vis_tab.c \ - lev_comp.exe dgn_comp.exe recover.exe $(TILEUTIL) - echo utilities made > utility.tag +$(O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \ + $(INCL)/pm.h monstr.c vis_tab.c \ + $(U)lev_comp.exe $(U)dgn_comp.exe $(U)recover.exe $(TILEUTIL) + echo utilities made > $@ -tileutil: gif2txt.exe txt2ppm.exe +tileutil: $(U)gif2txt.exe $(U)txt2ppm.exe @echo Optional tile development utilities are up to date. -install.tag: dat.tag $(GAMEFILE) +$(O)install.tag: $(O)dat.tag $(GAMEFILE) ifeq ($(USE_DLB),Y) - copy $(DAT)\nhdat $(GAMEDIR) - copy $(DAT)\license $(GAMEDIR) + $(subst /,\,copy $(DAT)/nhdat $(GAMEDIR)) + $(subst /,\,copy $(DAT)/license $(GAMEDIR)) else - copy $(DAT)\*. $(GAMEDIR) - copy $(DAT)\*.dat $(GAMEDIR) - copy $(DAT)\*.lev $(GAMEDIR) - copy $(MSYS)\msdoshlp.txt $(GAMEDIR) - if exist $(GAMEDIR)\makefile. del $(GAMEDIR)\makefile. + $(subst /,\,copy $(DAT)/*. $(GAMEDIR)) + $(subst /,\,copy $(DAT)/*.dat $(GAMEDIR)) + $(subst /,\,copy $(DAT)/*.lev $(GAMEDIR)) + $(subst /,\,copy $(MSYS)/msdoshlp.txt $(GAMEDIR)) + $(subst /,\,if exist $(GAMEDIR)/makefile. del $(GAMEDIR)/makefile.) endif ifdef TERMLIB - copy $(SSHR)\termcap $(GAMEDIR) + $(subst /,\,copy $(SSHR)/termcap $(GAMEDIR)) endif - if exist *.tib copy *.tib $(GAMEDIR) - copy $(SSHR)\NetHack.cnf $(GAMEDIR)\defaults.nh - copy $(MSYS)\NHAccess.nh $(GAMEDIR) - copy recover.exe $(GAMEDIR) - copy $(DOC)\guidebo*.txt $(GAMEDIR) - if exist $(DOC)\recover.txt copy $(DOC)\recover.txt $(GAMEDIR) - if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR) + $(subst /,\,if exist *.tib copy *.tib $(GAMEDIR)) + $(subst /,\,copy $(SSHR)/NetHack.cnf $(GAMEDIR)/defaults.nh) + $(subst /,\,copy $(MSYS)/NHAccess.nh $(GAMEDIR)) + $(subst /,\,copy $(U)recover.exe $(GAMEDIR)) + $(subst /,\,copy $(DOC)/guidebo*.txt $(GAMEDIR)) + $(subst /,\,if exist $(DOC)/recover.txt copy $(DOC)/recover.txt $(GAMEDIR)) + $(subst /,\,if exist $(DOC)/nethack.txt copy $(DOC)/nethack.txt $(GAMEDIR)) ifdef CWSDPMI - if exist $(CWSDPMI) copy $(CWSDPMI) $(GAMEDIR) + $(subst /,\,if exist $(CWSDPMI) copy $(CWSDPMI) $(GAMEDIR)) else - echo Could not find a copy of CWSDPMI.EXE to put into $(GAMEDIR) + $(subst /,\,echo Could not find a copy of CWSDPMI.EXE to put into $(GAMEDIR)) endif - echo install done > install.tag + $(subst /,\,echo install done > $@) # The main target. -$(GAMEFILE): utility.tag $(GAME).lnk - $(LINK) $(LFLAGS) -o$(GAME).exe @$(GAME).lnk $(LIBRARIES) +$(GAMEFILE): $(O)obj.tag $(O)lfnfixup.tag $(O)utility.tag $(O)$(GAME).lnk + $(LINK) $(LFLAGS) -o$(GAME).exe @$(O)$(GAME).lnk $(LIBRARIES) stubedit $(GAME).exe minstack=2048K - copy $(GAME).exe $(GAMEFILE) - del $(GAME).exe - -$(GAME).lnk: $(ALLOBJ) - @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) >> $@ - + $(subst /,\,copy $(GAME).exe $(GAMEFILE)) + $(subst /,\,del $(GAME).exe) + +$(O)$(GAME).lnk: $(ALLOBJ) + 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) >> $@ # # Housekeeping. # clean: - del *.o - del *.map - del dlb_main.exe + $(subst /,\,copy $(SSHR)/dgn_lex.c $@) + $(subst /,\,del $(O)*.o) + $(subst /,\,del *.map) + $(subst /,\,del $(DAT)/dlb_main.exe) spotless: clean - if exist utility.tag del utility.tag - if exist install.tag del install.tag - if exist dat.tag del dat.tag - if exist $(GAME).lnk del $(GAME).lnk - if exist makedefs.exe del makedefs.exe - if exist lev_comp.exe del lev_comp.exe - if exist dgn_comp.exe del dgn_comp.exe - if exist $(SRC)\lev_lex.c del $(SRC)\lev_lex.c - if exist $(SRC)\lev_flex.c del $(SRC)\lev_flex.c - if exist $(SRC)\lev_yacc.c del $(SRC)\lev_yacc.c - if exist $(SRC)\dgn_lex.c del $(SRC)\dgn_lex.c - if exist $(SRC)\dgn_flex.c del $(SRC)\dgn_flex.c - if exist $(SRC)\dgn_yacc.c del $(SRC)\dgn_yacc.c - if exist recover.exe del recover.exe - if exist $(INCL)\onames.h del $(INCL)\onames.h - if exist $(INCL)\pm.h del $(INCL)\pm.h - if exist $(INCL)\vis_tab.h del $(INCL)\vis_tab.h - if exist $(INCL)\pcvideo.h del $(INCL)\pcvideo.h - if exist $(INCL)\pctiles.h del $(INCL)\pctiles.h - if exist $(INCL)\portio.h del $(INCL)\portio.h - if exist $(INCL)\tile.h del $(INCL)\tile.h - if exist monstr.c del monstr.c - if exist vis_tab.c del vis_tab.c - if exist $(SRC)\panic.c del $(SRC)\panic.c - if exist $(SRC)\makedefs.c del $(SRC)\makedefs.c - if exist $(SRC)\recover.c del $(SRC)\recover.c - if exist $(SRC)\lev_main.c del $(SRC)\lev_main.c - if exist $(SRC)\dlb_main.c del $(SRC)\dlb_main.c - if exist $(SRC)\dgn_main.c del $(SRC)\dgn_main.c - if exist $(SRC)\wintty.c del $(SRC)\wintty.c - if exist $(SRC)\topl.c del $(SRC)\topl.c - if exist $(SRC)\getline.c del $(SRC)\getline.c - if exist $(SRC)\termcap.c del $(SRC)\termcap.c - if exist $(SRC)\tile2bin.c del $(SRC)\tile2bin.c - if exist $(SRC)\msdos.c del $(SRC)\msdos.c - if exist $(SRC)\pckeys.c del $(SRC)\pckeys.c - if exist $(SRC)\video.c del $(SRC)\video.c - if exist $(SRC)\vidtxt.c del $(SRC)\vidtxt.c - if exist $(SRC)\vidvga.c del $(SRC)\vidvga.c - if exist $(SRC)\sound.c del $(SRC)\sound.c - if exist $(SRC)\tilemap.c del $(SRC)\tilemap.c - if exist $(SRC)\gifread.c del $(SRC)\gifread.c - if exist $(SRC)\ppmwrite.c del $(SRC)\ppmwrite.c - if exist $(SRC)\pcmain.c del $(SRC)\pcmain.c - if exist $(SRC)\pcunix.c del $(SRC)\pcunix.c - if exist $(SRC)\pcsys.c del $(SRC)\pcsys.c - if exist $(SRC)\pctty.c del $(SRC)\pctty.c - if exist $(SRC)\tile.c del $(SRC)\tile.c - if exist $(SRC)\tiletext.c del $(SRC)\tiletext.c - if exist $(SRC)\pctiles.c del $(SRC)\pctiles.c - if exist $(SRC)\thintile.c del $(SRC)\thintile.c - if exist $(SRC)\thintile.exe del $(SRC)\thintile.exe - if exist $(SRC)\thintile.tag del $(SRC)\thintile.tag - if exist $(SRC)\til2bin2.exe del $(SRC)\til2bin2.exe - 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 $(INCL)\vis_tab.h del $(INCL)\vis_tab.h - if exist vis_tab.c del vis_tab.c - if exist *.lnk del *.lnk - if exist *.def del *.def - if exist *.map del *.map - if exist a.out del a.out - if exist tilemap.exe del tilemap.exe - if exist tile2bin.exe del tile2bin.exe - if exist $(DAT)\data del $(DAT)\data - if exist $(DAT)\*.lev del $(DAT)\*.lev - if exist $(DAT)\dungeon del $(DAT)\dungeon - if exist $(DAT)\options del $(DAT)\options - if exist $(DAT)\oracles del $(DAT)\oracles - if exist $(DAT)\rumors del $(DAT)\rumors - if exist $(DAT)\quest.dat del $(DAT)\quest.dat - if exist $(DAT)\nhdat del $(DAT)\nhdat - if exist $(DAT)\dlb.lst del $(DAT)\dlb.lst - if exist $(DAT)\msdoshlp.txt del $(DAT)\msdoshlp.txt - if exist $(DAT)\dlb_main.exe del $(DAT)\dlb_main.exe - if exist $(DAT)\lev_comp.exe del $(DAT)\lev_comp.exe - if exist $(DAT)\dgn_comp.exe del $(DAT)\dgn_comp.exe - if exist sp_lev.tag del sp_lev.tag - if exist $(PLANAR_TIB) del $(PLANAR_TIB) - if exist $(OVERVIEW_TIB) del $(OVERVIEW_TIB) - if exist thintile.tag del thintile.tag - if exist thintile.exe del thintile.exe - if exist til2bin2.exe del til2bin2.exe - if exist $(INCL)\dgn_comp.h del $(INCL)\dgn_comp.h - if exist $(INCL)\lev_comp.h del $(INCL)\lev_comp.h - if exist $(DAT)\dungeon.pdf del $(DAT)\dungeon.pdf - 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 - -# -# Secondary Targets. + $(subst /,\,if exist $(O)utility.tag del $(O)utility.tag) + $(subst /,\,if exist $(O)install.tag del $(O)install.tag) + $(subst /,\,if exist $(O)dat.tag del $(O)dat.tag) + $(subst /,\,if exist $(O)$(GAME).lnk del $(O)$(GAME).lnk) + $(subst /,\,if exist $(U)makedefs.exe del $(U)makedefs.exe) + $(subst /,\,if exist $(U)lev_comp.exe del $(U)lev_comp.exe) + $(subst /,\,if exist $(U)dgn_comp.exe del $(U)dgn_comp.exe) + $(subst /,\,if exist $(U)/lev_lex.c del $(U)/lev_lex.c) + $(subst /,\,if exist $(U)/lev_flex.c del $(U)/lev_flex.c) + $(subst /,\,if exist $(U)/lev_yacc.c del $(U)/lev_yacc.c) + $(subst /,\,if exist $(U)/dgn_lex.c del $(U)/dgn_lex.c) + $(subst /,\,if exist $(U)/dgn_flex.c del $(U)/dgn_flex.c) + $(subst /,\,if exist $(U)/dgn_yacc.c del $(U)/dgn_yacc.c) + $(subst /,\,if exist $(U)recover.exe del $(U)recover.exe) + $(subst /,\,if exist $(INCL)/onames.h del $(INCL)/onames.h) + $(subst /,\,if exist $(INCL)/pm.h del $(INCL)/pm.h) + $(subst /,\,if exist $(INCL)/vis_tab.h del $(INCL)/vis_tab.h) + $(subst /,\,if exist $(WSHR)/tile.h del $(WSHR)/tile.h) + $(subst /,\,if exist monstr.c del monstr.c) + $(subst /,\,if exist vis_tab.c del vis_tab.c) + $(subst /,\,if exist $(SRC)/panic.c del $(SRC)/panic.c) + $(subst /,\,if exist $(SRC)/makedefs.c del $(SRC)/makedefs.c) + $(subst /,\,if exist $(SRC)/recover.c del $(SRC)/recover.c) + $(subst /,\,if exist $(SRC)/lev_main.c del $(SRC)/lev_main.c) + $(subst /,\,if exist $(SRC)/dlb_main.c del $(SRC)/dlb_main.c) + $(subst /,\,if exist $(SRC)/dgn_main.c del $(SRC)/dgn_main.c) + $(subst /,\,if exist $(SRC)/wintty.c del $(SRC)/wintty.c) + $(subst /,\,if exist $(SRC)/topl.c del $(SRC)/topl.c) + $(subst /,\,if exist $(SRC)/getline.c del $(SRC)/getline.c) + $(subst /,\,if exist $(SRC)/termcap.c del $(SRC)/termcap.c) + $(subst /,\,if exist $(SRC)/tile2bin.c del $(SRC)/tile2bin.c) + $(subst /,\,if exist $(SRC)/msdos.c del $(SRC)/msdos.c) + $(subst /,\,if exist $(SRC)/pckeys.c del $(SRC)/pckeys.c) + $(subst /,\,if exist $(SRC)/video.c del $(SRC)/video.c) + $(subst /,\,if exist $(SRC)/vidtxt.c del $(SRC)/vidtxt.c) + $(subst /,\,if exist $(SRC)/vidvga.c del $(SRC)/vidvga.c) + $(subst /,\,if exist $(SRC)/sound.c del $(SRC)/sound.c) + $(subst /,\,if exist $(SRC)/tilemap.c del $(SRC)/tilemap.c) + $(subst /,\,if exist $(SRC)/gifread.c del $(SRC)/gifread.c) + $(subst /,\,if exist $(SRC)/ppmwrite.c del $(SRC)/ppmwrite.c) + $(subst /,\,if exist $(SRC)/pcmain.c del $(SRC)/pcmain.c) + $(subst /,\,if exist $(SRC)/pcunix.c del $(SRC)/pcunix.c) + $(subst /,\,if exist $(SRC)/pcsys.c del $(SRC)/pcsys.c) + $(subst /,\,if exist $(SRC)/pctty.c del $(SRC)/pctty.c) + $(subst /,\,if exist $(SRC)/tile.c del $(SRC)/tile.c) + $(subst /,\,if exist $(SRC)/tiletext.c del $(SRC)/tiletext.c) + $(subst /,\,if exist $(SRC)/pctiles.c del $(SRC)/pctiles.c) + $(subst /,\,if exist $(SRC)/thintile.c del $(SRC)/thintile.c) + $(subst /,\,if exist $(U)/thintile.exe del $(U)/thintile.exe) + $(subst /,\,if exist $(O)/thintile.tag del $(O)/thintile.tag) + $(subst /,\,if exist $(U)/til2bin2.exe del $(U)/til2bin2.exe) + $(subst /,\,if exist $(INCL)/date.h del $(INCL)/date.h) + $(subst /,\,if exist $(INCL)/onames.h del $(INCL)/onames.h) + $(subst /,\,if exist $(INCL)/pm.h del $(INCL)/pm.h) + $(subst /,\,if exist $(INCL)/vis_tab.h del $(INCL)/vis_tab.h) + $(subst /,\,if exist vis_tab.c del vis_tab.c) + $(subst /,\,if exist *.lnk del *.lnk) + $(subst /,\,if exist *.def del *.def) + $(subst /,\,if exist *.map del *.map) + $(subst /,\,if exist a.out del a.out) + $(subst /,\,if exist $(U)tilemap.exe del $(U)tilemap.exe) + $(subst /,\,if exist $(U)tile2bin.exe del $(U)tile2bin.exe) + $(subst /,\,if exist $(DAT)/data del $(DAT)/data) + $(subst /,\,if exist $(DAT)/*.lev del $(DAT)/*.lev) + $(subst /,\,if exist $(DAT)/dungeon del $(DAT)/dungeon) + $(subst /,\,if exist $(DAT)/options del $(DAT)/options) + $(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles) + $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors) + $(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat) + $(subst /,\,if exist $(DAT)/nhdat del $(DAT)/nhdat) + $(subst /,\,if exist $(DAT)/dlb.lst del $(DAT)/dlb.lst) + $(subst /,\,if exist $(DAT)/msdoshlp.txt del $(DAT)/msdoshlp.txt) + $(subst /,\,if exist $(DAT)/dlb_main.exe del $(DAT)/dlb_main.exe) + $(subst /,\,if exist $(U)/lev_comp.exe del $(U)/lev_comp.exe) + $(subst /,\,if exist $(U)/dgn_comp.exe del $(U)/dgn_comp.exe) + $(subst /,\,if exist $(O)sp_lev.tag del $(O)sp_lev.tag) + $(subst /,\,if exist $(PLANAR_TIB) del $(PLANAR_TIB)) + $(subst /,\,if exist $(OVERVIEW_TIB) del $(OVERVIEW_TIB)) + $(subst /,\,if exist $(O)thintile.tag del $(O)thintile.tag) + $(subst /,\,if exist $(U)thintile.exe del $(U)thintile.exe) + $(subst /,\,if exist $(U)til2bin2.exe del $(U)til2bin2.exe) + $(subst /,\,if exist $(INCL)/dgn_comp.h del $(INCL)/dgn_comp.h) + $(subst /,\,if exist $(INCL)/lev_comp.h del $(INCL)/lev_comp.h) + $(subst /,\,if exist $(DAT)/dungeon.pdf del $(DAT)/dungeon.pdf) + $(subst /,\,if exist $(WSHR)/monthin.txt del $(WSHR)/monthin.txt) + $(subst /,\,if exist $(WSHR)/objthin.txt del $(WSHR)/objthin.txt) + $(subst /,\,if exist $(WSHR)/oththin.txt del $(WSHR)/oththin.txt) + +#========================================== +# Create directory for holding object files +#========================================== + +$(O)obj.tag: + $(subst /,\,@if not exist $(OBJ)/*.* echo creating directory $(OBJ)) + $(subst /,\,@if not exist $(OBJ)/*.* mkdir $(OBJ)) + $(subst /,\,@echo directory created > $@) + +#=========================================== +# Work around some djgpp long file name woes +#=========================================== + +$(O)lfnfixup.tag: + @$(subst /,\,if exist $(INCL)/patchl~1.h copy $(INCL)/patchl~1.h $(INCL)/patchlev.h) + @$(subst /,\,echo directory created > $@) + +#========================================== +#=========== SECONDARY TARGETS ============ +#========================================== # # The following include files depend on makedefs to be created. # @@ -522,166 +597,160 @@ spotless: clean # files is modified. -$(INCL)\date.h : makedefs.exe +$(INCL)/date.h : $(U)makedefs.exe -makedefs -v -$(INCL)\onames.h: makedefs.exe +$(INCL)/onames.h: $(U)makedefs.exe -makedefs -o -$(INCL)\pm.h: makedefs.exe +$(INCL)/pm.h: $(U)makedefs.exe -makedefs -p -monstr.c: makedefs.exe +monstr.c: $(U)makedefs.exe -makedefs -m -$(INCL)\vis_tab.h: makedefs.exe +$(INCL)/vis_tab.h: $(U)makedefs.exe -makedefs -z -vis_tab.c: makedefs.exe +vis_tab.c: $(U)makedefs.exe -makedefs -z # # Makedefs Stuff # -makedefs.exe: $(MAKEOBJS) - $(LINK) $(LFLAGS) -omakedefs.exe $(MAKEOBJS) - -makedefs.c: $(UTIL)\makedefs.c - copy $(UTIL)\makedefs.c . +$(U)makedefs.exe: $(MAKEOBJS) + $(LINK) $(LFLAGS) -o$@ $(MAKEOBJS) -makedefs.o: $(CONFIG_H) $(PERMONST_H) $(INCL)\objclass.h \ - $(INCL)\monsym.h $(INCL)\qtext.h makedefs.c +$(O)makedefs.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/objclass.h \ + $(INCL)/monsym.h $(INCL)/qtext.h $(U)makedefs.c # # Level Compiler Dependencies # -lev_comp.exe: $(SPLEVOBJS) - $(LINK) $(LFLAGS) -olev_comp.exe $(SPLEVOBJS) +$(U)lev_comp.exe: $(SPLEVOBJS) + $(LINK) $(LFLAGS) -o$@ $(SPLEVOBJS) ifeq ($(YACC_LEX),Y) -lev_yacc.o: $(HACK_H) $(SP_LEV_H) lev_yacc.c - $(CC) $(CFLAGS) -o$@ lev_yacc.c +$(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(U)lev_yacc.c + $(CC) $(cflags) -o$@ $(U)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 +$(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h $(U)lev_yacc.c + $(CC) $(cflags) -o$@ $(U)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 +$(O)lev_$(LEX).o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h \ + $(U)lev_$(LEX).c + $(CC) $(cflags) -o$@ $(U)lev_$(LEX).c -lev_main.c: $(UTIL)\lev_main.c - copy $(UTIL)\lev_main.c . +$(O)lev_main.o: $(HACK_H) $(INCL)/sp_lev.h $(INCL)/date.h $(U)lev_main.c -lev_main.o: $(HACK_H) $(INCL)\sp_lev.h $(INCL)\date.h lev_main.c +$(INCL)/lev_comp.h: lev_yacc.c -$(INCL)\lev_comp.h: lev_yacc.c +ifeq "$(DO_YACC)" "YACC_ACT" -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) +$(U)lev_yacc.c $(INCL)/lev_comp.h : $(U)lev_comp.y + $(subst /,\,chdir $(U)) & \ + $(subst /,\,$(YACC) -d lev_comp.y) & \ + $(subst /,\,copy $(YTABC) lev_yacc.c) & \ + $(subst /,\,copy $(YTABH) $(INCL)/lev_comp.h) & \ + $(subst /,\,@del $(YTABC)) & \ + $(subst /,\,@del $(YTABH)) & \ + $(subst /,\,chdir $(SRC)) 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 +$(U)lev_yacc.c: $(SSHR)/lev_yacc.c + @echo For now, we will copy the prebuilt + @echo lev_comp.c from $(SSHR) into $(U) and use that. + $(subst /,\,copy $(SSHR)/lev_yacc.c $(U)lev_yacc.c) + $(subst /,\,echo.>>$(U)lev_yacc.c) -lev_$(LEX).c: $(SSHR)\lev_lex.c - copy $(SSHR)\lev_lex.c $@ +$(INCL)/lev_comp.h : $(SSHR)/lev_comp.h + @echo For now, we will copy the prebuilt lev_comp.h + @echo from $(SSHR) into $(U) and use that. + $(subst /,\,copy $(SSHR)/lev_comp.h $(INCL)/lev_comp.h) + $(subst /,\,echo.>>$(INCL)/lev_comp.h) endif +$(U)lev_$(LEX).c: $(U)lev_comp.l +ifeq "$(DO_LEX)" "LEX_ACT" + $(subst /,\,chdir $(U)) & \ + $(subst /,\,$(LEX) $(FLEXSKEL) lev_comp.l) & \ + $(subst /,\,copy $(LEXYYC) $@) & \ + $(subst /,\,@del $(LEXYYC)) & \ + $(subst /,\,chdir $(SRC)) +else + @echo $(U)lev_comp.l has changed. To update $@ run $(LEX). + @echo --- + @echo For now, we will copy the prebuilt lev_lex.c + @echo from $(SSHR) into $(U) and use it. + $(subst /,\,copy $(SSHR)/lev_lex.c $@) + $(subst /,\,echo.>>$@) +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 - +$(U)dgn_comp.exe: $(DGNCOMPOBJS) + $(LINK) $(LFLAGS) -o$@ $(DGNCOMPOBJS) + +ifeq "$(DO_YACC)" "YACC_ACT" +$(U)dgn_yacc.c $(INCL)/dgn_comp.h : $(U)dgn_comp.y + $(subst /,\,chdir $(U)) & \ + $(subst /,\,$(YACC) -d dgn_comp.y) & \ + $(subst /,\,copy $(YTABC) dgn_yacc.c) & \ + $(subst /,\,copy $(YTABH) $(INCL)/dgn_comp.h) & \ + $(subst /,\,@del $(YTABC)) & \ + $(subst /,\,@del $(YTABH)) & \ + $(subst /,\,chdir $(SRC)) else +$(U)dgn_yacc.c: $(SSHR)/dgn_yacc.c + @echo For now, we will copy the prebuilt $(U)dgn_yacc.c and + @echo dgn_comp.h from $(SSHR) into $(U) and use that. + $(subst /,\,copy $(SSHR)/dgn_yacc.c $(U)dgn_yacc.c) + $(subst /,\,echo.>>$(U)dgn_yacc.c) -dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h dgn_yacc.c - $(CC) $(CFLAGS) -o$@ dgn_yacc.c +$(INCL)/dgn_comp.h: $(SSHR)/dgn_comp.h + $(subst /,\,copy $(SSHR)/dgn_comp.h $(INCL)/dgn_comp.h) + $(subst /,\,echo.>>$(INCL)/dgn_comp.h) 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) +ifeq "$(DO_LEX)" "LEX_ACT" +$(U)dgn_$(LEX).c: $(U)dgn_comp.l $(INCL)/dgn_comp.h + $(subst /,\,chdir $(U)) & \ + $(subst /,\,$(LEX) $(FLEXSKEL) dgn_comp.l) & \ + $(subst /,\,copy $(LEXYYC) $@) & \ + $(subst /,\,@del $(LEXYYC)) & \ + $(subst /,\,chdir $(SRC)) else -dgn_yacc.c: $(SSHR)\dgn_yacc.c - copy $(SSHR)\dgn_yacc.c $@ +$(U)dgn_$(LEX).c: $(SSHR)/dgn_lex.c $(INCL)/dgn_comp.h + @echo For now, we will copy the prebuilt dgn_lex.c + @echo from $(SSHR) into $(U) and use it. + $(subst /,\,copy $(SSHR)/dgn_lex.c $@) + $(subst /,\,echo.>>$@) -$(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 . +$(U)recover.exe: $(RECOVOBJS) + $(LINK) $(LFLAGS) -o$@ $(O)recover.o -recover.o: $(CONFIG_H) recover.c - $(CC) $(CFLAGS) -o$@ recover.c +$(O)recover.o: $(CONFIG_H) $(U)recover.c + $(CC) $(cflags) -o$@ $(U)recover.c # @@ -690,34 +759,19 @@ recover.o: $(CONFIG_H) recover.c ifeq ($(SUPPRESS_GRAPHICS),Y) else - -$(INCL)\tile.h: $(WSHR)\tile.h - copy $(WSHR)\tile.h $@ - -$(INCL)\pctiles.h: $(MSYS)\pctiles.h - copy $(MSYS)\pctiles.h $@ - -$(INCL)\pcvideo.h: $(MSYS)\pcvideo.h - copy $(MSYS)\pcvideo.h $@ - -$(INCL)\portio.h: $(MSYS)\portio.h - copy $(MSYS)\portio.h $@ - # # Tile Mapping # -tile.c: tilemap.exe - @tilemap +tile.c: $(U)tilemap.exe + @$(subst /,\,$(U)tilemap.exe) @echo A new $@ has been created -tilemap.exe: tilemap.o - $(LINK) $(LFLAGS) -otilemap.exe tilemap.o - -tilemap.c: $(WSHR)\tilemap.c - copy $(WSHR)\tilemap.c . +$(U)tilemap.exe: $(O)tilemap.o + $(LINK) $(LFLAGS) -o$@ $(O)tilemap.o -tilemap.o: tilemap.c $(HACK_H) $(TILE_H) +$(O)tilemap.o: $(WSHR)/tilemap.c $(HACK_H) $(TILE_H) + $(CC) $(cflags) -I$(WSHR) -I$(MSYS) -o$@ $(WSHR)/tilemap.c # # Tile Utilities @@ -726,99 +780,84 @@ tilemap.o: tilemap.c $(HACK_H) $(TILE_H) # Required for tile support # -NetHack1.tib: $(TILEFILES) tile2bin.exe +$(O)NetHack1.tib: $(TILEFILES) $(U)tile2bin.exe @echo Creating binary tile files (this may take some time) @tile2bin -NetHacko.tib: thintile.tag $(TILEFILES2) til2bin2.exe +$(O)NetHacko.tib: $(O)thintile.tag $(TILEFILES2) $(U)til2bin2.exe @echo Creating overview binary tile files (this may take some time) @til2bin2 -tile2bin.exe: tile2bin.o $(TEXTIO) - $(LINK) $(LFLAGS) -otile2bin.exe tile2bin.o $(TEXTIO) +$(U)tile2bin.exe: $(O)tile2bin.o $(TEXTIO) + $(LINK) $(LFLAGS) -o$@ $(O)tile2bin.o $(TEXTIO) -til2bin2.exe: til2bin2.o $(TEXTIO2) - $(LINK) $(LFLAGS) -otil2bin2.exe til2bin2.o $(TEXTIO2) +$(U)til2bin2.exe: $(O)til2bin2.o $(TEXTIO2) + $(LINK) $(LFLAGS) -o$@ $(O)til2bin2.o $(TEXTIO2) -thintile.exe: thintile.o - $(LINK) $(LFLAGS) -othintile.exe thintile.o +$(U)thintile.exe: $(O)thintile.o + $(LINK) $(LFLAGS) -o$@ $(O)thintile.o -thintile.c: $(WSHR)\thintile.c - copy $(WSHR)\thintile.c . +$(O)thintile.o: $(HACK_H) $(WSHR)/tile.h $(WSHR)/thintile.c + $(CC) $(cflags) -o$@ $(WSHR)/thintile.c -thintile.o: $(HACK_H) $(INCL)\tile.h thintile.c - $(CC) $(CFLAGS) -o$@ thintile.c +$(O)thintile.tag: $(U)thintile.exe $(TILEFILES) + $(subst /,\,$(U)thintile.exe) + @$(subst /,\,echo thintiles created >$@) -thintile.tag: thintile.exe $(TILEFILES) - thintile - @echo thintiles created >thintile.tag +$(O)tile2bin.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/tile2bin.c -tile2bin.c: $(MSYS)\tile2bin.c - copy $(MSYS)\tile2bin.c . +$(O)til2bin2.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE_X=8 -DOVERVIEW_FILE -o$@ $(MSYS)/tile2bin.c -tile2bin.o: $(HACK_H) $(INCL)\tile.h $(INCL)\pctiles.h $(INCL)\pcvideo.h \ - tile2bin.c +$(O)tiletext.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tiletext.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(WSHR)/tiletext.c -til2bin2.o: $(HACK_H) $(INCL)\tile.h $(INCL)\pctiles.h $(INCL)\pcvideo.h \ - tile2bin.c - $(CC) $(CFLAGS) -DTILE_X=8 -DOVERVIEW_FILE -o$@ tile2bin.c +$(O)tiletex2.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tiletext.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE_X=8 -o$@ $(WSHR)/tiletext.c -tiletext.o: $(CONFIG_H) $(INCL)\tile.h $(WSHR)\tiletext.c - copy $(WSHR)\tiletext.c . - $(CC) $(CFLAGS) -o$@ tiletext.c - -tiletex2.o: $(CONFIG_H) $(INCL)\tile.h $(WSHR)\tiletext.c - copy $(WSHR)\tiletext.c . - $(CC) $(CFLAGS) -DTILE_X=8 -o$@ tiletext.c - -tiletxt.o: $(CONFIG_H) $(INCL)\tile.h tilemap.c - $(CC) $(CFLAGS) -DTILETEXT -o$@ tilemap.c +$(O)tiletxt.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tilemap.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILETEXT -o$@ $(WSHR)/tilemap.c -tiletxt2.o: $(CONFIG_H) $(INCL)\tile.h tilemap.c - $(CC) $(CFLAGS) -DTILETEXT -DTILE_X=8 -o$@ tilemap.c +$(O)tiletxt2.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tilemap.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILETEXT -DTILE_X=8 -o$@ $(WSHR)/tilemap.c # # Optional GIF Utilities (for development) # -gif2txt.exe: $(GIFREADERS) $(TEXTIO) - $(LINK) $(LFLAGS) -ogif2txt.exe $(GIFREADERS) $(TEXTIO) - -gif2txt2.exe: $(GIFREAD2) $(TEXTIO2) - $(LINK) $(LFLAGS) -ogif2txt2.exe $(GIFREAD2) $(TEXTIO2) +$(U)gif2txt.exe: $(GIFREADERS) $(TEXTIO) + $(LINK) $(LFLAGS) -o$@ $(GIFREADERS) $(TEXTIO) -txt2ppm.exe: $(PPMWRITERS) $(TEXTIO) - $(LINK) $(LFLAGS) -otxt2ppm.exe $(PPMWRITERS) $(TEXTIO) +$(U)gif2txt2.exe: $(GIFREAD2) $(TEXTIO2) + $(LINK) $(LFLAGS) -o$@ $(GIFREAD2) $(TEXTIO2) -txt2ppm2.exe: $(PPMWRIT2) $(TEXTIO2) - $(LINK) $(LFLAGS) -otxt2ppm2.exe $(PPMWRIT2) $(TEXTIO2) +$(U)txt2ppm.exe: $(PPMWRITERS) $(TEXTIO) + $(LINK) $(LFLAGS) -o$@ $(PPMWRITERS) $(TEXTIO) -gifread.c: $(WSHR)\gifread.c - copy $(WSHR)\gifread.c . +$(U)txt2ppm2.exe: $(PPMWRIT2) $(TEXTIO2) + $(LINK) $(LFLAGS) -o$@ $(PPMWRIT2) $(TEXTIO2) -gifread.o: $(CONFIG_H) $(INCL)\tile.h +$(O)gifread.o: $(CONFIG_H) $(WSHR)/tile.h $(WSHR)/gifread.c -gifread2.o: $(CONFIG_H) $(INCL)\tile.h gifread.c - $(CC) $(CFLAGS) -DTILE_X=8 -o$@ gifread.c +$(O)gifread2.o: $(CONFIG_H) $(WSHR)/tile.h $(WSHR)/gifread.c + $(CC) $(cflags) -DTILE_X=8 -o$@ $(WSHR)/gifread.c -ppmwrite.c: $(WSHR)\ppmwrite.c - copy $(WSHR)\ppmwrite.c . +ppmwrite.c: $(WSHR)/ppmwrite.c + copy $(WSHR)/ppmwrite.c . -ppmwrite.o: $(CONFIG_H) $(INCL)\tile.h +$(O)ppmwrite.o: $(CONFIG_H) $(WSHR)/tile.h -ppmwrit2.o: $(CONFIG_H) $(INCL)\tile.h ppmwrite.c - $(CC) $(CFLAGS) -DTILE_X=8 -o$@ ppmwrite.c +$(O)ppmwrit2.o: $(CONFIG_H) $(WSHR)/tile.h ppmwrite.c + $(CC) $(cflags) -DTILE_X=8 -o$@ ppmwrite.c # # Optional tile viewer (development sources only) # -viewtib.exe: viewtib.o - $(LINK) $(LFLAGS) -oviewtib.exe viewtib.o $(LIBRARIES) +$(U)viewtib.exe: $(O)viewtib.o + $(LINK) $(LFLAGS) -o$@ $(O)viewtib.o $(LIBRARIES) -viewtib.c: $(MSYS)\viewtib.c - copy $(MSYS)\viewtib.c . - -viewtib.o: viewtib.c +$(O)viewtib.o: $(MSYS)/viewtib.c endif @@ -826,132 +865,122 @@ endif # Other Util Dependencies. # -alloc.o: $(CONFIG_H) alloc.c - $(CC) $(CFLAGS) -oalloc.o alloc.c - -drawing.o: $(CONFIG_H) drawing.c $(INCL)\pcvideo.h - $(CC) $(CFLAGS) -odrawing.o drawing.c +$(O)alloc.o: $(CONFIG_H) alloc.c + $(CC) $(cflags) -o$@ alloc.c -decl.o: $(CONFIG_H) decl.c - $(CC) $(CFLAGS) -odecl.o decl.c +$(O)drawing.o: $(CONFIG_H) drawing.c $(MSYS)/pcvideo.h + $(CC) $(cflags) -I$(MSYS) -o$@ drawing.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 +$(O)decl.o: $(CONFIG_H) decl.c + $(CC) $(cflags) -o$@ decl.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 +$(O)monst.o: $(CONFIG_H) $(PERMONST_H) $(ESHK_H) \ + $(EPRI_H) $(VAULT_H) $(INCL)/monsym.h \ + $(INCL)/color.h monst.c + $(CC) $(cflags) -o$@ monst.c +$(O)objects.o: $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ + $(INCL)/prop.h $(INCL)/color.h objects.c + $(CC) $(cflags) -o$@ objects.c +$(O)panic.o: $(CONFIG_H) $(U)panic.c # # make data.base an 8.3 filename to prevent an nmake warning # -DATABASE = $(DAT)\data.bas +DATABASE = $(DAT)/data.bas -dat.tag: $(DAT)\nhdat - @echo dat done >dat.tag +$(O)dat.tag: $(DAT)/nhdat + @echo dat done >$@ -$(DAT)\data: utility.tag $(DATABASE) +$(DAT)/data: $(O)utility.tag $(DATABASE) makedefs -d -$(DAT)\rumors: utility.tag $(DAT)\rumors.tru $(DAT)\rumors.fal +$(DAT)/rumors: $(O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal makedefs -r -$(DAT)\quest.dat: utility.tag $(DAT)\quest.txt +$(DAT)/quest.dat: $(O)utility.tag $(DAT)/quest.txt makedefs -q -$(DAT)\oracles: utility.tag $(DAT)\oracles.txt +$(DAT)/oracles: $(O)utility.tag $(DAT)/oracles.txt makedefs -h -sp_lev.tag: utility.tag $(DAT)\bigroom.des $(DAT)\castle.des \ - $(DAT)\endgame.des $(DAT)\gehennom.des $(DAT)\knox.des \ - $(DAT)\medusa.des $(DAT)\oracle.des $(DAT)\tower.des \ - $(DAT)\yendor.des $(DAT)\arch.des $(DAT)\barb.des \ - $(DAT)\caveman.des $(DAT)\healer.des $(DAT)\knight.des \ - $(DAT)\monk.des $(DAT)\priest.des $(DAT)\ranger.des \ - $(DAT)\rogue.des $(DAT)\samurai.des $(DAT)\tourist.des \ - $(DAT)\valkyrie.des $(DAT)\wizard.des - copy $(SRC)\lev_comp.exe $(DAT)\lev_comp.exe - cd $(DAT) - lev_comp bigroom.des - lev_comp castle.des - lev_comp endgame.des - lev_comp gehennom.des - lev_comp knox.des - lev_comp mines.des - lev_comp medusa.des - lev_comp oracle.des - lev_comp sokoban.des - lev_comp tower.des - lev_comp yendor.des - lev_comp arch.des - lev_comp barb.des - lev_comp caveman.des - lev_comp healer.des - lev_comp knight.des - lev_comp monk.des - lev_comp priest.des - lev_comp ranger.des - lev_comp rogue.des - lev_comp samurai.des - lev_comp tourist.des - lev_comp valkyrie.des - lev_comp wizard.des - cd $(SRC) - 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 - cd $(SRC) +$(O)sp_lev.tag: $(O)utility.tag $(DAT)/bigroom.des $(DAT)/castle.des \ + $(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \ + $(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \ + $(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \ + $(DAT)/caveman.des $(DAT)/healer.des $(DAT)/knight.des \ + $(DAT)/monk.des $(DAT)/priest.des $(DAT)/ranger.des \ + $(DAT)/rogue.des $(DAT)/samurai.des $(DAT)/tourist.des \ + $(DAT)/valkyrie.des $(DAT)/wizard.des + $(subst /,\,cd $(DAT)) + $(subst /,\,$(U)lev_comp bigroom.des) + $(subst /,\,$(U)lev_comp castle.des) + $(subst /,\,$(U)lev_comp endgame.des) + $(subst /,\,$(U)lev_comp gehennom.des) + $(subst /,\,$(U)lev_comp knox.des) + $(subst /,\,$(U)lev_comp mines.des) + $(subst /,\,$(U)lev_comp medusa.des) + $(subst /,\,$(U)lev_comp oracle.des) + $(subst /,\,$(U)lev_comp sokoban.des) + $(subst /,\,$(U)lev_comp tower.des) + $(subst /,\,$(U)lev_comp yendor.des) + $(subst /,\,$(U)lev_comp arch.des) + $(subst /,\,$(U)lev_comp barb.des) + $(subst /,\,$(U)lev_comp caveman.des) + $(subst /,\,$(U)lev_comp healer.des) + $(subst /,\,$(U)lev_comp knight.des) + $(subst /,\,$(U)lev_comp monk.des) + $(subst /,\,$(U)lev_comp priest.des) + $(subst /,\,$(U)lev_comp ranger.des) + $(subst /,\,$(U)lev_comp rogue.des) + $(subst /,\,$(U)lev_comp samurai.des) + $(subst /,\,$(U)lev_comp tourist.des) + $(subst /,\,$(U)lev_comp valkyrie.des) + $(subst /,\,$(U)lev_comp wizard.des) + $(subst /,\,cd $(SRC)) + $(subst /,\,echo sp_levs done > $@) + +$(DAT)/dungeon: $(O)utility.tag $(DAT)/dungeon.def + $(subst /,\,$(U)makedefs.exe -e) + $(subst /,\,cd $(DAT)) + $(subst /,\,$(U)dgn_comp.exe dungeon.pdf) + $(subst /,\,cd $(SRC)) # # DLB stuff # #note that dir below assumes bin/dir.exe from djgpp distribution # -$(DAT)\nhdat: dlb_main.exe $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ - $(DAT)\oracles $(DAT)\quest.dat sp_lev.tag - @echo dat done >dat.tag - @cd $(DAT) - @copy $(MSYS)\msdoshlp.txt . - @echo data >dlb.lst - @echo dungeon >>dlb.lst - @echo oracles >>dlb.lst - @echo options >>dlb.lst - @echo quest.dat >>dlb.lst - @echo rumors >>dlb.lst - @echo help >>dlb.lst - @echo hh >>dlb.lst - @echo cmdhelp >>dlb.lst - @echo history >>dlb.lst - @echo opthelp >>dlb.lst - @echo wizhelp >>dlb.lst - @echo license >>dlb.lst - @echo msdoshlp.txt >>dlb.lst - $(LS) *.lev >>dlb.lst +$(DAT)/nhdat: $(DAT)/dlb_main.exe $(DAT)/data $(DAT)/rumors $(DAT)/dungeon \ + $(DAT)/oracles $(DAT)/quest.dat $(O)sp_lev.tag + @$(subst /,\,echo dat done >$(O)dat.tag) + @$(subst /,\,cd $(DAT)) + @$(subst /,\,copy $(MSYS)/msdoshlp.txt .) + @$(subst /,\,echo data >dlb.lst) + @$(subst /,\,echo dungeon >>dlb.lst) + @$(subst /,\,echo oracles >>dlb.lst) + @$(subst /,\,echo options >>dlb.lst) + @$(subst /,\,echo quest.dat >>dlb.lst) + @$(subst /,\,echo rumors >>dlb.lst) + @$(subst /,\,echo help >>dlb.lst) + @$(subst /,\,echo hh >>dlb.lst) + @$(subst /,\,echo cmdhelp >>dlb.lst) + @$(subst /,\,echo history >>dlb.lst) + @$(subst /,\,echo opthelp >>dlb.lst) + @$(subst /,\,echo wizhelp >>dlb.lst) + @$(subst /,\,echo license >>dlb.lst) + @$(subst /,\,echo msdoshlp.txt >>dlb.lst) + @$(subst /,\,$(LS) *.lev >>dlb.lst) dlb_main cvIf dlb.lst nhdat - @cd $(SRC) - -dlb_main.exe: $(DLBOBJS) - $(LINK) $(LFLAGS) -odlb_main.exe $(DLBOBJS) - @copy $@ $(DAT)\dlb_main.exe + @$(subst /,\,cd $(SRC)) +$(DAT)/dlb_main.exe: $(DLBOBJS) + $(LINK) $(LFLAGS) -o$@ $(DLBOBJS) -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 +$(O)dlb_main.o: $(U)dlb_main.c $(INCL)/config.h $(DLB_H) + $(CC) $(cflags) -o$@ $(U)dlb_main.c # Game Dependencies # Some files require movement as Gnu make doesn't like unix style '/' @@ -959,185 +988,285 @@ dlb_main.o: $(UTIL)\dlb_main.c $(INCL)\config.h $(DLB_H) # So we get to copy stuff where we might need it. Fun eh? # sys/share -main.o: $(HACK_H) $(DLB_H) $(SSHR)\pcmain.c - copy $(SSHR)\pcmain.c . - $(CC) $(CFLAGS) -o$@ pcmain.c +$(O)main.o: $(HACK_H) $(DLB_H) $(SSHR)/pcmain.c + $(CC) $(cflags) -o$@ $(SSHR)/pcmain.c -tty.o: $(HACK_H) $(INCL)\wintty.h $(SSHR)\pctty.c - copy $(SSHR)\pctty.c . - $(CC) $(CFLAGS) -o$@ pctty.c +$(O)tty.o: $(HACK_H) $(INCL)/wintty.h $(SSHR)/pctty.c + $(CC) $(cflags) -o$@ $(SSHR)/pctty.c -unix.o: $(HACK_H) $(SSHR)\pcunix.c - copy $(SSHR)\pcunix.c . - $(CC) $(CFLAGS) -o$@ pcunix.c +$(O)unix.o: $(HACK_H) $(SSHR)/pcunix.c + $(CC) $(cflags) -o$@ $(SSHR)/pcunix.c -sys.o : $(HACK_H) $(SSHR)\pcsys.c - copy $(SSHR)\pcsys.c . - $(CC) $(CFLAGS) -o$@ pcsys.c +$(O)sys.o : $(HACK_H) $(SSHR)/pcsys.c + $(CC) $(cflags) -o$@ $(SSHR)/pcsys.c # sys/msdos -msdos.o : $(HACK_H) $(MSYS)\msdos.c - copy $(MSYS)\msdos.c . - $(CC) $(CFLAGS) -o$@ msdos.c +$(O)msdos.o : $(HACK_H) $(MSYS)/msdos.c +# $(CC) $(cflags) -o$@ $(MSYS)/msdos.c -pckeys.o : $(HACK_H) $(MSYS)\pckeys.c - copy $(MSYS)\pckeys.c . - $(CC) $(CFLAGS) -o$@ pckeys.c +$(O)pckeys.o : $(HACK_H) $(MSYS)/pckeys.c +# $(CC) $(cflags) -o$@ $(MSYS)/pckeys.c -pctiles.o : $(HACK_H) $(MSYS)\pctiles.c $(INCL)\portio.h - copy $(MSYS)\pctiles.c . - $(CC) $(CFLAGS) -o$@ pctiles.c +$(O)pctiles.o : $(HACK_H) $(MSYS)/pctiles.c $(MSYS)/portio.h + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/pctiles.c -sound.o : $(HACK_H) $(MSYS)\sound.c $(INCL)\portio.h - copy $(MSYS)\sound.c . - $(CC) $(CFLAGS) -o$@ sound.c +$(O)sound.o : $(HACK_H) $(MSYS)/sound.c $(MSYS)/portio.h +# $(CC) $(cflags) -o$@ $(MSYS)/sound.c -video.o : $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h $(MSYS)\video.c - copy $(MSYS)\video.c . - $(CC) $(CFLAGS) -o$@ video.c +$(O)video.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(MSYS)/video.c +# $(CC) $(cflags) -o$@ -I$(MSYS) $(MSYS)/video.c -vidvga.o : $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h $(TILE_H) \ - $(MSYS)\vidvga.c - copy $(MSYS)\vidvga.c . - $(CC) $(CFLAGS) -o$@ vidvga.c +$(O)vidvga.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(TILE_H) $(MSYS)/vidvga.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/vidvga.c -vidtxt.o : $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h $(TILE_H) \ - $(MSYS)\vidtxt.c - copy $(MSYS)\vidtxt.c . - $(CC) $(CFLAGS) -o$@ vidtxt.c +$(O)vidtxt.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(TILE_H) $(MSYS)/vidtxt.c +# $(CC) $(cflags) -o$@ -I$(MSYS) $(MSYS)/vidtxt.c -stubvid.o : $(HACK_H) $(MSYS)\video.c - copy $(MSYS)\video.c . - $(CC) $(CFLAGS) -DSTUBVIDEO -o$@ video.c +$(O)stubvid.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/video.c + $(CC) $(cflags) -I$(MSYS) -DSTUBVIDEO -o$@ $(MSYS)/video.c -# win/tty -getline.o : $(HACK_H) $(INCL)\wintty.h $(WIN)\getline.c - copy $(WIN)\getline.c . - $(CC) $(CFLAGS) -o$@ getline.c - -termcap.o : $(CONFIG_H) $(WIN)\termcap.c - copy $(WIN)\termcap.c . - $(CC) $(CFLAGS) -o$@ termcap.c +# src dependencies -topl.o : $(CONFIG_H) $(WIN)\topl.c - copy $(WIN)\topl.c . - $(CC) $(CFLAGS) -o$@ topl.c +# +# The rest are stolen from sys/unix/Makefile.src, +# and -c (which is included in cflags) substituted +# with -o$@ , +# Also an explicit build instruction for dlb.o +# because it requires a .h file in ../sys/msdos. +# Other than that, these dependencies are 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 \ + $(INCL)/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)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)/patchlevel.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 \ + $(INCL)/patchlevel.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)gnaskstr.o: ../win/gnome/gnaskstr.c ../win/gnome/gnaskstr.h \ + ../win/gnome/gnmain.h + $(CC) $(cflags) $(GNOMEINC) -c ../win/gnome/gnaskstr.c +$(O)gnbind.o: ../win/gnome/gnbind.c ../win/gnome/gnbind.h ../win/gnome/gnmain.h \ + ../win/gnome/gnaskstr.h ../win/gnome/gnyesno.h + $(CC) $(cflags) $(GNOMEINC) -c ../win/gnome/gnbind.c +$(O)gnglyph.o: ../win/gnome/gnglyph.c ../win/gnome/gnglyph.h + $(CC) $(cflags) $(GNOMEINC) -c ../win/gnome/gnglyph.c +$(O)gnmain.o: ../win/gnome/gnmain.c ../win/gnome/gnmain.h ../win/gnome/gnsignal.h \ + ../win/gnome/gnbind.h ../win/gnome/gnopts.h $(HACK_H) \ + $(INCL)/date.h + $(CC) $(cflags) $(GNOMEINC) -c ../win/gnome/gnmain.c +$(O)gnmap.o: ../win/gnome/gnmap.c ../win/gnome/gnmap.h ../win/gnome/gnglyph.h \ + ../win/gnome/gnsignal.h $(HACK_H) + $(CC) $(cflags) $(GNOMEINC) -c ../win/gnome/gnmap.c +$(O)gnmenu.o: ../win/gnome/gnmenu.c ../win/gnome/gnmenu.h ../win/gnome/gnmain.h \ + ../win/gnome/gnbind.h + $(CC) $(cflags) $(GNOMEINC) -c ../win/gnome/gnmenu.c +$(O)gnmesg.o: ../win/gnome/gnmesg.c ../win/gnome/gnmesg.h ../win/gnome/gnsignal.h + $(CC) $(cflags) $(GNOMEINC) -c ../win/gnome/gnmesg.c +$(O)gnopts.o: ../win/gnome/gnopts.c ../win/gnome/gnopts.h ../win/gnome/gnglyph.h \ + ../win/gnome/gnmain.h ../win/gnome/gnmap.h $(HACK_H) + $(CC) $(cflags) $(GNOMEINC) -c ../win/gnome/gnopts.c +$(O)gnplayer.o: ../win/gnome/gnplayer.c ../win/gnome/gnplayer.h \ + ../win/gnome/gnmain.h $(HACK_H) + $(CC) $(cflags) $(GNOMEINC) -c ../win/gnome/gnplayer.c +$(O)gnsignal.o: ../win/gnome/gnsignal.c ../win/gnome/gnsignal.h \ + ../win/gnome/gnmain.h + $(CC) $(cflags) $(GNOMEINC) -c ../win/gnome/gnsignal.c +$(O)gnstatus.o: ../win/gnome/gnstatus.c ../win/gnome/gnstatus.h \ + ../win/gnome/gnsignal.h ../win/gnome/gn_xpms.h \ + ../win/gnome/gnomeprv.h + $(CC) $(cflags) $(GNOMEINC) -c ../win/gnome/gnstatus.c +$(O)gntext.o: ../win/gnome/gntext.c ../win/gnome/gntext.h ../win/gnome/gnmain.h \ + ../win/gnome/gn_rip.h + $(CC) $(cflags) $(GNOMEINC) -c ../win/gnome/gntext.c +$(O)gnyesno.o: ../win/gnome/gnyesno.c ../win/gnome/gnbind.h ../win/gnome/gnyesno.h + $(CC) $(cflags) $(GNOMEINC) -c ../win/gnome/gnyesno.c +$(O)wingem.o: ../win/gem/wingem.c $(HACK_H) $(INCL)/func_tab.h $(INCL)/dlb.h \ + $(INCL)/patchlevel.h $(INCL)/wingem.h + $(CC) $(cflags) -o$@ ../win/gem/wingem.c +$(O)wingem1.o: ../win/gem/wingem1.c $(INCL)/gem_rsc.h $(INCL)/load_img.h \ + $(INCL)/wintype.h $(INCL)/wingem.h + $(CC) $(cflags) -o$@ ../win/gem/wingem1.c +$(O)load_img.o: ../win/gem/load_img.c $(INCL)/load_img.h + $(CC) $(cflags) -o$@ ../win/gem/load_img.c +$(O)tile.o: tile.c $(HACK_H) +$(O)qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) $(INCL)/func_tab.h \ + $(INCL)/dlb.h $(INCL)/patchlevel.h $(INCL)/qt_win.h \ + $(INCL)/qt_clust.h $(INCL)/qt_kde0.h \ + $(INCL)/qt_xpms.h qt_win.moc qt_kde0.moc + $(CXX) $(CXXFLAGS) -c ../win/Qt/qt_win.cpp +$(O)qt_clust.o: ../win/Qt/qt_clust.cpp $(INCL)/qt_clust.h + $(CXX) $(CXXFLAGS) -c ../win/Qt/qt_clust.cpp +$(O)monstr.o: $(SRC)/monstr.c $(CONFIG_H) +$(O)vis_tab.o: $(SRC)/vis_tab.c $(CONFIG_H) $(INCL)/vis_tab.h +$(O)allmain.o: allmain.c $(HACK_H) +$(O)alloc.o: alloc.c $(CONFIG_H) +$(O)apply.o: apply.c $(HACK_H) $(INCL)/edog.h +$(O)artifact.o: artifact.c $(HACK_H) $(INCL)/artifact.h $(INCL)/artilist.h +$(O)attrib.o: attrib.c $(HACK_H) $(INCL)/artifact.h +$(O)ball.o: ball.c $(HACK_H) +$(O)bones.o: bones.c $(HACK_H) $(INCL)/lev.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) $(INCL)/edog.h +$(O)display.o: display.c $(HACK_H) +$(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)/dlb.h + $(CC) $(cflags) -I../sys/msdos -o$@ dlb.c +$(O)do.o: do.c $(HACK_H) $(INCL)/lev.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) $(INCL)/edog.h +$(O)dogmove.o: dogmove.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/edog.h +$(O)dokick.o: dokick.c $(HACK_H) $(INCL)/eshk.h +$(O)dothrow.o: dothrow.c $(HACK_H) +$(O)drawing.o: drawing.c $(HACK_H) $(INCL)/tcap.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)/eshk.h $(INCL)/dlb.h +$(O)engrave.o: engrave.c $(HACK_H) $(INCL)/lev.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)invent.o: invent.c $(HACK_H) $(INCL)/artifact.h +$(O)light.o: light.c $(HACK_H) $(INCL)/lev.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) $(INCL)/epri.h $(INCL)/emin.h \ + $(INCL)/edog.h +$(O)mapglyph.o: mapglyph.c $(HACK_H) +$(O)mcastu.o: mcastu.c $(HACK_H) +$(O)mhitm.o: mhitm.c $(HACK_H) $(INCL)/artifact.h $(INCL)/edog.h +$(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)/artifact.h $(INCL)/edog.h +$(O)minion.o: minion.c $(HACK_H) $(INCL)/emin.h $(INCL)/epri.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 $(INCL)/lev.h +$(O)mkobj.o: mkobj.c $(HACK_H) $(INCL)/artifact.h +$(O)mkroom.o: mkroom.c $(HACK_H) +$(O)mon.o: mon.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/edog.h +$(O)mondata.o: mondata.c $(HACK_H) $(INCL)/eshk.h $(INCL)/epri.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)/monsym.h \ + $(INCL)/dungeon.h $(INCL)/eshk.h $(INCL)/vault.h \ + $(INCL)/epri.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) $(INCL)/edog.h +$(O)music.o: music.c $(HACK_H) #interp.c +$(O)o_init.o: o_init.c $(HACK_H) $(INCL)/lev.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) $(INCL)/epri.h $(INCL)/edog.h +$(O)polyself.o: polyself.c $(HACK_H) +$(O)potion.o: potion.c $(HACK_H) +$(O)pray.o: pray.c $(HACK_H) $(INCL)/epri.h +$(O)priest.o: priest.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/eshk.h \ + $(INCL)/epri.h $(INCL)/emin.h +$(O)quest.o: quest.c $(HACK_H) $(INCL)/qtext.h +$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(INCL)/qtext.h +$(O)read.o: read.c $(HACK_H) +$(O)rect.o: rect.c $(HACK_H) +$(O)region.o: region.c $(HACK_H) $(INCL)/lev.h +$(O)restore.o: restore.c $(HACK_H) $(INCL)/lev.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)/lev.h $(INCL)/dlb.h +$(O)save.o: save.c $(HACK_H) $(INCL)/lev.h +$(O)shk.o: shk.c $(HACK_H) $(INCL)/eshk.h +$(O)shknam.o: shknam.c $(HACK_H) $(INCL)/eshk.h +$(O)sit.o: sit.c $(HACK_H) $(INCL)/artifact.h +$(O)sounds.o: sounds.c $(HACK_H) $(INCL)/edog.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)teleport.o: teleport.c $(HACK_H) +$(O)timeout.o: timeout.c $(HACK_H) $(INCL)/lev.h +$(O)topten.o: topten.c $(HACK_H) $(INCL)/dlb.h $(INCL)/patchlevel.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) $(INCL)/vault.h +$(O)version.o: version.c $(HACK_H) $(INCL)/date.h $(INCL)/patchlevel.h +$(O)vision.o: vision.c $(HACK_H) $(INCL)/vis_tab.h +$(O)weapon.o: weapon.c $(HACK_H) +$(O)were.o: were.c $(HACK_H) +$(O)wield.o: wield.c $(HACK_H) +$(O)windows.o: windows.c $(HACK_H) $(INCL)/wingem.h $(INCL)/winGnome.h +$(O)wizard.o: wizard.c $(HACK_H) $(INCL)/qtext.h +$(O)worm.o: worm.c $(HACK_H) $(INCL)/lev.h +$(O)worn.o: worn.c $(HACK_H) +$(O)write.o: write.c $(HACK_H) +$(O)zap.o: zap.c $(HACK_H) -wintty.o : $(HACK_H) $(WIN)\wintty.c - copy $(WIN)\wintty.c . - $(CC) $(CFLAGS) -o$@ wintty.c +# end of file -# 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) -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) -mapglyph.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) -rnd.o: $(HACK_H) -role.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) -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)\patchlev.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