OSDN Git Service

41d74c3abd63e49372557f3b7fe48b08fee4ac34
[jnethack/source.git] / sys / winnt / Makefile.msc
1 # NetHack 3.6   Makefile.msc    $NHDT-Date: 1554784482 2019/04/09 04:34:42 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.153 $ */
2 #       Copyright (c) NetHack PC Development Team 1993-2019
3 #
4 #==============================================================================
5 # Build Tools Environment
6 #
7 #       NetHack 3.6.x Makefile for MS Visual Studio Visual C++ compiler
8 #  
9 #       Visual Studio Compilers Tested:
10 #            - Microsoft Visual Studio 2017 Community Edition
11 #            - Microsoft Visual Studio 2019 Community Edition
12 #
13 #==============================================================================
14 #   This is used for building two versions of NetHack:
15 #
16 #   A tty port utilizing the Win32 Console I/O subsystem, Console
17 #       NetHack.exe
18 #
19 #   A Win32 native port built on the Windows API, Graphical NetHack or
20 #       NetHackW.exe
21 #
22 #       In addition to your C compiler,
23 #
24 #       if you want to change           you will need a
25 #       files with suffix               workalike for
26 #              .y                           yacc   (such as bison)
27 #              .l                           lex    (such as flex)
28 #
29 #   If you have any questions read the sys/winnt/Install.nt file included 
30 #   with the distribution.
31 #========================================================================================
32 # BUILD DECISIONS SECTION
33 #
34 # There are currently only 4 decisions that you can choose to make, and none are 
35 # absolutely required because defaults are in place:
36 #       1. Where do you want your build to end up?
37 #       2. Do you want debug information in the executable?
38 #       3. Do you want to explicitly override auto-detection of a 32-bit or 64-bit target?
39 #       4. Do you want to include the optional curses port?
40 #
41 #-----------------------------------------------------------------------------------------
42 #=========================================================================================
43
44 #---------------------------------------------------------------
45 # 1. Where do you want the game to be built (which folder)?
46
47 GAMEDIR = ..\binary               # Default game build directory
48  
49 #---------------------------------------------------------------
50 # 2. Do you want debug information available to the executable?
51   
52 DEBUGINFO = Y
53
54 #---------------------------------------------------------------
55 # 3. This Makefile will attempt to auto-detect your selected target architecture
56 #    based on Visual Studio command prompt configuration settins etc.
57 #    However, if you want to manually override generation of a 
58 #    32-bit or 64-bit build target, you can uncomment the apppropriate
59 #    TARGET_CPU line below.
60 #
61 #TARGET_CPU=x64
62 #TARGET_CPU=x86
63
64 #---------------------------------------------------------------
65 # OPTIONAL - Curses window port support 
66 #
67 # 4. Uncomment these and set them appropriately if you want to
68 #    include curses port support alongside TTY support in your
69 #    NetHack.exe binary. 
70 #
71 #    You'll have to set PDCURSES_H to the correct location of the 
72 #    PDCurses header (.h) files and PDCURSES_C to the location
73 #    of your PDCurses C files.
74 #
75 #ADD_CURSES=Y
76 #PDCURSES_TOP=..\..\pdcurses
77 #
78 #==============================================================================
79 # This marks the end of the BUILD DECISIONS section.
80 #==============================================================================
81 #
82 #===============================================
83 #======= End of Modification Section ===========
84 #===============================================
85 #
86 ################################################
87 #                                              #
88 # Nothing below here should have to be changed.#
89 #                                              #
90 ################################################
91
92 #
93 #==============================================================================
94
95 #  Set the gamedir according to your preference.  
96 #  If not present prior to compilation it gets created.
97
98 #
99 #  Source directories.    Makedefs hardcodes these, don't change them.
100 #
101
102 INCL    = ..\include     # NetHack include files
103 DAT     = ..\dat         # NetHack data files
104 DOC     = ..\doc         # NetHack documentation files
105 UTIL    = ..\util        # Utility source
106 SRC     = ..\src         # Main source
107 SSYS    = ..\sys\share   # Shared system files
108 MSWSYS  = ..\sys\winnt   # mswin specific files
109 TTY     = ..\win\tty     # window port files (tty)
110 MSWIN   = ..\win\win32   # window port files (win32)
111 WCURSES = ..\win\curses  # window port files (curses) 
112 WSHR    = ..\win\share   # Tile support files 
113 JP      = ..\japanese    # JP
114
115 #
116 #  Object directory.
117 #
118
119 OBJ     = o
120
121 #
122 #==========================================
123 # Exe File Info.
124 #==========================================
125  
126 #        
127 #
128 # Optional high-quality BSD random number generation routines
129 # (see pcconf.h). Set to nothing if not used.
130 #
131
132 RANDOM  = $(OBJ)\random.o
133 #RANDOM =
134 BCRYPT=bcrypt.lib
135 WINPFLAG= -DTILES -DMSWIN_GRAPHICS -DWIN32CON
136
137 # To store all the level files,
138 # help files, etc. in a single library file.
139 # USE_DLB = Y is left uncommented
140
141 USE_DLB = Y
142
143 ! IF ("$(USE_DLB)"=="Y")
144 DLBFLG = -DDLB
145 ! ELSE
146 DLBFLG =
147 ! ENDIF
148
149 #
150 # If you defined ZLIB_COMP in include/config.h and you need
151 # to link with the zlib.lib library, uncomment the line below.
152 # If necessary, prefix explicit path information to the file name
153 # otherwise it assumes the NetHack src directory.
154 #
155
156 #ZLIB = zlib.lib
157
158
159 #==========================================
160 #================ MACROS ==================
161 #==========================================
162 # This section creates shorthand macros for many objects
163 # referenced later on in the Makefile.
164 #
165 #
166 # Shorten up the location for some files
167 #
168
169 O  = $(OBJ)^\
170
171 U  = $(UTIL)^\
172
173 #
174 # Utility Objects.
175 #
176
177 MAKESRC       = $(U)makedefs.c
178
179 MAKEOBJS      = $(O)makedefs.o $(O)monst.o $(O)objects.o
180
181 LEVCOMPOBJS   = $(O)lev_yacc.o  $(O)lev_lex.o   $(O)lev_main.o  \
182                 $(O)alloc.o $(O)decl.o  $(O)drawing.o   $(O)monst.o     $(O)objects.o   $(O)panic.o
183
184 DGNCOMPOBJS   = $(O)dgn_yacc.o  $(O)dgn_lex.o   $(O)dgn_main.o  \
185                 $(O)alloc.o     $(O)panic.o
186
187 RECOVOBJS      = $(O)recover.o
188
189 TILEFILES      = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt
190
191 #
192 # These are not invoked during a normal game build in 3.4
193 #
194 TEXT_IO        = $(O)tiletext.o $(O)tiletxt.o   $(O)drawing.o \
195                  $(O)decl.o     $(O)monst.o     $(O)objects.o
196
197 TEXT_IO32      = $(O)tilete32.o $(O)tiletx32.o $(O)drawing.o \
198                  $(O)decl.o     $(O)monst.o     $(O)objects.o
199
200 GIFREADERS     = $(O)gifread.o  $(O)alloc.o $(O)panic.o
201 GIFREADERS32   = $(O)gifrd32.o $(O)alloc.o $(O)panic.o
202
203 PPMWRITERS     = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o
204
205 #
206 #  Object files for the game itself.
207 #
208
209 VOBJ01 = $(O)allmain.o  $(O)alloc.o    $(O)apply.o    $(O)artifact.o
210 VOBJ02 = $(O)attrib.o   $(O)ball.o     $(O)bones.o    $(O)botl.o    
211 VOBJ03 = $(O)cmd.o      $(O)dbridge.o  $(O)decl.o     $(O)detect.o  
212 VOBJ04 = $(O)dig.o      $(O)display.o  $(O)do.o       $(O)do_name.o 
213 VOBJ05 = $(O)do_wear.o  $(O)dog.o      $(O)dogmove.o  $(O)dokick.o  
214 VOBJ06 = $(O)dothrow.o  $(O)drawing.o  $(O)dungeon.o  $(O)eat.o     
215 VOBJ07 = $(O)end.o      $(O)engrave.o  $(O)exper.o    $(O)explode.o 
216 VOBJ08 = $(O)extralev.o $(O)files.o    $(O)fountain.o $(O)hack.o    
217 VOBJ09 = $(O)hacklib.o  $(O)invent.o   $(O)light.o    $(O)lock.o    
218 VOBJ10 = $(O)mail.o     $(O)makemon.o  $(O)mapglyph.o $(O)mcastu.o  
219 VOBJ11 = $(O)mhitm.o    $(O)mhitu.o    $(O)minion.o   $(O)mklev.o   
220 VOBJ12 = $(O)mkmap.o    $(O)mkmaze.o   $(O)mkobj.o    $(O)mkroom.o  
221 VOBJ13 = $(O)mon.o      $(O)mondata.o  $(O)monmove.o  $(O)monstj.o  
222 VOBJ14 = $(O)mplayer.o  $(O)mthrowu.o  $(O)muse.o     $(O)isaac64.o
223 VOBJ15 = $(O)music.o    $(O)o_init.o   $(O)objectsj.o $(O)objnam.o  
224 VOBJ16 = $(O)options.o  $(O)pager.o    $(O)pickup.o   $(O)pline.o   
225 VOBJ17 = $(O)polyself.o $(O)potion.o   $(O)pray.o     $(O)priest.o  
226 VOBJ18 = $(O)quest.o    $(O)questpgr.o $(RANDOM)      $(O)read.o    
227 VOBJ19 = $(O)rect.o     $(O)region.o   $(O)restore.o  $(O)rip.o     
228 VOBJ20 = $(O)rnd.o      $(O)role.o     $(O)rumors.o   $(O)save.o    
229 VOBJ21 = $(O)shk.o      $(O)shknam.o   $(O)sit.o      $(O)sounds.o  
230 VOBJ22 = $(O)sp_lev.o   $(O)spell.o    $(O)steal.o    $(O)steed.o   
231 VOBJ23 = $(O)sys.o      $(O)teleport.o $(O)timeout.o  $(O)topten.o
232 VOBJ24 = $(O)track.o    $(O)trap.o     $(O)u_init.o   $(O)uhitm.o
233 VOBJ25 = $(O)vault.o    $(O)vis_tab.o  $(O)vision.o   $(O)weapon.o
234 VOBJ26 = $(O)were.o     $(O)wield.o    $(O)windows.o  $(O)wizard.o
235 VOBJ27 = $(O)worm.o     $(O)worn.o     $(O)write.o    $(O)zap.o
236 VOBJ28 = 
237 JOBJ   = $(O)jlib.o     $(O)jconj.o
238
239 DLBOBJ = $(O)dlb.o
240
241 REGEX  = $(O)cppregex.o
242
243 TTYOBJ = $(O)topl.o     $(O)getline.o  $(O)wintty.o
244
245 !IFNDEF ADD_CURSES
246 CURSESOBJ=
247 !ELSE
248 CURSESOBJ= $(O)cursdial.o $(O)cursinit.o $(O)cursinvt.o $(O)cursmain.o \
249            $(O)cursmesg.o $(O)cursmisc.o $(O)cursstat.o $(O)curswins.o
250 !ENDIF
251
252 SOBJ   = $(O)windmain.o $(O)winnt.o $(O)win10.o \
253         $(O)safeproc.o $(O)nhlan.o $(SOUND) 
254
255 OBJS   = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
256          $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \
257          $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \
258          $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \
259          $(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \
260          $(VOBJ26) $(VOBJ27) $(VOBJ28) $(VOBJ29) $(REGEX)  \
261          $(CURSESOBJ)
262
263 GUIOBJ  = $(O)mhaskyn.o $(O)mhdlg.o \
264         $(O)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \
265         $(O)mhmenu.o $(O)mhmsgwnd.o $(O)mhrip.o $(O)mhsplash.o \
266         $(O)mhstatus.o $(O)mhtext.o $(O)mswproc.o $(O)winhack.o
267
268 GUIHDR  = $(MSWIN)\mhaskyn.h $(MSWIN)\mhdlg.h $(MSWIN)\mhfont.h \
269         $(MSWIN)\mhinput.h $(MSWIN)\mhmain.h $(MSWIN)\mhmap.h $(MSWIN)\mhmenu.h \
270         $(MSWIN)\mhmsg.h $(MSWIN)\mhmsgwnd.h $(MSWIN)\mhrip.h $(MSWIN)\mhstatus.h \
271         $(MSWIN)\mhtext.h $(MSWIN)\resource.h $(MSWIN)\winMS.h
272
273 COMCTRL = comctl32.lib
274
275 KEYDLLS = $(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll $(GAMEDIR)\nhraykey.dll
276
277 TILEUTIL16  = $(UTIL)\tile2bmp.exe
278 TILEBMP16   = $(SRC)\tiles.bmp
279
280 TILEUTIL32  = $(UTIL)\til2bm32.exe
281 TILEBMP32   = $(SRC)\tiles32.bmp
282
283 SOUND = $(OBJ)\ntsound.o
284
285 VVOBJ  = $(O)version.o
286
287 ALLOBJ  = $(SOBJ) $(DLBOBJ)  $(WOBJ) $(OBJS) $(VVOBJ) $(JOBJ)
288
289 OPTIONS_FILE = $(DAT)\options
290
291 !IF "$(ADD_CURSES)" == "Y"      
292 #===============-=================================================
293 # PDCurses build macros
294 # Latest PDCurses from https://github.com/wmcbrine/PDCurses.git
295 #=================================================================
296
297 PDCURSES_CURSES_H       = $(PDCURSES_TOP)\curses.h
298 PDCURSES_CURSPRIV_H     = $(PDCURSES_TOP)\curspriv.h
299 PDCURSES_HEADERS        = $(PDCURSES_CURSES_H) $(PDCURSES_CURSPRIV_H)
300 PDCSRC                  = $(PDCURSES_TOP)\pdcurses
301 PDCWINCON               = $(PDCURSES_TOP)\wincon
302
303 PDCLIBOBJS = $(O)addch.o $(O)addchstr.o $(O)addstr.o $(O)attr.o $(O)beep.o \
304         $(O)bkgd.o $(O)border.o $(O)clear.o $(O)color.o $(O)delch.o $(O)deleteln.o \
305         $(O)getch.o $(O)getstr.o $(O)getyx.o $(O)inch.o $(O)inchstr.o \
306         $(O)initscr.o $(O)inopts.o $(O)insch.o $(O)insstr.o $(O)instr.o $(O)kernel.o \
307         $(O)keyname.o $(O)mouse.o $(O)move.o $(O)outopts.o $(O)overlay.o $(O)pad.o \
308         $(O)panel.o $(O)printw.o $(O)refresh.o $(O)scanw.o $(O)scr_dump.o $(O)scroll.o \
309         $(O)slk.o $(O)termattr.o $(O)touch.o $(O)util.o $(O)window.o $(O)debug.o
310
311 PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o $(O)pdcscrn.o \
312         $(O)pdcsetsc.o $(O)pdcutil.o
313
314 PDCLIB = $(O)pdcurses.lib
315
316 PDCINCL = /I$(PDCURSES_TOP) /I$(PDCSRC) /I$(PDCWINCON)
317
318 !ELSE
319 PDCLIB = 
320 !ENDIF
321
322 #==========================================
323 # Header file macros
324 #==========================================
325
326 CONFIG_H = $(INCL)\config.h $(INCL)\config1.h $(INCL)\tradstdc.h \
327                 $(INCL)\global.h $(INCL)\coord.h $(INCL)\vmsconf.h \
328                 $(INCL)\system.h $(INCL)\unixconf.h $(INCL)\os2conf.h \
329                 $(INCL)\micro.h $(INCL)\pcconf.h $(INCL)\tosconf.h \
330                 $(INCL)\amiconf.h $(INCL)\macconf.h $(INCL)\beconf.h \
331                 $(INCL)\ntconf.h
332
333 HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\align.h $(INCL)\context.h \
334                 $(INCL)\dungeon.h $(INCL)\monsym.h $(INCL)\mkroom.h \
335                 $(INCL)\objclass.h $(INCL)\youprop.h $(INCL)\prop.h \
336                 $(INCL)\permonst.h $(INCL)\monattk.h \
337                 $(INCL)\monflag.h $(INCL)\mondata.h $(INCL)\pm.h \
338                 $(INCL)\wintype.h $(INCL)\decl.h $(INCL)\quest.h \
339                 $(INCL)\spell.h $(INCL)\color.h $(INCL)\obj.h \
340                 $(INCL)\you.h $(INCL)\attrib.h $(INCL)\monst.h $(INCL)\lint.h \
341                 $(INCL)\mextra.h $(INCL)\skills.h $(INCL)\onames.h \
342                 $(INCL)\timeout.h $(INCL)\trap.h $(INCL)\flag.h $(INCL)\rm.h \
343                 $(INCL)\vision.h $(INCL)\display.h $(INCL)\engrave.h \
344                 $(INCL)\rect.h $(INCL)\region.h $(INCL)\winprocs.h $(INCL)\botl.h \
345                 $(INCL)\wintty.h $(INCL)\sys.h $(INCL)\trampoli.h
346
347 LEV_H       = $(INCL)\lev.h
348 DGN_FILE_H  = $(INCL)\dgn_file.h
349 LEV_COMP_H  = $(INCL)\lev_comp.h
350 SP_LEV_H    = $(INCL)\sp_lev.h
351 TILE_H      = ..\win\share\tile.h
352
353 #==========================================
354 # Miscellaneous
355 #==========================================
356
357 DATABASE = $(DAT)\data.base
358
359 #==========================================
360 #==========================================
361 # Setting up the compiler and linker
362 #==========================================
363 #==========================================
364
365 cc=cl
366 link=link
367 rc=Rc
368
369 # Before we get started, this section is used to determine the version of 
370 # Visual Studio we are using.  We set VSVER to 0000 to flag any version that 
371 # is too old or untested.
372 #
373 #NMAKE version 1414264330 is distributed with VS 15.7.5
374
375 #!MESSAGE $(MAKEFLAGS)
376 #!MESSAGE $(MAKEDIR)
377 #!MESSAGE $(MAKE)
378
379 MAKEVERSION=$(_NMAKE_VER:.= )
380 MAKEVERSION=$(MAKEVERSION: =)
381 #!MESSAGE $(_NMAKE_VER)
382 #!MESSAGE $(MAKEVERSION)
383
384 VSNEWEST=2017
385 !IF ($(MAKEVERSION) < 1000000000)
386 VSVER=0000              #untested ancient version
387 !ELSEIF ($(MAKEVERSION) > 1000000000) && ($(MAKEVERSION) < 1100000000)
388 VSVER=2010
389 !ELSEIF ($(MAKEVERSION) > 1100000000) && ($(MAKEVERSION) < 1200000000)
390 VSVER=2012
391 !ELSEIF ($(MAKEVERSION) > 1200000000) && ($(MAKEVERSION) < 1400000000)
392 VSVER=2013
393 !ELSEIF ($(MAKEVERSION) > 1400000000) && ($(MAKEVERSION) < 1411000000)
394 VSVER=2015
395 !ELSEIF ($(MAKEVERSION) > 1411000000) && ($(MAKEVERSION) < 1414264331)
396 VSVER=$(VSNEWEST)
397 !ELSEIF ($(MAKEVERSION) > 1414264330)
398 VSVER=2999              #untested future version
399 !ENDIF
400
401 !IF ($(VSVER) >= 2012)
402 !MESSAGE Autodetected Visual Studio $(VSVER)
403 !ELSEIF ($(VSVER) == 2999
404 !MESSAGE The version of Visual Studio is newer than the most recent at
405 !MESSAGE the time this Makefile was crafted (Visual Studio $(VSNEWEST)).
406 !MESSAGE Because it is newer we'll proceed expecting that the 
407 !MESSAGE VS$(VSNEWEST) processing will still work.
408 !ELSEIF ($(VSVER) == 0000)
409 !MESSAGE The version of Visual Studio appears to be quite old, older
410 !MESSAGE than VS2010 which is the oldest supported version by this
411 !MESSAGE Makefile, so we'll stop now.
412 !ERROR Untested old Visual Studio version with NMAKE $(_NMAKE_VER).
413 !ENDIF
414
415 !IF ($(VSVER) == 2010)
416 # For VS2010 use "setenv /x86" or "setenv /x64" before invoking make process
417 # DO NOT DELETE THE FOLLOWING LINE
418 !include <win32.mak>
419 ! ENDIF
420
421 #These will be in the environment variables with one of the VS2017
422 #developer command prompts.
423 #VSCMD_ARG_HOST_ARCH=x64
424 #VSCMD_ARG_TGT_ARCH=x86
425
426 !IFDEF VSCMD_ARG_HOST_ARCH
427 !MESSAGE Host architecture is $(VSCMD_ARG_HOST_ARCH)
428 !MESSAGE Target architecture is $(VSCMD_ARG_TGT_ARCH)
429 ! IFNDEF TARGET_CPU
430 !  IF "$(VSCMD_ARG_TGT_ARCH)"=="x64"
431 TARGET_CPU=x64
432 !  ELSE
433 TARGET_CPU=x86
434 !  ENDIF
435 ! ENDIF
436 !ENDIF
437
438 !IF "$(TARGET_CPU)" == ""
439 TARGET_CPU=x86
440 !ENDIF
441
442 !IF ($(VSVER) == 2010)
443 CL_RECENT=
444 !ELSE
445 ! IF ($(VSVER) > 2010)
446 CL_RECENT=-sdl
447 ! ENDIF
448 !ENDIF
449
450 #==========================================
451 # More compiler setup post-macros
452 #==========================================
453 #----------------------------------------------------------------
454
455 !IF "$(ADD_CURSES)" == "Y"
456 CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE" -DCHTYPE_32
457 !ELSE
458 CURSDEF=
459 CURSESLIB=
460 !ENDIF
461
462 ccommon= -c -nologo -D"_CONSOLE" -D"_CRT_NONSTDC_NO_DEPRECATE" -D"_CRT_SECURE_NO_DEPRECATE" \
463         -D"_LIB" -D"_SCL_SECURE_NO_DEPRECATE" -D"_VC80_UPGRADE=0x0600" -D"DLB" -D"_MBCS" \
464         -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -D"NDEBUG" -D"YY_NO_UNISTD_H" \
465         -DHAS_STDINT_H -DHAS_INLINE $(CURSESDEF) \
466         -EHsc -fp:precise -Gd -GF -GS -Gy \
467         $(CL_RECENT) -WX- -Zc:forScope -Zc:wchar_t -Zi
468 cdebug= -analyze- -D"_DEBUG" -MTd -RTC1 -Od
469 crelease= -analyze- -D"_MBCS" -errorReport:prompt -MT -O2 -Ot -Ox -Oy
470
471 lcommon= /NOLOGO /INCREMENTAL:NO
472
473 !IF "$(DEBUGINFO)" == "Y"
474 ldebug = /DEBUG
475 cflags1=$(ccommon) $(cdebug)
476 lflags1=$(lcommon) $(ldebug)
477 !ELSE
478 ldebug= /DEBUG
479 cflags1=$(ccommon) $(crelease)
480 lflags1=$(lcommon) $(ldebug)
481 !ENDIF
482
483 lflags= $(lflags1)
484
485 !IF "$(TARGET_CPU)" == "x86"
486 cflags = $(cflags1) -D_X86_=1  -DWIN32 -D_WIN32 -W3
487 scall  = -Gz
488
489 !ELSEIF "$(TARGET_CPU)" == "x64"
490 cflags = $(cflags1) -D_AMD64_=1 -DWIN64 -D_WIN64  -DWIN32 -D_WIN32 -W4
491 scall  =
492 !ENDIF
493
494 !IF ($(VSVER) >= 2012)
495 cflags = $(cflags:-W4=-W3)
496 !ENDIF
497
498 #More verbose warning output options below
499 #cflags = $(cflags:-W4=-wd4131
500 #cflags = $(cflags:-W4=-Wall)
501 #cflags = $(cflags:-W3=-wd4131
502 #cflags = $(cflags:-W3=-Wall)
503
504 # declarations for use on Intel x86 systems
505 !IF "$(TARGET_CPU)" == "x86"
506 DLLENTRY = @12
507 EXEVER=5.01
508 MACHINE=/MACHINE:X86
509 !ENDIF
510
511 # declarations for use on AMD64 systems
512 !IF "$(TARGET_CPU)" == "x64"
513 DLLENTRY =
514 EXEVER=5.02
515 MACHINE=/MACHINE:X64
516 !ENDIF
517
518 # for Windows applications
519 conlflags = $(lflags) -subsystem:console,$(EXEVER)
520 guilflags = $(lflags) -subsystem:windows,$(EXEVER)
521 dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
522
523 # basic subsystem specific libraries, less the C Run-Time
524 baselibs    = kernel32.lib $(optlibs) $(winsocklibs) advapi32.lib gdi32.lib
525 winlibs     = $(baselibs) user32.lib comdlg32.lib winspool.lib
526
527 # for Windows applications that use the C Run-Time libraries
528 conlibs     = $(baselibs)
529 guilibs     = $(winlibs)
530 #
531
532 !IFNDEF ADD_CURSES
533 INCLDIR= /I..\include /I..\sys\winnt
534 !ELSE
535 INCLDIR= /I..\include /I..\sys\winnt
536 !ENDIF
537
538 #==========================================
539 # Util builds
540 #==========================================
541
542 cflagsBuild = $(cflags) $(INCLDIR) $(WINPFLAG) $(DLBFLG) -DSAFEPROCS
543 lflagsBuild = $(lflags) $(conlibs) $(MACHINE)
544
545 #==========================================
546 # - Game build
547 #==========================================
548
549 LIBS= user32.lib winmm.lib $(ZLIB) $(CURSESLIB)
550
551 ! IF ("$(USE_DLB)"=="Y")
552 DLB = nhdat
553 ! ELSE
554 DLB =
555 ! ENDIF
556
557 #==========================================
558 #================ RULES ==================
559 #==========================================
560
561 .SUFFIXES: .exe .o .til .uu .c .y .l
562
563 #==========================================
564 # Rules for files in src
565 #==========================================
566
567 .c{$(OBJ)}.o:
568         @$(cc) $(cflagsBuild)  -Fo$@ $<
569
570 {$(SRC)}.c{$(OBJ)}.o:
571         @$(cc) $(cflagsBuild)   -Fo$@  $<
572
573 #==========================================
574 # Rules for files in sys\share
575 #==========================================
576
577 {$(SSYS)}.c{$(OBJ)}.o:
578         @$(cc) $(cflagsBuild)  -Fo$@  $<
579
580 {$(SSYS)}.cpp{$(OBJ)}.o:
581         @$(CC) $(cflagsBuild) /EHsc -Fo$@  $<
582
583 #==========================================
584 # Rules for files in sys\winnt
585 #==========================================
586
587 {$(MSWSYS)}.c{$(OBJ)}.o:
588         @$(cc) $(cflagsBuild)  -Fo$@  $<
589
590 {$(MSWSYS)}.h{$(INCL)}.h:
591         @copy $< $@
592
593 #==========================================
594 # Rules for files in util
595 #==========================================
596
597 {$(UTIL)}.c{$(OBJ)}.o:
598         @$(cc) $(cflagsBuild) -Fo$@ $<
599
600 #==========================================
601 # Rules for files in win\share
602 #==========================================
603
604 {$(WSHR)}.c{$(OBJ)}.o:
605         @$(cc) $(cflagsBuild)  -Fo$@ $<
606
607 {$(WSHR)}.h{$(INCL)}.h:
608         @copy $< $@
609
610 #{$(WSHR)}.txt{$(DAT)}.txt:
611 #       @copy $< $@
612
613 #==========================================
614 # Rules for files in win\tty
615 #==========================================
616
617 {$(TTY)}.c{$(OBJ)}.o:
618         $(cc) $(cflagsBuild)  -Fo$@  $<
619
620 #==========================================
621 # Rules for files in japanese
622 #==========================================
623
624 {$(JP)}.c{$(OBJ)}.o:
625         $(cc) $(cflagsBuild)  -Fo$@  $<
626
627 #==========================================
628 # Rules for files in win\win32
629 #==========================================
630
631 {$(MSWIN)}.c{$(OBJ)}.o:
632         @$(cc) $(cflagsBuild)  -Fo$@  $<
633
634 #==========================================
635 # Rules for files in win\curses
636 #==========================================
637
638 {$(WCURSES)}.c{$(OBJ)}.o:
639         @$(cc) $(PDCINCL) $(cflagsBuild)  -Fo$@ $<
640
641 #{$(WCURSES)}.txt{$(DAT)}.txt:
642 #       @copy $< $@
643
644 #==========================================
645 # Rules for files in PDCurses
646 #==========================================
647
648 {$(PDCURSES_TOP)}.c{$(OBJ)}.o:
649         @$(cc) $(PDCINCL) $(cflagsBuild)  -Fo$@ $<
650
651 {$(PDCSRC)}.c{$(OBJ)}.o:
652         @$(cc) $(PDCINCL) $(cflagsBuild)  -Fo$@ $<
653
654 {$(PDCWINCON)}.c{$(OBJ)}.o:
655         @$(cc) $(PDCINCL) $(cflagsBuild)  -Fo$@ $<
656
657 #==========================================
658 #=============== TARGETS ==================
659 #==========================================
660
661 #
662 #  The default make target (so just typing 'nmake' is useful).
663 #
664 default : install
665
666 #
667 #  The game target.
668 #
669
670 #
671 #  Everything
672 #
673
674 all :   install
675
676 install: $(O)envchk.tag $(O)obj.tag $(O)utility.tag $(GAMEDIR)\JNetHack.exe $(GAMEDIR)\JNetHackW.exe $(O)install.tag
677          @echo Done.
678
679 $(O)install.tag:        $(DAT)\data     $(DAT)\rumors    $(DAT)\dungeon \
680                 $(DAT)\oracles  $(DAT)\quest.dat $(O)sp_lev.tag $(DLB)
681 ! IF ("$(USE_DLB)"=="Y")
682         copy nhdat                $(GAMEDIR)
683         copy $(DAT)\license       $(GAMEDIR)
684         copy $(DAT)\opthelp       $(GAMEDIR)
685 ! ELSE
686         copy $(DAT)\*.            $(GAMEDIR)
687         copy $(DAT)\*.dat         $(GAMEDIR)
688         copy $(DAT)\*.lev         $(GAMEDIR)
689         if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile
690 ! ENDIF
691         if not exist $(GAMEDIR)\sysconf copy $(MSWSYS)\sysconf $(GAMEDIR)
692         if exist $(DAT)\symbols copy $(DAT)\symbols $(GAMEDIR)
693         if exist $(DOC)\guidebook.txt copy $(DOC)\guidebook.txt $(GAMEDIR)\Guidebook.txt
694         if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt
695         @if exist $(GAMEDIR)\JNetHack.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/JNetHack.PDB to conserve space
696         @if exist $(GAMEDIR)\JNetHackW.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/JNetHackW.PDB to conserve space
697         -if not exist $(GAMEDIR)\defaults.nh copy $(MSWSYS)\defaults.nh   $(GAMEDIR)\defaults.nh
698         -if not exist $(GAMEDIR)\record. goto>$(GAMEDIR)\record.
699         echo install done > $@
700
701 #       copy $(MSWSYS)\winnt.hlp    $(GAMEDIR)
702
703 recover: $(U)recover.exe
704         if exist $(U)recover.exe copy $(U)recover.exe  $(GAMEDIR)
705         if exist $(DOC)\recover.txt copy $(DOC)\recover.txt $(GAMEDIR)\recover.txt
706
707 $(O)sp_lev.tag: $(O)utility.tag $(DAT)\bigroom.des  $(DAT)\castle.des \
708         $(DAT)\endgame.des $(DAT)\gehennom.des $(DAT)\knox.des   \
709         $(DAT)\medusa.des  $(DAT)\oracle.des   $(DAT)\tower.des  \
710         $(DAT)\yendor.des  $(DAT)\arch.des     $(DAT)\barb.des   \
711         $(DAT)\caveman.des $(DAT)\healer.des   $(DAT)\knight.des \
712         $(DAT)\monk.des    $(DAT)\priest.des   $(DAT)\ranger.des \
713         $(DAT)\rogue.des   $(DAT)\samurai.des  $(DAT)\sokoban.des \
714         $(DAT)\tourist.des $(DAT)\valkyrie.des $(DAT)\wizard.des
715         cd $(DAT)
716         $(U)levcomp bigroom.des
717         $(U)levcomp castle.des
718         $(U)levcomp endgame.des
719         $(U)levcomp gehennom.des
720         $(U)levcomp knox.des
721         $(U)levcomp mines.des
722         $(U)levcomp medusa.des
723         $(U)levcomp oracle.des
724         $(U)levcomp sokoban.des
725         $(U)levcomp tower.des
726         $(U)levcomp yendor.des
727         $(U)levcomp arch.des
728         $(U)levcomp barb.des
729         $(U)levcomp caveman.des
730         $(U)levcomp healer.des
731         $(U)levcomp knight.des
732         $(U)levcomp monk.des
733         $(U)levcomp priest.des
734         $(U)levcomp ranger.des
735         $(U)levcomp rogue.des
736         $(U)levcomp samurai.des
737         $(U)levcomp tourist.des
738         $(U)levcomp valkyrie.des
739         $(U)levcomp wizard.des
740         cd $(SRC)
741         echo sp_levs done > $(O)sp_lev.tag
742
743 $(O)utility.tag: $(INCL)\date.h $(INCL)\onames.h $(INCL)\pm.h \
744                 $(SRC)\vis_tab.c  \
745                 $(U)levcomp.exe $(INCL)\vis_tab.h \
746                 $(U)dgncomp.exe $(TILEUTIL16)
747              @echo utilities made >$@
748              @echo utilities made.
749
750 tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe
751         @echo Optional tile development utilities are up to date.
752
753 $(O)winhack.res: $(TILEBMP16) $(MSWIN)\winhack.rc $(MSWIN)\mnsel.bmp \
754         $(MSWIN)\mnselcnt.bmp $(MSWIN)\mnunsel.bmp \
755         $(MSWIN)\petmark.bmp $(MSWIN)\pilemark.bmp $(MSWIN)\NetHack.ico $(MSWIN)\rip.bmp \
756         $(MSWIN)\splash.bmp
757         @$(rc) -r -fo$@ -i$(MSWIN) -dNDEBUG $(MSWIN)\winhack.rc
758
759 $(O)console.res: $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico
760         @$(rc) -r -fo$@ -i$(MSWSYS) -dNDEBUG $(MSWSYS)\console.rc
761
762
763 #==========================================
764 #  The game targets.
765 #==========================================
766
767 #  The section for linking the NetHack image looks a little strange at 
768 #  first, especially if you are used to UNIX makes, or NDMAKE.  It is 
769 #  Microsoft nmake specific, and it gets around the problem of the 
770 #  link command line being too long for the linker.  An "in-line" linker 
771 #  response file is generated temporarily.
772 #
773 #  It takes advantage of the following features of nmake:
774 #
775 #  Inline files : 
776 #                       Specifying the "<<" means to start an inline file.
777 #                       Another "<<" at the start of a line closes the 
778 #                       inline file.
779 #
780 #  Substitution within Macros:
781 #                       $(mymacro:string1=string2) replaces every
782 #                       occurrence of string1 with string2 in the 
783 #                       macro mymacro.  Special ascii key codes may be 
784 #                       used in the substitution text by preceding it 
785 #                       with ^ as we have done below.  Every occurence
786 #                       of a <tab> in $(ALLOBJ) is replaced by 
787 #                       <+><return><tab>.
788
789 GAMEOBJ=$(ALLOBJ:^      =^
790 )
791 GAMEOBJ=$(GAMEOBJ:^ =^
792 )
793
794 #
795 #  DO NOT INDENT THE << below!
796 #
797
798 # NetHack
799 # full gui linkage libs:
800 #    libs: $(LIBS) $(conlibs) $(guilibs) $(COMCTRL)
801 #    objs: $(GAMEOBJ) $(TTYOBJ) $(O)nttty.o $(O)tile.o $(GUIOBJ)
802 # otherwise:
803 #    libs: $(LIBS) $(conlibs) 
804 #    objs: $(GAMEOBJ) $(TTYOBJ) $(O)tile.o $(O)guistub.o
805
806
807 $(GAMEDIR)\JNetHack.exe : $(O)gamedir.tag $(PDCLIB) $(O)tile.o $(O)nttty.o $(O)guistub.o \
808                         $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)console.res $(KEYDLLS)
809         @if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
810         @echo Linking $(@:\=/)
811         $(link) $(lflagsBuild) $(conlflags) /STACK:2048 /PDB:$(GAMEDIR)\$(@B).PDB /MAP:$(O)$(@B).MAP \
812                 $(LIBS) $(PDCLIB) $(conlibs) $(BCRYPT) -out:$@ @<<$(@B).lnk
813                 $(GAMEOBJ)
814                 $(TTYOBJ)
815                 $(O)nttty.o
816                 $(O)tile.o
817                 $(O)guistub.o
818                 $(O)console.res
819 <<
820         @if exist $(O)install.tag del $(O)install.tag
821
822 # NetHackW
823 # full tty linkage libs:
824 #    libs: $(LIBS) $(guilibs) $(COMCTRL)
825 #    objs: $(GAMEOBJ) $(GUIOBJ) $(TTYOBJ) $(O)tile.o $(O)nttty.o
826 # otherwise:
827 #    libs: $(LIBS) $(guilibs) $(COMCTRL)
828 #    objs: $(GAMEOBJ) $(GUIOBJ) $(O)tile.o $(O)ttystub.o
829
830 $(GAMEDIR)\JNetHackW.exe : $(O)gamedir.tag $(O)tile.o $(O)ttystub.o \
831                         $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)winhack.res $(O)gamedir.tag $(KEYDLLS)
832         @if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
833         @echo   Linking $(@:\=/)
834         $(link) $(lflagsBuild) $(guilflags) /STACK:2048 /PDB:$(GAMEDIR)\$(@B).PDB \
835                 /MAP:$(O)$(@B).MAP $(LIBS) $(PDCLIB) $(guilibs) $(COMCTRL) $(BCRYPT) -out:$@ @<<$(@B).lnk
836                 $(GAMEOBJ)
837                 $(GUIOBJ)
838                 $(O)tile.o
839                 $(O)ttystub.o
840                 $(O)winhack.res
841 <<
842         @if exist $(O)install.tag del $(O)install.tag
843
844 $(O)gamedir.tag:
845         @if not exist $(GAMEDIR)\*.* echo creating directory $(GAMEDIR:\=/)
846         @if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
847         @echo directory created > $@
848
849 $(O)nhdefkey.def:
850         @echo LIBRARY $(@B) >$@
851 ! IF "$(TARGET_CPU)"=="x64" || "$(PROCESSOR_ARCHITECTURE)"=="x64"
852 ! ELSE
853         @echo EXPORTS >>$@
854         @echo    ProcessKeystroke >>$@
855         @echo    NHkbhit >>$@
856         @echo    CheckInput >>$@
857         @echo    SourceWhere >>$@
858         @echo    SourceAuthor >>$@
859         @echo    KeyHandlerName >>$@
860 ! ENDIF
861
862 $(GAMEDIR)\nhdefkey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def
863         @echo Linking $(@:\=/)
864         @$(link) $(ldebug) /RELEASE /DLL user32.lib \
865                 /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).map" /DEF:$(O)$(@B).def \
866                 /IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o
867
868 $(O)nh340key.def:
869         @echo LIBRARY $(@B) >$@
870 ! IF "$(TARGET_CPU)"=="x64" || "$(PROCESSOR_ARCHITECTURE)"=="x64"
871 ! ELSE
872         @echo EXPORTS >>$@
873         @echo    ProcessKeystroke >>$@
874         @echo    NHkbhit >>$@
875         @echo    CheckInput >>$@
876         @echo    SourceWhere >>$@
877         @echo    SourceAuthor >>$@
878         @echo    KeyHandlerName >>$@
879 ! ENDIF
880
881 $(GAMEDIR)\nh340key.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def
882         @echo Linking $(@:\=/)
883         @$(link) $(ldebug) /RELEASE /NOLOGO /DLL user32.lib \
884                 /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).map" /DEF:$(O)$(@B).def \
885                 /IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o
886
887 $(O)nhraykey.def:
888         @echo LIBRARY $(@B) >$@
889 ! IF "$(TARGET_CPU)"=="x64" || "$(PROCESSOR_ARCHITECTURE)"=="x64"
890 ! ELSE
891         @echo EXPORTS >>$@
892         @echo    ProcessKeystroke >>$@
893         @echo    NHkbhit >>$@
894         @echo    CheckInput >>$@
895         @echo    SourceWhere >>$@
896         @echo    SourceAuthor >>$@
897         @echo    KeyHandlerName >>$@
898 ! ENDIF
899
900 $(GAMEDIR)\nhraykey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def
901         @echo Linking $(@:\=/)
902         @$(link) $(ldebug) /RELEASE /NOLOGO /DLL user32.lib \
903                 /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).map" /DEF:$(O)$(@B).def \
904                 /IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o
905
906 #
907 #  Secondary Targets.
908 #
909     
910 #==========================================
911 # Makedefs Stuff
912 #==========================================
913 $(U)nhsizes.exe: $(O)nhsizes.o
914         @echo Linking $(@:\=/)
915         $(link) $(lflagsBuild) -out:$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o
916
917 $(O)nhsizes.o: $(CONFIG_H) nhsizes.c
918         @$(cc) $(cflagsBuild) -Fo$@ nhsizes.c
919
920 $(U)makedefs.exe:       $(MAKEOBJS)
921         @echo Linking $(@:\=/)
922         @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(MAKEOBJS)
923
924 $(O)makedefs.o: $(CONFIG_H)     $(INCL)\monattk.h $(INCL)\monflag.h   $(INCL)\objclass.h \
925                  $(INCL)\monsym.h    $(INCL)\qtext.h    $(INCL)\patchlevel.h \
926                  $(U)makedefs.c
927         @if not exist $(OBJ)\*.* echo creating directory $(OBJ:\=/)
928         @if not exist $(OBJ)\*.* mkdir $(OBJ)
929         @$(cc) $(cflagsBuild) -Fo$@ $(U)makedefs.c
930
931 #
932 #  date.h should be remade every time any of the source or include
933 #  files is modified.
934 #
935
936 $(INCL)\date.h $(OPTIONS_FILE) : $(U)makedefs.exe
937         $(U)makedefs -v
938
939 $(INCL)\onames.h : $(U)makedefs.exe
940         $(U)makedefs -o
941
942 $(INCL)\pm.h : $(U)makedefs.exe
943         $(U)makedefs -p
944
945 $(INCL)\vis_tab.h: $(U)makedefs.exe
946         $(U)makedefs -z
947
948 $(SRC)\vis_tab.c: $(U)makedefs.exe
949         $(U)makedefs -z
950
951 #==========================================
952 # uudecode utility and uuencoded targets
953 #==========================================
954
955 $(U)uudecode.exe: $(O)uudecode.o
956         @echo Linking $(@:\=/)
957         @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)uudecode.o
958
959 $(O)uudecode.o: $(SSYS)\uudecode.c
960         @$(cc) $(cflagsBuild) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c
961
962 $(MSWSYS)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu 
963         chdir $(MSWSYS)
964         ..\..\util\uudecode.exe nhico.uu
965         chdir ..\..\src
966
967 $(MSWIN)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu 
968         chdir $(MSWIN)
969         ..\..\util\uudecode.exe ../../sys/winnt/nhico.uu
970         chdir ..\..\src
971
972 $(MSWIN)\mnsel.bmp: $(U)uudecode.exe $(MSWIN)\mnsel.uu
973         chdir $(MSWIN)
974         ..\..\util\uudecode.exe mnsel.uu
975         chdir ..\..\src
976
977 $(MSWIN)\mnselcnt.bmp: $(U)uudecode.exe $(MSWIN)\mnselcnt.uu
978         chdir $(MSWIN)
979         ..\..\util\uudecode.exe mnselcnt.uu
980         chdir ..\..\src
981
982 $(MSWIN)\mnunsel.bmp: $(U)uudecode.exe $(MSWIN)\mnunsel.uu
983         chdir $(MSWIN)
984         ..\..\util\uudecode.exe mnunsel.uu
985         chdir ..\..\src
986
987 $(MSWIN)\petmark.bmp: $(U)uudecode.exe $(MSWIN)\petmark.uu
988         chdir $(MSWIN)
989         ..\..\util\uudecode.exe petmark.uu
990         chdir ..\..\src
991
992 $(MSWIN)\pilemark.bmp: $(U)uudecode.exe $(MSWIN)\pilemark.uu
993         chdir $(MSWIN)
994         ..\..\util\uudecode.exe pilemark.uu
995         chdir ..\..\src
996
997 $(MSWIN)\rip.bmp: $(U)uudecode.exe $(MSWIN)\rip.uu
998         chdir $(MSWIN)
999         ..\..\util\uudecode.exe rip.uu
1000         chdir ..\..\src
1001
1002 $(MSWIN)\splash.bmp: $(U)uudecode.exe $(MSWIN)\splash.uu
1003         chdir $(MSWIN)
1004         ..\..\util\uudecode.exe splash.uu
1005         chdir ..\..\src
1006
1007 #=================================================
1008 # Level Compiler Stuff
1009 #=================================================
1010 #
1011 # defer to the steps in ..\win\win32\levstuff.mak
1012 #
1013
1014 $(U)lev_yacc.c: $(U)lev_comp.y
1015         nmake -nologo -f ..\win\win32\levstuff.mak $(U)lev_yacc.c
1016
1017 $(U)lev_lex.c: $(U)lev_comp.l
1018         nmake -nologo -f ..\win\win32\levstuff.mak $(U)lev_lex.c
1019
1020 $(INCL)\lev_comp.h:
1021         nmake -nologo -f ..\win\win32\levstuff.mak $(INCL)\lev_comp.h
1022
1023 $(O)lev_yacc.o: $(HACK_H)   $(SP_LEV_H) $(INCL)\lev_comp.h $(U)lev_yacc.c
1024         @$(cc) $(cflagsBuild) -Fo$@ $(U)lev_yacc.c
1025
1026 $(O)lev_lex.o: $(HACK_H) $(INCL)\lev_comp.h $(SP_LEV_H) $(U)lev_lex.c
1027         @$(cc) $(cflagsBuild) -Fo$@ $(U)lev_lex.c
1028
1029 $(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H)
1030         @$(cc) $(cflagsBuild) -Fo$@ $(U)lev_main.c
1031
1032 $(U)levcomp.exe: $(LEVCOMPOBJS)
1033         @echo Linking $(@:\=/)
1034         @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
1035                 $(LEVCOMPOBJS:^ =^
1036                 )
1037 <<
1038
1039 #=================================================
1040 # Dungeon Compiler Stuff
1041 #=================================================
1042 #
1043 # defer to the steps in ..\win\win32\dgnstuff.mak
1044 #
1045 $(U)dgn_yacc.c: $(U)dgn_comp.y
1046         nmake -nologo -f ..\win\win32\dgnstuff.mak $(U)dgn_yacc.c
1047
1048 $(INCL)\dgn_comp.h:
1049         nmake -nologo -f ..\win\win32\dgnstuff.mak $(INCL)\dgn_comp.h
1050
1051 $(U)dgn_lex.c: $(U)dgn_comp.l
1052         nmake -nologo -f ..\win\win32\dgnstuff.mak $(U)dgn_lex.c
1053
1054 $(O)dgn_yacc.o: $(HACK_H)   $(DGN_FILE_H) $(INCL)\dgn_comp.h $(U)dgn_yacc.c
1055         @$(cc) $(cflagsBuild) -Fo$@ $(U)dgn_yacc.c
1056
1057 $(O)dgn_lex.o: $(HACK_H)   $(DGN_FILE_H)  $(INCL)\dgn_comp.h \
1058         $(U)dgn_lex.c
1059         @$(cc) $(cflagsBuild) -Fo$@ $(U)dgn_lex.c
1060
1061 $(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c
1062         @$(cc) $(cflagsBuild) -Fo$@ $(U)dgn_main.c
1063
1064 $(U)dgncomp.exe: $(DGNCOMPOBJS)
1065         @echo Linking $(@:\=/)
1066         @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
1067                 $(DGNCOMPOBJS:^ =^
1068                 )
1069 <<
1070
1071 #=================================================
1072 # Create directory for holding object files
1073 #=================================================
1074
1075 $(O)obj.tag:
1076         @if not exist $(OBJ)\*.* echo creating directory $(OBJ:\=/)
1077         @if not exist $(OBJ)\*.* mkdir $(OBJ)
1078         @echo directory created >$@
1079
1080 #==========================================
1081 # Notify of any CL environment variables
1082 # in effect since they change the compiler
1083 # options.
1084 #==========================================
1085
1086 $(O)envchk.tag: $(O)obj.tag
1087 !       IF "$(TARGET_CPU)"=="x64"
1088         @echo Windows x64 64-bit target build
1089 !       ELSE
1090         @echo Windows x86 32-bit target build
1091 !       ENDIF
1092 !IFDEF TTYOBJ
1093         @echo tty window support included
1094 ! IF "$(ADD_CURSES)"=="Y"
1095         @echo curses window support also included
1096 ! ENDIF
1097 !ENDIF
1098 !       IF "$(CL)"!=""
1099 #          @echo Warning, the CL Environment variable is defined:
1100 #          @echo CL=$(CL)
1101 !       ENDIF
1102         echo envchk >$@
1103
1104 #==========================================
1105 #=========== SECONDARY TARGETS ============
1106 #==========================================
1107
1108 #==========================================
1109 # DLB utility and nhdat file creation
1110 #==========================================
1111
1112 $(U)dlb_main.exe: $(DLBOBJ) $(O)dlb.o
1113         @echo Linking $(@:\=/)
1114         @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
1115                 $(O)dlb_main.o
1116                 $(O)dlb.o
1117                 $(O)alloc.o
1118                 $(O)panic.o
1119 <<
1120
1121 $(O)dlb.o:      $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)\dlb.h
1122         @$(cc) $(cflagsBuild) /Fo$@ $(SRC)\dlb.c
1123         
1124 $(O)dlb_main.o: $(UTIL)\dlb_main.c $(INCL)\config.h $(INCL)\dlb.h
1125         @$(cc) $(cflagsBuild) /Fo$@ $(UTIL)\dlb_main.c
1126
1127 $(DAT)\porthelp: $(MSWSYS)\porthelp
1128         @copy $(MSWSYS)\porthelp $@ >nul
1129
1130 nhdat:  $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \
1131         $(DAT)\quest.dat $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp $(DAT)\keyhelp \
1132         $(DAT)\history $(DAT)\opthelp $(DAT)\wizhelp $(DAT)\dungeon $(DAT)\porthelp \
1133         $(DAT)\license $(DAT)\engrave $(DAT)\epitaph $(DAT)\bogusmon $(DAT)\tribute $(O)sp_lev.tag
1134         cd $(DAT)
1135         echo data >dlb.lst
1136         echo oracles >>dlb.lst
1137         if exist options echo options >>dlb.lst
1138         if exist ttyoptions echo ttyoptions >>dlb.lst
1139         if exist guioptions echo guioptions >>dlb.lst
1140         if exist porthelp echo porthelp >>dlb.lst
1141         echo quest.dat >>dlb.lst
1142         echo rumors >>dlb.lst
1143         echo engrave >>dlb.lst
1144         echo epitaph >>dlb.lst
1145         echo bogusmon >>dlb.lst
1146         echo tribute >>dlb.lst
1147         echo help >>dlb.lst
1148         echo hh >>dlb.lst
1149         echo cmdhelp >>dlb.lst
1150         echo keyhelp >>dlb.lst
1151         echo history >>dlb.lst
1152         echo opthelp >>dlb.lst
1153         echo wizhelp >>dlb.lst
1154         echo dungeon >>dlb.lst
1155         echo license >>dlb.lst
1156         for %%N in (*.lev) do echo %%N >>dlb.lst
1157         $(U)dlb_main cIf dlb.lst $(SRC)\nhdat
1158         cd $(SRC)
1159
1160 #==========================================
1161 #  Recover Utility
1162 #==========================================
1163
1164 $(U)recover.exe: $(RECOVOBJS)
1165         @echo Linking $(@:\=/)
1166         $(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(RECOVOBJS)
1167
1168 $(O)recover.o: $(CONFIG_H) $(U)recover.c $(MSWSYS)\win32api.h
1169         @$(cc) $(cflagsBuild) -Fo$@ $(U)recover.c
1170
1171 #==========================================
1172 #  Tile Mapping
1173 #==========================================
1174
1175 $(SRC)\tile.c: $(U)tilemap.exe
1176         @echo A new $(@:\=/) has been created
1177         @$(U)tilemap
1178
1179 $(U)tilemap.exe: $(O)tilemap.o
1180         @echo Linking $(@:\=/)
1181         @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)tilemap.o
1182
1183 $(O)tilemap.o: $(WSHR)\tilemap.c $(HACK_H)
1184         @$(cc) $(cflagsBuild) -Fo$@ $(WSHR)\tilemap.c
1185
1186 $(O)tiletx32.o: $(WSHR)\tilemap.c $(HACK_H)
1187         @$(cc) $(cflagsBuild) /DTILETEXT /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tilemap.c
1188
1189 $(O)tiletxt.o: $(WSHR)\tilemap.c $(HACK_H)
1190         @$(cc) $(cflagsBuild) /DTILETEXT -Fo$@ $(WSHR)\tilemap.c
1191
1192 $(O)gifread.o: $(WSHR)\gifread.c  $(CONFIG_H) $(TILE_H)
1193         @$(cc) $(cflagsBuild) -I$(WSHR) -Fo$@ $(WSHR)\gifread.c
1194
1195 $(O)gifrd32.o: $(WSHR)\gifread.c  $(CONFIG_H) $(TILE_H)
1196         @$(cc) $(cflagsBuild) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\gifread.c
1197
1198 $(O)ppmwrite.o: $(WSHR)\ppmwrite.c $(CONFIG_H) $(TILE_H)
1199         @$(cc) $(cflagsBuild) -I$(WSHR) -Fo$@ $(WSHR)\ppmwrite.c
1200
1201 $(O)tiletext.o: $(WSHR)\tiletext.c  $(CONFIG_H) $(TILE_H)
1202         @$(cc) $(cflagsBuild) -I$(WSHR) -Fo$@ $(WSHR)\tiletext.c
1203
1204 $(O)tilete32.o: $(WSHR)\tiletext.c  $(CONFIG_H) $(TILE_H)
1205         @$(cc) $(cflagsBuild) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tiletext.c
1206
1207 #==========================================
1208 # Optional Tile Utilities
1209 #==========================================
1210
1211 $(U)gif2txt.exe: $(GIFREADERS) $(TEXT_IO)
1212         @echo Linking $(@:\=/)
1213         @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
1214                 $(GIFREADERS:^  =^
1215                 )
1216                 $(TEXT_IO:^     =^
1217                 )
1218 <<
1219
1220 $(U)gif2tx32.exe: $(GIFREADERS32) $(TEXT_IO32)
1221         @echo Linking $(@:\=/)
1222         @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
1223                 $(GIFREADERS32:^        =^
1224                 )
1225                 $(TEXT_IO32:^   =^
1226                 )
1227 <<
1228
1229 $(U)txt2ppm.exe: $(PPMWRITERS) $(TEXT_IO)
1230         @echo Linking $(@:\=/)
1231         @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
1232                 $(PPMWRITERS:^  =^
1233                 )
1234                 $(TEXT_IO:^     =^
1235                 )
1236 <<
1237
1238 $(TILEBMP16): $(TILEUTIL16) $(TILEFILES)
1239         @echo Creating 16x16 binary tile files (this may take some time)
1240         @$(U)tile2bmp $(TILEBMP16)
1241 #$(TILEBMP32): $(TILEUTIL32) $(TILEFILES32)
1242 #       @echo Creating 32x32 binary tile files (this may take some time)
1243 #       @$(U)til2bm32 $(TILEBMP32)
1244
1245
1246 $(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO)
1247         @echo Linking $(@:\=/)
1248         @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
1249                 $(O)tile2bmp.o
1250                 $(TEXT_IO:^  =^
1251                 )
1252 <<
1253
1254 $(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32)
1255         @echo Linking $(@:\=/)
1256         @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
1257                 $(O)til2bm32.o
1258                 $(TEXT_IO32:^  =^
1259                 )
1260 <<
1261
1262 $(O)tile2bmp.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h
1263         @$(cc) $(cflagsBuild) -I$(WSHR) /DPACKED_FILE /Fo$@ $(WSHR)\tile2bmp.c
1264
1265 $(O)til2bm32.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h
1266         @$(cc) $(cflagsBuild) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c
1267
1268 #===============================================================================
1269 # PDCurses
1270 #===============================================================================
1271
1272 $(O)pdcurses.lib : $(PDCLIBOBJS) $(PDCOBJS)
1273         lib -nologo /out:$@ $(PDCLIBOBJS) $(PDCOBJS)
1274
1275 $(O)pdcscrn.o : $(PDCURSES_HEADERS) $(PDCWINCON)\pdcscrn.c $(MSWSYS)\stub-pdcscrn.c
1276         $(cc) $(PDCINCL) $(cflagsBuild) -Fo$@ $(MSWSYS)\stub-pdcscrn.c
1277
1278 #===============================================================================
1279 # Housekeeping
1280 #===============================================================================
1281
1282 spotless: clean
1283 ! IF ("$(OBJ)"!="")
1284         if exist $(OBJ)\* rmdir $(OBJ) /s /Q
1285         if exist $(GAMEDIR)\nhdefkey.dll del $(GAMEDIR)\nhdefkey.dll
1286         if exist $(GAMEDIR)\nh340key.dll del $(GAMEDIR)\nh340key.dll
1287         if exist $(GAMEDIR)\nhraykey.dll del $(GAMEDIR)\nhraykey.dll
1288         if exist $(GAMEDIR)\JNetHack.exe del $(GAMEDIR)\JNetHack.exe
1289         if exist $(GAMEDIR)\JNetHack.pdb del $(GAMEDIR)\JNetHack.pdb
1290         if exist $(GAMEDIR)\nhdat        del $(GAMEDIR)\nhdat
1291 ! ENDIF
1292         if exist $(INCL)\date.h          del $(INCL)\date.h
1293         if exist $(INCL)\onames.h        del $(INCL)\onames.h
1294         if exist $(INCL)\pm.h            del $(INCL)\pm.h
1295         if exist $(INCL)\vis_tab.h       del $(INCL)\vis_tab.h
1296         if exist $(SRC)\vis_tab.c        del $(SRC)\vis_tab.c
1297         if exist $(SRC)\tile.c           del $(SRC)\tile.c
1298         if exist $(U)*.lnk               del $(U)*.lnk
1299         if exist $(U)*.map               del $(U)*.map
1300         if exist $(DAT)\data             del $(DAT)\data
1301         if exist $(DAT)\rumors           del $(DAT)\rumors
1302         if exist $(DAT)\engrave          del $(DAT)\engrave
1303         if exist $(DAT)\epitaph          del $(DAT)\epitaph
1304         if exist $(DAT)\bogusmon         del $(DAT)\bogusmon
1305         if exist $(DAT)\???-fil?.lev     del $(DAT)\???-fil?.lev
1306         if exist $(DAT)\???-goal.lev     del $(DAT)\???-goal.lev
1307         if exist $(DAT)\???-loca.lev     del $(DAT)\???-loca.lev
1308         if exist $(DAT)\???-strt.lev     del $(DAT)\???-strt.lev
1309         if exist $(DAT)\air.lev          del $(DAT)\air.lev
1310         if exist $(DAT)\asmodeus.lev     del $(DAT)\asmodeus.lev
1311         if exist $(DAT)\astral.lev       del $(DAT)\astral.lev
1312         if exist $(DAT)\baalz.lev        del $(DAT)\baalz.lev
1313         if exist $(DAT)\bigrm-*.lev      del $(DAT)\bigrm-*.lev
1314         if exist $(DAT)\castle.lev       del $(DAT)\castle.lev
1315         if exist $(DAT)\data             del $(DAT)\data
1316         if exist $(DAT)\dungeon          del $(DAT)\dungeon
1317         if exist $(DAT)\dungeon.pdf      del $(DAT)\dungeon.pdf
1318         if exist $(DAT)\earth.lev        del $(DAT)\earth.lev
1319         if exist $(DAT)\fakewiz?.lev     del $(DAT)\fakewiz?.lev
1320         if exist $(DAT)\fire.lev         del $(DAT)\fire.lev
1321         if exist $(DAT)\juiblex.lev      del $(DAT)\juiblex.lev
1322         if exist $(DAT)\knox.lev         del $(DAT)\knox.lev
1323         if exist $(DAT)\medusa-?.lev     del $(DAT)\medusa-?.lev
1324         if exist $(DAT)\mine*.lev        del $(DAT)\mine*.lev
1325         if exist $(DAT)\options          del $(DAT)\options
1326         if exist $(DAT)\ttyoptions       del $(DAT)\ttyoptions
1327         if exist $(DAT)\guioptions       del $(DAT)\guioptions
1328         if exist $(DAT)\oracle.lev       del $(DAT)\oracle.lev
1329         if exist $(DAT)\oracles          del $(DAT)\oracles
1330         if exist $(DAT)\orcus.lev        del $(DAT)\orcus.lev
1331         if exist $(DAT)\rumors           del $(DAT)\rumors
1332         if exist $(DAT)\quest.dat        del $(DAT)\quest.dat
1333         if exist $(DAT)\sanctum.lev      del $(DAT)\sanctum.lev
1334         if exist $(DAT)\soko?-?.lev      del $(DAT)\soko?-?.lev
1335         if exist $(DAT)\tower?.lev       del $(DAT)\tower?.lev
1336         if exist $(DAT)\valley.lev       del $(DAT)\valley.lev
1337         if exist $(DAT)\water.lev        del $(DAT)\water.lev
1338         if exist $(DAT)\wizard?.lev      del $(DAT)\wizard?.lev
1339         if exist $(DAT)\dlb.lst          del $(DAT)\dlb.lst
1340         if exist $(DAT)\porthelp         del $(DAT)\porthelp
1341         if exist $(O)sp_lev.tag          del $(O)sp_lev.tag
1342         if exist $(SRC)\vis_tab.c        del $(SRC)\vis_tab.c
1343         if exist nhdat.                  del nhdat.
1344         if exist $(O)obj.tag             del $(O)obj.tag
1345         if exist $(O)gamedir.tag         del $(O)gamedir.tag
1346         if exist $(O)nh*key.lib          del $(O)nh*key.lib
1347         if exist $(O)nh*key.exp          del $(O)nh*key.exp
1348         if exist $(MSWIN)\mnsel.bmp      del $(MSWIN)\mnsel.bmp
1349         if exist $(MSWIN)\mnselcnt.bmp   del $(MSWIN)\mnselcnt.bmp
1350         if exist $(MSWIN)\mnunsel.bmp    del $(MSWIN)\mnunsel.bmp
1351         if exist $(MSWIN)\petmark.bmp    del $(MSWIN)\petmark.bmp
1352         if exist $(MSWIN)\pilemark.bmp   del $(MSWIN)\pilemark.bmp
1353         if exist $(MSWIN)\rip.bmp        del $(MSWIN)\rip.bmp
1354         if exist $(MSWIN)\splash.bmp     del $(MSWIN)\splash.bmp
1355         if exist $(MSWIN)\nethack.ico    del $(MSWIN)\nethack.ico
1356         if exist $(MSWSYS)\nethack.ico   del $(MSWSYS)\nethack.ico
1357         if exist $(U)recover.exe         del $(U)recover.exe
1358         if exist $(U)tile2bmp.exe        del $(U)tile2bmp.exe
1359         if exist $(U)tilemap.exe         del $(U)tilemap.exe
1360         if exist $(U)uudecode.exe        del $(U)uudecode.exe
1361         if exist $(U)dlb_main.exe        del $(U)dlb_main.exe
1362 !IF "$(ADD_CURSES)" == "Y"      
1363         if exist $(O)pdcurses.lib        del $(O)pdcurses.lib
1364 !ENDIF
1365 clean:
1366         if exist $(O)*.o del $(O)*.o
1367         if exist $(O)utility.tag   del $(O)utility.tag
1368         if exist $(U)makedefs.exe  del $(U)makedefs.exe
1369         if exist $(U)levcomp.exe   del $(U)levcomp.exe
1370         if exist $(U)dgncomp.exe   del $(U)dgncomp.exe
1371         if exist $(SRC)\*.lnk      del $(SRC)\*.lnk
1372         if exist $(SRC)\*.map      del $(SRC)\*.map
1373         if exist $(O)install.tag   del $(O)install.tag
1374         if exist $(O)console.res  del $(O)console.res
1375         if exist $(O)dgncomp.MAP  del $(O)dgncomp.MAP
1376         if exist $(O)dgncomp.PDB  del $(O)dgncomp.PDB
1377         if exist $(O)dlb_main.MAP del $(O)dlb_main.MAP
1378         if exist $(O)dlb_main.PDB del $(O)dlb_main.PDB
1379         if exist $(O)gamedir.tag  del $(O)gamedir.tag
1380         if exist $(O)levcomp.MAP  del $(O)levcomp.MAP
1381         if exist $(O)levcomp.PDB  del $(O)levcomp.PDB
1382         if exist $(O)makedefs.MAP del $(O)makedefs.MAP
1383         if exist $(O)makedefs.PDB del $(O)makedefs.PDB
1384         if exist $(O)NetHack.MAP  del $(O)NetHack.MAP
1385         if exist $(O)nh340key.def del $(O)nh340key.def
1386         if exist $(O)nh340key.exp del $(O)nh340key.exp
1387         if exist $(O)nh340key.lib del $(O)nh340key.lib
1388         if exist $(O)nh340key.map del $(O)nh340key.map
1389         if exist $(O)nh340key.PDB del $(O)nh340key.PDB
1390         if exist $(O)nhdefkey.def del $(O)nhdefkey.def
1391         if exist $(O)nhdefkey.exp del $(O)nhdefkey.exp
1392         if exist $(O)nhdefkey.lib del $(O)nhdefkey.lib
1393         if exist $(O)nhdefkey.map del $(O)nhdefkey.map
1394         if exist $(O)nhdefkey.PDB del $(O)nhdefkey.PDB
1395         if exist $(O)nhraykey.def del $(O)nhraykey.def
1396         if exist $(O)nhraykey.exp del $(O)nhraykey.exp
1397         if exist $(O)nhraykey.lib del $(O)nhraykey.lib
1398         if exist $(O)nhraykey.map del $(O)nhraykey.map
1399         if exist $(O)nhraykey.PDB del $(O)nhraykey.PDB
1400         if exist $(O)envchk.tag   del $(O)envchk.tag
1401         if exist $(O)obj.tag      del $(O)obj.tag
1402         if exist $(O)sp_lev.tag   del $(O)sp_lev.tag
1403         if exist $(O)uudecode.MAP del $(O)uudecode.MAP
1404         if exist $(O)uudecode.PDB del $(O)uudecode.PDB
1405         rem
1406         rem defer to the steps in ..\win\win32\levstuff.mak
1407         rem 
1408         nmake -nologo -f ..\win\win32\levstuff.mak clean
1409         rem
1410         rem defer to the steps in ..\win\win32\dgnstuff.mak
1411         rem
1412         nmake -nologo -f ..\win\win32\dgnstuff.mak clean
1413         if exist $(TILEBMP16)        del $(TILEBMP16)
1414         if exist $(TILEBMP32)        del $(TILEBMP32)
1415
1416 #===================================================================
1417 # OTHER DEPENDENCIES
1418 #===================================================================
1419
1420 #
1421 # dat dependencies
1422 #
1423
1424 $(DAT)\data: $(O)utility.tag    $(DATABASE)
1425         $(U)makedefs -d
1426
1427 $(DAT)\rumors: $(O)utility.tag    $(DAT)\rumors.tru   $(DAT)\rumors.fal
1428         $(U)makedefs -r
1429
1430 $(DAT)\quest.dat: $(O)utility.tag  $(DAT)\quest.txt
1431         $(U)makedefs -q
1432
1433 $(DAT)\oracles: $(O)utility.tag    $(DAT)\oracles.txt
1434         $(U)makedefs -h
1435
1436 $(DAT)\engrave: $(DAT)\engrave.txt $(U)makedefs.exe
1437         $(U)makedefs -s
1438
1439 $(DAT)\epitaph: $(DAT)\epitaph.txt $(U)makedefs.exe
1440         $(U)makedefs -s
1441
1442 $(DAT)\bogusmon: $(DAT)\bogusmon.txt $(U)makedefs.exe
1443         $(U)makedefs -s
1444
1445 $(DAT)\dungeon: $(O)utility.tag  $(DAT)\dungeon.def
1446         $(U)makedefs -e
1447         cd $(DAT)
1448         $(U)dgncomp dungeon.pdf
1449         cd $(SRC)
1450
1451 #
1452 # NT dependencies
1453 #
1454
1455 $(O)nttty.o:   $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h $(MSWSYS)\nttty.c
1456         @$(cc) $(cflagsBuild) -I$(WSHR) -Fo$@  $(MSWSYS)\nttty.c
1457 $(O)winnt.o: $(HACK_H) $(MSWSYS)\win32api.h $(MSWSYS)\winnt.c
1458         @$(cc) $(cflagsBuild) -I$(MSWSYS) -I$(MSWIN) -Fo$@ $(MSWSYS)\win10.c
1459         @$(cc) $(cflagsBuild) -Fo$@  $(MSWSYS)\winnt.c
1460 $(O)ntsound.o: $(HACK_H) $(MSWSYS)\ntsound.c
1461         @$(cc) $(cflagsBuild)  -Fo$@ $(MSWSYS)\ntsound.c
1462
1463 #if you aren't linking in the full gui then
1464 #include the following stub for proper linkage.
1465
1466 $(O)guistub.o: $(HACK_H) $(MSWSYS)\stubs.c
1467         @$(cc) $(cflagsBuild) -DGUISTUB -Fo$@ $(MSWSYS)\stubs.c
1468
1469 #
1470 # WIN32 dependencies
1471 #
1472
1473 $(O)winhack.o: $(HACK_H) $(MSWIN)\winhack.c
1474         @$(cc) $(cflagsBuild) -I$(MSWSYS) -I$(MSWIN) -Fo$@ $(MSWIN)\winhack.c
1475
1476 #if you aren't linking in the full tty then
1477 #include the following stub for proper linkage.
1478
1479 $(O)ttystub.o: $(HACK_H) $(MSWSYS)\stubs.c
1480         @$(cc) $(cflagsBuild) -DTTYSTUB -Fo$@ $(MSWSYS)\stubs.c
1481
1482
1483 # util dependencies
1484 #
1485
1486 $(O)panic.o:  $(U)panic.c $(CONFIG_H)
1487         @$(cc) $(cflagsBuild) -Fo$@ $(U)panic.c
1488
1489
1490 # sys/share dependencies
1491 #
1492
1493 (O)cppregex.o:  $(O)cppregex.cpp $(HACK_H)
1494         @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\cppregex.cpp
1495
1496
1497 # curses window port dependencies
1498 #
1499 $(O)cursdial.o: $(WCURSES)\cursdial.c $(WCURSES)\cursdial.h $(INCL)\wincurs.h
1500 $(O)cursinit.o: $(WCURSES)\cursinit.c $(WCURSES)\cursinit.h $(INCL)\wincurs.h
1501 $(O)cursinvt.o: $(WCURSES)\cursinvt.c $(WCURSES)\cursinvt.h $(INCL)\wincurs.h
1502 $(O)cursmain.o: $(WCURSES)\cursmain.c $(INCL)\wincurs.h
1503 $(O)cursmesg.o: $(WCURSES)\cursmesg.c $(WCURSES)\cursmesg.h $(INCL)\wincurs.h
1504 $(O)cursmisc.o: $(WCURSES)\cursmisc.c $(WCURSES)\cursmisc.h $(INCL)\wincurs.h
1505 $(O)cursstat.o: $(WCURSES)\cursstat.c $(WCURSES)\cursstat.h $(INCL)\wincurs.h
1506 $(O)curswins.o: $(WCURSES)\curswins.c $(WCURSES)\curswins.h $(INCL)\wincurs.h
1507 #
1508 # The rest are stolen from sys/unix/Makefile.src, 
1509 # with the following changes:
1510 #   * ../include changed to $(INCL)
1511 #   * slashes changed to back-slashes 
1512 #   * -c (which is included in CFLAGS) substituted with -Fo$@
1513 #   * $(CFLAGS) replaced with $(cflagsBuild)
1514 #   * $(CC) replaced with @$(CC)
1515 #   * targets prefixed with $(O)
1516 # but otherwise untouched.
1517 # That means that there is some irrelevant stuff
1518 # in here, but maintenance should be easier.
1519 #
1520
1521 $(O)tos.o: ..\sys\atari\tos.c $(HACK_H) $(INCL)\tcap.h
1522         @$(CC) $(cflagsBuild) -Fo$@ ..\sys\atari\tos.c
1523 $(O)pctty.o: ..\sys\share\pctty.c $(HACK_H)
1524         @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\pctty.c
1525 $(O)isaac64.o: ..\src\isaac64.c $(HACK_H) $(INCL)\isaac64.h $(INCL)\integer.h
1526         @$(CC) $(cflagsBuild) -Fo$@ ..\src\isaac64.c
1527 $(O)random.o: ..\sys\share\random.c $(HACK_H)
1528         @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\random.c
1529 $(O)ioctl.o: ..\sys\share\ioctl.c $(HACK_H) $(INCL)\tcap.h
1530         @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\ioctl.c
1531 $(O)unixtty.o: ..\sys\share\unixtty.c $(HACK_H)
1532         @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\unixtty.c
1533 $(O)unixmain.o: ..\sys\unix\unixmain.c $(HACK_H) $(INCL)\dlb.h
1534         @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixmain.c
1535 $(O)unixunix.o: ..\sys\unix\unixunix.c $(HACK_H)
1536         @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixunix.c
1537 $(O)unixres.o: ..\sys\unix\unixres.c $(CONFIG_H)
1538         @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixres.c
1539 $(O)bemain.o: ..\sys\be\bemain.c $(HACK_H) $(INCL)\dlb.h
1540         @$(CC) $(cflagsBuild) -Fo$@ ..\sys\be\bemain.c
1541 $(O)getline.o: ..\win\tty\getline.c $(HACK_H) $(INCL)\func_tab.h
1542         @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\getline.c
1543 $(O)termcap.o: ..\win\tty\termcap.c $(HACK_H) $(INCL)\tcap.h
1544         @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\termcap.c
1545 $(O)topl.o: ..\win\tty\topl.c $(HACK_H) $(INCL)\tcap.h
1546         @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\topl.c
1547 $(O)wintty.o: ..\win\tty\wintty.c $(HACK_H) $(INCL)\dlb.h $(INCL)\tcap.h
1548         @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\wintty.c
1549 #$(O)Window.o: ..\win\X11\Window.c $(INCL)\xwindowp.h $(INCL)\xwindow.h \
1550 #               $(CONFIG_H)
1551 #       @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\Window.c
1552 $(O)dialogs.o: ..\win\X11\dialogs.c $(CONFIG_H)
1553         @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\dialogs.c
1554 $(O)winX.o: ..\win\X11\winX.c $(HACK_H) $(INCL)\winX.h $(INCL)\dlb.h \
1555                 ..\win\X11\nh72icon ..\win\X11\nh56icon ..\win\X11\nh32icon
1556         @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winX.c
1557 $(O)winmap.o: ..\win\X11\winmap.c $(INCL)\xwindow.h $(HACK_H) $(INCL)\dlb.h \
1558                 $(INCL)\winX.h $(INCL)\tile2x11.h
1559         @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmap.c
1560 $(O)winmenu.o: ..\win\X11\winmenu.c $(HACK_H) $(INCL)\winX.h
1561         @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmenu.c
1562 $(O)winmesg.o: ..\win\X11\winmesg.c $(INCL)\xwindow.h $(HACK_H) $(INCL)\winX.h
1563         @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmesg.c
1564 $(O)winmisc.o: ..\win\X11\winmisc.c $(HACK_H) $(INCL)\func_tab.h \
1565                 $(INCL)\winX.h
1566         @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmisc.c
1567 $(O)winstat.o: ..\win\X11\winstat.c $(HACK_H) $(INCL)\winX.h
1568         @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winstat.c
1569 $(O)wintext.o: ..\win\X11\wintext.c $(HACK_H) $(INCL)\winX.h $(INCL)\xwindow.h
1570         @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\wintext.c
1571 $(O)winval.o: ..\win\X11\winval.c $(HACK_H) $(INCL)\winX.h
1572         @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winval.c
1573 $(O)tile.o: $(SRC)\tile.c $(HACK_H)
1574 $(O)gnaskstr.o: ..\win\gnome\gnaskstr.c ..\win\gnome\gnaskstr.h \
1575                 ..\win\gnome\gnmain.h
1576         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnaskstr.c
1577 $(O)gnbind.o: ..\win\gnome\gnbind.c ..\win\gnome\gnbind.h ..\win\gnome\gnmain.h \
1578                 ..\win\gnome\gnmenu.h ..\win\gnome\gnaskstr.h \
1579                 ..\win\gnome\gnyesno.h
1580         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnbind.c
1581 $(O)gnglyph.o: ..\win\gnome\gnglyph.c ..\win\gnome\gnglyph.h $(INCL)\tile2x11.h
1582         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnglyph.c
1583 $(O)gnmain.o: ..\win\gnome\gnmain.c ..\win\gnome\gnmain.h ..\win\gnome\gnsignal.h \
1584                 ..\win\gnome\gnbind.h ..\win\gnome\gnopts.h $(HACK_H) \
1585                 $(INCL)\date.h
1586         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmain.c
1587 $(O)gnmap.o: ..\win\gnome\gnmap.c ..\win\gnome\gnmap.h ..\win\gnome\gnglyph.h \
1588                 ..\win\gnome\gnsignal.h $(HACK_H)
1589         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmap.c
1590 $(O)gnmenu.o: ..\win\gnome\gnmenu.c ..\win\gnome\gnmenu.h ..\win\gnome\gnmain.h \
1591                 ..\win\gnome\gnbind.h $(INCL)\func_tab.h
1592         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmenu.c
1593 $(O)gnmesg.o: ..\win\gnome\gnmesg.c ..\win\gnome\gnmesg.h ..\win\gnome\gnsignal.h
1594         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmesg.c
1595 $(O)gnopts.o: ..\win\gnome\gnopts.c ..\win\gnome\gnopts.h ..\win\gnome\gnglyph.h \
1596                 ..\win\gnome\gnmain.h ..\win\gnome\gnmap.h $(HACK_H)
1597         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnopts.c
1598 $(O)gnplayer.o: ..\win\gnome\gnplayer.c ..\win\gnome\gnplayer.h \
1599                 ..\win\gnome\gnmain.h $(HACK_H)
1600         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnplayer.c
1601 $(O)gnsignal.o: ..\win\gnome\gnsignal.c ..\win\gnome\gnsignal.h \
1602                 ..\win\gnome\gnmain.h
1603         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnsignal.c
1604 $(O)gnstatus.o: ..\win\gnome\gnstatus.c ..\win\gnome\gnstatus.h \
1605                 ..\win\gnome\gnsignal.h ..\win\gnome\gn_xpms.h \
1606                 ..\win\gnome\gnomeprv.h
1607         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnstatus.c
1608 $(O)gntext.o: ..\win\gnome\gntext.c ..\win\gnome\gntext.h ..\win\gnome\gnmain.h \
1609                 ..\win\gnome\gn_rip.h
1610         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gntext.c
1611 $(O)gnyesno.o: ..\win\gnome\gnyesno.c ..\win\gnome\gnbind.h ..\win\gnome\gnyesno.h
1612         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnyesno.c
1613 $(O)gnworn.o: ..\win\gnome\gnworn.c ..\win\gnome\gnworn.h ..\win\gnome\gnglyph.h \
1614                 ..\win\gnome\gnsignal.h ..\win\gnome\gnomeprv.h
1615         @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnworn.c
1616 $(O)wingem.o: ..\win\gem\wingem.c $(HACK_H) $(INCL)\func_tab.h $(INCL)\dlb.h \
1617                 $(INCL)\patchlevel.h $(INCL)\wingem.h
1618         @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\wingem.c
1619 $(O)wingem1.o: ..\win\gem\wingem1.c $(INCL)\gem_rsc.h $(INCL)\load_img.h \
1620                 $(INCL)\gr_rect.h $(INCL)\wintype.h $(INCL)\wingem.h
1621         @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\wingem1.c
1622 $(O)load_img.o: ..\win\gem\load_img.c $(INCL)\load_img.h
1623         @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\load_img.c
1624 $(O)gr_rect.o: ..\win\gem\gr_rect.c $(INCL)\gr_rect.h
1625         @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\gr_rect.c
1626 $(O)tile.o: $(SRC)\tile.c $(HACK_H)
1627 $(O)qt_win.o: ..\win\Qt\qt_win.cpp $(HACK_H) $(INCL)\func_tab.h \
1628                 $(INCL)\dlb.h $(INCL)\patchlevel.h $(INCL)\tile2x11.h \
1629                 $(INCL)\qt_win.h $(INCL)\qt_clust.h $(INCL)\qt_kde0.h \
1630                 $(INCL)\qt_xpms.h qt_win.moc qt_kde0.moc qttableview.moc
1631         $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_win.cpp
1632 $(O)qt_clust.o: ..\win\Qt\qt_clust.cpp $(INCL)\qt_clust.h
1633         $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_clust.cpp
1634 $(O)qttableview.o: ..\win\Qt\qttableview.cpp $(INCL)\qttableview.h
1635         $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qttableview.cpp
1636 $(O)wc_chainin.o: ..\win\chain\wc_chainin.c $(HACK_H)
1637         @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_chainin.c
1638 $(O)wc_chainout.o: ..\win\chain\wc_chainout.c $(HACK_H)
1639         @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_chainout.c
1640 $(O)wc_trace.o: ..\win\chain\wc_trace.c $(HACK_H) $(INCL)\func_tab.h
1641         @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_trace.c
1642 $(O)vis_tab.o: vis_tab.c $(CONFIG_H) $(INCL)\vis_tab.h
1643 $(O)allmain.o: allmain.c $(HACK_H)
1644 $(O)alloc.o: alloc.c $(CONFIG_H)
1645 $(O)apply.o: apply.c $(HACK_H)
1646 $(O)artifact.o: artifact.c $(HACK_H) $(INCL)\artifact.h $(INCL)\artilist.h
1647 $(O)attrib.o: attrib.c $(HACK_H)
1648 $(O)ball.o: ball.c $(HACK_H)
1649 $(O)bones.o: bones.c $(HACK_H) $(INCL)\lev.h
1650 $(O)botl.o: botl.c $(HACK_H)
1651 $(O)cmd.o: cmd.c $(HACK_H) $(INCL)\func_tab.h
1652 $(O)dbridge.o: dbridge.c $(HACK_H)
1653 $(O)decl.o: decl.c $(HACK_H)
1654 $(O)detect.o: detect.c $(HACK_H) $(INCL)\artifact.h
1655 $(O)dig.o: dig.c $(HACK_H)
1656 $(O)display.o: display.c $(HACK_H)
1657 $(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)\dlb.h
1658 $(O)do.o: do.c $(HACK_H) $(INCL)\lev.h
1659 $(O)do_name.o: do_name.c $(HACK_H)
1660 $(O)do_wear.o: do_wear.c $(HACK_H)
1661 $(O)dog.o: dog.c $(HACK_H)
1662 $(O)dogmove.o: dogmove.c $(HACK_H) $(INCL)\mfndpos.h
1663 $(O)dokick.o: dokick.c $(HACK_H)
1664 $(O)dothrow.o: dothrow.c $(HACK_H)
1665 $(O)drawing.o: drawing.c $(HACK_H) $(INCL)\tcap.h
1666 $(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)\dgn_file.h $(INCL)\dlb.h
1667 $(O)eat.o: eat.c $(HACK_H)
1668 $(O)end.o: end.c $(HACK_H) $(INCL)\lev.h $(INCL)\dlb.h
1669 $(O)engrave.o: engrave.c $(HACK_H) $(INCL)\lev.h
1670 $(O)exper.o: exper.c $(HACK_H)
1671 $(O)explode.o: explode.c $(HACK_H)
1672 $(O)extralev.o: extralev.c $(HACK_H)
1673 $(O)files.o: files.c $(HACK_H) $(INCL)\dlb.h #zlib.h
1674 $(O)fountain.o: fountain.c $(HACK_H)
1675 $(O)hack.o: hack.c $(HACK_H)
1676 $(O)hacklib.o: hacklib.c $(HACK_H)
1677 $(O)invent.o: invent.c $(HACK_H)
1678 $(O)light.o: light.c $(HACK_H) $(INCL)\lev.h
1679 $(O)lock.o: lock.c $(HACK_H)
1680 $(O)mail.o: mail.c $(HACK_H) $(INCL)\mail.h
1681 $(O)makemon.o: makemon.c $(HACK_H)
1682 $(O)mapglyph.o: mapglyph.c $(HACK_H)
1683 $(O)mcastu.o: mcastu.c $(HACK_H)
1684 $(O)mhitm.o: mhitm.c $(HACK_H) $(INCL)\artifact.h
1685 $(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)\artifact.h
1686 $(O)minion.o: minion.c $(HACK_H)
1687 $(O)mklev.o: mklev.c $(HACK_H)
1688 $(O)mkmap.o: mkmap.c $(HACK_H) $(INCL)\sp_lev.h
1689 $(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)\sp_lev.h $(INCL)\lev.h
1690 $(O)mkobj.o: mkobj.c $(HACK_H)
1691 $(O)mkroom.o: mkroom.c $(HACK_H)
1692 $(O)mon.o: mon.c $(HACK_H) $(INCL)\mfndpos.h
1693 $(O)mondata.o: mondata.c $(HACK_H)
1694 $(O)monmove.o: monmove.c $(HACK_H) $(INCL)\mfndpos.h $(INCL)\artifact.h
1695 $(O)monst.o: monst.c $(CONFIG_H) $(INCL)\permonst.h $(INCL)\align.h \
1696                 $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\monsym.h \
1697                 $(INCL)\color.h
1698 $(O)mplayer.o: mplayer.c $(HACK_H)
1699 $(O)mthrowu.o: mthrowu.c $(HACK_H)
1700 $(O)muse.o: muse.c $(HACK_H)
1701 $(O)music.o: music.c $(HACK_H) #interp.c
1702 $(O)o_init.o: o_init.c $(HACK_H) $(INCL)\lev.h
1703 $(O)objects.o: objects.c $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \
1704                 $(INCL)\prop.h $(INCL)\skills.h $(INCL)\color.h
1705 $(O)objectsj.o: objectsj.c $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \
1706                 $(INCL)\prop.h $(INCL)\skills.h $(INCL)\color.h
1707 $(O)objnam.o: objnam.c $(HACK_H)
1708 $(O)options.o: options.c $(CONFIG_H) $(INCL)\objclass.h $(INCL)\flag.h \
1709                 $(HACK_H) $(INCL)\tcap.h
1710 $(O)pager.o: pager.c $(HACK_H) $(INCL)\dlb.h
1711 $(O)pickup.o: pickup.c $(HACK_H)
1712 $(O)pline.o: pline.c $(HACK_H)
1713 $(O)polyself.o: polyself.c $(HACK_H)
1714 $(O)potion.o: potion.c $(HACK_H)
1715 $(O)pray.o: pray.c $(HACK_H)
1716 $(O)priest.o: priest.c $(HACK_H) $(INCL)\mfndpos.h
1717 $(O)quest.o: quest.c $(HACK_H) $(INCL)\qtext.h
1718 $(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)\dlb.h $(INCL)\qtext.h
1719 $(O)read.o: read.c $(HACK_H)
1720 $(O)rect.o: rect.c $(HACK_H)
1721 $(O)region.o: region.c $(HACK_H) $(INCL)\lev.h
1722 $(O)restore.o: restore.c $(HACK_H) $(INCL)\lev.h $(INCL)\tcap.h
1723 $(O)rip.o: rip.c $(HACK_H)
1724 $(O)rnd.o: rnd.c $(HACK_H)
1725 $(O)role.o: role.c $(HACK_H)
1726 $(O)rumors.o: rumors.c $(HACK_H) $(INCL)\lev.h $(INCL)\dlb.h
1727 $(O)save.o: save.c $(HACK_H) $(INCL)\lev.h
1728 $(O)shk.o: shk.c $(HACK_H)
1729 $(O)shknam.o: shknam.c $(HACK_H)
1730 $(O)sit.o: sit.c $(HACK_H) $(INCL)\artifact.h
1731 $(O)sounds.o: sounds.c $(HACK_H)
1732 $(O)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)\dlb.h $(INCL)\sp_lev.h
1733 $(O)spell.o: spell.c $(HACK_H)
1734 $(O)steal.o: steal.c $(HACK_H)
1735 $(O)steed.o: steed.c $(HACK_H)
1736 $(O)sys.o: sys.c $(HACK_H)
1737 $(O)teleport.o: teleport.c $(HACK_H)
1738 $(O)timeout.o: timeout.c $(HACK_H) $(INCL)\lev.h
1739 $(O)topten.o: topten.c $(HACK_H) $(INCL)\dlb.h $(INCL)\patchlevel.h
1740 $(O)track.o: track.c $(HACK_H)
1741 $(O)trap.o: trap.c $(HACK_H)
1742 $(O)u_init.o: u_init.c $(HACK_H)
1743 $(O)uhitm.o: uhitm.c $(HACK_H)
1744 $(O)vault.o: vault.c $(HACK_H)
1745 $(O)version.o: version.c $(HACK_H) $(INCL)\dlb.h $(INCL)\date.h \
1746                 $(INCL)\patchlevel.h
1747 $(O)vision.o: vision.c $(HACK_H) $(INCL)\vis_tab.h
1748 $(O)weapon.o: weapon.c $(HACK_H)
1749 $(O)were.o: were.c $(HACK_H)
1750 $(O)wield.o: wield.c $(HACK_H)
1751 #$(O)windows.o: windows.c $(HACK_H) $(INCL)\wingem.h $(INCL)\winGnome.h
1752 $(O)wizard.o: wizard.c $(HACK_H) $(INCL)\qtext.h
1753 $(O)worm.o: worm.c $(HACK_H) $(INCL)\lev.h
1754 $(O)worn.o: worn.c $(HACK_H)
1755 $(O)write.o: write.c $(HACK_H)
1756 $(O)zap.o: zap.c $(HACK_H)
1757
1758 #
1759 # from japanese
1760 #
1761
1762 $(O)jlib.o:    $(PCH) $(JP)\jlib.c $(HACK_H)
1763 $(O)jconj.o:   $(PCH) $(JP)\jconj.c $(HACK_H)
1764 #$(O)jtrns.o:   $(PCH) $(JP)\jtrns.c $(HACK_H) $(INCL)\jdata.h
1765
1766 # end of file
1767