File: Makefile.msc

package info (click to toggle)
glhack 1.2-8.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,744 kB
  • sloc: ansic: 208,571; cpp: 13,139; yacc: 2,005; makefile: 1,152; lex: 377; sh: 121; awk: 89; sed: 11
file content (1419 lines) | stat: -rw-r--r-- 47,051 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
#       SCCS Id: @(#)Makefile.msc       3.4     $Date: 2003/11/16 04:50:58 $
#       Copyright (c) NetHack PC Development Team 1993-2003
#
#       NetHack 3.4.x Makefile for MS Visual C++ V6.x and above and MS NMAKE
#  
#       Win32 Compilers Tested:
#                              - Microsoft 32 bit Visual C++ V4.x
#                              - Microsoft 32 bit Visual C++ V6.0 SP3, SP4
#
#   This is used for building two versions of NetHack:
#   A tty port utilizing the Win32 Console I/O subsystem, Console
#       NetHack;
#   A Win32 native port built on the Windows API, Graphical NetHack or
#       NetHackW.
#
#       In addition to your C compiler,
#
#       if you want to change           you will need a
#       files with suffix               workalike for
#              .y                           yacc   (such as bison)
#              .l                           lex    (such as flex)
#
#
#       If you have any questions read the sys/winnt/Install.nt file included 
#       with the distribution.
#==============================================================================
# Do not delete the following 3 lines.
#
TARGETOS=BOTH
APPVER=4.0
!include <win32.mak>

# Graphical interface
# Set to Y for a graphical version

#GRAPHICAL = Y

#  Set the gamedir according to your preference.  
#  If not present prior to compilation it gets created.

!IF "$(GRAPHICAL)" == "Y"
GAME    = NetHackW                # Game Name
!ELSE
GAME    = NetHack                 # Game Name
!ENDIF

GAMEDIR = ..\binary               # Game directory

#
#  Source directories.    Makedefs hardcodes these, don't change them.
#

INCL  = ..\include   # NetHack include files
DAT   = ..\dat       # NetHack data files
DOC   = ..\doc       # NetHack documentation files
UTIL  = ..\util      # Utility source
SRC   = ..\src       # Main source
SSYS  = ..\sys\share # Shared system files
NTSYS = ..\sys\winnt # NT Win32 specific files
TTY   = ..\win\tty   # window port files (tty)
WIN32 = ..\win\win32 # window port files (Win32)
WSHR  = ..\win\share # Tile support files 

#
#  Object directory.
#

OBJ     = o


#
#==========================================
# Exe File Info.
#==========================================
 
# Yacc/Lex ... if you got 'em.
#
# If you have yacc and lex programs (or work-alike such as bison 
# and flex), comment out the upper two macros and uncomment 
# the lower two.
#

DO_YACC = YACC_MSG
DO_LEX  = LEX_MSG
#DO_YACC  = YACC_ACT
#DO_LEX   = LEX_ACT

# - Specify your yacc and lex programs (or work-alikes) here.

#YACC	= bison -y
YACC   = byacc
#YACC	= yacc

#LEX	= lex
LEX	= flex

#
# - Specify your flex skeleton file (if needed).
#

FLEXSKEL =
#FLEXSKEL = -S../tools/flex.ske

YTABC   = y_tab.c
YTABH   = y_tab.h
LEXYYC  = lexyy.c

#
# Optional high-quality BSD random number generation routines
# (see pcconf.h). Set to nothing if not used.
#

RANDOM	= $(OBJ)\random.o
#RANDOM	=

#
#  Leave the next two lines uncommented _ONLY_ if you do NOT want any
#  debug capability in the object files, or in the NetHack executable.
#  Comment them if you want debug capability.

#cdebug =
#linkdebug =

#
# Compiler and Linker flags
#

PRECOMPHEAD = N			# set to Y if you want to use precomp. headers

#===============================================
#======= End of Modification Section ===========
#===============================================
################################################
#                                              #
# Nothing below here should have to be changed.#
#                                              #
################################################

!IF "$(GRAPHICAL)" == "Y"
WINPORT	= $(O)tile.o $(O)mhaskyn.o $(O)mhdlg.o \
	$(O)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \
	$(O)mhmenu.o $(O)mhmsgwnd.o $(O)mhrip.o $(O)mhsplash.o \
	$(O)mhstatus.o $(O)mhtext.o $(O)mswproc.o $(O)winhack.o
WINPHDR	= $(WIN32)\mhaskyn.h $(WIN32)\mhdlg.h $(WIN32)\mhfont.h \
	$(WIN32)\mhinput.h $(WIN32)\mhmain.h $(WIN32)\mhmap.h $(WIN32)\mhmenu.h \
	$(WIN32)\mhmsg.h $(WIN32)\mhmsgwnd.h $(WIN32)\mhrip.h $(WIN32)\mhstatus.h \
	$(WIN32)\mhtext.h $(WIN32)\resource.h $(WIN32)\winMS.h
