1#	NetHack Makefile.
2#	SCCS Id: @(#)Makefile.ami	3.2	2000/01/12
3# Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991,1992,1993,1996.
4# NetHack may be freely redistributed.  See license for details.
5
6###
7### INTRODUCTION
8###
9
10# This makefile is arranged for compiling for the Amiga with SAS/C 6.51 but
11# can be configured for compiling with Manx C 5 or commercial DICE with
12# simple changes.  The appropriate changes are identified by #[compiler]
13# where compiler is one of: SAS6, MANX, or DICE; the options in this
14# makefile as should be set according to the compiler being used.  (But see
15# note 3 below.)
16
17# Note: When using the Manx compiler, an alternate make utility is
18# required. The bundled Aztec make is just too damaged.
19
20# Note 2: The #SFD_xxx lines are used with mkdmake to generate a DMake-
21# compatible makefile (DMakefile) from this file.  Any line beginning with
22# #SFD_INSTEAD replaces, in DMakefile, the following line from Makefile.ami.
23# #SFD_BEGIN, #SFD_ELSE, and #SFD_END bracket multi-line sections for the two
24# makefile formats.
25# When changing this file, #SFD_INSTEAD lines will need to be inserted for
26# the following cases:
27#	- Dependencies with different numbers of filenames (both > 1) on
28#	    either side.  The #SFD_INSTEAD line should immediately precede
29#	    the line with the colon, and should contain a double colon "::"
30#	    instead of a single colon.
31#	- Special command lists that override the default.  A line containing
32#	    "#SFD_INSTEAD #none" should precede such a rule.  If the rule is
33#	    more than one line long, precede it with "#SFD_BEGIN" and
34#	    "#SFD_ELSE", and follow it with "#SFD_END".
35#	- Files not in the src, sys/amiga, sys/share, or win/tty directories
36#	    that rely on the default ".c.o" rule.  Following the dependency
37#	    should be "#SFD_INSTEAD <default>" with the filename inserted
38#	    into the default rule where appropriate, then a line contianing
39#	    "#none".
40# In any SFD_BEGIN/ELSE/END block added, put a '##' before every line
41# between the BEGIN and ELSE.  Any line that's really a comment needs three
42# '#'s, e.g. "### DICE comment".
43
44# Note 2A: Whenever an SFD line/block is added, the appropriate repeat count
45#          in mkdmake must be changed.  (The repeat count "0" meaning "repeat
46#          until end of file" doesn't work as advertised.)
47
48# Note 3: mkdmake will automatically substitute DICE flags, etc. for SAS
49#         where appropriate.  Since the makefile is already set up for SAS,
50#         the only people who end up having to make changes here are Manx
51#         users (or people who want to change the defaults).
52
53###
54### DIRECTORY STRUCTURE
55###
56
57NH = NH:
58SBIN = $(NH)sbin/
59SLIB = $(NH)slib/
60NETHACK = $(NH)NetHack/
61HACKEXE = $(NH)HackExe/
62AMI = $(NH)sys/amiga/
63DAT = $(NH)dat/
64DOC = $(NH)doc/
65I = $(NH)include/
66SHARE = $(NH)sys/share/
67NHS = $(NH)src/
68TTY = $(NH)win/tty/
69WSHARE  = $(NH)win/share/
70UTIL = $(NH)util/
71O = $(NH)obj/
72OO = $(NH)objo/
73#	NB: O and OO MUST be different directories
74
75###
76### INVOCATION
77###
78
79#[SAS6]
80#MAKE = smake
81#[MANX]
82#MAKE = make
83#[DICE]
84#MAKE = dmake
85
86# Startup makefile with:
87#
88#[SAS6]
89#[MANX]
90#	$(MAKE) -f $(AMI)Makefile.ami
91#	$(MAKE) -f $(AMI)Makefile.ami install
92#
93#[DICE]
94#	$(MAKE) -f $(AMI)DMakefile
95#	$(MAKE) -f $(AMI)DMakefile install
96#
97#
98# You may use following targets on $(MAKE) command lines:
99#   all		do it all (default)
100#   link	just create binary from object files
101#   obj		just create common object files
102#   obja	just create amiga object files
103#   objs	just create shared object files
104#   clean	deletes the object files
105#   spotless	deletes the object files, main binary, and more
106#
107# Note:  We do not build the Guidebook here since it needs tbl
108# (See the file sys/unix/Makefile.doc for more information)
109
110#X# Precompiled header files:
111#X#   $(HDEP) should appear in any dependency list for an object file where
112#X#   we would want to make use of the precompiled version of $(I)hack.h,
113#X#   while $(CSYM) should appear in the C compiler command line that creates
114#X#   any such object file.  (Changes made here should agree with the $(HDEP):
115#X#   target that appears later in this makefile.)
116#X#
117
118#SFD_BEGIN
119##
120###[DICE]
121###   If we were compiling with DICE and wanted to use the symbol table
122###   pre-loading feature, we would uncomment these following two lines.
123##
124##HDEP	= $(I)hack.sym
125##CSYM	= -H$(I)hack.sym=hack.h
126##
127#SFD_ELSE
128
129#[SAS5]
130#   If we were to use the precompiled header file feature in a newer version
131#   of SAS/C, we would comment out these following two lines.
132#   If we don't use precompiled header files, we uncomment it as well.
133
134HDEP	= $(I)hack.h
135CSYM	=
136
137#[MANX]
138#   If we were compiling with Aztec, and wanted to use the symbol table
139#   pre-loading feature, we would uncomment these following two lines.
140
141#HDEP	= Ram:hack.sym
142#CSYM	= +IRam:hack.sym
143
144#SFD_END
145
146#Pathname for uudecode program:
147UUDEC	= uudecode
148
149# Flex/Bison command assignments -- Useful only if you have flex/bison
150FLEX	= flex
151BISON	= bison
152# FBFIL and FBLIB may be used, if required by your version of flex or bison,
153# to specify additional files or libraries to be linked with
154FBFIL	=
155FBLIB	= #lib lib:compat.lib
156
157# If you're compiling this on a 1.3 system, you'll have to uncomment the
158# following (for use with the ifchange script below).  Also useful instead of
159# "protect ifchange +s"
160EXECUTE = execute
161
162# Headers we depend on
163AMDEP = $(AMI)winproto.h $(AMI)winext.h $(AMI)windefs.h $(I)winami.h
164
165# Pathname for the C compiler being used.
166
167#SFD_BEGIN
168##
169###[DICE]
170##CC	= dcc
171##ASM	= das
172##
173#SFD_ELSE
174
175#[SAS6]
176CC	= sc
177ASM	= asm
178
179#[MANX]
180#CC	= cc
181
182#SFD_END
183
184# Compilation flags for selected C Compiler:
185#   $(CFLAGS) should appear before filename arguments of $(CC) command line.
186
187#SFD_BEGIN
188##
189###[DICE]
190##CFLAGS = -c -I$(I) -mC -mD -ms -//
191##CFLAGS2 =
192##WBCFLAGS = -c -I$(I) -mC -mD -ms -//
193##WBC2FLAGS = -DCLI
194##SPLFLAGS = -DSPLIT
195##
196#SFD_ELSE
197
198#[SAS6]
199#   Note: make sure your CLI stack size is large (at least 50K) or lev_comp
200#   and makedefs may fail terribly - stack checking is disabled.
201#
202#  **** WARNING ****	GST support is not fool proof.  You must make makedefs
203#			without a GST first so that the generated headers
204#			that are part of the GST can be made.
205#
206#GSTSRC=$(AMI)gst.c
207#
208#GSTHEAD=$(I)hack.h $(I)pm.h $(I)trap.h $(I)onames.h \
209#	$(AMI)winami.p $(AMI)amidos.p $(AMI)amiwind.p
210#
211#GSTFILE=$(O)NetHack.gst
212# undefine this to not compile with GSTs
213#GST=gst=$(GSTFILE)
214#
215#DEBUG=debug=sf
216OPTFLAGS=opt opttime optpeep optgo optinl optsched optcomp=10 optdep=5 optrdep=5 #optalias +OPTTIME -OPTSIZE
217CFLAGS	= data=far nominc $(DEBUG) idir=$(I) cpu=any nostkchk nover \
218	codename=nhcode dataname=nhdata strmerge $(OPTFLAGS) $(TILES) $(SAVEDS) \
219	afp $(ERRREXX) $(GST)
220# for files that are too large for the standard flags:
221CFLAGS2 = code=far strmerge $(SAVEDS)
222WBCFLAGS = ignore=217,62 data=far ansi nminc code=far idir=$(I) cpu=any afp \
223	$(DEBUG) $(ERRREXX) define=AMIGA $(GST)
224XXX = data=far ansi nminc idir=$(I) cpu=any afp opt optinline optinlocal \
225	optloop opttime
226WBC2FLAGS = define=CLI
227SPLFLAGS = define=SPLIT #dollarok
228#for amistack.c
229CFLAGS3	= data=near dataname=__MERGED nominc $(DEBUG) idir=$(I) cpu=any nover nostkchk \
230	codename=nhcode strmerge $(OPTFLAGS) $(TILES) $(SAVEDS) \
231	afp $(ERRREXX) $(GST)
232
233#[MANX]
234#CFLAGS = -i$(I) -mc -md -ms -pa -ps -bs -wo -qq
235#WBCFLAGS = -mc -md -ms -pa -ps -bs -wo -qq -pp
236
237#SFD_END
238
239# Assembly flags:
240
241#SFD_BEGIN
242##
243###[DICE]
244##AFLAGS =
245##AOBJSPEC = -o
246##
247#SFD_ELSE
248
249#[SAS6]
250AFLAGS = #what to put here?
251AOBJSPEC = -o
252
253#SFD_END
254
255# Components of various link command lines:
256#   $(LINK) should be the pathname of the linker being used (with any options
257#   that should appear at the beginning of the command line).  The name of the
258#   output file should appear immediately after $(LNSPEC).  $(LIN) should
259#   appear before the list of object files in each link command.  $(LLINK)
260#   should appear as the list of object files in the link command line that
261#   creates the NetHack executable.  $(LLIB) should appear at the end of each
262#   link command line.
263
264# Note: amiga.lib added due to missing prototypes/pragmas.
265# Should be deleted when this is resolved.
266
267#SFD_BEGIN
268##
269###[DICE]
270### If you have flex/bison libraries, use the second definition of FLLIB
271### instead of the first.
272##
273##LINK	 = dcc -mD
274##LIN	 =
275##LLINK	 = @$(AMI)ami.lnk
276##LLIB	 =
277##FLLIB	 =
278###FLLIB	 = -l$(FBLIB)
279##OBJSPEC = -o
280##PNSPEC	= -o
281##LNSPEC = -o
282##CCLINK	= dcc
283##CLFLAGS = -I$(I) -mC -mD -ms -//
284##INCLSPEC = -I
285##DEFSPEC = -D
286##IGNSPEC = -j
287##
288#SFD_ELSE
289
290#[SAS6]
291
292LINK	= slink noicons verbose maxhunk 65536 stripdebug
293LIN	= from lib:catch.o
294LLINK	= with $(AMI)ami.lnk
295LLIB	= lib lib:scnb.lib BATCH #lib lib:amiga.lib BATCH #scnb.lib or sc.lib
296FLLIB	= $(FBLIB) lib Lib:sc.lib BATCH
297OBJSPEC = objname=
298PNSPEC = noicons to #pname=
299LNSPEC = to
300CCLINK =  sc link
301INCLSPEC = idir=
302DEFSPEC = define=
303IGNSPEC = ignore=
304COMPACT_HEADERS=$(GSTFILE)
305
306#[MANX]
307
308#LINK	= ln -g +q +ss -o
309#LIN	=
310#LLINK	= -f $(AMI)ami.lnk
311#LLIB	= -lcl16
312#FLLIB  = -lcl16
313#OBJSPEC = -o
314#PNSPEC = -o
315#LNSPEC = -o
316#CCLINK = cc
317#INCLSPEC = -i
318#DEFSPEC = -d
319#IGNSPEC = -j
320
321#SFD_END
322
323###
324### FILE LISTS
325###
326
327# A more reasonable random number generator (recommended for the Amiga):
328
329RANDOBJ	= $(O)random.o
330
331#SFD_INSTEAD #none
332.PRECIOUS:  $(I)config.h $(I)decl.h $(I)hack.h $(I)permonst.h $(I)you.h
333
334# Almost nothing below this line should have to be changed.
335# (Exceptions are marked by [SAS6], [MANX], etc.)
336#
337# Other things that have to be reconfigured are in config.h,
338# (amiconf.h, pcconf.h), and possibly system.h, tradstdc.h.
339
340# Object files for makedefs:
341
342MAKEOBJS = \
343	$(OO)makedefs.o $(O)monst.o $(O)objects.o
344
345# Object files for special levels compiler:
346
347SPLEVOBJS = \
348	$(OO)lev_yacc.o $(OO)lev_lex.o	$(OO)lev_main.o \
349	$(O)decl.o 	$(O)drawing.o	$(O)monst.o \
350	$(O)objects.o	$(OO)panic.o
351
352# Object files for dungeon compiler
353
354DGNCOMPOBJS = \
355	$(OO)dgn_yacc.o	$(OO)dgn_lex.o	$(OO)dgn_main.o $(O)alloc.o $(OO)panic.o
356
357# Object files for NetHack:
358
359COMMOBJ = \
360	$(O)allmain.o	$(O)alloc.o	$(O)apply.o 	$(O)artifact.o	\
361	$(O)attrib.o	$(O)ball.o	$(O)bones.o	$(O)botl.o	\
362	$(O)cmd.o	$(O)dbridge.o	$(O)decl.o	$(O)detect.o	\
363	$(O)dig.o	$(O)display.o	$(O)dlb.o	$(O)do.o	\
364	$(O)do_name.o	$(O)do_wear.o	$(O)dog.o	$(O)dogmove.o	\
365	$(O)dokick.o	$(O)dothrow.o	$(O)drawing.o	$(O)dungeon.o	\
366	$(O)eat.o	$(O)end.o	$(O)engrave.o	$(O)exper.o	\
367	$(O)explode.o	$(O)extralev.o	$(O)files.o 	$(O)fountain.o	\
368	$(O)hack.o	$(O)hacklib.o	$(O)invent.o	$(O)light.o	\
369	$(O)lock.o	$(O)mail.o	$(O)makemon.o	$(O)mcastu.o	\
370	$(O)mhitm.o	$(O)mhitu.o	$(O)minion.o	$(O)mklev.o	\
371	$(O)mkmap.o	$(O)mkmaze.o	$(O)mkobj.o	$(O)mkroom.o	\
372	$(O)mon.o	$(O)mondata.o	$(O)monmove.o	$(O)monst.o	\
373	$(O)mplayer.o	$(O)mthrowu.o	$(O)muse.o	$(O)music.o	\
374	$(O)o_init.o	$(O)objects.o	$(O)objnam.o	$(O)options.o	\
375	$(O)pager.o	$(O)pickup.o	$(O)pline.o	$(O)polyself.o	\
376	$(O)potion.o	$(O)pray.o	$(O)priest.o	$(O)quest.o	\
377	$(O)questpgr.o	$(O)read.o	$(O)rect.o	$(O)region.o	\
378	$(O)restore.o	$(O)rnd.o	$(O)role.o	$(O)rumors.o	\
379	$(O)save.o	$(O)shk.o	$(O)shknam.o	$(O)sit.o	\
380	$(O)sounds.o	$(O)sp_lev.o	$(O)spell.o	$(O)steal.o	\
381	$(O)steed.o	$(O)teleport.o	$(O)timeout.o	$(O)topten.o	\
382	$(O)track.o	$(O)trap.o	$(O)u_init.o	$(O)uhitm.o	\
383	$(O)vault.o	$(O)version.o	$(O)vision.o	$(O)weapon.o	\
384	$(O)were.o	$(O)wield.o	$(O)windows.o	$(O)wizard.o	\
385	$(O)worm.o	$(O)worn.o	$(O)write.o	$(O)zap.o
386
387MAKEDEFOBJ = \
388	$(O)monstr.o
389
390AMIGAOBJ = \
391	$(O)amidos.o	$(O)amirip.o 	$(O)amisnd.o	$(O)amiwbench.o	\
392	$(O)amiwind.o	$(O)winami.o	$(O)winchar.o	$(O)winfuncs.o	\
393	$(O)winkey.o	$(O)winmenu.o	$(O)winreq.o	$(O)winstr.o \
394	$(O)amistack.o
395
396# Objects from assembly sources (because DMake can't handle default rules)
397AMIGAOBJ2 = \
398#	$(O)dispmap.o
399
400SHAREOBJ = \
401	$(O)pcmain.o	$(RANDOBJ)
402
403TTYOBJ = \
404	$(O)getline.o $(O)termcap.o $(O)topl.o $(O)wintty.o $(O)amitty.o \
405	$(O)rip.o
406
407# Yuck yuck yuck.  Have to tell DMake where these are, since they're not
408# all in the same place.
409TTYSRC = \
410	$(TTY)getline.c $(TTY)termcap.c $(TTY)topl.c $(TTY)wintty.c \
411	$(AMI)amitty.c $(NHS)rip.c
412
413# All the object files for NetHack:
414
415HOBJ = $(COMMOBJ) $(AMIGAOBJ) $(AMIGAOBJ2) $(SHAREOBJ) $(MAKEDEFOBJ) $(TTYOBJ)
416
417###
418### DATA FILES
419###
420
421# quest files
422ADFILES1= $(SLIB)Arc-fila.lev $(SLIB)Arc-filb.lev $(SLIB)Arc-loca.lev \
423	$(SLIB)Arc-strt.lev
424ADFILES= $(SLIB)Arc-goal.lev $(ADFILES1)
425
426BDFILES1= $(SLIB)Bar-fila.lev $(SLIB)Bar-filb.lev $(SLIB)Bar-loca.lev \
427	$(SLIB)Bar-strt.lev
428BDFILES= $(SLIB)Bar-goal.lev $(BDFILES1)
429
430CDFILES1= $(SLIB)Cav-fila.lev $(SLIB)Cav-filb.lev $(SLIB)Cav-loca.lev \
431	$(SLIB)Cav-strt.lev
432CDFILES= $(SLIB)Cav-goal.lev $(CDFILES1)
433
434HDFILES1= $(SLIB)Hea-fila.lev $(SLIB)Hea-filb.lev $(SLIB)Hea-loca.lev \
435	$(SLIB)Hea-strt.lev
436HDFILES= $(SLIB)Hea-goal.lev $(HDFILES1)
437
438KDFILES1= $(SLIB)Kni-fila.lev $(SLIB)Kni-filb.lev $(SLIB)Kni-loca.lev \
439	$(SLIB)Kni-strt.lev
440KDFILES= $(SLIB)Kni-goal.lev $(KDFILES1)
441
442MDFILES1= $(SLIB)Mon-fila.lev $(SLIB)Mon-filb.lev $(SLIB)Mon-loca.lev \
443	$(SLIB)Mon-strt.lev
444MDFILES= $(SLIB)Mon-goal.lev $(MDFILES1)
445
446PDFILES1= $(SLIB)Pri-fila.lev $(SLIB)Pri-filb.lev $(SLIB)Pri-loca.lev \
447	$(SLIB)Pri-strt.lev
448PDFILES= $(SLIB)Pri-goal.lev $(PDFILES1)
449
450RDFILES1= $(SLIB)Rog-fila.lev $(SLIB)Rog-filb.lev $(SLIB)Rog-loca.lev \
451	$(SLIB)Rog-strt.lev
452RDFILES= $(SLIB)Rog-goal.lev $(RDFILES1)
453
454RANFILES1= $(SLIB)Ran-fila.lev $(SLIB)Ran-filb.lev $(SLIB)Ran-loca.lev \
455	$(SLIB)Ran-strt.lev
456RANFILES= $(SLIB)Ran-goal.lev $(RANFILES1)
457
458SDFILES1= $(SLIB)Sam-fila.lev $(SLIB)Sam-filb.lev $(SLIB)Sam-loca.lev \
459	$(SLIB)Sam-strt.lev
460SDFILES= $(SLIB)Sam-goal.lev $(SDFILES1)
461
462TDFILES1= $(SLIB)Tou-fila.lev $(SLIB)Tou-filb.lev $(SLIB)Tou-loca.lev \
463	$(SLIB)Tou-strt.lev
464TDFILES= $(SLIB)Tou-goal.lev $(TDFILES1)
465
466VDFILES1= $(SLIB)Val-fila.lev $(SLIB)Val-filb.lev $(SLIB)Val-loca.lev \
467	$(SLIB)Val-strt.lev
468VDFILES= $(SLIB)Val-goal.lev $(VDFILES1)
469
470WDFILES1= $(SLIB)Wiz-fila.lev $(SLIB)Wiz-filb.lev $(SLIB)Wiz-loca.lev \
471	$(SLIB)Wiz-strt.lev
472WDFILES= $(SLIB)Wiz-goal.lev $(WDFILES1)
473
474XDFILES=	$(ADFILES) $(BDFILES) $(CDFILES) $(HDFILES) $(KDFILES) \
475		$(MDFILES) $(PDFILES) $(RDFILES) $(RANFILES) $(SDFILES) $(TDFILES) \
476		$(VDFILES) $(WDFILES)
477
478SOUNDFILES= \
479	$(SBIN)cvtsnd \
480	$(SLIB)sounds \
481	$(SLIB)sounds/Bell $(SLIB)sounds/Bugle \
482	$(SLIB)sounds/Drum_Of_Earthquake \
483	$(SLIB)sounds/Fire_Horn $(SLIB)sounds/Frost_Horn \
484	$(SLIB)sounds/Leather_Drum $(SLIB)sounds/Magic_Flute \
485	$(SLIB)sounds/Magic_Harp $(SLIB)sounds/Tooled_Horn \
486	$(SLIB)sounds/Wooden_Flute $(SLIB)sounds/Wooden_Harp
487
488TILEFILES= \
489	$(SBIN)txt2iff \
490	$(NETHACK)tiles \
491	$(NETHACK)tiles/objects.iff \
492	$(NETHACK)tiles/monsters.iff \
493	$(NETHACK)tiles/other.iff
494
495INSTDUNGEONFILES1= \
496	$(SLIB)air.lev		$(SLIB)asmodeus.lev	$(SLIB)astral.lev \
497	$(SLIB)baalz.lev	$(SLIB)bigrm-1.lev	$(SLIB)bigrm-2.lev \
498	$(SLIB)bigrm-3.lev	$(SLIB)bigrm-4.lev	$(SLIB)bigrm-5.lev \
499	$(SLIB)castle.lev	$(SLIB)dungeon		$(SLIB)earth.lev \
500	$(SLIB)fakewiz1.lev	$(SLIB)fakewiz2.lev	$(SLIB)fire.lev \
501	$(SLIB)juiblex.lev	$(SLIB)knox.lev		$(SLIB)medusa-1.lev \
502	$(SLIB)medusa-2.lev	$(SLIB)minend-1.lev	$(SLIB)minend-2.lev \
503	$(SLIB)minetn-1.lev	$(SLIB)minetn-2.lev	$(SLIB)minefill.lev \
504	$(SLIB)options		$(SLIB)oracle.lev	$(SLIB)orcus.lev \
505	$(SLIB)sanctum.lev	$(SLIB)soko1-1.lev	$(SLIB)soko1-2.lev \
506	$(SLIB)soko2-1.lev	$(SLIB)soko2-2.lev	$(SLIB)soko3-1.lev \
507	$(SLIB)soko3-2.lev	$(SLIB)soko4-1.lev	$(SLIB)soko4-2.lev \
508	$(SLIB)tower1.lev	$(SLIB)tower2.lev	$(SLIB)tower3.lev \
509	$(SLIB)valley.lev	$(SLIB)water.lev	$(SLIB)wizard1.lev \
510	$(SLIB)wizard2.lev	$(SLIB)wizard3.lev \
511	$(XDFILES)
512
513INSTDUNGEONFILES= $(NETHACK)NetHack.cnf $(INSTDUNGEONFILES1)
514
515
516INSTDATAFILES= \
517	$(NETHACK)license	$(NETHACK)logfile	$(NETHACK)record \
518	$(NETHACK)tomb.iff	$(NETHACK)amii.hlp 	$(NETHACK)Recover.txt \
519	$(NETHACK)GuideBook.txt	$(NETHACK)NetHack.txt	$(NETHACK)Install.ami \
520#	$(NETHACK)HackWB.hlp	$(NETHACK)WBDefaults.def
521
522LIBFILES= \
523	$(INSTDUNGEONFILES1) \
524	$(SLIB)cmdhelp	 	$(SLIB)data		$(SLIB)dungeon \
525	$(SLIB)help		$(SLIB)hh		$(SLIB)history \
526	$(SLIB)opthelp		$(SLIB)oracles		$(SLIB)rumors \
527	$(SLIB)quest.dat	$(SLIB)wizhelp
528
529###
530### Getting down to business:
531###
532
533#SFD_INSTEAD all:  $(SBIN)lev_comp $(SBIN)dgn_comp $(SBIN)NetHack \
534all:  $(COMPACT_HEADERS) $(SBIN)lev_comp $(SBIN)dgn_comp $(SBIN)NetHack \
535	$(SBIN)dlb $(NETHACK)recover #$(NETHACK)HackCli $(SBIN)splitter \
536#	$(NETHACK)HackWB
537
538install: inst-data inst-dungeon inst-fonts inst-sounds inst-tiles \
539	 $(NETHACK)recover $(NETHACK)NetHack $(NETHACK)nhdat
540	#$(NETHACK)NetHack.dir inst-icons
541
542$(SBIN)NetHack:  $(HOBJ) $(AMI)ami.lnk
543	$(LINK) $(LNSPEC) $(SBIN)NetHack $(LIN) $(LLINK) $(LLIB)
544
545$(NETHACK)NetHack: $(SBIN)NetHack
546	copy $(SBIN)NetHack $(NETHACK)NetHack
547
548link:
549	$(LINK) $(LNSPEC) $(SBIN)NetHack $(LIN) $(LLINK) $(LLIB)
550
551$(AMI)ami.lnk: $(AMI)Makefile.ami
552	list to $(AMI)ami.lnk lformat="$(O)%s" $(O)\#?.o QUICK NOHEAD
553
554## dlb support
555$(OO)dlb_main.o:	$(UTIL)dlb_main.c $(HDEP) $(I)dlb.h $(I)date.h
556	$(CC) $(CFLAGS) $(OBJSPEC)$(OO)dlb_main.o $(UTIL)dlb_main.c
557
558$(SBIN)dlb:	$(OO)dlb_main.o $(O)dlb.o $(O)alloc.o $(OO)panic.o
559	$(LINK) $(PNSPEC) $(SBIN)dlb $(LIN) $(OO)dlb_main.o $(O)dlb.o \
560	  $(O)alloc.o $(OO)panic.o $(LLIB)
561
562obj:  $(HOBJ)
563
564obja:  $(AMIGAOBJ)
565
566objs:  $(SHAREOBJ)
567
568
569#SFD_BEGIN
570#SFD_ELSE
571SUFFIXES = .lev .des
572.des.lev:
573	$(SBIN)lev_comp $<
574#SFD_END
575
576
577# The default method for creating object files:
578
579#SFD_BEGIN
580##
581###[DICE]
582##
583##$(COMMOBJ): $(COMMOBJ:"$(O)*.o":"$(NHS)%1.c")
584##	$(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)%(left) %(right)
585##
586##$(AMIGAOBJ): $(AMIGAOBJ:"$(O)*.o":"$(AMI)%1.c")
587##	$(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)%(left) %(right)
588##
589##$(SHAREOBJ): $(SHAREOBJ:"$(O)*.o":"$(SHARE)%1.c")
590##	$(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)%(left) %(right)
591##
592##$(TTYOBJ): $(TTYSRC)
593##	$(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)%(left) %(right)
594##
595#SFD_ELSE
596
597#[SAS6]
598
599.c.o:
600	$(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)$@ $<
601
602#SFD_END
603
604
605clean:
606	-delete $(O)\#?.o $(OO)\#?.o
607
608spotless:  clean
609	-delete $(SBIN)NetHack $(SBIN)lev_comp $(SBIN)makedefs $(SBIN)dgn_comp
610	-delete $(SBIN)cvtsnd $(SBIN)dlb $(SBIN)txt2iff $(SBIN)splitter
611	-delete $(SBIN)tilemap
612	-delete $(SLIB)data $(SLIB)rumors
613	-delete $(SLIB)\#?.lev
614	-delete $(SLIB)dungeon
615	-delete $(SLIB)cmdhelp $(SLIB)help $(SLIB)hh $(SLIB)history
616	-delete $(SLIB)opthelp $(SLIB)options $(SLIB)oracles
617	-delete $(SLIB)quest.dat $(SLIB)wizhelp
618#	-delete $(SLIB)earth.lev $(SLIB)air.lev $(SLIB)fire.lev
619#	-delete $(SLIB)water.lev $(SLIB)astral.lev
620#	-delete $(SLIB)tower1.lev $(SLIB)tower2.lev $(SLIB)tower3.lev
621#	-delete $(SLIB)fakewiz1.lev $(SLIB)fakewiz2.lev
622#	-delete $(SLIB)medusa-1.lev $(SLIB)medusa-2.lev
623#	-delete $(SLIB)oracle.lev $(SLIB)wizard1.lev $(SLIB)wizard2.lev
624#	-delete $(SLIB)wizard3.lev $(DAT)dungeon.pdf $(SLIB)valley.lev
625#	-delete $(SLIB)minefill.lev
626#	-delete $(SLIB)minetn-1 $(SLIB)minetn-2 $(SLIB)minend-1 $(SLIB)minend-2
627#	-delete	$(SLIB)soko1-1.lev $(SLIB)soko1-2.lev $(SLIB)soko2-1.lev
628#	-delete $(SLIB)soko2-2.lev $(SLIB)soko3-1.lev $(SLIB)soko3-2.lev
629#	-delete $(SLIB)soko4-1.lev $(SLIB)soko4-2.lev
630#	-delete $(ADFILES)
631#	-delete $(BDFILES)
632#	-delete $(CDFILES)
633#	-delete $(HDFILES)
634#	-delete $(KDFILES)
635#	-delete $(MDFILES)
636#	-delete $(PDFILES)
637#	-delete $(RDFILES)
638#	-delete $(RANFILES)
639#	-delete $(SDFILES)
640#	-delete $(TDFILES)
641#	-delete $(VDFILES)
642#	-delete $(WDFILES)
643	-delete $(I)onames.h $(I)pm.h $(I)date.h
644	-delete $(NHS)tile.c $(NHS)monstr.c
645	-delete $(I)tile.h
646#	-echo to $(I)onames.h "" noline
647#	-wait 2
648#	-echo to $(I)pm.h "" noline
649#	-wait 2
650#	-setdate $(UTIL)makedefs.c
651#	-wait 2
652
653# Creating precompiled version of $(I)hack.h to save disk I/O.
654
655#SFD_BEGIN
656##
657###[DICE]
658###   If we were compiling with DICE and wanted to use the symbol table
659###   pre-loading feature, we would technically not need a rule to make the
660###   precompiled header file, because DCC handles this automatically;
661###   however, we must delete the precompiled header file if any of the
662###   includes change, and we need to create it manually because the
663###   sys/amiga sources, compiled first, define things differently than the
664###   main sources want them.
665##
666##$(HDEP):  $(I)hack.h $(I)pm.h $(I)onames.h
667##	-delete $(I)hack.sym
668##	echo to Ram:hackincl.c "#include <hack.h>"
669##	$(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)Ram:hackincl.o Ram:hackincl.c
670##	-delete Ram:hackincl.c Ram:hackincl.o
671##
672#SFD_ELSE
673
674#X#[SAS5]
675#X#   If we were to use the precompiled header file feature of SAS/C, we
676#X#   would uncomment the following lines.  (Also see defines for HDEP and
677#X#   CSYM near the beginning of this file, as these should be appropriately
678#X#   defined.)
679
680#X#$(HDEP):  $(I)hack.h $(SBIN)makedefs
681#X#	echo to Ram:hackincl.c "#include <$(I)hack.h>"
682#X#	$(CC) $(CFLAGS) -ph $(OBJSPEC)$@ Ram:hackincl.c
683#X#	-delete Ram:hackincl.c
684
685#[MANX]
686#   If we were compiling with Aztec, and wanted to use the symbol table
687#   pre-loading feature, we would uncomment these following two lines.
688
689#$(HDEP):  $(I)hack.h $(SBIN)makedefs
690#	$(CC) $(CFLAGS) -a $(OBJSPEC)Ram:hack.asm +h$@ $(I)hack.h
691#	-delete Ram:hack.asm
692
693#SFD_END
694
695#
696#	Please note:	The dependency lines for the modules here are
697#			deliberately incorrect.  Including "hack.h" in
698#			the dependency list would cause a dependency
699#			loop.
700#
701
702$(SBIN)makedefs:  $(MAKEOBJS)
703	$(LINK) $(LNSPEC) $(SBIN)makedefs $(LIN) $(MAKEOBJS) $(LLIB)
704
705$(OO)makedefs.o:  $(UTIL)makedefs.c $(I)config.h $(I)permonst.h $(I)monsym.h \
706		$(I)objclass.h  $(I)patchlevel.h $(I)qtext.h $(I)artilist.h
707	$(CC) $(DEFSPEC)MAKEDEFS_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)makedefs.c
708
709$(SBIN)lev_comp:  $(SPLEVOBJS)
710	$(LINK) $(LNSPEC) $(SBIN)lev_comp $(LIN) $(SPLEVOBJS) $(FBFIL) $(FLLIB)
711
712$(SBIN)dgn_comp:  $(DGNCOMPOBJS)
713	$(LINK) $(LNSPEC) $(SBIN)dgn_comp $(LIN) $(DGNCOMPOBJS) $(FBFIL) $(FLLIB)
714
715$(OO)lev_yacc.o:  $(UTIL)lev_yacc.c $(HDEP) $(I)sp_lev.h $(I)pm.h $(I)onames.h
716#	setdate $(UTIL)lev_yacc.c
717	$(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)PREFIX="NH:slib/" $(CFLAGS) \
718		$(DEFSPEC)alloca=malloc $(OBJSPEC)$@ $(UTIL)lev_yacc.c
719
720$(OO)lev_lex.o: $(UTIL)lev_lex.c $(HDEP) $(I)lev_comp.h $(I)sp_lev.h
721	$(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)lev_lex.c
722
723$(OO)lev_main.o:  $(UTIL)lev_main.c $(HDEP) $(I)pm.h $(I)onames.h $(I)date.h
724	$(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ \
725		$(UTIL)lev_main.c
726
727$(OO)dgn_yacc.o:  $(UTIL)dgn_yacc.c $(HDEP) $(I)dgn_file.h $(I)patchlevel.h
728	$(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(DEFSPEC)alloca=malloc \
729		$(OBJSPEC)$@ $(UTIL)dgn_yacc.c
730
731$(OO)dgn_lex.o: $(UTIL)dgn_lex.c $(I)config.h $(I)dgn_comp.h $(I)dgn_file.h
732	$(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)dgn_lex.c
733
734$(OO)dgn_main.o: $(UTIL)dgn_main.c $(I)config.h $(I)date.h
735	$(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ \
736		$(UTIL)dgn_main.c
737
738$(OO)panic.o: $(UTIL)panic.c $(HDEP)
739#SFD_INSTEAD 	$(CC) $(CFLAGS) $(OBJSPEC)%(left) $(UTIL)panic.c
740#none
741
742$(OO)recover.o: $(UTIL)recover.c $(I)config.h $(I)date.h
743	$(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ \
744		$(UTIL)recover.c
745
746$(NETHACK)recover: $(OO)recover.o
747	$(LINK) $(LNSPEC) $(NETHACK)recover $(LIN) $(OO)recover.o $(LLIB)
748
749# [OPTION] -- If you have flex/bison, leave these uncommented.  Otherwise,
750# comment them out and be careful! (You're not guaranteed to have the most
751# up to date *_comp.c, *_comp.h and *_lex.c)
752
753$(I)lev_comp.h: $(UTIL)lev_yacc.c $(I)patchlevel.h
754
755$(UTIL)lev_yacc.c:  $(UTIL)lev_comp.y $(I)patchlevel.h
756	$(BISON) -d $(UTIL)lev_comp.y
757#	copy y.tab.c $(UTIL)lev_yacc.c
758#	copy y.tab.h $(I)lev_comp.h
759	copy $(UTIL)lev_comp.tab.c $(UTIL)lev_yacc.c
760	copy $(UTIL)lev_comp.tab.h $(I)lev_comp.h
761#	delete y.tab.c
762#	delete y.tab.h
763	delete $(UTIL)lev_comp.tab.c
764	delete $(UTIL)lev_comp.tab.h
765
766$(UTIL)lev_lex.c:  $(UTIL)lev_comp.l $(I)patchlevel.h
767	$(FLEX) $(UTIL)lev_comp.l
768	copy lex.yy.c $(UTIL)lev_lex.c
769	delete lex.yy.c
770
771$(I)dgn_comp.h: $(UTIL)dgn_yacc.c $(I)patchlevel.h
772
773$(UTIL)dgn_yacc.c:  $(UTIL)dgn_comp.y $(I)patchlevel.h
774	$(BISON) -d $(UTIL)dgn_comp.y
775#	copy y.tab.c $(UTIL)dgn_yacc.c
776#	copy y.tab.h $(I)dgn_comp.h
777	copy $(UTIL)dgn_comp.tab.c $(UTIL)dgn_yacc.c
778	copy $(UTIL)dgn_comp.tab.h $(I)dgn_comp.h
779#	delete y.tab.c
780#	delete y.tab.h
781	delete $(UTIL)dgn_comp.tab.c
782	delete $(UTIL)dgn_comp.tab.h
783
784$(UTIL)dgn_lex.c:  $(UTIL)dgn_comp.l $(I)patchlevel.h
785	$(FLEX) $(UTIL)dgn_comp.l
786	copy lex.yy.c $(UTIL)dgn_lex.c
787	delete lex.yy.c
788
789#
790#	The following include files depend on makedefs to be created.
791#	As a result, they are not defined in HACKINCL, instead, their
792#	dependencies are explicitly outlined here.
793#
794
795#
796#	date.h should be remade any time any of the source or include code
797#	is modified.  Unfortunately, this would make the contents of this
798#	file far more complex.	Since "hack.h" depends on most of the include
799#	files, we kludge around this by making date.h dependent on hack.h,
800#	even though it doesn't include this file.
801#
802
803#SFD_INSTEAD $(I)date.h $(DAT)options::  $(HDEP) $(SBIN)makedefs $(AMIGAOBJ)
804$(I)date.h $(DAT)options:  $(HDEP) $(SBIN)makedefs $(AMIGAOBJ) $(I)patchlevel.h
805	$(SBIN)makedefs -v
806	$(EXECUTE) $(AMI)ifchange MOVE $(I)t.date.h $(I)date.h
807	-wait 2
808
809$(I)onames.h:  $(SBIN)makedefs
810	$(SBIN)makedefs -o
811	$(EXECUTE) $(AMI)ifchange TOUCH $(I)t.onames.h $(I)onames.h $(I)decl.h
812	$(EXECUTE) $(AMI)ifchange MOVE $(I)t.onames.h $(I)onames.h
813	-wait 2
814
815$(I)pm.h:  $(SBIN)makedefs
816	$(SBIN)makedefs -p
817	$(EXECUTE) $(AMI)ifchange TOUCH $(I)t.pm.h $(I)pm.h $(I)decl.h $(I)youprop.h
818	$(EXECUTE) $(AMI)ifchange MOVE $(I)t.pm.h $(I)pm.h
819	-wait 2
820
821$(SLIB)quest.dat:	$(DAT)quest.txt $(SBIN)makedefs
822	$(SBIN)makedefs -q
823
824$(NHS)monstr.c:  $(HDEP) $(SBIN)makedefs
825	$(SBIN)makedefs -m
826	-wait 2
827
828$(SLIB)oracles:	$(DAT)oracles.txt $(SBIN)makedefs
829	$(SBIN)makedefs -h
830	-wait 2
831
832#
833#	The following programs vary depending on what OS you are using.
834#	As a result, they are not defined in HACKSRC and their dependencies
835#	are explicitly outlined here.
836#
837
838$(O)amidos.o:  $(AMI)amidos.c $(HDEP)
839
840$(O)amirip.o:  $(AMI)amirip.c $(HDEP)
841
842$(O)aglue.o:  $(AMI)aglue.a
843	$(ASM) $(AFLAGS) $(AOBJSPEC)$(O)aglue.o $(AMI)aglue.a
844
845$(O)amisnd.o:	$(AMI)amisnd.c $(HDEP)
846
847$(O)winchar.o:	$(AMI)winchar.c $(NHS)tile.c $(HDEP)
848
849$(NHS)tile.c:	$(WSHARE)tilemap.c
850#SFD_INSTEAD 	$(CCLINK) $(CLFLAGS) $(PNSPEC) $(SBIN)tilemap $(WSHARE)tilemap.c
851	$(CCLINK) $(CFLAGS) $(PNSPEC) $(SBIN)tilemap $(WSHARE)tilemap.c
852	$(SBIN)tilemap
853
854$(O)winstr.o:	$(AMI)winstr.c $(HDEP) $(AMDEP)
855
856$(O)winreq.o:	$(AMI)winreq.c $(HDEP) $(AMDEP) $(AMI)colorwin.c $(AMI)clipwin.c
857
858$(O)winfuncs.o:	$(AMI)winfuncs.c $(HDEP) $(AMDEP) $(I)patchlevel.h
859
860$(O)winkey.o:	$(AMI)winkey.c $(HDEP) $(AMDEP)
861
862$(O)winmenu.o:	$(AMI)winmenu.c $(HDEP) $(AMDEP)
863
864$(O)winami.o:	$(AMI)winami.c $(HDEP) $(AMDEP) #$(AMI)char.c $(AMI)randwin.c
865
866#$(O)amilib.o:	$(AMI)amilib.c $(HDEP) $(AMDEP)
867
868$(O)amiwind.o:  $(AMI)amiwind.c $(AMI)amimenu.c $(HDEP) $(AMDEP)
869
870$(O)amiwbench.o:  $(AMI)amiwbench.c $(HDEP)
871
872$(O)random.o:  $(SHARE)random.c
873
874$(O)pcmain.o:  $(SHARE)pcmain.c $(HDEP) $(I)dlb.h
875
876$(O)dispmap.o:	$(AMI)dispmap.s
877	$(ASM) $(AFLAGS) $(AOBJSPEC)$@ $<
878
879# Stuff to build the front ends
880$(NETHACK)HackWB: $(OO)wb.o $(OO)wbx.o $(OO)loader.o $(OO)multi.o
881	$(LINK) $(LNSPEC) $(NETHACK)HackWB $(LIN) $(OO)wb.o $(OO)wbx.o \
882		$(OO)loader.o $(OO)multi.o $(LLIB)
883
884$(NETHACK)HackCli: $(OO)cli.o $(OO)loader.o $(OO)multi.o
885	$(LINK) $(LNSPEC) $(NETHACK)HackCli $(LIN) $(OO)cli.o $(OO)loader.o \
886		$(OO)multi.o $(LLIB)
887
888# This needs to exist to eliminate the HackWB startup message
889#SFD_INSTEAD $(NETHACK)WBDefaults.def: $(NETHACK)WBDefaults.def
890$(NETHACK)WBDefaults.def:
891	echo to $(NETHACK)WBDefaults.def
892
893WBH	= $(AMI)wbdefs.h $(AMI)wbstruct.h $(AMI)wbprotos.h
894ASP	= $(AMI)splitter
895$(OO)wb.o: $(WBH) $(AMI)wb.c $(AMI)wbwin.c $(AMI)wbdata.c $(AMI)wbgads.c \
896		$(I)patchlevel.h
897	$(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)wb.o $(AMI)wb.c
898
899$(OO)wbx.o: $(WBH) $(AMI)wbcli.c $(AMI)wbwin.c $(AMI)wbdata.c \
900		$(I)patchlevel.h $(I)date.h
901	$(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)wbx.o $(AMI)wbcli.c
902
903$(OO)loader.o: $(ASP)/loader.c $(ASP)/split.h $(ASP)/amiout.h $(ASP)/multi.h
904	$(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)loader.o $(ASP)/loader.c
905
906$(OO)multi.o: $(ASP)/multi.c $(ASP)/multi.h
907	$(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)multi.o $(ASP)/multi.c
908
909$(OO)cli.o: $(WBH) $(AMI)wbcli.c $(I)patchlevel.h $(I)date.h
910	$(CC) $(WBCFLAGS) $(WBC2FLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)cli.o \
911		$(AMI)wbcli.c
912
913####
914# splitter support
915$(SBIN)splitter:	$(OO)splitter.o $(OO)arg.o
916	$(LINK) $(LNSPEC) $(SBIN)splitter $(LIN) $(OO)splitter.o $(OO)arg.o \
917		$(LLIB)
918
919$(NETHACK)NetHack.dir:	$(SBIN)splitter $(SBIN)NetHack
920	$(SBIN)splitter $(SBIN)NetHack
921
922$(OO)splitter.o:	$(ASP)/splitter.c $(ASP)/split.h $(ASP)/amiout.h $(ASP)/arg.h
923	$(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)splitter.o \
924		$(ASP)/splitter.c
925
926$(OO)arg.o:	$(ASP)/arg.c $(ASP)/arg.h
927	$(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)arg.o $(ASP)/arg.c
928
929# Create/copy other stuff into NetHack: directory:
930
931$(NETHACK)tomb.iff:	$(SBIN)xpm2iff $(AMI)grave16.xpm
932	$(SBIN)xpm2iff $(AMI)grave16.xpm $(NETHACK)tomb.iff
933
934$(OO)xpm2iff.o:	$(AMI)xpm2iff.c
935	$(CC) $(CFLAGS) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(AMI)xpm2iff.c
936
937$(SBIN)xpm2iff:	$(OO)xpm2iff.o
938	$(LINK) $(LNSPEC) $@ $(LIN) $(OO)xpm2iff.o $(FLLIB)
939
940# Tile installation for the tile version of the game
941inst-tiles: $(TILEFILES)
942
943#SFD_INSTEAD $(NETHACK)tiles: $(NETHACK)tiles
944$(NETHACK)tiles:
945	-makedir $(NETHACK)tiles
946
947$(OO)txt2iff.o:	$(AMI)txt2iff.c
948	$(CC) $(CFLAGS) $(CSYM) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ \
949		$(AMI)txt2iff.c
950
951$(OO)ppmwrite.o: $(WSHARE)ppmwrite.c
952	$(CC) $(CFLAGS) $(CSYM) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(WSHARE)ppmwrite.c
953
954$(OO)tiletext.o:	$(WSHARE)tiletext.c $(I)config.h $(WSHARE)tile.h
955	$(CC) $(CFLAGS) $(CSYM) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(WSHARE)tiletext.c
956
957$(OO)tiletxt.o:	$(WSHARE)tilemap.c $(I)hack.h
958	$(CC) $(CFLAGS) $(CSYM) $(DEFSPEC)TILETEXT $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(WSHARE)tilemap.c
959
960NAMEOBJS = $(O)drawing.o $(O)decl.o $(O)monst.o $(O)objects.o
961
962$(SBIN)txt2ppm:	$(OO)ppmwrite.o $(NAMEOBJS) $(O)alloc.o $(OO)panic.o $(OO)tiletext.o $(OO)tiletxt.o
963	$(LINK) $(LNSPEC) $@ $(LIN) $(OO)ppmwrite.o $(NAMEOBJS) $(OO)tiletext.o $(OO)tiletxt.o $(O)alloc.o $(OO)panic.o $(FLLIB)
964
965$(SBIN)txt2iff: $(OO)txt2iff.o $(NAMEOBJS) $(OO)tiletext.o $(OO)tiletxt.o
966	$(LINK) $(LNSPEC) $@ $(LIN) $(OO)txt2iff.o $(NAMEOBJS) $(OO)tiletext.o \
967		$(OO)tiletxt.o  $(FLLIB)
968
969$(NETHACK)tiles/objects.iff: $(WSHARE)objects.txt $(SBIN)txt2iff
970	$(SBIN)txt2iff $(WSHARE)objects.txt $(NETHACK)tiles/objects.iff
971
972$(NETHACK)tiles/monsters.iff: $(WSHARE)monsters.txt $(SBIN)txt2iff
973	$(SBIN)txt2iff $(WSHARE)monsters.txt $(NETHACK)tiles/monsters.iff
974
975$(NETHACK)tiles/other.iff: $(WSHARE)other.txt $(SBIN)txt2iff
976	$(SBIN)txt2iff $(WSHARE)other.txt $(NETHACK)tiles/other.iff
977
978# Sound installation rules.
979inst-sounds: $(SOUNDFILES)
980	list to T:nhsdat.lst $(SLIB)sounds QUICK NOHEAD
981	echo  >T:make-nhsdat $(SBIN)dlb cCfI $(SLIB)sounds $(NETHACK)nhsdat T:nhsdat.lst
982	echo >>T:make-nhsdat if not exists $(NETHACK)nhsdat
983	echo >>T:make-nhsdat copy $(SLIB)sounds/\#? $(NETHACK)sounds
984	echo >>T:make-nhsdat endif
985	execute T:make-nhsdat
986	-delete T:make-nhsdat
987
988#SFD_INSTEAD $(SLIB)sounds: $(SLIB)sounds
989$(SLIB)sounds:
990	-makedir $(SLIB)sounds
991
992$(SBIN)cvtsnd: $(OO)cvtsnd.o
993	$(LINK) $(LNSPEC) $@ $(LIN) $(OO)cvtsnd.o $(FLLIB)
994
995$(OO)cvtsnd.o: $(AMI)cvtsnd.c
996#SFD_INSTEAD $(CC) $(CFLAGS) $(OBJSPEC)%(left) %(right)
997#none
998
999$(SLIB)sounds/Bell: $(SHARE)sounds/bell.uu
1000	$(UUDEC) $(SHARE)sounds/bell.uu
1001	$(SBIN)cvtsnd Bell $(SLIB)sounds/Bell
1002	-delete Bell
1003
1004$(SLIB)sounds/Bugle: $(SHARE)sounds/bugle.uu
1005	$(UUDEC) $(SHARE)sounds/bugle.uu
1006	$(SBIN)cvtsnd Bugle $(SLIB)sounds/Bugle
1007	-delete Bugle
1008
1009$(SLIB)sounds/Drum_Of_Earthquake: $(SHARE)sounds/erthdrum.uu
1010	$(UUDEC) $(SHARE)sounds/erthdrum.uu
1011	$(SBIN)cvtsnd Drum_Of_Earthquake $(SLIB)sounds/Drum_Of_Earthquake
1012	-delete Drum_Of_Earthquake
1013
1014$(SLIB)sounds/Fire_Horn: $(SHARE)sounds/firehorn.uu
1015	$(UUDEC) $(SHARE)sounds/firehorn.uu
1016	$(SBIN)cvtsnd Fire_Horn $(SLIB)sounds/Fire_Horn
1017	-delete Fire_Horn
1018
1019$(SLIB)sounds/Frost_Horn: $(SHARE)sounds/frsthorn.uu
1020	$(UUDEC) $(SHARE)sounds/frsthorn.uu
1021	$(SBIN)cvtsnd Frost_Horn $(SLIB)sounds/Frost_Horn
1022	-delete Frost_Horn
1023
1024$(SLIB)sounds/Leather_Drum: $(SHARE)sounds/lethdrum.uu
1025	$(UUDEC) $(SHARE)sounds/lethdrum.uu
1026	$(SBIN)cvtsnd Leather_Drum $(SLIB)sounds/Leather_Drum
1027	-delete Leather_Drum
1028
1029$(SLIB)sounds/Magic_Flute: $(SHARE)sounds/mgcflute.uu
1030	$(UUDEC) $(SHARE)sounds/mgcflute.uu
1031	$(SBIN)cvtsnd Magic_Flute $(SLIB)sounds/Magic_Flute
1032	-delete Magic_Flute
1033
1034$(SLIB)sounds/Magic_Harp: $(SHARE)sounds/mgcharp.uu
1035	$(UUDEC) $(SHARE)sounds/mgcharp.uu
1036	$(SBIN)cvtsnd Magic_Harp $(SLIB)sounds/Magic_Harp
1037	-delete Magic_Harp
1038
1039$(SLIB)sounds/Tooled_Horn: $(SHARE)sounds/toolhorn.uu
1040	$(UUDEC) $(SHARE)sounds/toolhorn.uu
1041	$(SBIN)cvtsnd Tooled_Horn $(SLIB)sounds/Tooled_Horn
1042	-delete Tooled_Horn
1043
1044$(SLIB)sounds/Wooden_Flute: $(SHARE)sounds/wdnflute.uu
1045	$(UUDEC) $(SHARE)sounds/wdnflute.uu
1046	$(SBIN)cvtsnd Wooden_Flute $(SLIB)sounds/Wooden_Flute
1047	-delete Wooden_Flute
1048
1049$(SLIB)sounds/Wooden_Harp: $(SHARE)sounds/wdnharp.uu
1050	$(UUDEC) $(SHARE)sounds/wdnharp.uu
1051	$(SBIN)cvtsnd Wooden_Harp $(SLIB)sounds/Wooden_Harp
1052	-delete Wooden_Harp
1053
1054inst-dungeon: $(INSTDUNGEONFILES)
1055
1056$(NETHACK)options : $(DAT)options
1057	copy $(DAT)options $@
1058
1059# Create compiled dungeon files
1060BGM= $(SLIB)bigrm-2.lev $(SLIB)bigrm-3.lev $(SLIB)bigrm-4.lev $(SLIB)bigrm-5.lev
1061$(BGM):	$(SLIB)bigrm-1.lev
1062
1063$(SLIB)bigrm-1.lev: $(DAT)bigroom.des $(SBIN)lev_comp
1064#SFD_INSTEAD $(SBIN)lev_comp $(DAT)bigroom.des
1065#none
1066
1067$(SLIB)castle.lev:  $(DAT)castle.des $(SBIN)lev_comp
1068
1069ENDGAME1= $(SLIB)air.lev $(SLIB)earth.lev $(SLIB)fire.lev $(SLIB)water.lev
1070$(ENDGAME1):	$(SLIB)astral.lev
1071
1072$(SLIB)astral.lev:	$(DAT)endgame.des $(SBIN)lev_comp
1073#SFD_INSTEAD $(SBIN)lev_comp $(DAT)endgame.des
1074#none
1075
1076GEHENNOM1= $(SLIB)asmodeus.lev $(SLIB)baalz.lev $(SLIB)juiblex.lev \
1077  $(SLIB)orcus.lev $(SLIB)sanctum.lev
1078$(GEHENNOM1):	$(SLIB)valley.lev
1079
1080$(SLIB)valley.lev:	$(DAT)gehennom.des $(SBIN)lev_comp
1081#SFD_INSTEAD $(SBIN)lev_comp $(DAT)gehennom.des
1082#none
1083
1084$(SLIB)knox.lev: $(DAT)knox.des $(SBIN)lev_comp
1085#SFD_INSTEAD $(SBIN)lev_comp $(DAT)knox.des
1086#none
1087
1088MINES1= $(SLIB)minend-1.lev $(SLIB)minend-2.lev $(SLIB)minetn-1.lev $(SLIB)minetn-2.lev
1089$(MINES1): $(SLIB)minefill.lev
1090
1091$(SLIB)minefill.lev: $(DAT)mines.des $(SBIN)lev_comp
1092#SFD_INSTEAD $(SBIN)lev_comp $(DAT)mines.des
1093#none
1094
1095$(SLIB)oracle.lev: $(DAT)oracle.des $(SBIN)lev_comp
1096#SFD_INSTEAD $(SBIN)lev_comp $(DAT)oracle.des
1097#none
1098
1099TOWER1= $(SLIB)tower1.lev $(SLIB)tower2.lev
1100$(TOWER1): $(SLIB)tower3.lev
1101
1102$(SLIB)tower3.lev: $(DAT)tower.des $(SBIN)lev_comp
1103#SFD_INSTEAD $(SBIN)lev_comp $(DAT)tower.des
1104#none
1105
1106WIZARD1= $(SLIB)wizard1.lev $(SLIB)wizard2.lev $(SLIB)wizard3.lev \
1107	$(SLIB)fakewiz1.lev
1108$(WIZARD1):  $(SLIB)fakewiz2.lev
1109
1110$(SLIB)fakewiz2.lev:  $(DAT)yendor.des $(SBIN)lev_comp
1111#SFD_INSTEAD $(SBIN)lev_comp $(DAT)yendor.des
1112#none
1113
1114MEDUSA1= $(SLIB)medusa-1.lev
1115$(MEDUSA1): $(SLIB)medusa-2.lev
1116
1117$(SLIB)medusa-2.lev:	$(DAT)medusa.des $(SBIN)lev_comp
1118#SFD_INSTEAD $(SBIN)lev_comp $(DAT)medusa.des
1119#none
1120
1121SOKOBAN1= $(SLIB)soko1-1.lev $(SLIB)soko1-2.lev $(SLIB)soko2-1.lev \
1122	$(SLIB)soko2-2.lev $(SLIB)soko3-1.lev $(SLIB)soko3-2.lev \
1123	$(SLIB)soko4-1.lev
1124$(SOKOBAN1): $(SLIB)soko4-2.lev
1125
1126$(SLIB)soko4-2.lev: $(DAT)sokoban.des $(SBIN)lev_comp
1127#SFD_INSTEAD $(SBIN)lev_comp $(DAT)sokoban.des
1128#none
1129
1130$(ADFILES1):	$(SLIB)Arc-goal.lev
1131
1132$(SLIB)Arc-goal.lev:	$(DAT)Arch.des $(SBIN)lev_comp
1133#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Arch.des
1134#none
1135
1136$(BDFILES1):	$(SLIB)Bar-goal.lev
1137
1138$(SLIB)Bar-goal.lev:	$(DAT)Barb.des $(SBIN)lev_comp
1139#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Barb.des
1140#none
1141
1142$(CDFILES1):	$(SLIB)Cav-goal.lev
1143
1144$(SLIB)Cav-goal.lev:	$(DAT)Caveman.des $(SBIN)lev_comp
1145#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Caveman.des
1146#none
1147
1148$(HDFILES1):	$(SLIB)Hea-goal.lev
1149
1150$(SLIB)Hea-goal.lev:	$(DAT)Healer.des $(SBIN)lev_comp
1151#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Healer.des
1152#none
1153
1154$(KDFILES1):	$(SLIB)Kni-goal.lev
1155
1156$(SLIB)Kni-goal.lev:	$(DAT)Knight.des $(SBIN)lev_comp
1157#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Knight.des
1158#none
1159
1160$(MDFILES1):	$(SLIB)Mon-goal.lev
1161
1162$(SLIB)Mon-goal.lev:	$(DAT)Monk.des $(SBIN)lev_comp
1163#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Monk.des
1164#none
1165
1166$(PDFILES1):	$(SLIB)Pri-goal.lev
1167
1168$(SLIB)Pri-goal.lev:	$(DAT)Priest.des $(SBIN)lev_comp
1169#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Priest.des
1170#none
1171
1172$(RDFILES1):	$(SLIB)Rog-goal.lev
1173
1174$(SLIB)Rog-goal.lev:	$(DAT)Rogue.des $(SBIN)lev_comp
1175#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Rogue.des
1176#none
1177
1178$(RANFILES1):	$(SLIB)Ran-goal.lev
1179
1180$(SLIB)Ran-goal.lev:	$(DAT)Ranger.des $(SBIN)lev_comp
1181#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Ranger.des
1182#none
1183
1184$(SDFILES1):	$(SLIB)Sam-goal.lev
1185
1186$(SLIB)Sam-goal.lev:	$(DAT)Samurai.des $(SBIN)lev_comp
1187#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Samurai.des
1188#none
1189
1190$(TDFILES1):	$(SLIB)Tou-goal.lev
1191
1192$(SLIB)Tou-goal.lev:	$(DAT)Tourist.des $(SBIN)lev_comp
1193#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Tourist.des
1194#none
1195
1196$(VDFILES1):	$(SLIB)Val-goal.lev
1197
1198$(SLIB)Val-goal.lev:	$(DAT)Valkyrie.des $(SBIN)lev_comp
1199#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Valkyrie.des
1200#none
1201
1202$(WDFILES1):	$(SLIB)Wiz-goal.lev
1203
1204$(SLIB)Wiz-goal.lev:	$(DAT)Wizard.des $(SBIN)lev_comp
1205#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Wizard.des
1206#none
1207
1208$(SLIB)dungeon:  $(DAT)dungeon.def $(SBIN)makedefs $(SBIN)dgn_comp
1209	$(SBIN)makedefs -e
1210	$(SBIN)dgn_comp $(DAT)dungeon.pdf
1211	copy $(DAT)dungeon $(SLIB)dungeon
1212	delete $(DAT)dungeon
1213
1214inst-data: $(INSTDATAFILES)
1215
1216$(NETHACK)amii.hlp: $(AMI)amii.hlp
1217	copy $(AMI)amii.hlp $@
1218
1219#$(NETHACK)data:  $(DAT)data
1220#	copy $(DAT)data $@
1221
1222$(SLIB)data:  $(DAT)data.base $(I)config.h $(SBIN)makedefs
1223	$(SBIN)makedefs -d
1224
1225#$(NETHACK)rumors:  $(DAT)rumors
1226#	copy $(DAT)rumors $@
1227
1228$(SLIB)rumors:  $(DAT)rumors.tru $(DAT)rumors.fal $(SBIN)makedefs
1229	$(SBIN)makedefs -r
1230
1231$(SLIB)cmdhelp:  $(DAT)cmdhelp
1232	copy $(DAT)cmdhelp $@
1233
1234$(SLIB)help:  $(DAT)help
1235	copy $(DAT)help $@
1236
1237$(SLIB)hh:  $(DAT)hh
1238	copy $(DAT)hh $@
1239
1240$(NETHACK)HackWB.hlp: $(AMI)HackWB.hlp
1241	copy $(AMI)HackWB.hlp $@
1242
1243$(SLIB)history:  $(DAT)history
1244	copy $(DAT)history $@
1245
1246$(NETHACK)license:  $(DAT)license
1247	copy $(DAT)license $@
1248
1249$(SLIB)opthelp:  $(DAT)opthelp
1250	copy $(DAT)opthelp $@
1251
1252$(NETHACK)Recover.txt: $(DOC)Recover.txt
1253	copy $(DOC)Recover.txt $@
1254
1255$(NETHACK)GuideBook.txt: $(DOC)GuideBook.txt
1256	copy $(DOC)GuideBook.txt $@
1257
1258$(NETHACK)NetHack.txt: $(DOC)NetHack.txt
1259	copy $(DOC)NetHack.txt $@
1260
1261$(NETHACK)Install.ami: $(AMI)Install.ami
1262	copy $(AMI)Install.ami $@
1263
1264#SFD_INSTEAD $(NETHACK)logfile: $(NETHACK)logfile
1265$(NETHACK)logfile:
1266	echo to $@
1267
1268#SFD_INSTEAD $(NETHACK)record: $(NETHACK)record
1269$(NETHACK)record:
1270	echo to $@
1271
1272$(SLIB)wizhelp: $(DAT)wizhelp
1273	copy $(DAT)wizhelp $@
1274
1275# Create the directories here because NetHack.cnf puts them there by default
1276$(NETHACK)NetHack.cnf:  $(AMI)NetHack.cnf
1277	copy $(AMI)NetHack.cnf $@
1278	-makedir $(NETHACK)save
1279	-makedir $(NETHACK)levels
1280
1281#SFD_BEGIN
1282#SFD_ELSE
1283$(O)NetHack.gst: $(GSTSRC) $(I)hack.h
1284	sc makegst=$(GSTFILE) $(CFLAGS) $(GSTSRC)
1285#SFD_END
1286
1287# Unpack and install fonts
1288
1289INSTFONTFILES= 	$(NETHACK)hack.font $(NETHACK)hack $(NETHACK)hack/8
1290
1291inst-fonts: $(INSTFONTFILES)
1292
1293$(NETHACK)hack/8:  $(AMI)amifont8.uu $(NETHACK)hack
1294	$(UUDEC) $(AMI)amifont8.uu
1295	copy 8 $(NETHACK)hack/8
1296	delete 8
1297
1298$(NETHACK)hack.font:  $(AMI)amifont.uu
1299	$(UUDEC) $(AMI)amifont.uu
1300	copy hack.font $(NETHACK)hack.font
1301	delete hack.font
1302
1303#SFD_INSTEAD $(NETHACK)hack: $(NETHACK)hack
1304$(NETHACK)hack:
1305	-makedir $@
1306
1307INSTICONFILES= \
1308	$(NETHACK)default.icon $(NETHACK)NetHack.info $(NETHACK)NewGame.info \
1309	$(NETHACK)HackWB.info
1310
1311inst-icons: $(INSTICONFILES)
1312
1313# Unpack the icons into place
1314
1315$(NETHACK)default.icon:  $(AMI)dflticon.uu
1316	$(UUDEC) $(AMI)dflticon.uu
1317#	copy default.icon $(NETHACK)default.icon
1318#	delete default.icon
1319
1320$(NETHACK)NetHack.info:  $(AMI)NHinfo.uu
1321	$(UUDEC) $(AMI)NHinfo.uu
1322#	copy NetHack.info $(NETHACK)NetHack.info
1323#	delete NetHack.info
1324
1325$(NETHACK)NewGame.info:  $(AMI)NewGame.uu
1326	$(UUDEC) $(AMI)NewGame.uu
1327#	copy NewGame.info $(NETHACK)NewGame.info
1328#	delete NewGame.info
1329
1330$(NETHACK)HackWB.info:  $(AMI)HackWB.uu
1331	$(UUDEC) $(AMI)HackWB.uu
1332#	copy HackWB.info $(NETHACK)HackWB.info
1333#	delete HackWB.info
1334
1335# If DLB is defined, create the nhdat library file in the playground
1336# directory.  If not, move all the data files there.
1337$(NETHACK)nhdat:  $(LIBFILES)
1338	list to T:nhdat.lst $(SLIB) QUICK NOHEAD FILES
1339	echo  >T:make-nhdat $(SBIN)dlb cCfI $(SLIB) $(NETHACK)nhdat T:nhdat.lst
1340	echo >>T:make-nhdat if not exists $(NETHACK)nhdat
1341	echo >>T:make-nhdat copy $(SLIB)\#? $(NETHACK)
1342	echo >>T:make-nhdat endif
1343	execute T:make-nhdat
1344	-delete T:make-nhdat
1345
1346# DO NOT DELETE THIS LINE
1347
1348$(O)allmain.o:  $(NHS)allmain.c $(HDEP)
1349
1350$(O)alloc.o:  $(NHS)alloc.c $(I)config.h
1351
1352$(O)apply.o:  $(NHS)apply.c $(HDEP) $(I)edog.h
1353#SFD_INSTEAD #none
1354	$(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)apply.c
1355
1356$(O)artifact.o:  $(NHS)artifact.c $(HDEP) $(I)artifact.h $(I)artilist.h
1357
1358$(O)attrib.o:  $(NHS)attrib.c $(HDEP) $(I)artifact.h
1359
1360$(O)ball.o: $(NHS)ball.c $(HDEP)
1361
1362$(O)bones.o:  $(NHS)bones.c $(HDEP) $(I)lev.h
1363
1364$(O)botl.o:	$(NHS)botl.c $(HDEP)
1365
1366$(O)cmd.o:  $(NHS)cmd.c $(HDEP) $(I)func_tab.h
1367
1368$(O)dbridge.o:  $(NHS)dbridge.c $(HDEP)
1369
1370$(O)decl.o:  $(NHS)decl.c $(HDEP) $(I)quest.h
1371
1372$(O)detect.o: $(NHS)detect.c $(HDEP) $(I)artifact.h
1373
1374$(O)dig.o: $(NHS)dig.c $(HDEP) $(I)edog.h
1375
1376$(O)display.o:  $(NHS)display.c $(HDEP)
1377
1378$(O)dlb.o: $(NHS)dlb.c $(HDEP) $(I)dlb.h
1379
1380$(O)do.o:  $(NHS)do.c $(HDEP) $(I)lev.h
1381
1382$(O)do_name.o:  $(NHS)do_name.c $(HDEP)
1383
1384$(O)do_wear.o:  $(NHS)do_wear.c $(HDEP)
1385
1386$(O)dog.o:  $(NHS)dog.c $(HDEP) $(I)edog.h
1387
1388$(O)dogmove.o:  $(NHS)dogmove.c $(HDEP) $(I)mfndpos.h $(I)edog.h
1389
1390$(O)dokick.o:  $(NHS)dokick.c $(HDEP) $(I)eshk.h
1391
1392$(O)dothrow.o:  $(NHS)dothrow.c $(HDEP)
1393
1394$(O)drawing.o:  $(NHS)drawing.c $(HDEP) $(I)tcap.h
1395	$(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)drawing.c
1396
1397$(O)dungeon.o:  $(NHS)dungeon.c $(HDEP) $(I)dgn_file.h $(I)dlb.h
1398
1399$(O)eat.o:  $(NHS)eat.c $(HDEP)
1400
1401$(O)end.o:  $(NHS)end.c $(HDEP) $(I)eshk.h $(I)dlb.h
1402
1403$(O)engrave.o:  $(NHS)engrave.c $(HDEP) $(I)lev.h
1404
1405$(O)exper.o:  $(NHS)exper.c $(HDEP)
1406
1407$(O)explode.o:  $(NHS)explode.c $(HDEP)
1408
1409$(O)extralev.o:  $(NHS)extralev.c $(HDEP)
1410
1411$(O)files.o:  $(NHS)files.c $(HDEP) $(I)dlb.h $(I)date.h
1412
1413$(O)fountain.o:  $(NHS)fountain.c $(HDEP)
1414
1415$(O)hack.o:  $(NHS)hack.c $(HDEP)
1416
1417$(O)hacklib.o:  $(NHS)hacklib.c $(HDEP)
1418
1419$(O)invent.o:  $(NHS)invent.c $(HDEP) $(I)artifact.h
1420
1421$(O)light.o:  $(NHS)light.c $(HDEP) $(I)lev.h
1422
1423$(O)lock.o:  $(NHS)lock.c $(HDEP)
1424
1425$(O)mail.o:  $(NHS)mail.c $(HDEP) $(I)mail.h
1426
1427$(O)makemon.o:  $(NHS)makemon.c $(HDEP) $(I)epri.h $(I)emin.h $(I)edog.h
1428
1429$(O)mcastu.o:  $(NHS)mcastu.c $(HDEP)
1430
1431$(O)mhitm.o:  $(NHS)mhitm.c $(HDEP) $(I)artifact.h $(I)edog.h
1432
1433$(O)mhitu.o:  $(NHS)mhitu.c $(HDEP) $(I)artifact.h $(I)edog.h
1434	$(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)mhitu.c
1435
1436$(O)minion.o:  $(NHS)minion.c $(HDEP) $(I)emin.h $(I)epri.h
1437
1438$(O)mklev.o:  $(NHS)mklev.c $(HDEP)
1439
1440$(O)mkmap.o:  $(NHS)mkmap.c $(HDEP) $(I)sp_lev.h
1441
1442$(O)mkmaze.o:  $(NHS)mkmaze.c $(HDEP) $(I)sp_lev.h $(I)lev.h
1443
1444$(O)mkobj.o:  $(NHS)mkobj.c $(HDEP) $(I)artifact.h $(I)prop.h
1445
1446$(O)mkroom.o:  $(NHS)mkroom.c $(HDEP)
1447
1448$(O)mon.o:  $(NHS)mon.c $(HDEP) $(I)mfndpos.h $(I)edog.h
1449
1450$(O)mondata.o:  $(NHS)mondata.c $(HDEP) $(I)eshk.h $(I)epri.h
1451
1452$(O)monmove.o:  $(NHS)monmove.c $(HDEP) $(I)mfndpos.h $(I)artifact.h
1453
1454$(O)monst.o:  $(NHS)monst.c $(I)config.h $(I)permonst.h $(I)monsym.h \
1455		$(I)eshk.h $(I)vault.h $(I)epri.h $(I)color.h
1456
1457$(O)monstr.o:  $(NHS)monstr.c $(HDEP)
1458#SFD_INSTEAD 	$(CC) $(CFLAGS) $(OBJSPEC)%(left) $(NHS)monstr.c
1459#none
1460
1461$(O)mplayer.o:	$(NHS)mplayer.c $(HDEP)
1462
1463$(O)mthrowu.o:  $(NHS)mthrowu.c $(HDEP)
1464
1465$(O)muse.o:	$(NHS)muse.c $(HDEP)
1466	$(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)muse.c
1467
1468$(O)music.o:  $(NHS)music.c $(HDEP) #interp.c
1469
1470$(O)o_init.o:  $(NHS)o_init.c $(HDEP) $(I)lev.h
1471
1472$(O)objects.o:  $(NHS)objects.c $(I)config.h $(I)obj.h $(I)objclass.h \
1473		$(I)prop.h $(I)skills.h $(I)color.h
1474#SFD_INSTEAD #none
1475	$(CC) $(CFLAGS) $(INCLSPEC)$(NHS) $(OBJSPEC)$@ $(NHS)objects.c
1476
1477$(O)objnam.o:  $(NHS)objnam.c $(HDEP)
1478
1479$(O)options.o:  $(NHS)options.c $(HDEP) $(I)tcap.h $(I)config.h \
1480		$(I)objclass.h $(I)flag.h
1481
1482$(O)pager.o:  $(NHS)pager.c $(HDEP) $(I)dlb.h
1483
1484$(O)pickup.o:  $(NHS)pickup.c $(HDEP)
1485
1486$(O)pline.o:	$(NHS)pline.c $(HDEP) $(I)epri.h
1487
1488$(O)polyself.o:  $(NHS)polyself.c $(HDEP)
1489
1490$(O)potion.o:  $(NHS)potion.c $(HDEP)
1491
1492$(O)pray.o:  $(NHS)pray.c $(HDEP) $(I)epri.h
1493
1494$(O)priest.o:  $(NHS)priest.c $(HDEP) $(I)mfndpos.h $(I)eshk.h $(I)epri.h \
1495		$(I)emin.h
1496
1497$(O)quest.o:	$(NHS)quest.c $(HDEP) $(I)quest.h $(I)qtext.h
1498
1499$(O)questpgr.o: $(NHS)questpgr.c $(HDEP) $(I)qtext.h $(I)dlb.h
1500
1501$(O)read.o:  $(NHS)read.c $(HDEP)
1502
1503$(O)rect.o:	$(NHS)rect.c $(HDEP)
1504
1505$(O)region.o:	$(NHS)region.c $(HDEP)
1506
1507$(O)restore.o:  $(NHS)restore.c $(HDEP) $(I)lev.h $(I)tcap.h $(I)quest.h
1508
1509$(O)rnd.o:  $(NHS)rnd.c $(HDEP)
1510
1511$(O)role.o:	$(NHS)role.c $(HDEP)
1512
1513$(O)rumors.o:  $(NHS)rumors.c $(HDEP) $(I)dlb.h
1514
1515$(O)save.o:  $(NHS)save.c $(HDEP) $(I)lev.h $(I)quest.h
1516
1517$(O)shk.o:  $(NHS)shk.c $(HDEP) $(I)eshk.h
1518#SFD_INSTEAD #none
1519	$(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)shk.c
1520
1521$(O)shknam.o:  $(NHS)shknam.c $(HDEP) $(I)eshk.h
1522
1523$(O)sit.o:  $(NHS)sit.c $(HDEP) $(I)artifact.h
1524
1525$(O)sounds.o:  $(NHS)sounds.c $(HDEP) $(I)edog.h
1526
1527$(O)sp_lev.o:  $(NHS)sp_lev.c $(HDEP) $(I)sp_lev.h $(I)rect.h $(I)dlb.h
1528
1529$(O)spell.o:  $(NHS)spell.c $(HDEP)
1530
1531$(O)steal.o:  $(NHS)steal.c $(HDEP)
1532
1533$(O)steed.o:	$(NHS)steed.c $(HDEP)
1534
1535$(O)teleport.o:	$(NHS)teleport.c $(HDEP)
1536
1537$(O)timeout.o:  $(NHS)timeout.c $(HDEP) $(I)lev.h
1538
1539$(O)topten.o:  $(NHS)topten.c $(HDEP) $(I)dlb.h
1540
1541$(O)track.o:  $(NHS)track.c $(HDEP)
1542
1543$(O)trap.o:  $(NHS)trap.c $(HDEP)
1544#SFD_INSTEAD #none
1545	$(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)trap.c
1546
1547$(O)u_init.o:  $(NHS)u_init.c $(HDEP)
1548
1549$(O)uhitm.o:  $(NHS)uhitm.c $(HDEP)
1550	$(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)uhitm.c
1551
1552$(O)vault.o:  $(NHS)vault.c $(HDEP) $(I)vault.h
1553
1554$(O)version.o:  $(NHS)version.c $(HDEP) $(I)date.h $(I)patchlevel.h
1555
1556# DMake doesn't grok mid-line comments
1557#SFD_INSTEAD $(O)vision.o:  $(NHS)vision.c $(HDEP)
1558$(O)vision.o:  $(NHS)vision.c $(HDEP) #$(I)vis_tab.h
1559
1560$(O)weapon.o:  $(NHS)weapon.c $(HDEP)
1561
1562$(O)were.o:  $(NHS)were.c $(HDEP)
1563
1564$(O)wield.o:  $(NHS)wield.c $(HDEP)
1565
1566$(O)windows.o:  $(NHS)windows.c $(HDEP) $(I)wintty.h
1567
1568$(O)wizard.o:  $(NHS)wizard.c $(HDEP) $(I)qtext.h
1569
1570$(O)worm.o:  $(NHS)worm.c $(HDEP) $(I)lev.h
1571
1572$(O)worn.o:  $(NHS)worn.c $(HDEP)
1573
1574$(O)write.o:  $(NHS)write.c $(HDEP)
1575
1576$(O)zap.o:  $(NHS)zap.c $(HDEP)
1577	$(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)zap.c
1578
1579$(O)getline.o:	$(TTY)getline.c $(HDEP) $(I)wintty.h
1580
1581$(O)termcap.o:	$(TTY)termcap.c $(HDEP) $(I)wintty.h $(I)tcap.h
1582
1583$(O)topl.o:	$(TTY)topl.c $(HDEP) $(I)wintty.h $(I)tcap.h
1584
1585$(O)wintty.o:	$(TTY)wintty.c $(HDEP) $(I)wintty.h $(I)tcap.h \
1586		$(I)patchlevel.h
1587
1588$(O)amitty.o:	$(AMI)amitty.c $(HDEP)
1589
1590$(O)amistack.o:	$(AMI)amistack.c
1591	$(CC) $(CFLAGS3) $(CSYM) $(OBJSPEC)$@ $(AMI)amistack.c
1592
1593$(O)rip.o:	$(NHS)rip.c $(HDEP)
1594
1595
1596$(I)config.h:  $(I)config1.h $(I)tradstdc.h $(I)global.h
1597	-setdate $(I)config.h
1598	-wait 2
1599
1600# onames.h handled at onames.h target, pm.h
1601
1602$(I)decl.h:  $(I)quest.h $(I)spell.h $(I)color.h $(I)obj.h $(I)you.h
1603	-setdate $(I)decl.h
1604	-wait 2
1605
1606$(I)global.h:  $(I)coord.h $(I)pcconf.h $(I)amiconf.h
1607	-setdate $(I)global.h
1608	-wait 2
1609
1610$(I)hack.h:  $(I)config.h $(I)trap.h $(I)decl.h $(I)dungeon.h $(I)monsym.h \
1611		$(I)mkroom.h $(I)objclass.h $(I)flag.h $(I)rm.h $(I)vision.h \
1612		$(I)display.h $(I)wintype.h $(I)engrave.h $(I)rect.h \
1613		$(I)region.h $(I)trampoli.h
1614	-setdate $(I)hack.h
1615	-wait 2
1616
1617$(I)permonst.h:  $(I)monattk.h $(I)monflag.h $(I)align.h
1618	-setdate $(I)permonst.h
1619	-wait 2
1620
1621$(I)you.h:  $(I)align.h $(I)attrib.h $(I)monst.h $(I)youprop.h $(I)skills.h
1622	-setdate $(I)you.h
1623	-wait 2
1624
1625# pm.h handled at target
1626
1627$(I)youprop.h:  $(I)prop.h $(I)permonst.h $(I)mondata.h
1628	-setdate $(I)youprop.h
1629	-wait 2
1630
1631$(I)display.h: $(I)vision.h $(I)mondata.h
1632	-setdate $(I)display.h
1633	-wait 2
1634
1635$(I)dungeon.h: $(I)align.h
1636	-setdate $(I)dungeon.h
1637	-wait 2
1638
1639$(I)emin.h: $(I)dungeon.h
1640	-setdate $(I)emin.h
1641	-wait 2
1642
1643$(I)epri.h: $(I)dungeon.h $(I)align.h
1644	-setdate $(I)epri.h
1645	-wait 2
1646
1647$(I)eshk.h: $(I)dungeon.h
1648	-setdate $(I)eshk.h
1649	-wait 2
1650
1651$(I)engrave.h: $(I)trampoli.h $(I)rect.h
1652	-setdate $(I)engrave.h
1653	-wait 2
1654
1655$(I)mondata.h: $(I)align.h
1656	-setdate $(I)mondata.h
1657	-wait 2
1658
1659$(I)monst.h: $(I)align.h
1660	-setdate $(I)monst.h
1661	-wait 2
1662
1663$(I)pcconf.h: $(I)micro.h $(I)system.h
1664	-setdate $(I)pcconf.h
1665	-wait 2
1666
1667$(I)rm.h: $(I)align.h
1668	-setdate $(I)rm.h
1669	-wait 2
1670
1671$(I)vault.h: $(I)dungeon.h
1672	-setdate $(I)vault.h
1673	-wait 2
1674
1675
1676#notes
1677#  install keeps doing re-install because it keeps rebuilding lev_comp???
1678#  fixed(?) - deleted setdate
1679