1 # SCCS Id: @(#)Makefile.MSC 3.4 2002/09/10
2 # Copyright (c) NetHack PC Development Team 1997 - 2002.
3 # PC NetHack 3.3x Makefile for MSC V1.52c (16 bit compiler)
5 # For questions or comments: nethack-bugs@nethack.org
7 # In addition to your C compiler,
9 # if you want to change you will need a
10 # files with suffix workalike for
16 # Game Installation Variables
17 # NOTE: Make sure GAMEDIR exists before make is started.
43 # if you have a uudecode program, add its name here
44 # otherwise leave blank
48 # Yacc/Lex ... if you got 'em.
50 # If you have yacc/lex or a work-alike set YACC_LEX to Y
54 # If YACC_LEX is Y above, set the following to values appropriate for
65 # Uncomment this line if you want to include support for ALT-numeric
66 # sequences, such as ALT-2 for toggling #twoweapon mode.
67 # Note that this code did not get a thorough testing prior to 3.4.x
70 #############################################################################
72 # nothing below this line should have to be changed
78 # Controls whether MOVE tracing is enabled in the executable
79 # This should be left commented unless you are tinkering with the
80 # overlay structure of NetHack. The executable runs _very_
81 # slowly when the movetr.lib is linked in.
87 ! IF ("$(MOVETR)"!="")
94 # Uncomment the line below if you want to store all the level files,
95 # help files, etc. in a single library file.
99 ! IF ("$(USE_DLB)"=="Y")
105 LIBRARIES = $(LIBS) $(TERMLIB)
107 GAMEFILE = $(GAMEDIR)\$(GAME).exe
113 #CFLAGS = /Zi /DFUNCTION_LEVEL_LINKING /DUSE_TILES /DDLB
114 #LFLAGS = /CODEVIEW /NOI/MAP /CPARM:1 /INFO
117 LFLAGS = /NOI/MAP /CPARM:1 /INFO
118 CFLAGS = /DFUNCTION_LEVEL_LINKING /DUSE_TILES /DDLB
121 # Leaving MACHINE_CODE undefined will allow it to run
122 # on any Intel 8088 machines and above.
123 # Set to 1 for 80186 and above only
124 # Set to 2 for 80286 and above only
125 # Set to 3 for 80386 and above only
133 # Shorten up the location for some files
136 O = $(OBJ)\ # comment so \ isn't last char
138 U = $(UTIL)\ # comment so \ isn't last char
140 SPLEVDES = $(DAT)\Arch.des $(DAT)\Barb.des $(DAT)\bigroom.des \
141 $(DAT)\castle.des $(DAT)\Caveman.des $(DAT)\endgame.des \
142 $(DAT)\gehennom.des $(DAT)\Healer.des $(DAT)\Knight.des \
143 $(DAT)\knox.des $(DAT)\Monk.des $(DAT)\medusa.des \
144 $(DAT)\mines.des $(DAT)\oracle.des $(DAT)\Priest.des \
145 $(DAT)\Ranger.des $(DAT)\Rogue.des $(DAT)\Samurai.des \
146 $(DAT)\Tourist.des $(DAT)\tower.des $(DAT)\Valkyrie.des \
147 $(DAT)\Wizard.des $(DAT)\yendor.des
151 MAKESRC = $(U)makedefs.c
153 SPLEVSRC = $(U)lev_yacc.c $(U)lev_$(LEX).c $(U)lev_main.c \
156 DGNCOMPSRC = $(U)dgn_yacc.c $(U)dgn_$(LEX).c $(U)dgn_main.c
158 MAKEOBJS = makedefs.o monst.o objects.o
160 SPLEVOBJS = lev_yacc.o lev_$(LEX).o lev_main.o alloc.o \
161 monst.o objects.o panic.o \
162 drawing.o decl.o stubvid.o
164 DGNCOMPOBJS = dgn_yacc.o dgn_$(LEX).o dgn_main.o alloc.o \
167 RECOVOBJS = recover.o
170 # Tile related object files.
172 TILOBJ = tile.o pctiles.o $(VGAOBJ)
174 TEXTIO = tiletext.o tiletxt.o drawing.o decl.o monst.o objects.o stubvid.o
176 TEXTIO2 = tiletex2.o tiletxt2.o drawing.o decl.o monst.o objects.o stubvid.o
179 PLANAR_TIB = NetHack1.tib
181 OVERVIEW_TIB = NetHacko.tib
183 TILEUTIL = $(TILOBJ) tile2bin.exe til2bin2.exe $(PLANAR_TIB) $(OVERVIEW_TIB)
185 TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt
187 TILEFILES2 = $(WSHR)\monthin.txt $(WSHR)\objthin.txt $(WSHR)\oththin.txt
189 GIFREADERS = gifread.o alloc.o panic.o
191 GIFREAD2 = gifread2.o alloc.o panic.o
193 PPMWRITERS = ppmwrite.o alloc.o panic.o
195 PPMWRIT2 = ppmwrit2.o alloc.o panic.o
197 DLBOBJS = dlb_main.o dlb.o alloc.o panic.o
199 # Object files for the game itself.
201 VOBJ01 = allmain.o alloc.o apply.o artifact.o attrib.o
202 VOBJ02 = ball.o bones.o botl.o cmd.o dbridge.o
203 VOBJ03 = decl.o detect.o display.o do.o do_name.o
204 VOBJ04 = do_wear.o dog.o dogmove.o dokick.o dothrow.o
205 VOBJ05 = drawing.o dungeon.o eat.o end.o engrave.o
206 VOBJ06 = exper.o explode.o extralev.o files.o fountain.o
207 VOBJ07 = getline.o hack.o hacklib.o invent.o lock.o
208 VOBJ08 = mail.o main.o makemon.o mapglyph.o mcastu.o mhitm.o
209 VOBJ09 = mhitu.o minion.o mkmap.o mklev.o mkmaze.o
210 VOBJ10 = mkobj.o mkroom.o mon.o mondata.o monmove.o
211 VOBJ11 = monst.o monstr.o mplayer.o mthrowu.o muse.o
212 VOBJ12 = music.o o_init.o objects.o objnam.o options.o
213 VOBJ13 = pickup.o pline.o polyself.o potion.o quest.o
214 VOBJ14 = questpgr.o pager.o pray.o priest.o read.o
215 VOBJ15 = rect.o restore.o rip.o rnd.o role.o
216 VOBJ16 = rumors.o save.o shk.o shknam.o sit.o
217 VOBJ17 = sounds.o sp_lev.o spell.o steal.o steed.o
218 VOBJ18 = termcap.o timeout.o topl.o topten.o track.o
219 VOBJ19 = trap.o u_init.o uhitm.o vault.o vision.o
220 VOBJ20 = vis_tab.o weapon.o were.o wield.o windows.o
221 VOBJ21 = wintty.o wizard.o worm.o worn.o write.o
222 VOBJ22 = zap.o light.o dlb.o dig.o teleport.o
223 VOBJ23 = random.o region.o
225 SOBJ = msdos.o sound.o sys.o tty.o unix.o video.o \
230 VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
231 $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \
232 $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \
233 $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \
234 $(VOBJ21) $(VOBJ22) $(VOBJ23)
236 ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(VVOBJ)
242 DGN_FILE_H = $(INCL)\align.h $(INCL)\dgn_file.h
243 DUNGEON_H = $(INCL)\align.h $(INCL)\dungeon.h
244 EMIN_H = $(DUNGEON_H) $(INCL)\emin.h
245 EPRI_H = $(DUNGEON_H) $(INCL)\align.h $(INCL)\epri.h
246 ESHK_H = $(DUNGEON_H) $(INCL)\eshk.h
247 MONDATA_H = $(INCL)\align.h $(INCL)\mondata.h
248 MONST_H = $(INCL)\align.h $(INCL)\monst.h
249 PERMONST_H = $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\align.h \
251 RM_H = $(INCL)\align.h $(INCL)\rm.h
252 SP_LEV_H = $(INCL)\align.h $(INCL)\sp_lev.h
253 VAULT_H = $(DUNGEON_H) $(INCL)\vault.h
254 YOUPROP_H = $(PERMONST_H) $(MONDATA_H) $(INCL)\prop.h \
255 $(INCL)\pm.h $(INCL)\youprop.h
256 YOU_H = $(MONST_H) $(YOUPROP_H) $(INCL)\align.h \
257 $(INCL)\attrib.h $(INCL)\you.h
258 DISPLAY_H = $(MONDATA_H) $(INCL)\vision.h $(INCL)\display.h
259 PCCONF_H = $(INCL)\micro.h $(INCL)\system.h $(INCL)\pcconf.h \
261 CONFIG_H = $(GLOBAL_H) $(INCL)\tradstdc.h $(INCL)\config1.h \
263 DECL_H = $(YOU_H) $(INCL)\spell.h $(INCL)\color.h \
264 $(INCL)\obj.h $(INCL)\onames.h $(INCL)\pm.h \
266 GLOBAL_H = $(PCCONF_H) $(INCL)\coord.h $(INCL)\global.h
267 HACK_H = $(CONFIG_H) $(DUNGEON_H) $(DECL_H) \
268 $(DISPLAY_H) $(INCL)\monsym.h $(INCL)\mkroom.h \
269 $(INCL)\objclass.h $(INCL)\trap.h $(INCL)\flag.h \
270 $(RM_H) $(INCL)\vision.h $(INCL)\wintype.h \
271 $(INCL)\engrave.h $(INCL)\rect.h \
272 $(INCL)\trampoli.h $(INCL)\hack.h
273 DLB_H = $(INCL)\dlb.h
274 TILE_H = $(WSHR)\tile.h $(MSYS)\pctiles.h
278 # Due to the inadequacy of some makes these must accord with a
279 # topological sort of the generated-from relation... output on
280 # the left, input on the right. Trust me.
283 .SUFFIXES: .exe .o .til .uu .c .y .l
286 # Rules for files in src
291 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
294 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
296 {$(SRC)}.c{$(OBJ)}.o:
297 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
300 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
303 # Rules for files in sys\share
306 {$(SYS)}.c{$(OBJ)}.o:
307 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
310 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
313 # Rules for files in sys\msdos
316 {$(MSYS)}.c{$(OBJ)}.o:
317 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
320 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
322 {$(MSYS)}.h{$(INCL)}.h:
326 # Rules for files in util
329 {$(UTIL)}.c{$(OBJ)}.o:
330 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
333 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
336 # Rules for files in win\share
340 @@$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
342 {$(WSHR)}.c{$(OBJ)}.o:
343 @@$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
345 {$(WSHR)}.h{$(INCL)}.h:
348 {$(WSHR)}.txt{$(DAT)}.txt:
352 # Rules for files in win\tty
355 {$(WTTY)}.c{$(OBJ)}.o:
356 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
359 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $<
362 ! IF ("$(USE_DLB)"=="Y")
368 ########################################################
374 # The default make target (so just typing 'nmake' is useful).
376 default : envchk $(GAMEFILE)
378 # The default target.
380 $(GAME): $(O)utility.tag $(GAMEFILE)
381 @echo $(GAME) is up to date.
389 install: envchk $(GAME) $(O)install.tag
392 $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \
393 $(DAT)\oracles $(DAT)\quest.dat $(O)sp_lev.tag $(DLB)
394 ! IF ("$(USE_DLB)"=="Y")
395 copy $(SRC)\nhdat $(GAMEDIR)
396 copy $(DAT)\license $(GAMEDIR)
398 copy $(DAT)\*. $(GAMEDIR)
399 copy $(DAT)\*.dat $(GAMEDIR)
400 copy $(DAT)\*.lev $(GAMEDIR)
401 if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile
403 copy $(SSHR)\termcap $(GAMEDIR)
404 copy *.tib $(GAMEDIR)
405 copy $(SSHR)\NetHack.cnf $(GAMEDIR)\defaults.nh
406 copy $(MSYS)\NHAccess.nh $(GAMEDIR)
407 copy $(U)recover.exe $(GAMEDIR)
408 if exist $(DOC)\guideb*.txt copy $(DOC)\guideb*.txt $(GAMEDIR)
409 if exist $(DOC)\recover.txt copy $(DOC)\recover.txt $(GAMEDIR)
410 if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)
411 echo install done > $@
413 $(O)sp_lev.tag: $(O)utility.tag $(SPLEVDES)
415 $(U)lev_comp bigroom.des
416 $(U)lev_comp castle.des
417 $(U)lev_comp endgame.des
418 $(U)lev_comp gehennom.des
419 $(U)lev_comp knox.des
420 $(U)lev_comp mines.des
421 $(U)lev_comp medusa.des
422 $(U)lev_comp oracle.des
423 $(U)lev_comp sokoban.des
424 $(U)lev_comp tower.des
425 $(U)lev_comp yendor.des
426 $(U)lev_comp arch.des
427 $(U)lev_comp barb.des
428 $(U)lev_comp caveman.des
429 $(U)lev_comp healer.des
430 $(U)lev_comp knight.des
431 $(U)lev_comp monk.des
432 $(U)lev_comp priest.des
433 $(U)lev_comp ranger.des
434 $(U)lev_comp rogue.des
435 $(U)lev_comp samurai.des
436 $(U)lev_comp tourist.des
437 $(U)lev_comp valkyrie.des
438 $(U)lev_comp wizard.des
440 # -@if exist $(O)sp_lev.tag del $(O)sp_lev.tag
441 @echo sp_levs done >$(O)sp_lev.tag
443 $(O)utility.tag: $(INCL)\date.h $(INCL)\trap.h \
444 $(INCL)\onames.h $(INCL)\pm.h monstr.c vis_tab.c \
445 $(U)lev_comp.exe $(U)dgn_comp.exe $(U)recover.exe $(TILEUTIL)
446 -@if exist $(O)utility.tag del $(O)utility.tag
447 @echo utilities made > $@
449 tileutil: gif2txt.exe txt2ppm.exe
450 @echo Optional tile development utilities are up to date.
455 ! IF ("$(MACHINE_CODE)"!="")
456 @SET MC=/G$(MACHINE_CODE)
461 @echo CL Environment variable is defined as follows:
462 SET CL=/AL $(MC) /Oo /Gy /Gs /Gt14 /Zp1 /W0 /I$(INCL) /I$(MSYS) /I$(WSHR) /nologo /c
464 @echo Warning CL Environment variable is defined:
466 @echo Overriding that definition as follows:
467 SET CL=/AL $(MC) /Oo /Gy /Gs /Gt14 /Zp1 /W0 /I$(INCL) /I$(MSYS) /I$(WSHR) /nologo /c
472 $(GAMEFILE) : $(LNKOPT) $(ALLOBJ)
474 $(LINK) $(LFLAGS) /SE:1000 /DYNAMIC:2135 /NOE /ST:6000 @<<$(GAME).lnk
479 $(TERMLIB) $(MOVETR) $(CLIB) $(BCOVL) $(BCMDL)
482 @if exist $(O)install.tag del $(O)install.tag
483 @if exist $(GAMEDIR)\$(GAME).bak del $(GAMEDIR)\$(GAME).bak
495 if exist $(O)utility.tag del $(O)utility.tag
496 if exist $(O)install.tag del $(O)install.tag
497 if exist $(GAME).lnk del $(GAME).lnk
498 if exist $(U)makedefs.exe del $(U)makedefs.exe
499 if exist $(U)lev_comp.exe del $(U)lev_comp.exe
500 if exist $(U)dgn_comp.exe del $(U)dgn_comp.exe
501 if exist $(SRC)\lev_lex.c del $(SRC)\lev_lex.c
502 if exist $(SRC)\lev_yacc.c del $(SRC)\lev_yacc.c
503 if exist $(SRC)\dgn_lex.c del $(SRC)\dgn_lex.c
504 if exist $(SRC)\dgn_yacc.c del $(SRC)\dgn_yacc.c
505 if exist $(U)recover.exe del $(U)recover.exe
506 if exist $(INCL)\onames.h del $(INCL)\onames.h
507 if exist $(INCL)\pm.h del $(INCL)\pm.h
508 if exist $(INCL)\vis_tab.h del $(INCL)\vis_tab.h
509 if exist $(INCL)\pcvideo.h del $(INCL)\pcvideo.h
510 if exist $(MSYS)\pctiles.h del $(MSYS)\pctiles.h
511 if exist $(INCL)\portio.h del $(MSYS)\portio.h
512 if exist $(WSHR)\tile.h del $(WSHR)\tile.h
513 if exist monstr.c del monstr.c
514 if exist vis_tab.c del vis_tab.c
515 if exist $(SRC)\panic.c del $(SRC)\panic.c
516 if exist $(SRC)\makedefs.c del $(SRC)\makedefs.c
517 if exist $(SRC)\recover.c del $(SRC)\recover.c
518 if exist $(SRC)\lev_main.c del $(SRC)\lev_main.c
519 if exist $(SRC)\dlb_main.c del $(SRC)\dlb_main.c
520 if exist $(SRC)\dgn_main.c del $(SRC)\dgn_main.c
521 if exist $(SRC)\wintty.c del $(SRC)\wintty.c
522 if exist $(SRC)\topl.c del $(SRC)\topl.c
523 if exist $(SRC)\getline.c del $(SRC)\getline.c
524 if exist $(SRC)\termcap.c del $(SRC)\termcap.c
525 if exist $(SRC)\tile2bin.c del $(SRC)\tile2bin.c
526 if exist $(SRC)\msdos.c del $(SRC)\msdos.c
527 if exist $(SRC)\pckeys.c del $(SRC)\pckeys.c
528 if exist $(SRC)\video.c del $(SRC)\video.c
529 if exist $(SRC)\sound.c del $(SRC)\sound.c
530 if exist $(SRC)\tilemap.c del $(SRC)\tilemap.c
531 if exist $(SRC)\gifread.c del $(SRC)\gifread.c
532 if exist $(SRC)\ppmwrite.c del $(SRC)\ppmwrite.c
533 if exist $(SRC)\pcmain.c del $(SRC)\pcmain.c
534 if exist $(SRC)\pcunix.c del $(SRC)\pcunix.c
535 if exist $(SRC)\pcsys.c del $(SRC)\pcsys.c
536 if exist $(SRC)\pctty.c del $(SRC)\pctty.c
537 if exist $(SRC)\tile.c del $(SRC)\tile.c
538 if exist $(INCL)\date.h del $(INCL)\date.h
539 if exist $(INCL)\onames.h del $(INCL)\onames.h
540 if exist $(INCL)\pm.h del $(INCL)\pm.h
541 if exist $(INCL)\vis_tab.h del $(INCL)\vis_tab.h
542 if exist vis_tab.c del vis_tab.c
543 if exist *.lnk del *.lnk
544 if exist *.def del *.def
545 if exist *.map del *.map
546 if exist a.out del a.out
547 if exist tilemap.exe del tilemap.exe
548 if exist tile2bin.exe del tile2bin.exe
549 if exist $(DAT)\data del $(DAT)\data
550 if exist $(DAT)\*.lev del $(DAT)\*.lev
551 if exist $(DAT)\data del $(DAT)\data
552 if exist $(DAT)\dungeon del $(DAT)\dungeon
553 if exist $(DAT)\options del $(DAT)\options
554 if exist $(DAT)\oracles del $(DAT)\oracles
555 if exist $(DAT)\rumors del $(DAT)\rumors
556 if exist $(DAT)\quest.dat del $(DAT)\quest.dat
557 if exist $(SRC)\nhdat del $(SRC)\nhdat
558 if exist $(DAT)\dlb.lst del $(DAT)\dlb.lst
559 if exist $(DAT)\msdoshlp.txt del $(DAT)\msdoshlp.txt
560 if exist $(DAT)\dlb_main.exe del $(DAT)\dlb_main.exe
561 if exist $(DAT)\lev_comp.exe del $(DAT)\lev_comp.exe
562 if exist $(DAT)\dgn_comp.exe del $(DAT)\dgn_comp.exe
563 if exist $(O)sp_lev.tag del $(O)sp_lev.tag
564 if exist $(PLANAR_TIB) del $(PLANAR_TIB)
565 if exist $(OVERVIEW_TIB) del $(OVERVIEW_TIB)
575 $(U)makedefs.exe: $(MAKEOBJS)
577 @$(LINK) $(LFLAGS) @<<$(@B).lnk
585 makedefs.o: $(CONFIG_H) $(PERMONST_H) $(INCL)\objclass.h \
586 $(INCL)\monsym.h $(INCL)\qtext.h $(UTIL)\makedefs.c
588 # The following include files depend on makedefs to be created.
590 # date.h should be remade every time any of the source or include
594 $(INCL)\date.h : $(U)makedefs.exe
597 $(INCL)\onames.h: $(U)makedefs.exe
600 $(INCL)\pm.h: $(U)makedefs.exe
603 monstr.c: $(U)makedefs.exe
606 $(INCL)\vis_tab.h: $(U)makedefs.exe
609 vis_tab.c: $(U)makedefs.exe
613 # Level Compiler Stuff
616 $(U)lev_comp.exe: $(SPLEVOBJS)
618 @$(LINK) $(LFLAGS) @<<$(@B).lnk
626 $(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h $(U)lev_yacc.c
628 $(O)lev_$(LEX).o: $(HACK_H) $(INCL)\lev_comp.h $(SP_LEV_H) \
631 $(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H)
633 $(U)lev_yacc.c $(INCL)\lev_comp.h : $(U)lev_comp.y
634 ! IF "$(DO_YACC)"=="YACC_ACT"
635 $(YACC) -d -l $(U)lev_comp.y
636 copy $(YTABC) $(U)lev_yacc.c
637 copy $(YTABH) $(INCL)\lev_comp.h
642 @echo $(U)lev_comp.y has changed.
643 @echo To update $(U)lev_yacc.c and $(INCL)\lev_comp.h run $(YACC).
645 @echo For now, we will copy the prebuilt lev_yacc.c
646 @echo from $(SSHR) to $(U)lev_yacc.c, and copy the prebuilt
647 @echo lev_comp.h from $(SYS) to $(UTIL)\lev_comp.h
650 copy $(SSHR)\lev_yacc.c $@ >nul
652 copy $(SSHR)\lev_comp.h $(INCL)\lev_comp.h >nul
653 touch $(INCL)\lev_comp.h
656 $(U)lev_$(LEX).c: $(U)lev_comp.l
657 ! IF "$(DO_LEX)"=="LEX_ACT"
658 $(LEX) $(FLEXSKEL) $(U)lev_comp.l
663 @echo $(U)lev_comp.l has changed. To update $@ run $(LEX).
665 @echo For now, we will copy a prebuilt lev_lex.c
666 @echo from $(SSHR) to $@ and use it.
668 copy $(SSHR)\lev_lex.c $@ >nul
676 $(U)dgn_comp.exe: $(DGNCOMPOBJS)
678 @$(LINK) $(LFLAGS) @<<$(@B).lnk
686 $(O)dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h \
689 $(O)dgn_$(LEX).o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h \
692 $(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c
694 $(U)dgn_yacc.c $(INCL)\dgn_comp.h : $(U)dgn_comp.y
695 ! IF "$(DO_YACC)"=="YACC_ACT"
696 $(YACC) -d -l $(U)dgn_comp.y
697 copy $(YTABC) $(U)dgn_yacc.c
698 copy $(YTABH) $(INCL)\dgn_comp.h
703 @echo $(U)dgn_comp.y has changed. To update $@ and
704 @echo $(INCL)\dgn_comp.h run $(YACC).
706 @echo For now, we will copy the prebuilt dgn_yacc.c from
707 @echo $(SSHR) to $(U)dgn_yacc.c, and copy the prebuilt
708 @echo dgn_comp.h from $(SSHR) to $(INCL)\dgn_comp.h
711 copy $(SSHR)\dgn_yacc.c $@ >nul
713 copy $(SSHR)\dgn_comp.h $(INCL)\dgn_comp.h >nul
714 touch $(INCL)\dgn_comp.h
717 $(U)dgn_$(LEX).c: $(U)dgn_comp.l
718 ! IF "$(DO_LEX)"=="LEX_ACT"
719 $(LEX) $(FLEXSKEL) $(U)dgn_comp.l
724 @echo $(U)dgn_comp.l has changed. To update $@ run $(LEX).
726 @echo For now, we will copy a prebuilt dgn_lex.c
727 @echo from $(SSHR) to $@ and use it.
729 copy $(SSHR)\dgn_lex.c $@ >nul
737 $(U)recover.exe: $(RECOVOBJS)
739 @$(LINK) $(LFLAGS) @<<$(@B).lnk
747 recover.o: $(CONFIG_H) $(UTIL)\recover.c
750 # Header file moves required for tile support
753 #$(WSHR)\tile.h: $(WSHR)\tile.h
754 # copy $(WSHR)\tile.h $@
756 #$(MSYS)\pctiles.h: $(MSYS)\pctiles.h
757 # copy $(MSYS)\pctiles.h $@
759 #$(INCL)\pcvideo.h: $(MSYS)\pcvideo.h
760 # copy $(MSYS)\pcvideo.h $@
762 #$(MSYS)\portio.h: $(MSYS)\portio.h
763 # copy $(MSYS)\portio.h $@
771 @echo A new $@ has been created
773 tilemap.exe: tilemap.o
775 @$(LINK) $(LFLAGS) @<<$(@B).lnk
782 tilemap.c: $(WSHR)\tilemap.c
783 copy $(WSHR)\tilemap.c .
785 tilemap.o: tilemap.c $(HACK_H) $(TILE_H)
791 # Required for tile support
794 NetHack1.tib: $(TILEFILES) tile2bin.exe
795 @echo Creating binary tile files (this may take some time)
798 NetHacko.tib: thintile.tag $(TILEFILES2) til2bin2.exe
799 @echo Creating overview binary tile files (this may take some time)
802 tile2bin.exe: tile2bin.o $(TEXTIO)
803 @$(LINK) $(LFLAGS) tile2bin.o $(TEXTIO),$@,$(@B);
805 til2bin2.exe: til2bin2.o $(TEXTIO2)
806 @$(LINK) $(LFLAGS) til2bin2.o $(TEXTIO2),$@,$(@B);
808 thintile.exe: thintile.o
809 @$(LINK) $(LFLAGS) thintile.o,$@,$(@B);
811 thintile.o: $(HACK_H) $(WSHR)\tile.h $(WSHR)\thintile.c
813 thintile.tag: thintile.exe $(TILEFILES)
815 @echo thintiles created >thintile.tag
817 tile2bin.o: $(HACK_H) $(WSHR)\tile.h $(MSYS)\pctiles.h $(MSYS)\pcvideo.h \
820 til2bin2.o: $(HACK_H) $(WSHR)\tile.h $(MSYS)\pctiles.h $(MSYS)\pcvideo.h \
822 -@$(CC) $(CFLAGS) $(SPECOPTS) -DTILE_X=8 -DOVERVIEW_FILE /Zg $(MSYS)\tile2bin.c >$(@B).pro
823 @$(CC) $(CFLAGS) $(SPECOPTS) -DTILE_X=8 -DOVERVIEW_FILE /Fo$@ $(MSYS)\tile2bin.c
825 tiletext.o: $(CONFIG_H) $(WSHR)\tile.h $(WSHR)\tiletext.c
827 tiletex2.o: $(CONFIG_H) $(WSHR)\tile.h $(WSHR)\tiletext.c
828 -@$(CC) $(CFLAGS) $(SPECOPTS) -DTILE_X=8 /Zg $(WSHR)\tiletext.c >$(@B).pro
829 @$(CC) $(CFLAGS) $(SPECOPTS) -DTILE_X=8 /Fo$@ $(WSHR)\tiletext.c
831 tiletxt.o: $(CONFIG_H) $(WSHR)\tile.h tilemap.c
832 -@$(CC) $(CFLAGS) $(SPECOPTS) -DTILETEXT /Zg tilemap.c >$(@B).pro
833 @$(CC) $(CFLAGS) $(SPECOPTS) -DTILETEXT /Fo$@ tilemap.c
835 tiletxt2.o: $(CONFIG_H) $(WSHR)\tile.h tilemap.c
836 -@$(CC) $(CFLAGS) $(SPECOPTS) -DTILETEXT /Zg tilemap.c >$(@B).pro
837 @$(CC) $(CFLAGS) $(SPECOPTS) -DTILETEXT -DTILE_X=8 /Fo$@ tilemap.c
839 # Optional GIF Utilities (for development)
842 gif2txt.exe: $(GIFREADERS) $(TEXTIO)
843 @$(LINK) $(LFLAGS) $(GIFREADERS) $(TEXTIO),$@,$(@B);
845 gif2txt2.exe: $(GIFREAD2) $(TEXTIO2)
846 @$(LINK) $(LFLAGS) $(GIFREAD2) $(TEXTIO2),$@,$(@B);
848 txt2ppm.exe: $(PPMWRITERS) $(TEXTIO)
849 @$(LINK) $(LFLAGS) $(PPMWRITERS) $(TEXTIO),$@,$(@B);
851 txt2ppm2.exe: $(PPMWRIT2) $(TEXTIO2)
852 @$(LINK) $(LFLAGS) $(PPMWRIT2) $(TEXTIO2),$@,$(@B);
854 gifread.o: $(CONFIG_H) $(WSHR)\tile.h
856 gifread2.o: $(CONFIG_H) $(WSHR)\tile.h $(WSHR)\gifread.c
857 -@$(CC) $(CFLAGS) $(SPECOPTS) -DTILE_X=8 /Zg gifread.c >$(@B).pro
858 @$(CC) $(CFLAGS) $(SPECOPTS) -DTILE_X=8 $(WSHR)\gifread.c
860 ppmwrite.o: $(CONFIG_H) $(WSHR)\tile.h $(WSHR)\ppmwrite.c
862 ppmwrit2.o: $(CONFIG_H) $(WSHR)\tile.h $(WSHR)\ppmwrite.c
863 -@$(CC) $(CFLAGS) $(SPECOPTS) -DTILE_X=8 /Zg ppmwrite.c >$(@B).pro
864 @$(CC) $(CFLAGS) $(SPECOPTS) -DTILE_X=8 $(WSHR)\ppmwrite.c
867 # Optional tile viewer (development sources only)
870 viewtib.exe: viewtib.o
871 @$(LINK) $(LFLAGS) -oviewtib.exe viewtib.o $(LIBRARIES)
873 viewtib.o: $(MSYS)\viewtib.c
876 # Other Util Dependencies.
879 alloc.o: $(CONFIG_H) alloc.c
880 drawing.o: $(CONFIG_H) drawing.c $(MSYS)\pcvideo.h
881 decl.o: $(CONFIG_H) decl.c
882 monst.o: $(CONFIG_H) $(PERMONST_H) $(ESHK_H) \
883 $(EPRI_H) $(VAULT_H) $(INCL)\monsym.h \
884 $(INCL)\color.h monst.c
886 objects.o: $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \
887 $(INCL)\prop.h $(INCL)\color.h objects.c
889 panic.o: $(CONFIG_H) $(UTIL)\panic.c
894 # make data.base an 8.3 filename to prevent an nmake warning
897 DATABASE = $(DAT)\data.bas
899 $(DAT)\data: $(O)utility.tag $(DATABASE)
902 $(DAT)\rumors: $(O)utility.tag $(DAT)\rumors.tru $(DAT)\rumors.fal
905 $(DAT)\quest.dat: $(O)utility.tag $(DAT)\quest.txt
908 $(DAT)\oracles: $(O)utility.tag $(DAT)\oracles.txt
911 $(DAT)\dungeon: $(O)utility.tag $(DAT)\dungeon.def
914 $(U)dgn_comp dungeon.pdf
921 nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(DAT)\options \
922 $(DAT)\quest.dat $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp \
923 $(DAT)\history $(DAT)\opthelp $(DAT)\wizhelp $(DAT)\dungeon \
924 $(DAT)\license $(O)sp_lev.tag
925 @copy $(MSYS)\msdoshlp.txt $(DAT)
928 @echo oracles >>dlb.lst
929 @echo options >>dlb.lst
930 @echo quest.dat >>dlb.lst
931 @echo rumors >>dlb.lst
934 @echo cmdhelp >>dlb.lst
935 @echo history >>dlb.lst
936 @echo opthelp >>dlb.lst
937 @echo wizhelp >>dlb.lst
938 @echo dungeon >>dlb.lst
939 @echo license >>dlb.lst
940 @echo msdoshlp.txt >>dlb.lst
941 @for %%N in (*.lev) do echo %%N >>dlb.lst
942 $(U)dlb_main cvIf dlb.lst $(SRC)\nhdat
945 $(U)dlb_main.exe: $(DLBOBJS)
946 link $(LFLAGS) /ST:5120 $(DLBOBJS),$@,$(@B);
948 dlb_main.o: $(U)dlb_main.c $(INCL)\config.h $(DLB_H)
949 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(U)dlb_main.c
954 main.o: $(SSHR)\pcmain.c $(HACK_H) $(INCL)\dlb.h \
956 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(SSHR)\pcmain.c
957 sys.o: $(SSHR)\pcsys.c $(HACK_H)
958 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(SSHR)\pcsys.c
959 tty.o: $(SSHR)\pctty.c $(HACK_H)
960 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(SSHR)\pctty.c
961 unix.o: $(SSHR)\pcunix.c $(HACK_H)
962 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(SSHR)\pcunix.c
963 random.o: $(SSHR)\random.c $(HACK_H)
964 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(SSHR)\random.c
967 msdos.o : $(HACK_H) $(MSYS)\msdos.c
968 @$(CC) $(CFLAGS) $(SPECOPTS) $(NEWALT) /Fo$@ $(MSYS)\msdos.c
969 pckeys.o : $(HACK_H) $(MSYS)\pckeys.c
970 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(MSYS)\pckeys.c
971 pctiles.o : $(HACK_H) $(MSYS)\pctiles.c $(MSYS)\portio.h
972 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(MSYS)\pctiles.c
973 sound.o : $(HACK_H) $(MSYS)\sound.c $(MSYS)\portio.h
974 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(MSYS)\sound.c
975 video.o : $(HACK_H) $(MSYS)\pcvideo.h $(MSYS)\portio.h $(MSYS)\video.c
976 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(MSYS)\video.c
977 vidvga.o : $(HACK_H) $(MSYS)\pcvideo.h $(MSYS)\portio.h $(TILE_H) \
979 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(MSYS)\vidvga.c
980 vidtxt.o : $(HACK_H) $(MSYS)\pcvideo.h $(MSYS)\portio.h $(TILE_H) \
982 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(MSYS)\vidtxt.c
983 stubvid.o : $(HACK_H) $(MSYS)\video.c
984 @$(CC) $(CFLAGS) $(SPECOPTS) -DSTUBVIDEO /Fo$@ $(MSYS)\video.c
987 getline.o: $(WIN)\getline.c $(HACK_H) $(INCL)\func_tab.h
988 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(WIN)\getline.c
989 termcap.o: $(WIN)\termcap.c $(HACK_H) $(INCL)\tcap.h
990 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(WIN)\termcap.c
991 topl.o: $(WIN)\topl.c $(HACK_H) $(INCL)\tcap.h
992 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(WIN)\topl.c
993 wintty.o: $(WIN)\wintty.c $(HACK_H) $(INCL)\dlb.h \
994 $(INCL)\patchlev.h $(INCL)\tcap.h
995 @$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(WIN)\wintty.c
998 allmain.o: allmain.c $(HACK_H)
999 alloc.o: alloc.c $(CONFIG_H)
1000 apply.o: apply.c $(HACK_H) $(INCL)\edog.h
1001 artifact.o: artifact.c $(HACK_H) $(INCL)\artifact.h $(INCL)\artilist.h
1002 attrib.o: attrib.c $(HACK_H) $(INCL)\artifact.h
1003 ball.o: ball.c $(HACK_H)
1004 bones.o: bones.c $(HACK_H) $(INCL)\lev.h
1005 botl.o: botl.c $(HACK_H)
1006 cmd.o: cmd.c $(HACK_H) $(INCL)\func_tab.h
1007 dbridge.o: dbridge.c $(HACK_H)
1008 decl.o: decl.c $(HACK_H)
1009 detect.o: detect.c $(HACK_H) $(INCL)\artifact.h
1010 dig.o: dig.c $(HACK_H) $(INCL)\edog.h
1011 display.o: display.c $(HACK_H)
1012 dlb.o: dlb.c $(CONFIG_H) $(INCL)\dlb.h
1013 do.o: do.c $(HACK_H) $(INCL)\lev.h
1014 do_name.o: do_name.c $(HACK_H)
1015 do_wear.o: do_wear.c $(HACK_H)
1016 dog.o: dog.c $(HACK_H) $(INCL)\edog.h
1017 dogmove.o: dogmove.c $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h
1018 dokick.o: dokick.c $(HACK_H) $(INCL)\eshk.h
1019 dothrow.o: dothrow.c $(HACK_H)
1020 drawing.o: drawing.c $(HACK_H) $(INCL)\tcap.h
1021 dungeon.o: dungeon.c $(HACK_H) $(INCL)\dgn_file.h $(INCL)\dlb.h
1022 eat.o: eat.c $(HACK_H)
1023 end.o: end.c $(HACK_H) $(INCL)\eshk.h $(INCL)\dlb.h
1024 engrave.o: engrave.c $(HACK_H) $(INCL)\lev.h
1025 exper.o: exper.c $(HACK_H)
1026 explode.o: explode.c $(HACK_H)
1027 extralev.o: extralev.c $(HACK_H)
1028 files.o: files.c $(HACK_H) $(INCL)\dlb.h
1029 fountain.o: fountain.c $(HACK_H)
1030 hack.o: hack.c $(HACK_H)
1031 hacklib.o: hacklib.c $(HACK_H)
1032 invent.o: invent.c $(HACK_H) $(INCL)\artifact.h
1033 light.o: light.c $(HACK_H) $(INCL)\lev.h
1034 lock.o: lock.c $(HACK_H)
1035 mail.o: mail.c $(HACK_H) $(INCL)\mail.h
1036 makemon.o: makemon.c $(HACK_H) $(INCL)\epri.h $(INCL)\emin.h \
1038 mapglyph.o: mapglyph.c $(HACK_H)
1039 mcastu.o: mcastu.c $(HACK_H)
1040 mhitm.o: mhitm.c $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h
1041 mhitu.o: mhitu.c $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h
1042 minion.o: minion.c $(HACK_H) $(INCL)\emin.h $(INCL)\epri.h
1043 mklev.o: mklev.c $(HACK_H)
1044 mkmap.o: mkmap.c $(HACK_H) $(INCL)\sp_lev.h
1045 mkmaze.o: mkmaze.c $(HACK_H) $(INCL)\sp_lev.h $(INCL)\lev.h
1046 mkobj.o: mkobj.c $(HACK_H) $(INCL)\artifact.h
1047 mkroom.o: mkroom.c $(HACK_H)
1048 mon.o: mon.c $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h
1049 mondata.o: mondata.c $(HACK_H) $(INCL)\eshk.h $(INCL)\epri.h
1050 monmove.o: monmove.c $(HACK_H) $(INCL)\mfndpos.h $(INCL)\artifact.h
1051 monst.o: monst.c $(CONFIG_H) $(INCL)\permonst.h $(INCL)\align.h \
1052 $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\monsym.h \
1053 $(INCL)\dungeon.h $(INCL)\eshk.h $(INCL)\vault.h \
1054 $(INCL)\epri.h $(INCL)\color.h
1055 mplayer.o: mplayer.c $(HACK_H)
1056 mthrowu.o: mthrowu.c $(HACK_H)
1057 muse.o: muse.c $(HACK_H) $(INCL)\edog.h
1058 music.o: music.c $(HACK_H) #interp.c
1059 o_init.o: o_init.c $(HACK_H) $(INCL)\lev.h
1060 objects.o: objects.c $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \
1061 $(INCL)\prop.h $(INCL)\skills.h $(INCL)\color.h
1062 objnam.o: objnam.c $(HACK_H)
1063 options.o: options.c $(CONFIG_H) $(INCL)\objclass.h $(INCL)\flag.h \
1064 $(HACK_H) $(INCL)\tcap.h
1065 pager.o: pager.c $(HACK_H) $(INCL)\dlb.h
1066 @$(CC) $(CFLAGS) $(SPECOPTS) /f- /Od /Fo$@ pager.c
1067 pickup.o: pickup.c $(HACK_H)
1068 pline.o: pline.c $(HACK_H) $(INCL)\epri.h
1069 polyself.o: polyself.c $(HACK_H)
1070 potion.o: potion.c $(HACK_H)
1071 pray.o: pray.c $(HACK_H) $(INCL)\epri.h
1072 priest.o: priest.c $(HACK_H) $(INCL)\mfndpos.h $(INCL)\eshk.h \
1073 $(INCL)\epri.h $(INCL)\emin.h
1074 quest.o: quest.c $(HACK_H) $(INCL)\qtext.h
1075 questpgr.o: questpgr.c $(HACK_H) $(INCL)\dlb.h $(INCL)\qtext.h
1076 read.o: read.c $(HACK_H)
1077 rect.o: rect.c $(HACK_H)
1078 region.o: region.c $(HACK_H)
1079 restore.o: restore.c $(HACK_H) $(INCL)\lev.h $(INCL)\tcap.h
1080 rip.o: rip.c $(HACK_H)
1081 rnd.o: rnd.c $(HACK_H)
1082 role.o: role.c $(HACK_H)
1083 rumors.o: rumors.c $(HACK_H) $(INCL)\lev.h $(INCL)\dlb.h
1084 save.o: save.c $(HACK_H) $(INCL)\lev.h
1085 shk.o: shk.c $(HACK_H) $(INCL)\eshk.h
1086 shknam.o: shknam.c $(HACK_H) $(INCL)\eshk.h
1087 sit.o: sit.c $(HACK_H) $(INCL)\artifact.h
1088 sounds.o: sounds.c $(HACK_H) $(INCL)\edog.h
1089 sp_lev.o: sp_lev.c $(HACK_H) $(INCL)\dlb.h $(INCL)\sp_lev.h
1090 spell.o: spell.c $(HACK_H)
1091 steal.o: steal.c $(HACK_H)
1092 steed.o: steed.c $(HACK_H)
1093 teleport.o: teleport.c $(HACK_H)
1094 timeout.o: timeout.c $(HACK_H) $(INCL)\lev.h
1095 topten.o: topten.c $(HACK_H) $(INCL)\dlb.h $(INCL)\patchlev.h
1096 track.o: track.c $(HACK_H)
1097 trap.o: trap.c $(HACK_H)
1098 u_init.o: u_init.c $(HACK_H)
1099 uhitm.o: uhitm.c $(HACK_H)
1100 vault.o: vault.c $(HACK_H) $(INCL)\vault.h
1101 version.o: version.c $(HACK_H) $(INCL)\date.h $(INCL)\patchlev.h
1102 vision.o: vision.c $(HACK_H) $(INCL)\vis_tab.h
1103 weapon.o: weapon.c $(HACK_H)
1104 were.o: were.c $(HACK_H)
1105 wield.o: wield.c $(HACK_H)
1106 windows.o: windows.c $(HACK_H) $(INCL)\wingem.h
1107 wizard.o: wizard.c $(HACK_H) $(INCL)\qtext.h
1108 worm.o: worm.c $(HACK_H) $(INCL)\lev.h
1109 worn.o: worn.c $(HACK_H)
1110 write.o: write.c $(HACK_H)
1111 zap.o: zap.c $(HACK_H)