WINDLLS =
WINPFLAG= -DTILES -DMSWIN_GRAPHICS
NHRES	= $(O)winhack.res
WINPINC	= -I$(WIN32)
!ELSE
WINPORT	= $(O)nttty.o    
WINPHDR	=
WINDLLS	= $(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll $(GAMEDIR)\nhraykey.dll
WINPFLAG= -DWIN32CON
NHRES	= $(O)console.res
WINPINC	=
!ENDIF

TILEUTIL16  = $(UTIL)\tile2bmp.exe
TILEBMP16   = $(SRC)\tiles.bmp

TILEUTIL32  = $(UTIL)\til2bm32.exe
TILEBMP32   = $(SRC)\tiles32.bmp

SOUND = $(OBJ)\ntsound.o

#SOUND =

# To store all the level files,
# help files, etc. in a single library file.
# USE_DLB = Y is left uncommented

USE_DLB = Y

! IF ("$(USE_DLB)"=="Y")
DLBFLG = -DDLB
! ELSE
DLBFLG =
! ENDIF

#==========================================
# Setting up the compiler and linker
# macros. All builds include the base ones.
#==========================================

CFLAGSBASE  = -c $(cflags) $(cvarsmt) -I$(INCL) -nologo $(cdebug) $(WINPINC)
LFLAGSBASEC = $(linkdebug) /NODEFAULTLIB /INCREMENTAL:NO /RELEASE /NOLOGO -subsystem:console,4.0 $(conlibsmt)
LFLAGSBASEG = $(linkdebug) $(guiflags) $(guilibsmt) comctl32.lib

#==========================================
# Util builds
#==========================================

CFLAGSU = $(CFLAGSBASE) $(WINPFLAG)
LFLAGSU	= $(LFLAGSBASEC)

#==========================================
# - Game build
#==========================================
LFLAGSBASE = $(linkdebug) /NODEFAULTLIB /INCREMENTAL:NO /RELEASE /NOLOGO -subsystem:console,4.0 $(conlibsmt)
CFLAGS	 = $(CFLAGSBASE) $(WINPFLAG) $(DLBFLG)
NHLFLAGS1 = /NODEFAULTLIB /INCREMENTAL:NO /PDB:"$(GAME).PDB" /RELEASE /NOLOGO
NHLFLAGS2 = /MAP:"$(GAME).MAP" /MACHINE:$(CPU) -IGNORE:505 
!IF ("$(GRAPHICAL)"=="Y")
LFLAGS	= $(LFLAGSBASEG) $(NHLFLAGS1) $(NHLFLAGS2)
!ELSE
LFLAGS	= $(LFLAGSBASEC) $(NHLFLAGS1) $(NHLFLAGS2)
!ENDIF

GAMEFILE = $(GAMEDIR)\$(GAME).exe # whole thing

! IF ("$(USE_DLB)"=="Y")
DLB = nhdat
! ELSE
DLB =
! ENDIF

#==========================================
#================ RULES ==================
#==========================================

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

#==========================================
# Rules for files in src
#==========================================

.c{$(OBJ)}.o:
	@$(cc) $(CFLAGS)  -Fo$@ $<

{$(SRC)}.c{$(OBJ)}.o:
	@$(CC) $(CFLAGS)   -Fo$@  $<

#==========================================
# Rules for files in sys\share
#==========================================

{$(SSYS)}.c{$(OBJ)}.o:
	@$(CC) $(CFLAGS)  -Fo$@  $<

#==========================================
# Rules for files in sys\winnt
#==========================================

{$(NTSYS)}.c{$(OBJ)}.o:
	@$(CC) $(CFLAGS)  -Fo$@  $<

{$(NTSYS)}.h{$(INCL)}.h:
	@copy $< $@

#==========================================
# Rules for files in util
#==========================================

{$(UTIL)}.c{$(OBJ)}.o:
	@$(CC) $(CFLAGSU) -Fo$@ $<

#==========================================
# Rules for files in win\share
#==========================================

{$(WSHR)}.c{$(OBJ)}.o:
	@$(CC) $(CFLAGS)  -Fo$@ $<

{$(WSHR)}.h{$(INCL)}.h:
	@copy $< $@

#{$(WSHR)}.txt{$(DAT)}.txt:
#	@copy $< $@

#==========================================
# Rules for files in win\tty
#==========================================

{$(TTY)}.c{$(OBJ)}.o:
	@$(CC) $(CFLAGS)  -Fo$@  $<


#==========================================
# Rules for files in win\win32
#==========================================

{$(WIN32)}.c{$(OBJ)}.o:
	@$(cc) $(CFLAGS)  -Fo$@  $<

#==========================================
#================ MACROS ==================
#==========================================
# This section creates shorthand macros for many objects
# referenced later on in the Makefile.
#

DEFFILE = $(NTSYS)\$(GAME).def

#
# Shorten up the location for some files
#

O  = $(OBJ)^\

U  = $(UTIL)^\

#
# Utility Objects.
#

MAKESRC        = $(U)makedefs.c

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

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

MAKEOBJS       = $(O)makedefs.o $(O)monst.o $(O)objects.o

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

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

RECOVOBJS      = $(O)recover.o

TILEFILES      = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt

#
# These are not invoked during a normal game build in 3.4
#
TEXT_IO        = $(O)tiletext.o	$(O)tiletxt.o	$(O)drawing.o \
		 $(O)decl.o	$(O)monst.o	$(O)objects.o

TEXT_IO32      = $(O)tilete32.o $(O)tiletx32.o $(O)drawing.o \
		 $(O)decl.o	$(O)monst.o	$(O)objects.o

GIFREADERS     = $(O)gifread.o	$(O)alloc.o $(O)panic.o
GIFREADERS32   = $(O)gifrd32.o $(O)alloc.o $(O)panic.o

PPMWRITERS     = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o

#
#  Object files for the game itself.
#

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

DLBOBJ = $(O)dlb.o

TTYOBJ = $(O)topl.o     $(O)getline.o  $(O)wintty.o

SOBJ   = $(O)winnt.o    $(O)pcsys.o      $(O)pcunix.o  \
	   $(SOUND) 	$(O)mapimail.o $(O)nhlan.o

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

WINPOBJ = $(WINPORT)

VVOBJ  = $(O)version.o

ALLOBJ  = $(WINPOBJ) $(SOBJ) $(DLBOBJ)  $(TTYOBJ) $(WOBJ) $(OBJS) $(VVOBJ)

!IF "$(GRAPHICAL)" == "Y"
OPTIONS_FILE = $(DAT)\guioptions
!ELSE
OPTIONS_FILE = $(DAT)\ttyoptions
!ENDIF
#==========================================
# Header file macros
#==========================================

CONFIG_H = $(INCL)\config.h $(INCL)\config1.h $(INCL)\tradstdc.h \
		$(INCL)\global.h $(INCL)\coord.h $(INCL)\vmsconf.h \
		$(INCL)\system.h $(INCL)\unixconf.h $(INCL)\os2conf.h \
		$(INCL)\micro.h $(INCL)\pcconf.h $(INCL)\tosconf.h \
		$(INCL)\amiconf.h $(INCL)\macconf.h $(INCL)\beconf.h \
		$(INCL)\ntconf.h $(INCL)\nhlan.h

HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\align.h \
		$(INCL)\dungeon.h $(INCL)\monsym.h $(INCL)\mkroom.h \
		$(INCL)\objclass.h $(INCL)\youprop.h $(INCL)\prop.h \
		$(INCL)\permonst.h $(INCL)\monattk.h \
		$(INCL)\monflag.h $(INCL)\mondata.h $(INCL)\pm.h \
		$(INCL)\wintype.h $(INCL)\decl.h $(INCL)\quest.h \
		$(INCL)\spell.h $(INCL)\color.h $(INCL)\obj.h \
		$(INCL)\you.h $(INCL)\attrib.h $(INCL)\monst.h \
		$(INCL)\skills.h $(INCL)\onames.h $(INCL)\timeout.h \
		$(INCL)\trap.h $(INCL)\flag.h $(INCL)\rm.h \
		$(INCL)\vision.h $(INCL)\display.h $(INCL)\engrave.h \
		$(INCL)\rect.h $(INCL)\region.h $(INCL)\winprocs.h \
		$(INCL)\wintty.h $(INCL)\trampoli.h

LEV_H       = $(INCL)\lev.h
DGN_FILE_H  = $(INCL)\dgn_file.h
LEV_COMP_H  = $(INCL)\lev_comp.h
SP_LEV_H    = $(INCL)\sp_lev.h
TILE_H      = ..\win\share\tile.h

#==========================================
# Miscellaneous
#==========================================

DATABASE = $(DAT)\data.base

#
#  The name of the game.
#

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

#==========================================
#=============== TARGETS ==================
#==========================================

#
#  The default make target (so just typing 'nmake' is useful).
#
default : $(GAMEFILE)

#
#  The main target.
#

$(GAME): $(O)obj.tag $(O)utility.tag envchk $(GAMEFILE)
	@echo $(GAME) is up to date.

#
#  Everything
#

all :	install

install: envchk $(GAME) $(O)install.tag
	 @echo Done.

$(O)install.tag: 	$(DAT)\data	$(DAT)\rumors	 $(DAT)\dungeon \
	 	$(DAT)\oracles	$(DAT)\quest.dat $(O)sp_lev.tag $(DLB)
! IF ("$(USE_DLB)"=="Y")
	copy nhdat                $(GAMEDIR)
	copy $(DAT)\license       $(GAMEDIR)
	copy $(DAT)\opthelp       $(GAMEDIR)
! ELSE
	copy $(DAT)\*.            $(GAMEDIR)
	copy $(DAT)\*.dat         $(GAMEDIR)
	copy $(DAT)\*.lev         $(GAMEDIR)
	if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile
! ENDIF
	if exist $(DOC)\guidebook.txt copy $(DOC)\guidebook.txt $(GAMEDIR)\Guidebook.txt
	if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt
	@if exist $(SRC)\$(GAME).PDB copy $(SRC)\$(GAME).pdb $(GAMEDIR)\$(GAME).pdb
	@if exist $(GAMEDIR)\$(GAME).PDB echo NOTE: You may want to remove $(GAMEDIR)\$(GAME).pdb to conserve space
	-copy $(NTSYS)\defaults.nh   $(GAMEDIR)\defaults.nh
	echo install done > $@

#	copy $(NTSYS)\winnt.hlp    $(GAMEDIR)

recover: $(U)recover.exe
	if exist $(U)recover.exe copy $(U)recover.exe  $(GAMEDIR)
	if exist $(DOC)\recover.txt copy $(DOC)\recover.txt $(GAMEDIR)\recover.txt

$(O)sp_lev.tag: $(O)utility.tag $(DAT)\bigroom.des  $(DAT)\castle.des \
	$(DAT)\endgame.des $(DAT)\gehennom.des $(DAT)\knox.des   \
	$(DAT)\medusa.des  $(DAT)\oracle.des   $(DAT)\tower.des  \
	$(DAT)\yendor.des  $(DAT)\arch.des     $(DAT)\barb.des   \
	$(DAT)\caveman.des $(DAT)\healer.des   $(DAT)\knight.des \
	$(DAT)\monk.des    $(DAT)\priest.des   $(DAT)\ranger.des \
	$(DAT)\rogue.des   $(DAT)\samurai.des  $(DAT)\sokoban.des \
	$(DAT)\tourist.des $(DAT)\valkyrie.des $(DAT)\wizard.des
	cd $(DAT)
	$(U)lev_comp bigroom.des
	$(U)lev_comp castle.des
	$(U)lev_comp endgame.des
	$(U)lev_comp gehennom.des
	$(U)lev_comp knox.des
	$(U)lev_comp mines.des
	$(U)lev_comp medusa.des
	$(U)lev_comp oracle.des
	$(U)lev_comp sokoban.des
	$(U)lev_comp tower.des
	$(U)lev_comp yendor.des
	$(U)lev_comp arch.des
	$(U)lev_comp barb.des
	$(U)lev_comp caveman.des
	$(U)lev_comp healer.des
	$(U)lev_comp knight.des
	$(U)lev_comp monk.des
	$(U)lev_comp priest.des
	$(U)lev_comp ranger.des
	$(U)lev_comp rogue.des
	$(U)lev_comp samurai.des
	$(U)lev_comp tourist.des
	$(U)lev_comp valkyrie.des
	$(U)lev_comp wizard.des
	cd $(SRC)
	echo sp_levs done > $(O)sp_lev.tag

$(O)utility.tag: $(INCL)\date.h $(INCL)\onames.h $(INCL)\pm.h \
		$(SRC)\monstr.c		$(SRC)\vis_tab.c  \
		$(U)lev_comp.exe	$(INCL)\vis_tab.h \
		$(U)dgn_comp.exe
             @echo utilities made >$@
	     @echo utilities made.

tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe
	@echo Optional tile development utilities are up to date.

!IF "$(GRAPHICAL)"=="Y"
$(NHRES): $(TILEBMP16) $(WIN32)\winhack.rc $(WIN32)\mnsel.bmp \
	$(WIN32)\mnselcnt.bmp $(WIN32)\mnunsel.bmp \
	$(WIN32)\petmark.bmp $(WIN32)\NetHack.ico $(WIN32)\rip.bmp \
	$(WIN32)\splash.bmp
	@$(rc) -r -fo$@ -i$(WIN32) -dNDEBUG $(WIN32)\winhack.rc
!ELSE
$(NHRES): $(NTSYS)\console.rc $(NTSYS)\NetHack.ico
	@$(rc) -r -fo$@ -i$(NTSYS) -dNDEBUG $(NTSYS)\console.rc
!ENDIF

#==========================================
#  The main target.
#==========================================

#  The section for linking the NetHack image looks a little strange at 
#  first, especially if you are used to UNIX makes, or NDMAKE.  It is 
#  Microsoft nmake specific, and it gets around the problem of the 
#  link command line being too long for the linker.  An "in-line" linker 
#  response file is generated temporarily.
#
#  It takes advantage of the following features of nmake:
#
#  Inline files : 
#			Specifying the "<<" means to start an inline file.
#                 	Another "<<" at the start of a line closes the 
#                 	inline file.
#
#  Substitution within Macros:
#                       $(mymacro:string1=string2) replaces every
#                       occurrence of string1 with string2 in the 
#                       macro mymacro.  Special ascii key codes may be 
#                       used in the substitution text by preceding it 
#                       with ^ as we have done below.  Every occurence
#                       of a <tab> in $(ALLOBJ) is replaced by 
#                       <+><return><tab>.
#
#  DO NOT INDENT THE << below!
#

$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(O)gamedir.tag $(WINDLLS)
	@if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
	@echo Linking....
	$(link) $(LFLAGS) user32.lib winmm.lib -out:$@ @<<$(GAME).lnk
		$(ALLOBJ:^	=^
		) $(NHRES)
<<
	@if exist $(O)install.tag del $(O)install.tag
	@if exist $(GAMEDIR)\$(GAME).bak del $(GAMEDIR)\$(GAME).bak

$(O)gamedir.tag:
	@if not exist $(GAMEDIR)\*.* echo creating directory $(GAMEDIR)
	@if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
	@echo directory created > $@

$(O)nhdefkey.def:
	@echo EXPORTS >$@
	@echo    ProcessKeystroke >>$@
	@echo    NHkbhit >>$@
	@echo    CheckInput >>$@
	@echo    SourceWhere >>$@
	@echo    SourceAuthor >>$@
	@echo    KeyHandlerName >>$@

$(GAMEDIR)\nhdefkey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def
	@echo Linking $@
	@$(link) -debug:full -debugtype:cv /RELEASE /NOLOGO /DLL user32.lib \
		/PDB:"$(@B).PDB" /MAP:"$(@B).map" /DEF:$(O)$(@B).def \
		/IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o

$(O)nh340key.def:
	@echo EXPORTS >$@
	@echo    ProcessKeystroke >>$@
	@echo    NHkbhit >>$@
	@echo    CheckInput >>$@
	@echo    SourceWhere >>$@
	@echo    SourceAuthor >>$@
	@echo    KeyHandlerName >>$@

$(GAMEDIR)\nh340key.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def
	@echo Linking $@
	@$(link) -debug:full -debugtype:cv /RELEASE /NOLOGO /DLL user32.lib \
		/PDB:"$(@B).PDB" /MAP:"$(@B).map" /DEF:$(O)$(@B).def \
		/IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o

$(O)nhraykey.def:
	@echo EXPORTS >$@
	@echo    ProcessKeystroke >>$@
	@echo    NHkbhit >>$@
	@echo    CheckInput >>$@
	@echo    SourceWhere >>$@
	@echo    SourceAuthor >>$@
	@echo    KeyHandlerName >>$@

$(GAMEDIR)\nhraykey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def
	@echo Linking $@
	@$(link) -debug:full -debugtype:cv /RELEASE /NOLOGO /DLL user32.lib \
		/PDB:"$(@B).PDB" /MAP:"$(@B).map" /DEF:$(O)$(@B).def \
		/IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o

#
#  Secondary Targets.
#
    
#==========================================
# Makedefs Stuff
#==========================================

$(U)makedefs.exe:	$(MAKEOBJS)
	@$(link) $(LFLAGSU) -out:$@ $(MAKEOBJS)

$(O)makedefs.o: $(CONFIG_H)	$(INCL)\monattk.h $(INCL)\monflag.h   $(INCL)\objclass.h \
		 $(INCL)\monsym.h    $(INCL)\qtext.h	$(INCL)\patchlevel.h \
		 $(U)makedefs.c
	@if not exist $(OBJ)\*.* echo creating directory $(OBJ)
	@if not exist $(OBJ)\*.* mkdir $(OBJ)
	@$(CC) $(CFLAGSU) -Fo$@ $(U)makedefs.c

#
#  date.h should be remade every time any of the source or include
#  files is modified.
#

$(INCL)\date.h $(OPTIONS_FILE) : $(U)makedefs.exe
	$(U)makedefs -v

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

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

#$(INCL)\trap.h : $(U)makedefs.exe
#	$(U)makedefs -t

$(SRC)\monstr.c: $(U)makedefs.exe
	$(U)makedefs -m

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

$(SRC)\vis_tab.c: $(U)makedefs.exe
	$(U)makedefs -z

#==========================================
# uudecode utility and uuencoded targets
#==========================================

$(U)uudecode.exe: $(O)uudecode.o
	@$(link) $(LFLAGSU) -out:$@ $(O)uudecode.o

$(O)uudecode.o: $(SSYS)\uudecode.c

$(NTSYS)\NetHack.ico : $(U)uudecode.exe $(NTSYS)\nhico.uu 
	chdir $(NTSYS)
	..\..\util\uudecode.exe nhico.uu
	chdir ..\..\src

$(WIN32)\NetHack.ico : $(U)uudecode.exe $(NTSYS)\nhico.uu 
	chdir $(WIN32)
	..\..\util\uudecode.exe ../../sys/winnt/nhico.uu
	chdir ..\..\src

$(WIN32)\mnsel.bmp: $(U)uudecode.exe $(WIN32)\mnsel.uu
	chdir $(WIN32)
	..\..\util\uudecode.exe mnsel.uu
	chdir ..\..\src

$(WIN32)\mnselcnt.bmp: $(U)uudecode.exe $(WIN32)\mnselcnt.uu
	chdir $(WIN32)
	..\..\util\uudecode.exe mnselcnt.uu
	chdir ..\..\src

$(WIN32)\mnunsel.bmp: $(U)uudecode.exe $(WIN32)\mnunsel.uu
	chdir $(WIN32)
	..\..\util\uudecode.exe mnunsel.uu
	chdir ..\..\src

$(WIN32)\petmark.bmp: $(U)uudecode.exe $(WIN32)\petmark.uu
	chdir $(WIN32)
	..\..\util\uudecode.exe petmark.uu
	chdir ..\..\src

$(WIN32)\rip.bmp: $(U)uudecode.exe $(WIN32)\rip.uu
	chdir $(WIN32)
	..\..\util\uudecode.exe rip.uu
	chdir ..\..\src

$(WIN32)\splash.bmp: $(U)uudecode.exe $(WIN32)\splash.uu
	chdir $(WIN32)
	..\..\util\uudecode.exe splash.uu
	chdir ..\..\src

#==========================================
# Level Compiler Stuff
#==========================================

LEVCFLAGS=-c -nologo -DWINVER=0x0400 -DWIN32 -D_WIN32 \
	   -D_MT -MT -I..\include -nologo -Z7 -Od -DDLB

$(U)lev_comp.exe: $(SPLEVOBJS)
	@echo Linking $@...
	@$(link) $(LFLAGSU) -out:$@ @<<$(@B).lnk
 		$(SPLEVOBJS:^	=^
		)
<<

$(O)lev_yacc.o: $(HACK_H)   $(SP_LEV_H) $(INCL)\lev_comp.h $(U)lev_yacc.c
	@$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_yacc.c

$(O)lev_$(LEX).o: $(HACK_H)   $(INCL)\lev_comp.h $(SP_LEV_H) \
               $(U)lev_$(LEX).c
	@$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_$(LEX).c

$(O)lev_main.o:	$(U)lev_main.c $(HACK_H)   $(SP_LEV_H)
	@$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_main.c


$(U)lev_yacc.c $(INCL)\lev_comp.h : $(U)lev_comp.y
!	IF "$(DO_YACC)"=="YACC_ACT"
	   chdir $(UTIL)
	   $(YACC) -d lev_comp.y
	   copy $(YTABC) lev_yacc.c
	   copy $(YTABH) $(INCL)\lev_comp.h
	   @del $(YTABC)
	   @del $(YTABH)
	   chdir $(SRC)
!	ELSE
	   @echo $(U)lev_comp.y has changed.
	   @echo To update $(U)lev_yacc.c and $(INCL)\lev_comp.h run $(YACC).
	   @echo ---
	   @echo For now, we will copy the prebuilt lev_yacc.c and 
	   @echo lev_comp.h from $(SSYS) into $(UTIL) and use them.
	   @copy $(SSYS)\lev_yacc.c $(U)lev_yacc.c >nul
	   @copy $(SSYS)\lev_comp.h $(INCL)\lev_comp.h >nul
	   @echo /**/ >>$(U)lev_yacc.c
	   @echo /**/ >>$(INCL)\lev_comp.h
!	ENDIF

$(U)lev_$(LEX).c: $(U)lev_comp.l
!	IF "$(DO_LEX)"=="LEX_ACT"
	   chdir $(UTIL)
	   $(LEX) $(FLEXSKEL) lev_comp.l
	   copy $(LEXYYC) $@
	   @del $(LEXYYC)
	   chdir $(SRC)
!	ELSE
	   @echo $(U)lev_comp.l has changed. To update $@ run $(LEX).
	   @echo ---
	   @echo For now, we will copy the prebuilt lev_lex.c 
	   @echo from $(SSYS) into $(UTIL) and use it.
	   @copy $(SSYS)\lev_lex.c $@ >nul
	   @echo /**/ >>$@
!	ENDIF

#==========================================
# Dungeon Compiler Stuff
#==========================================

$(U)dgn_comp.exe: $(DGNCOMPOBJS)
    @echo Linking $@...
	@$(link) $(LFLAGSU) -out:$@ @<<$(@B).lnk
		$(DGNCOMPOBJS:^	=^
		)
<<

$(O)dgn_yacc.o:	$(HACK_H)   $(DGN_FILE_H) $(INCL)\dgn_comp.h $(U)dgn_yacc.c
	@$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_yacc.c

$(O)dgn_$(LEX).o: $(HACK_H)   $(DGN_FILE_H)  $(INCL)\dgn_comp.h \
	$(U)dgn_$(LEX).c
	@$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_$(LEX).c

$(O)dgn_main.o:	$(HACK_H) $(U)dgn_main.c
	@$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_main.c

$(U)dgn_yacc.c $(INCL)\dgn_comp.h : $(U)dgn_comp.y
!	IF "$(DO_YACC)"=="YACC_ACT"
	   chdir $(UTIL)
	   $(YACC) -d dgn_comp.y
	   copy $(YTABC) dgn_yacc.c
	   copy $(YTABH) $(INCL)\dgn_comp.h
	   @del $(YTABC)
	   @del $(YTABH)
	   chdir $(SRC)
!	ELSE
	   @echo $(U)dgn_comp.y has changed. To update dgn_yacc.c and 
	   @echo $(INCL)\dgn_comp.h run $(YACC).
	   @echo ---
	   @echo For now, we will copy the prebuilt $(U)dgn_yacc.c and 
	   @echo dgn_comp.h from $(SSYS) into $(UTIL) and use them.
	   @copy $(SSYS)\dgn_yacc.c $(U)dgn_yacc.c >nul
	   @copy $(SSYS)\dgn_comp.h $(INCL)\dgn_comp.h >nul
	   @echo /**/ >>$(U)dgn_yacc.c
	   @echo /**/ >>$(INCL)\dgn_comp.h
!	ENDIF

$(U)dgn_$(LEX).c: $(U)dgn_comp.l
!	IF "$(DO_LEX)"=="LEX_ACT"
	   chdir $(UTIL)
	   $(LEX) $(FLEXSKEL)  dgn_comp.l
	   copy $(LEXYYC) $@
	   @del $(LEXYYC)
	   chdir $(SRC)
!	ELSE
	   @echo $(U)dgn_comp.l has changed. To update $@ run $(LEX).
	   @echo ---
	   @echo For now, we will copy the prebuilt dgn_lex.c 
	   @echo from $(SSYS) into $(UTIL) and use it.
	   @copy $(SSYS)\dgn_lex.c $@ >nul
	   @echo /**/ >>$@
!	ENDIF

#==========================================
# Create directory for holding object files
#==========================================

$(O)obj.tag:
	@if not exist $(OBJ)\*.* echo creating directory $(OBJ)
	@if not exist $(OBJ)\*.* mkdir $(OBJ)
	@echo directory created >$@

#==========================================
# Notify of any CL environment variables
# in effect since they change the compiler
# options.
#==========================================

envchk:
!	IF "$(CL)"!=""
	   @echo Warning, the CL Environment variable is defined:
	   @echo CL=$(CL)
!	ENDIF
!   IF "$(GRAPHICAL)"=="Y"
	   @echo ----
	   @echo NOTE: This build will include tile support.
	   @echo ----
!	ENDIF

#==========================================
#=========== SECONDARY TARGETS ============
#==========================================

#===========================================
# Header files NOT distributed in ..\include
#===========================================

$(INCL)\win32api.h: $(NTSYS)\win32api.h
	copy $(NTSYS)\win32api.h $@


#==========================================
# DLB utility and nhdat file creation
#==========================================

$(U)dlb_main.exe: $(DLBOBJ) $(O)dlb.o
	@$(link) $(LFLAGSU) -out:$@ @<<$(@B).lnk
		$(O)dlb_main.o
		$(O)dlb.o
		$(O)alloc.o
		$(O)panic.o
<<

$(O)dlb.o:	$(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)\dlb.h
	@$(CC) $(CFLAGS) /Fo$@ $(SRC)\dlb.c
	
$(O)dlb_main.o: $(UTIL)\dlb_main.c $(INCL)\config.h $(INCL)\dlb.h
	@$(CC) $(CFLAGS) /Fo$@ $(UTIL)\dlb_main.c

$(DAT)\porthelp: $(NTSYS)\porthelp
	@copy $(NTSYS)\porthelp $@ >nul

nhdat:	$(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \
	$(DAT)\quest.dat $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp \
	$(DAT)\history $(DAT)\opthelp $(DAT)\wizhelp $(DAT)\dungeon $(DAT)\porthelp \
	$(DAT)\license $(O)sp_lev.tag
	cd $(DAT)
	echo data >dlb.lst
	echo oracles >>dlb.lst
	if exist options echo options >>dlb.lst
	if exist ttyoptions echo ttyoptions >>dlb.lst
	if exist guioptions echo guioptions >>dlb.lst
	if exist porthelp echo porthelp >>dlb.lst
	echo quest.dat >>dlb.lst
	echo rumors >>dlb.lst
	echo help >>dlb.lst
	echo hh >>dlb.lst
	echo cmdhelp >>dlb.lst
	echo history >>dlb.lst
	echo opthelp >>dlb.lst
	echo wizhelp >>dlb.lst
	echo dungeon >>dlb.lst
	echo license >>dlb.lst
	for %%N in (*.lev) do echo %%N >>dlb.lst
	$(U)dlb_main cIf dlb.lst $(SRC)\nhdat
	cd $(SRC)

#==========================================
#  Recover Utility
#==========================================

$(U)recover.exe: $(RECOVOBJS)
	$(link) $(LFLAGSU) -out:$@ $(RECOVOBJS)

$(O)recover.o: $(CONFIG_H) $(U)recover.c $(INCL)\win32api.h
	$(CC) $(CFLAGSU) -Fo$@ $(U)recover.c

#==========================================
#  Tile Mapping
#==========================================

$(SRC)\tile.c: $(U)tilemap.exe
	@echo A new $@ has been created
	@$(U)tilemap

$(U)tilemap.exe: $(O)tilemap.o
	@$(link) $(LFLAGSU) -out:$@ $(O)tilemap.o

$(O)tilemap.o: $(WSHR)\tilemap.c $(HACK_H)
	@$(CC) $(CFLAGSU) -Fo$@ $(WSHR)\tilemap.c

$(O)tiletx32.o: $(WSHR)\tilemap.c $(HACK_H)
	@$(CC) $(CFLAGS) /DTILETEXT /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tilemap.c

$(O)tiletxt.o: $(WSHR)\tilemap.c $(HACK_H)
	@$(CC) $(CFLAGS) /DTILETEXT -Fo$@ $(WSHR)\tilemap.c

$(O)gifread.o: $(WSHR)\gifread.c  $(CONFIG_H) $(TILE_H)
	@$(CC) $(CFLAGS) -I$(WSHR) -Fo$@ $(WSHR)\gifread.c

$(O)gifrd32.o: $(WSHR)\gifread.c  $(CONFIG_H) $(TILE_H)
	@$(CC) $(CFLAGS) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\gifread.c

$(O)ppmwrite.o: $(WSHR)\ppmwrite.c $(CONFIG_H) $(TILE_H)
	@$(CC) $(CFLAGS) -I$(WSHR) -Fo$@ $(WSHR)\ppmwrite.c

$(O)tiletext.o: $(WSHR)\tiletext.c  $(CONFIG_H) $(TILE_H)
	@$(CC) $(CFLAGS) -I$(WSHR) -Fo$@ $(WSHR)\tiletext.c

$(O)tilete32.o: $(WSHR)\tiletext.c  $(CONFIG_H) $(TILE_H)
	@$(CC) $(CFLAGS) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tiletext.c

#==========================================
# Optional Tile Utilities
#==========================================

$(U)gif2txt.exe: $(GIFREADERS) $(TEXT_IO)
    @echo Linking $@...
	@$(link) $(LFLAGSU) -out:$@ @<<$(@B).lnk
		$(GIFREADERS:^	=^
		)
		$(TEXT_IO:^	=^
		)
<<

$(U)gif2tx32.exe: $(GIFREADERS32) $(TEXT_IO32)
    @echo Linking $@...
	@$(link) $(LFLAGSU) -out:$@ @<<$(@B).lnk
		$(GIFREADERS32:^	=^
		)
		$(TEXT_IO32:^	=^
		)
<<

$(U)txt2ppm.exe: $(PPMWRITERS) $(TEXT_IO)
    @echo Linking $@...
	@$(link) $(LFLAGSU) -out:$@ @<<$(@B).lnk
		$(PPMWRITERS:^	=^
		)
		$(TEXT_IO:^	=^
		)
<<

!IF "$(GRAPHICAL)"=="Y"
$(TILEBMP16): $(TILEUTIL16) $(TILEFILES)
	@echo Creating 16x16 binary tile files (this may take some time)
	@$(U)tile2bmp $(TILEBMP16)
#$(TILEBMP32): $(TILEUTIL32) $(TILEFILES32)
#	@echo Creating 32x32 binary tile files (this may take some time)
#	@$(U)til2bm32 $(TILEBMP32)

!ELSE
$(TILEBMP16):
$(TILEBMP32):
!ENDIF

$(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO)
    @echo Linking $@...
	@$(link) $(LFLAGSU) -out:$@ @<<$(@B).lnk
		$(O)tile2bmp.o
		$(TEXT_IO:^  =^
		)
<<

$(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32)
    @echo Linking $@...
	@$(link) $(LFLAGSU) -out:$@ @<<$(@B).lnk
		$(O)til2bm32.o
		$(TEXT_IO32:^  =^
		)
<<

$(O)tile2bmp.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(INCL)\win32api.h
	@$(CC) $(CFLAGS) -I$(WSHR) /DPACKED_FILE /Fo$@ $(WSHR)\tile2bmp.c

$(O)til2bm32.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(INCL)\win32api.h
	@$(CC) $(CFLAGS) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c

#==========================================
# Housekeeping
#==========================================

spotless: clean
! IF ("$(OBJ)"!="")
	-rmdir $(OBJ) /s /Q
! ENDIF
	if exist $(INCL)\date.h    del $(INCL)\date.h
	if exist $(INCL)\onames.h  del $(INCL)\onames.h
	if exist $(INCL)\pm.h      del $(INCL)\pm.h
	if exist $(INCL)\vis_tab.h del $(INCL)\vis_tab.h
	if exist $(SRC)\vis_tab.c  del $(SRC)\vis_tab.c
	if exist $(SRC)\tile.c     del $(SRC)\tile.c
	if exist $(U)*.lnk         del $(U)*.lnk
	if exist $(U)*.map         del $(U)*.map
	if exist $(DAT)\data       del $(DAT)\data
	if exist $(DAT)\rumors     del $(DAT)\rumors
	if exist $(DAT)\???-fil?.lev	del $(DAT)\???-fil?.lev
	if exist $(DAT)\???-goal.lev	del $(DAT)\???-goal.lev
	if exist $(DAT)\???-loca.lev	del $(DAT)\???-loca.lev
	if exist $(DAT)\???-strt.lev	del $(DAT)\???-strt.lev
	if exist $(DAT)\air.lev		del $(DAT)\air.lev
	if exist $(DAT)\asmodeus.lev	del $(DAT)\asmodeus.lev
	if exist $(DAT)\astral.lev	del $(DAT)\astral.lev
	if exist $(DAT)\baalz.lev	del $(DAT)\baalz.lev
	if exist $(DAT)\bigroom.lev	del $(DAT)\bigroom.lev
	if exist $(DAT)\castle.lev	del $(DAT)\castle.lev
	if exist $(DAT)\data		del $(DAT)\data
	if exist $(DAT)\dungeon		del $(DAT)\dungeon
	if exist $(DAT)\dungeon.pdf	del $(DAT)\dungeon.pdf
	if exist $(DAT)\earth.lev	del $(DAT)\earth.lev
	if exist $(DAT)\fakewiz?.lev	del $(DAT)\fakewiz?.lev
	if exist $(DAT)\fire.lev	del $(DAT)\fire.lev
	if exist $(DAT)\juiblex.lev	del $(DAT)\juiblex.lev
	if exist $(DAT)\knox.lev	del $(DAT)\knox.lev
	if exist $(DAT)\medusa-?.lev	del $(DAT)\medusa-?.lev
	if exist $(DAT)\mine*.lev	del $(DAT)\mine*.lev
	if exist $(DAT)\options		del $(DAT)\options
	if exist $(DAT)\ttyoptions	del $(DAT)\ttyoptions
	if exist $(DAT)\guioptions	del $(DAT)\guioptions
	if exist $(DAT)\oracle.lev	del $(DAT)\oracle.lev
	if exist $(DAT)\oracles		del $(DAT)\oracles
	if exist $(DAT)\orcus.lev	del $(DAT)\orcus.lev
	if exist $(DAT)\rumors		del $(DAT)\rumors
	if exist $(DAT)\quest.dat	del $(DAT)\quest.dat
	if exist $(DAT)\sanctum.lev	del $(DAT)\sanctum.lev
	if exist $(DAT)\soko?-?.lev	del $(DAT)\soko?-?.lev
	if exist $(DAT)\tower?.lev	del $(DAT)\tower?.lev
	if exist $(DAT)\valley.lev	del $(DAT)\valley.lev
	if exist $(DAT)\water.lev	del $(DAT)\water.lev
	if exist $(DAT)\wizard?.lev	del $(DAT)\wizard?.lev
	if exist $(O)sp_lev.tag	        del $(O)sp_lev.tag
	if exist $(SRC)\monstr.c        del $(SRC)\monstr.c
	if exist $(SRC)\vis_tab.c       del $(SRC)\vis_tab.c
	if exist $(U)recover.exe        del $(U)recover.exe
	if exist nhdat.			del nhdat.
	if exist $(O)obj.tag            del $(O)obj.tag
	if exist $(O)gamedir.tag        del $(O)gamedir.tag
	if exist $(O)nh*key.lib         del $(O)nh*key.lib
	if exist $(O)nh*key.exp         del $(O)nh*key.exp

clean:
	if exist $(O)*.o del $(O)*.o
	if exist $(O)utility.tag   del $(O)utility.tag
	if exist $(U)makedefs.exe  del $(U)makedefs.exe
	if exist $(U)lev_comp.exe  del $(U)lev_comp.exe
	if exist $(U)dgn_comp.exe  del $(U)dgn_comp.exe
	if exist $(SRC)\*.lnk      del $(SRC)\*.lnk
	if exist $(SRC)\*.map      del $(SRC)\*.map
	if exist $(O)install.tag   del $(O)install.tag
! IF ("$(WINPFLAG)"!="")
	if exist $(TILEBMP16)        del $(TILEBMP16)
	if exist $(TILEBMP32)        del $(TILEBMP32)
! ENDIF

#===================================================================
# OTHER DEPENDENCIES
#===================================================================

#
# dat dependencies
#

$(DAT)\data: $(O)utility.tag    $(DATABASE)
	$(U)makedefs -d

$(DAT)\rumors: $(O)utility.tag    $(DAT)\rumors.tru   $(DAT)\rumors.fal
	$(U)makedefs -r

$(DAT)\quest.dat: $(O)utility.tag  $(DAT)\quest.txt
	$(U)makedefs -q

$(DAT)\oracles: $(O)utility.tag    $(DAT)\oracles.txt
	$(U)makedefs -h

$(DAT)\dungeon: $(O)utility.tag  $(DAT)\dungeon.def
	$(U)makedefs -e
	cd $(DAT)
	$(U)dgn_comp dungeon.pdf
	cd $(SRC)

#
# NT dependencies
#

$(O)nttty.o:   $(HACK_H) $(TILE_H) $(INCL)\win32api.h $(NTSYS)\nttty.c
	@$(CC) $(CFLAGS) -I$(WSHR) -Fo$@  $(NTSYS)\nttty.c
$(O)nhkeys.o:   $(HACK_H) $(TILE_H) $(INCL)\win32api.h $(NTSYS)\nhkeys.c
	@$(CC) $(CFLAGS) -I$(WSHR) -Fo$@  $(NTSYS)\nhkeys.c
$(O)winnt.o: $(HACK_H) $(INCL)\win32api.h $(NTSYS)\winnt.c
	@$(CC) $(CFLAGS) -Fo$@  $(NTSYS)\winnt.c
$(O)ntsound.o: $(HACK_H) $(NTSYS)\ntsound.c
	@$(CC) $(CFLAGS)  -Fo$@ $(NTSYS)\ntsound.c
$(O)mapimail.o: $(HACK_H) $(INCL)\nhlan.h $(NTSYS)\mapimail.c
	@$(CC) $(CFLAGS) -DMAPI_VERBOSE  -Fo$@ $(NTSYS)\mapimail.c

# 
# util dependencies
#

$(O)panic.o:  $(U)panic.c $(CONFIG_H)
	@$(CC) $(CFLAGS) -Fo$@ $(U)panic.c

#
# The rest are stolen from sys/unix/Makefile.src, 
# with the following changes:
#   * ../include changed to $(INCL)
#   * slashes changed to back-slashes 
#   * -c (which is included in CFLAGS) substituted with -Fo$@
#   * targets prefixed with $(O)
# but otherwise untouched.
# That means that there is some irrelevant stuff
# in here, but maintenance should be easier.
#
$(O)tos.o: ..\sys\atari\tos.c $(HACK_H) $(INCL)\tcap.h
	@$(CC) $(CFLAGS) -Fo$@ ..\sys\atari\tos.c
$(O)pcmain.o: ..\sys\share\pcmain.c $(HACK_H) $(INCL)\dlb.h \
		$(INCL)\win32api.h
	@$(CC) $(CFLAGS) -Fo$@ ..\sys\share\pcmain.c
$(O)pcsys.o: ..\sys\share\pcsys.c $(HACK_H)
	@$(CC) $(CFLAGS) -Fo$@ ..\sys\share\pcsys.c
$(O)pctty.o: ..\sys\share\pctty.c $(HACK_H)
	@$(CC) $(CFLAGS) -Fo$@ ..\sys\share\pctty.c
$(O)pcunix.o: ..\sys\share\pcunix.c $(HACK_H)
	@$(CC) $(CFLAGS) -Fo$@ ..\sys\share\pcunix.c
$(O)random.o: ..\sys\share\random.c $(HACK_H)
	@$(CC) $(CFLAGS) -Fo$@ ..\sys\share\random.c
$(O)ioctl.o: ..\sys\share\ioctl.c $(HACK_H) $(INCL)\tcap.h
	@$(CC) $(CFLAGS) -Fo$@ ..\sys\share\ioctl.c
$(O)unixtty.o: ..\sys\share\unixtty.c $(HACK_H)
	@$(CC) $(CFLAGS) -Fo$@ ..\sys\share\unixtty.c
$(O)unixmain.o: ..\sys\unix\unixmain.c $(HACK_H) $(INCL)\dlb.h
	@$(CC) $(CFLAGS) -Fo$@ ..\sys\unix\unixmain.c
$(O)unixunix.o: ..\sys\unix\unixunix.c $(HACK_H)
	@$(CC) $(CFLAGS) -Fo$@ ..\sys\unix\unixunix.c
$(O)unixres.o: ..\sys\unix\unixres.c $(CONFIG_H)
	@$(CC) $(CFLAGS) -Fo$@ ..\sys\unix\unixres.c
$(O)bemain.o: ..\sys\be\bemain.c $(HACK_H) $(INCL)\dlb.h
	@$(CC) $(CFLAGS) -Fo$@ ..\sys\be\bemain.c
$(O)getline.o: ..\win\tty\getline.c $(HACK_H) $(INCL)\func_tab.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\tty\getline.c
$(O)termcap.o: ..\win\tty\termcap.c $(HACK_H) $(INCL)\tcap.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\tty\termcap.c
$(O)topl.o: ..\win\tty\topl.c $(HACK_H) $(INCL)\tcap.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\tty\topl.c
$(O)wintty.o: ..\win\tty\wintty.c $(HACK_H) $(INCL)\dlb.h \
		$(INCL)\patchlevel.h $(INCL)\tcap.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\tty\wintty.c
$(O)Window.o: ..\win\X11\Window.c $(INCL)\xwindowp.h $(INCL)\xwindow.h \
		$(CONFIG_H)
	@$(CC) $(CFLAGS) -Fo$@ ..\win\X11\Window.c
$(O)dialogs.o: ..\win\X11\dialogs.c $(CONFIG_H)
	@$(CC) $(CFLAGS) -Fo$@ ..\win\X11\dialogs.c
$(O)winX.o: ..\win\X11\winX.c $(HACK_H) $(INCL)\winX.h $(INCL)\dlb.h \
		$(INCL)\patchlevel.h ..\win\X11\nh72icon \
		..\win\X11\nh56icon ..\win\X11\nh32icon
	@$(CC) $(CFLAGS) -Fo$@ ..\win\X11\winX.c
$(O)winmap.o: ..\win\X11\winmap.c $(INCL)\xwindow.h $(HACK_H) $(INCL)\dlb.h \
		$(INCL)\winX.h $(INCL)\tile2x11.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\X11\winmap.c
$(O)winmenu.o: ..\win\X11\winmenu.c $(HACK_H) $(INCL)\winX.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\X11\winmenu.c
$(O)winmesg.o: ..\win\X11\winmesg.c $(INCL)\xwindow.h $(HACK_H) $(INCL)\winX.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\X11\winmesg.c
$(O)winmisc.o: ..\win\X11\winmisc.c $(HACK_H) $(INCL)\func_tab.h \
		$(INCL)\winX.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\X11\winmisc.c
$(O)winstat.o: ..\win\X11\winstat.c $(HACK_H) $(INCL)\winX.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\X11\winstat.c
$(O)wintext.o: ..\win\X11\wintext.c $(HACK_H) $(INCL)\winX.h $(INCL)\xwindow.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\X11\wintext.c
$(O)winval.o: ..\win\X11\winval.c $(HACK_H) $(INCL)\winX.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\X11\winval.c
$(O)tile.o: $(SRC)\tile.c $(HACK_H)
$(O)gnaskstr.o: ..\win\gnome\gnaskstr.c ..\win\gnome\gnaskstr.h \
		..\win\gnome\gnmain.h
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gnaskstr.c
$(O)gnbind.o: ..\win\gnome\gnbind.c ..\win\gnome\gnbind.h ..\win\gnome\gnmain.h \
		..\win\gnome\gnaskstr.h ..\win\gnome\gnyesno.h
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gnbind.c
$(O)gnglyph.o: ..\win\gnome\gnglyph.c ..\win\gnome\gnglyph.h $(INCL)\tile2x11.h
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gnglyph.c
$(O)gnmain.o: ..\win\gnome\gnmain.c ..\win\gnome\gnmain.h ..\win\gnome\gnsignal.h \
		..\win\gnome\gnbind.h ..\win\gnome\gnopts.h $(HACK_H) \
		$(INCL)\date.h
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmain.c
$(O)gnmap.o: ..\win\gnome\gnmap.c ..\win\gnome\gnmap.h ..\win\gnome\gnglyph.h \
		..\win\gnome\gnsignal.h $(HACK_H)
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmap.c
$(O)gnmenu.o: ..\win\gnome\gnmenu.c ..\win\gnome\gnmenu.h ..\win\gnome\gnmain.h \
		..\win\gnome\gnbind.h
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmenu.c
$(O)gnmesg.o: ..\win\gnome\gnmesg.c ..\win\gnome\gnmesg.h ..\win\gnome\gnsignal.h
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmesg.c
$(O)gnopts.o: ..\win\gnome\gnopts.c ..\win\gnome\gnopts.h ..\win\gnome\gnglyph.h \
		..\win\gnome\gnmain.h ..\win\gnome\gnmap.h $(HACK_H)
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gnopts.c
$(O)gnplayer.o: ..\win\gnome\gnplayer.c ..\win\gnome\gnplayer.h \
		..\win\gnome\gnmain.h $(HACK_H)
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gnplayer.c
$(O)gnsignal.o: ..\win\gnome\gnsignal.c ..\win\gnome\gnsignal.h \
		..\win\gnome\gnmain.h
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gnsignal.c
$(O)gnstatus.o: ..\win\gnome\gnstatus.c ..\win\gnome\gnstatus.h \
		..\win\gnome\gnsignal.h ..\win\gnome\gn_xpms.h \
		..\win\gnome\gnomeprv.h
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gnstatus.c
$(O)gntext.o: ..\win\gnome\gntext.c ..\win\gnome\gntext.h ..\win\gnome\gnmain.h \
		..\win\gnome\gn_rip.h
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gntext.c
$(O)gnworn.o: ..\win\gnome\gnworn.c ..\win\gnome\gnworn.h ..\win\gnome\gnglyph.h \
		..\win\gnome\gnsignal.h ..\win\gnome\gnomeprv.h
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gnworn.c
$(O)gnyesno.o: ..\win\gnome\gnyesno.c ..\win\gnome\gnbind.h ..\win\gnome\gnyesno.h
	@$(CC) $(CFLAGS) $(GNOMEINC) -Fo$@ ..\win\gnome\gnyesno.c
$(O)wingem.o: ..\win\gem\wingem.c $(HACK_H) $(INCL)\func_tab.h $(INCL)\dlb.h \
		$(INCL)\patchlevel.h $(INCL)\wingem.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\gem\wingem.c
$(O)wingem1.o: ..\win\gem\wingem1.c $(INCL)\gem_rsc.h $(INCL)\load_img.h \
		$(INCL)\gr_rect.h $(INCL)\wintype.h $(INCL)\wingem.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\gem\wingem1.c
$(O)load_img.o: ..\win\gem\load_img.c $(INCL)\load_img.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\gem\load_img.c
$(O)gr_rect.o: ..\win\gem\gr_rect.c $(INCL)\gr_rect.h
	@$(CC) $(CFLAGS) -Fo$@ ..\win\gem\gr_rect.c
$(O)tile.o: tile.c $(HACK_H)
$(O)qt_win.o: ..\win\Qt\qt_win.cpp $(HACK_H) $(INCL)\func_tab.h \
		$(INCL)\dlb.h $(INCL)\patchlevel.h $(INCL)\tile2x11.h \
		$(INCL)\qt_win.h $(INCL)\qt_clust.h $(INCL)\qt_kde0.h \
		$(INCL)\qt_xpms.h qt_win.moc qt_kde0.moc qttableview.moc
	$(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_win.cpp
$(O)qt_clust.o: ..\win\Qt\qt_clust.cpp $(INCL)\qt_clust.h
	$(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qt_clust.cpp
$(O)qttableview.o: ..\win\Qt\qttableview.cpp $(INCL)\qttableview.h
	$(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qttableview.cpp
$(O)monstr.o: monstr.c $(CONFIG_H)
$(O)vis_tab.o: vis_tab.c $(CONFIG_H) $(INCL)\vis_tab.h
$(O)allmain.o: allmain.c $(HACK_H)
$(O)alloc.o: alloc.c $(CONFIG_H)
$(O)apply.o: apply.c $(HACK_H) $(INCL)\edog.h
$(O)artifact.o: artifact.c $(HACK_H) $(INCL)\artifact.h $(INCL)\artilist.h
$(O)attrib.o: attrib.c $(HACK_H)
$(O)ball.o: ball.c $(HACK_H)
$(O)bones.o: bones.c $(HACK_H) $(INCL)\lev.h
$(O)botl.o: botl.c $(HACK_H)
$(O)cmd.o: cmd.c $(HACK_H) $(INCL)\func_tab.h
$(O)dbridge.o: dbridge.c $(HACK_H)
$(O)decl.o: decl.c $(HACK_H)
$(O)detect.o: detect.c $(HACK_H) $(INCL)\artifact.h
$(O)dig.o: dig.c $(HACK_H) $(INCL)\edog.h
$(O)display.o: display.c $(HACK_H)
$(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)\dlb.h
$(O)do.o: do.c $(HACK_H) $(INCL)\lev.h
$(O)do_name.o: do_name.c $(HACK_H)
$(O)do_wear.o: do_wear.c $(HACK_H)
$(O)dog.o: dog.c $(HACK_H) $(INCL)\edog.h
$(O)dogmove.o: dogmove.c $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h
$(O)dokick.o: dokick.c $(HACK_H) $(INCL)\eshk.h
$(O)dothrow.o: dothrow.c $(HACK_H) $(INCL)\edog.h
$(O)drawing.o: drawing.c $(HACK_H) $(INCL)\tcap.h
$(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)\dgn_file.h $(INCL)\dlb.h
$(O)eat.o: eat.c $(HACK_H)
$(O)end.o: end.c $(HACK_H) $(INCL)\eshk.h $(INCL)\dlb.h
$(O)engrave.o: engrave.c $(HACK_H) $(INCL)\lev.h
$(O)exper.o: exper.c $(HACK_H)
$(O)explode.o: explode.c $(HACK_H)
$(O)extralev.o: extralev.c $(HACK_H)
$(O)files.o: files.c $(HACK_H) $(INCL)\dlb.h
$(O)fountain.o: fountain.c $(HACK_H)
$(O)hack.o: hack.c $(HACK_H)
$(O)hacklib.o: hacklib.c $(HACK_H)
$(O)invent.o: invent.c $(HACK_H)
$(O)light.o: light.c $(HACK_H) $(INCL)\lev.h
$(O)lock.o: lock.c $(HACK_H)
$(O)mail.o: mail.c $(HACK_H) $(INCL)\mail.h
$(O)makemon.o: makemon.c $(HACK_H) $(INCL)\epri.h $(INCL)\emin.h \
		$(INCL)\edog.h
$(O)mapglyph.o: mapglyph.c $(HACK_H)
$(O)mcastu.o: mcastu.c $(HACK_H)
$(O)mhitm.o: mhitm.c $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h
$(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h
$(O)minion.o: minion.c $(HACK_H) $(INCL)\emin.h $(INCL)\epri.h
$(O)mklev.o: mklev.c $(HACK_H)
$(O)mkmap.o: mkmap.c $(HACK_H) $(INCL)\sp_lev.h
$(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)\sp_lev.h $(INCL)\lev.h
$(O)mkobj.o: mkobj.c $(HACK_H)
$(O)mkroom.o: mkroom.c $(HACK_H)
$(O)mon.o: mon.c $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h
$(O)mondata.o: mondata.c $(HACK_H) $(INCL)\eshk.h $(INCL)\epri.h
$(O)monmove.o: monmove.c $(HACK_H) $(INCL)\mfndpos.h $(INCL)\artifact.h \
		$(INCL)\epri.h
$(O)monst.o: monst.c $(CONFIG_H) $(INCL)\permonst.h $(INCL)\align.h \
		$(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\monsym.h \
		$(INCL)\dungeon.h $(INCL)\eshk.h $(INCL)\vault.h \
		$(INCL)\epri.h $(INCL)\color.h
$(O)mplayer.o: mplayer.c $(HACK_H)
$(O)mthrowu.o: mthrowu.c $(HACK_H)
$(O)muse.o: muse.c $(HACK_H) $(INCL)\edog.h
$(O)music.o: music.c $(HACK_H) #interp.c
$(O)o_init.o: o_init.c $(HACK_H) $(INCL)\lev.h
$(O)objects.o: objects.c $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \
		$(INCL)\prop.h $(INCL)\skills.h $(INCL)\color.h
$(O)objnam.o: objnam.c $(HACK_H)
$(O)options.o: options.c $(CONFIG_H) $(INCL)\objclass.h $(INCL)\flag.h \
		$(HACK_H) $(INCL)\tcap.h
$(O)pager.o: pager.c $(HACK_H) $(INCL)\dlb.h
$(O)pickup.o: pickup.c $(HACK_H)
$(O)pline.o: pline.c $(HACK_H) $(INCL)\epri.h $(INCL)\edog.h
$(O)polyself.o: polyself.c $(HACK_H)
$(O)potion.o: potion.c $(HACK_H)
$(O)pray.o: pray.c $(HACK_H) $(INCL)\epri.h
$(O)priest.o: priest.c $(HACK_H) $(INCL)\mfndpos.h $(INCL)\eshk.h \
		$(INCL)\epri.h $(INCL)\emin.h
$(O)quest.o: quest.c $(HACK_H) $(INCL)\qtext.h
$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)\dlb.h $(INCL)\qtext.h
$(O)read.o: read.c $(HACK_H)
$(O)rect.o: rect.c $(HACK_H)
$(O)region.o: region.c $(HACK_H) $(INCL)\lev.h
$(O)restore.o: restore.c $(HACK_H) $(INCL)\lev.h $(INCL)\tcap.h
$(O)rip.o: rip.c $(HACK_H)
$(O)rnd.o: rnd.c $(HACK_H)
$(O)role.o: role.c $(HACK_H)
$(O)rumors.o: rumors.c $(HACK_H) $(INCL)\lev.h $(INCL)\dlb.h
$(O)save.o: save.c $(HACK_H) $(INCL)\lev.h
$(O)shk.o: shk.c $(HACK_H) $(INCL)\eshk.h
$(O)shknam.o: shknam.c $(HACK_H) $(INCL)\eshk.h
$(O)sit.o: sit.c $(HACK_H) $(INCL)\artifact.h
$(O)sounds.o: sounds.c $(HACK_H) $(INCL)\edog.h
$(O)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)\dlb.h $(INCL)\sp_lev.h
$(O)spell.o: spell.c $(HACK_H)
$(O)steal.o: steal.c $(HACK_H)
$(O)steed.o: steed.c $(HACK_H)
$(O)teleport.o: teleport.c $(HACK_H)
$(O)timeout.o: timeout.c $(HACK_H) $(INCL)\lev.h
$(O)topten.o: topten.c $(HACK_H) $(INCL)\dlb.h $(INCL)\patchlevel.h
$(O)track.o: track.c $(HACK_H)
$(O)trap.o: trap.c $(HACK_H)
$(O)u_init.o: u_init.c $(HACK_H)
$(O)uhitm.o: uhitm.c $(HACK_H)
$(O)vault.o: vault.c $(HACK_H) $(INCL)\vault.h
$(O)version.o: version.c $(HACK_H) $(INCL)\date.h $(INCL)\patchlevel.h
$(O)vision.o: vision.c $(HACK_H) $(INCL)\vis_tab.h
$(O)weapon.o: weapon.c $(HACK_H)
$(O)were.o: were.c $(HACK_H)
$(O)wield.o: wield.c $(HACK_H)
$(O)windows.o: windows.c $(HACK_H) $(INCL)\wingem.h $(INCL)\winGnome.h
$(O)wizard.o: wizard.c $(HACK_H) $(INCL)\qtext.h $(INCL)\epri.h
$(O)worm.o: worm.c $(HACK_H) $(INCL)\lev.h
$(O)worn.o: worn.c $(HACK_H)
$(O)write.o: write.c $(HACK_H)
$(O)zap.o: zap.c $(HACK_H)

# end of file