2 # Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991,1992,1993,1996.
3 # NetHack may be freely redistributed. See license for details.
9 # This makefile is arranged for compiling for the Amiga with SAS/C 6.51 but
10 # can be configured for compiling with Manx C 5 or commercial DICE with
11 # simple changes. The appropriate changes are identified by #[compiler]
12 # where compiler is one of: SAS6, MANX, or DICE; the options in this
13 # makefile as should be set according to the compiler being used. (But see
16 # Note: When using the Manx compiler, an alternate make utility is
17 # required. The bundled Aztec make is just too damaged.
19 # Note 2: The #SFD_xxx lines are used with mkdmake to generate a DMake-
20 # compatible makefile (DMakefile) from this file. Any line beginning with
21 # #SFD_INSTEAD replaces, in DMakefile, the following line from Makefile.ami.
22 # #SFD_BEGIN, #SFD_ELSE, and #SFD_END bracket multi-line sections for the two
24 # When changing this file, #SFD_INSTEAD lines will need to be inserted for
25 # the following cases:
26 # - Dependencies with different numbers of filenames (both > 1) on
27 # either side. The #SFD_INSTEAD line should immediately precede
28 # the line with the colon, and should contain a double colon "::"
29 # instead of a single colon.
30 # - Special command lists that override the default. A line containing
31 # "#SFD_INSTEAD #none" should precede such a rule. If the rule is
32 # more than one line long, precede it with "#SFD_BEGIN" and
33 # "#SFD_ELSE", and follow it with "#SFD_END".
34 # - Files not in the src, sys/amiga, sys/share, or win/tty directories
35 # that rely on the default ".c.o" rule. Following the dependency
36 # should be "#SFD_INSTEAD <default>" with the filename inserted
37 # into the default rule where appropriate, then a line contianing
39 # In any SFD_BEGIN/ELSE/END block added, put a '##' before every line
40 # between the BEGIN and ELSE. Any line that's really a comment needs three
41 # '#'s, e.g. "### DICE comment".
43 # Note 2A: Whenever an SFD line/block is added, the appropriate repeat count
44 # in mkdmake must be changed. (The repeat count "0" meaning "repeat
45 # until end of file" doesn't work as advertised.)
47 # Note 3: mkdmake will automatically substitute DICE flags, etc. for SAS
48 # where appropriate. Since the makefile is already set up for SAS,
49 # the only people who end up having to make changes here are Manx
50 # users (or people who want to change the defaults).
53 ### DIRECTORY STRUCTURE
59 NETHACK = $(NH)NetHack/
60 HACKEXE = $(NH)HackExe/
65 SHARE = $(NH)sys/share/
68 WSHARE = $(NH)win/share/
72 # NB: O and OO MUST be different directories
85 # Startup makefile with:
89 # $(MAKE) -f $(AMI)Makefile.ami
90 # $(MAKE) -f $(AMI)Makefile.ami install
93 # $(MAKE) -f $(AMI)DMakefile
94 # $(MAKE) -f $(AMI)DMakefile install
97 # You may use following targets on $(MAKE) command lines:
98 # all do it all (default)
99 # link just create binary from object files
100 # obj just create common object files
101 # obja just create amiga object files
102 # objs just create shared object files
103 # clean deletes the object files
104 # spotless deletes the object files, main binary, and more
106 # Note: We do not build the Guidebook here since it needs tbl
107 # (See the file sys/unix/Makefile.doc for more information)
109 #X# Precompiled header files:
110 #X# $(HDEP) should appear in any dependency list for an object file where
111 #X# we would want to make use of the precompiled version of $(I)hack.h,
112 #X# while $(CSYM) should appear in the C compiler command line that creates
113 #X# any such object file. (Changes made here should agree with the $(HDEP):
114 #X# target that appears later in this makefile.)
120 ### If we were compiling with DICE and wanted to use the symbol table
121 ### pre-loading feature, we would uncomment these following two lines.
123 ##HDEP = $(I)hack.sym
124 ##CSYM = -H$(I)hack.sym=hack.h
129 # If we were to use the precompiled header file feature in a newer version
130 # of SAS/C, we would comment out these following two lines.
131 # If we don't use precompiled header files, we uncomment it as well.
133 HDEP = $(I)hack.h $(I)pm.h $(I)onames.h
137 # If we were compiling with Aztec, and wanted to use the symbol table
138 # pre-loading feature, we would uncomment these following two lines.
141 #CSYM = +IRam:hack.sym
145 #Pathname for uudecode program:
148 # Flex/Bison command assignments -- Useful only if you have flex/bison
151 # FBFIL and FBLIB may be used, if required by your version of flex or bison,
152 # to specify additional files or libraries to be linked with
154 FBLIB = #lib lib:compat.lib
156 # If you're compiling this on a 1.3 system, you'll have to uncomment the
157 # following (for use with the ifchange script below). Also useful instead of
158 # "protect ifchange +s"
161 # Headers we depend on
162 AMDEP = $(AMI)winproto.h $(AMI)winext.h $(AMI)windefs.h $(I)winami.h
164 # Pathname for the C compiler being used.
183 # Compilation flags for selected C Compiler:
184 # $(CFLAGS) should appear before filename arguments of $(CC) command line.
189 ##CFLAGS = -c -I$(I) -mC -mD -ms -//
191 ##WBCFLAGS = -c -I$(I) -mC -mD -ms -//
198 # Note: make sure your CLI stack size is large (at least 50K) or lev_comp
199 # and makedefs may fail terribly - stack checking is disabled.
201 # **** WARNING **** GST support is not fool proof. You must make makedefs
202 # without a GST first so that the generated headers
203 # that are part of the GST can be made.
207 #GSTHEAD=$(I)hack.h $(I)pm.h $(I)trap.h $(I)onames.h \
208 # $(AMI)winami.p $(AMI)amidos.p $(AMI)amiwind.p
210 #GSTFILE=$(O)NetHack.gst
211 # undefine this to not compile with GSTs
216 #OPTFLAGS=opt opttime optpeep optgo optinl optsched optcomp=10 optdep=5 optrdep=5 #optalias +OPTTIME -OPTSIZE
217 CFLAGS = data=far nominc $(DEBUG) idir=$(I) $(CPU) 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:
221 CFLAGS2 = code=far strmerge $(SAVEDS)
222 WBCFLAGS = ignore=217,62 data=far ansi nminc code=far idir=$(I) $(CPU) afp \
223 $(DEBUG) $(ERRREXX) define=AMIGA $(GST)
224 XXX = data=far ansi nminc idir=$(I) $(CPU) afp opt optinline optinlocal \
226 WBC2FLAGS = define=CLI
227 SPLFLAGS = define=SPLIT #dollarok
229 CFLAGS3 = data=near dataname=__MERGED nominc $(DEBUG) idir=$(I) $(CPU) nover nostkchk \
230 codename=nhcode strmerge $(OPTFLAGS) $(TILES) $(SAVEDS) \
231 afp $(ERRREXX) $(GST)
234 #CFLAGS = -i$(I) -mc -md -ms -pa -ps -bs -wo -qq
235 #WBCFLAGS = -mc -md -ms -pa -ps -bs -wo -qq -pp
250 AFLAGS = #what to put here?
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
264 # Note: amiga.lib added due to missing prototypes/pragmas.
265 # Should be deleted when this is resolved.
270 ### If you have flex/bison libraries, use the second definition of FLLIB
271 ### instead of the first.
275 ##LLINK = @$(AMI)ami.lnk
278 ###FLLIB = -l$(FBLIB)
283 ##CLFLAGS = -I$(I) -mC -mD -ms -//
292 LINK = slink noicons verbose maxhunk 262144 stripdebug
293 LIN = from lib:catch.o
294 LLINK = with $(AMI)ami.lnk
295 LLIB = lib lib:scnb.lib BATCH #lib lib:amiga.lib BATCH #scnb.lib or sc.lib
296 FLLIB = $(FBLIB) lib Lib:sc.lib BATCH
298 PNSPEC = noicons to #pname=
304 COMPACT_HEADERS=$(GSTFILE)
308 #LINK = ln -g +q +ss -o
310 #LLINK = -f $(AMI)ami.lnk
327 # A more reasonable random number generator (recommended for the Amiga):
329 RANDOBJ = $(O)random.o
332 .PRECIOUS: $(I)config.h $(I)decl.h $(I)hack.h $(I)permonst.h $(I)you.h
334 # Almost nothing below this line should have to be changed.
335 # (Exceptions are marked by [SAS6], [MANX], etc.)
337 # Other things that have to be reconfigured are in config.h,
338 # (amiconf.h, pcconf.h), and possibly system.h, tradstdc.h.
340 # Object files for makedefs:
343 $(OO)makedefs.o $(O)monst.o $(O)objects.o
345 # Object files for special levels compiler:
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
352 # Object files for dungeon compiler
355 $(OO)dgn_yacc.o $(OO)dgn_lex.o $(OO)dgn_main.o $(O)alloc.o $(OO)panic.o
357 # Object files for NetHack:
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)mapglyph.o \
370 $(O)mcastu.o $(O)mhitm.o $(O)mhitu.o $(O)minion.o \
371 $(O)mklev.o $(O)mkmap.o $(O)mkmaze.o $(O)mkobj.o \
372 $(O)mkroom.o $(O)mon.o $(O)mondata.o $(O)monmove.o \
373 $(O)monst.o $(O)mplayer.o $(O)mthrowu.o $(O)muse.o \
374 $(O)music.o $(O)o_init.o $(O)objects.o $(O)objnam.o \
375 $(O)options.o $(O)pager.o $(O)pickup.o $(O)pline.o \
376 $(O)polyself.o $(O)potion.o $(O)pray.o $(O)priest.o \
377 $(O)quest.o $(O)questpgr.o $(O)read.o $(O)rect.o \
378 $(O)region.o $(O)restore.o $(O)rnd.o $(O)role.o \
379 $(O)rumors.o $(O)save.o $(O)shk.o $(O)shknam.o \
380 $(O)sit.o $(O)sounds.o $(O)sp_lev.o $(O)spell.o \
381 $(O)steal.o $(O)steed.o $(O)sys.o $(O)teleport.o \
382 $(O)timeout.o $(O)topten.o $(O)track.o $(O)trap.o \
383 $(O)u_init.o $(O)uhitm.o $(O)vault.o $(O)version.o \
384 (O)vision.o $(O)weapon.o $(O)were.o $(O)wield.o \
385 $(O)windows.o $(O)wizard.o $(O)worm.o $(O)worn.o \
386 $(O)write.o $(O)zap.o
392 $(O)amidos.o $(O)amirip.o $(O)amisnd.o $(O)amistack.o \
393 $(O)amiwind.o $(O)winami.o $(O)winchar.o $(O)winfuncs.o \
394 $(O)winkey.o $(O)winmenu.o $(O)winreq.o $(O)winstr.o
396 # Objects from assembly sources (because DMake can't handle default rules)
401 $(O)pcmain.o $(RANDOBJ)
404 $(O)getline.o $(O)termcap.o $(O)topl.o $(O)wintty.o $(O)amitty.o \
407 # Yuck yuck yuck. Have to tell DMake where these are, since they're not
408 # all in the same place.
410 $(TTY)getline.c $(TTY)termcap.c $(TTY)topl.c $(TTY)wintty.c \
411 $(AMI)amitty.c $(NHS)rip.c
413 # All the object files for NetHack:
415 HOBJ = $(COMMOBJ) $(AMIGAOBJ) $(AMIGAOBJ2) $(SHAREOBJ) $(MAKEDEFOBJ) $(TTYOBJ)
422 ADFILES1= $(SLIB)Arc-fila.lev $(SLIB)Arc-filb.lev $(SLIB)Arc-loca.lev \
424 ADFILES= $(SLIB)Arc-goal.lev $(ADFILES1)
426 BDFILES1= $(SLIB)Bar-fila.lev $(SLIB)Bar-filb.lev $(SLIB)Bar-loca.lev \
428 BDFILES= $(SLIB)Bar-goal.lev $(BDFILES1)
430 CDFILES1= $(SLIB)Cav-fila.lev $(SLIB)Cav-filb.lev $(SLIB)Cav-loca.lev \
432 CDFILES= $(SLIB)Cav-goal.lev $(CDFILES1)
434 HDFILES1= $(SLIB)Hea-fila.lev $(SLIB)Hea-filb.lev $(SLIB)Hea-loca.lev \
436 HDFILES= $(SLIB)Hea-goal.lev $(HDFILES1)
438 KDFILES1= $(SLIB)Kni-fila.lev $(SLIB)Kni-filb.lev $(SLIB)Kni-loca.lev \
440 KDFILES= $(SLIB)Kni-goal.lev $(KDFILES1)
442 MDFILES1= $(SLIB)Mon-fila.lev $(SLIB)Mon-filb.lev $(SLIB)Mon-loca.lev \
444 MDFILES= $(SLIB)Mon-goal.lev $(MDFILES1)
446 PDFILES1= $(SLIB)Pri-fila.lev $(SLIB)Pri-filb.lev $(SLIB)Pri-loca.lev \
448 PDFILES= $(SLIB)Pri-goal.lev $(PDFILES1)
450 RDFILES1= $(SLIB)Rog-fila.lev $(SLIB)Rog-filb.lev $(SLIB)Rog-loca.lev \
452 RDFILES= $(SLIB)Rog-goal.lev $(RDFILES1)
454 RANFILES1= $(SLIB)Ran-fila.lev $(SLIB)Ran-filb.lev $(SLIB)Ran-loca.lev \
456 RANFILES= $(SLIB)Ran-goal.lev $(RANFILES1)
458 SDFILES1= $(SLIB)Sam-fila.lev $(SLIB)Sam-filb.lev $(SLIB)Sam-loca.lev \
460 SDFILES= $(SLIB)Sam-goal.lev $(SDFILES1)
462 TDFILES1= $(SLIB)Tou-fila.lev $(SLIB)Tou-filb.lev $(SLIB)Tou-loca.lev \
464 TDFILES= $(SLIB)Tou-goal.lev $(TDFILES1)
466 VDFILES1= $(SLIB)Val-fila.lev $(SLIB)Val-filb.lev $(SLIB)Val-loca.lev \
468 VDFILES= $(SLIB)Val-goal.lev $(VDFILES1)
470 WDFILES1= $(SLIB)Wiz-fila.lev $(SLIB)Wiz-filb.lev $(SLIB)Wiz-loca.lev \
472 WDFILES= $(SLIB)Wiz-goal.lev $(WDFILES1)
474 XDFILES= $(ADFILES) $(BDFILES) $(CDFILES) $(HDFILES) $(KDFILES) \
475 $(MDFILES) $(PDFILES) $(RDFILES) $(RANFILES) $(SDFILES) $(TDFILES) \
476 $(VDFILES) $(WDFILES)
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
491 $(NETHACK)tiles/objects.iff \
492 $(NETHACK)tiles/monsters.iff \
493 $(NETHACK)tiles/other.iff
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 \
513 INSTDUNGEONFILES= $(NETHACK)NetHack.cnf $(INSTDUNGEONFILES1)
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
522 $(INSTDUNGEONFILES1) \
523 $(SLIB)cmdhelp $(SLIB)data $(SLIB)dungeon \
524 $(SLIB)help $(SLIB)hh $(SLIB)history \
525 $(SLIB)opthelp $(SLIB)oracles $(SLIB)rumors \
526 $(SLIB)quest.dat $(SLIB)wizhelp
529 ### Getting down to business:
532 #SFD_INSTEAD all: $(SBIN)lev_comp $(SBIN)dgn_comp $(SBIN)NetHack \
533 all: $(COMPACT_HEADERS) $(SBIN)lev_comp $(SBIN)dgn_comp $(SBIN)NetHack \
534 $(SBIN)dlb $(NETHACK)recover
536 install: all inst-data inst-dungeon inst-fonts inst-sounds inst-tiles \
537 $(NETHACK)nhdat $(NETHACK)NetHack
539 $(SBIN)NetHack: $(HOBJ) $(AMI)ami.lnk
540 $(LINK) $(LNSPEC) $(SBIN)NetHack $(LIN) $(LLINK) $(LLIB)
542 $(NETHACK)NetHack: $(SBIN)NetHack
543 copy $(SBIN)NetHack $(NETHACK)NetHack
546 $(LINK) $(LNSPEC) $(SBIN)NetHack $(LIN) $(LLINK) $(LLIB)
548 $(AMI)ami.lnk: $(AMI)Makefile.ami
549 list to $(AMI)ami.lnk lformat="$(O)%s" $(O)\#?.o QUICK NOHEAD
552 $(OO)dlb_main.o: $(UTIL)dlb_main.c $(HDEP) $(I)dlb.h $(I)date.h
553 $(CC) $(CFLAGS) $(OBJSPEC)$(OO)dlb_main.o $(UTIL)dlb_main.c
555 $(SBIN)dlb: $(OO)dlb_main.o $(O)dlb.o $(O)alloc.o $(OO)panic.o
556 $(LINK) $(PNSPEC) $(SBIN)dlb $(LIN) $(OO)dlb_main.o $(O)dlb.o \
557 $(O)alloc.o $(OO)panic.o $(LLIB)
574 # The default method for creating object files:
580 ##$(COMMOBJ): $(COMMOBJ:"$(O)*.o":"$(NHS)%1.c")
581 ## $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)%(left) %(right)
583 ##$(AMIGAOBJ): $(AMIGAOBJ:"$(O)*.o":"$(AMI)%1.c")
584 ## $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)%(left) %(right)
586 ##$(SHAREOBJ): $(SHAREOBJ:"$(O)*.o":"$(SHARE)%1.c")
587 ## $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)%(left) %(right)
589 ##$(TTYOBJ): $(TTYSRC)
590 ## $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)%(left) %(right)
597 $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)$@ $<
603 -delete $(O)\#?.o $(OO)\#?.o
606 -delete $(SBIN)NetHack $(SBIN)lev_comp $(SBIN)makedefs $(SBIN)dgn_comp
607 -delete $(SBIN)cvtsnd $(SBIN)dlb $(SBIN)txt2iff $(SBIN)splitter
608 -delete $(SBIN)tilemap
609 -delete $(SLIB)data $(SLIB)rumors
610 -delete $(SLIB)\#?.lev
611 -delete $(SLIB)dungeon
612 -delete $(SLIB)cmdhelp $(SLIB)help $(SLIB)hh $(SLIB)history
613 -delete $(SLIB)opthelp $(SLIB)options $(SLIB)oracles
614 -delete $(SLIB)quest.dat $(SLIB)wizhelp
615 # -delete $(SLIB)earth.lev $(SLIB)air.lev $(SLIB)fire.lev
616 # -delete $(SLIB)water.lev $(SLIB)astral.lev
617 # -delete $(SLIB)tower1.lev $(SLIB)tower2.lev $(SLIB)tower3.lev
618 # -delete $(SLIB)fakewiz1.lev $(SLIB)fakewiz2.lev
619 # -delete $(SLIB)medusa-1.lev $(SLIB)medusa-2.lev
620 # -delete $(SLIB)oracle.lev $(SLIB)wizard1.lev $(SLIB)wizard2.lev
621 # -delete $(SLIB)wizard3.lev $(DAT)dungeon.pdf $(SLIB)valley.lev
622 # -delete $(SLIB)minefill.lev
623 # -delete $(SLIB)minetn-1 $(SLIB)minetn-2 $(SLIB)minend-1 $(SLIB)minend-2
624 # -delete $(SLIB)soko1-1.lev $(SLIB)soko1-2.lev $(SLIB)soko2-1.lev
625 # -delete $(SLIB)soko2-2.lev $(SLIB)soko3-1.lev $(SLIB)soko3-2.lev
626 # -delete $(SLIB)soko4-1.lev $(SLIB)soko4-2.lev
635 # -delete $(RANFILES)
640 -delete $(I)onames.h $(I)pm.h $(I)date.h
641 -delete $(NHS)tile.c $(NHS)monstr.c
643 # -echo to $(I)onames.h "" noline
645 # -echo to $(I)pm.h "" noline
647 # -setdate $(UTIL)makedefs.c
650 # Creating precompiled version of $(I)hack.h to save disk I/O.
655 ### If we were compiling with DICE and wanted to use the symbol table
656 ### pre-loading feature, we would technically not need a rule to make the
657 ### precompiled header file, because DCC handles this automatically;
658 ### however, we must delete the precompiled header file if any of the
659 ### includes change, and we need to create it manually because the
660 ### sys/amiga sources, compiled first, define things differently than the
661 ### main sources want them.
663 ##$(HDEP): $(I)hack.h $(I)pm.h $(I)onames.h
664 ## -delete $(I)hack.sym
665 ## echo to Ram:hackincl.c "#include <hack.h>"
666 ## $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)Ram:hackincl.o Ram:hackincl.c
667 ## -delete Ram:hackincl.c Ram:hackincl.o
672 #X# If we were to use the precompiled header file feature of SAS/C, we
673 #X# would uncomment the following lines. (Also see defines for HDEP and
674 #X# CSYM near the beginning of this file, as these should be appropriately
677 #X#$(HDEP): $(I)hack.h $(SBIN)makedefs
678 #X# echo to Ram:hackincl.c "#include <$(I)hack.h>"
679 #X# $(CC) $(CFLAGS) -ph $(OBJSPEC)$@ Ram:hackincl.c
680 #X# -delete Ram:hackincl.c
683 # If we were compiling with Aztec, and wanted to use the symbol table
684 # pre-loading feature, we would uncomment these following two lines.
686 #$(HDEP): $(I)hack.h $(SBIN)makedefs
687 # $(CC) $(CFLAGS) -a $(OBJSPEC)Ram:hack.asm +h$@ $(I)hack.h
688 # -delete Ram:hack.asm
693 # Please note: The dependency lines for the modules here are
694 # deliberately incorrect. Including "hack.h" in
695 # the dependency list would cause a dependency
699 $(SBIN)makedefs: $(MAKEOBJS)
700 $(LINK) $(LNSPEC) $(SBIN)makedefs $(LIN) $(MAKEOBJS) $(LLIB)
702 $(OO)makedefs.o: $(UTIL)makedefs.c $(I)config.h $(I)permonst.h $(I)monsym.h \
703 $(I)objclass.h $(I)patchlevel.h $(I)qtext.h $(I)artilist.h
704 $(CC) $(DEFSPEC)MAKEDEFS_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)makedefs.c
706 $(SBIN)lev_comp: $(SPLEVOBJS)
707 $(LINK) $(LNSPEC) $(SBIN)lev_comp $(LIN) $(SPLEVOBJS) $(FBFIL) $(FLLIB)
709 $(SBIN)dgn_comp: $(DGNCOMPOBJS)
710 $(LINK) $(LNSPEC) $(SBIN)dgn_comp $(LIN) $(DGNCOMPOBJS) $(FBFIL) $(FLLIB)
712 $(OO)lev_yacc.o: $(UTIL)lev_yacc.c $(HDEP) $(I)sp_lev.h $(I)pm.h $(I)onames.h
713 # setdate $(UTIL)lev_yacc.c
714 $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)PREFIX="NH:slib/" $(CFLAGS) \
715 $(DEFSPEC)alloca=malloc $(OBJSPEC)$@ $(UTIL)lev_yacc.c
717 $(OO)lev_lex.o: $(UTIL)lev_lex.c $(HDEP) $(I)lev_comp.h $(I)sp_lev.h
718 $(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)lev_lex.c
720 $(OO)lev_main.o: $(UTIL)lev_main.c $(HDEP) $(I)pm.h $(I)onames.h $(I)date.h
721 $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ \
724 $(OO)dgn_yacc.o: $(UTIL)dgn_yacc.c $(HDEP) $(I)dgn_file.h $(I)patchlevel.h
725 $(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(DEFSPEC)alloca=malloc \
726 $(OBJSPEC)$@ $(UTIL)dgn_yacc.c
728 $(OO)dgn_lex.o: $(UTIL)dgn_lex.c $(I)config.h $(I)dgn_comp.h $(I)dgn_file.h
729 $(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)dgn_lex.c
731 $(OO)dgn_main.o: $(UTIL)dgn_main.c $(I)config.h $(I)date.h
732 $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ \
735 $(OO)panic.o: $(UTIL)panic.c $(HDEP)
736 #SFD_INSTEAD $(CC) $(CFLAGS) $(OBJSPEC)%(left) $(UTIL)panic.c
739 $(OO)recover.o: $(UTIL)recover.c $(I)config.h $(I)date.h
740 $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ \
743 $(NETHACK)recover: $(OO)recover.o
744 $(LINK) $(LNSPEC) $(NETHACK)recover $(LIN) $(OO)recover.o $(LLIB)
746 # [OPTION] -- If you have flex/bison, leave these uncommented. Otherwise,
747 # comment them out and be careful! (You're not guaranteed to have the most
748 # up to date *_comp.c, *_comp.h and *_lex.c)
750 $(I)lev_comp.h: $(UTIL)lev_yacc.c $(I)patchlevel.h
752 $(UTIL)lev_yacc.c: $(UTIL)lev_comp.y $(I)patchlevel.h
753 $(BISON) -d $(UTIL)lev_comp.y
754 # copy y.tab.c $(UTIL)lev_yacc.c
755 # copy y.tab.h $(I)lev_comp.h
756 copy $(UTIL)lev_comp.tab.c $(UTIL)lev_yacc.c
757 copy $(UTIL)lev_comp.tab.h $(I)lev_comp.h
760 delete $(UTIL)lev_comp.tab.c
761 delete $(UTIL)lev_comp.tab.h
763 $(UTIL)lev_lex.c: $(UTIL)lev_comp.l $(I)patchlevel.h
764 $(FLEX) $(UTIL)lev_comp.l
765 copy lex.yy.c $(UTIL)lev_lex.c
768 $(I)dgn_comp.h: $(UTIL)dgn_yacc.c $(I)patchlevel.h
770 $(UTIL)dgn_yacc.c: $(UTIL)dgn_comp.y $(I)patchlevel.h
771 $(BISON) -d $(UTIL)dgn_comp.y
772 # copy y.tab.c $(UTIL)dgn_yacc.c
773 # copy y.tab.h $(I)dgn_comp.h
774 copy $(UTIL)dgn_comp.tab.c $(UTIL)dgn_yacc.c
775 copy $(UTIL)dgn_comp.tab.h $(I)dgn_comp.h
778 delete $(UTIL)dgn_comp.tab.c
779 delete $(UTIL)dgn_comp.tab.h
781 $(UTIL)dgn_lex.c: $(UTIL)dgn_comp.l $(I)patchlevel.h
782 $(FLEX) $(UTIL)dgn_comp.l
783 copy lex.yy.c $(UTIL)dgn_lex.c
787 # The following include files depend on makedefs to be created.
788 # As a result, they are not defined in HACKINCL, instead, their
789 # dependencies are explicitly outlined here.
793 # date.h should be remade any time any of the source or include code
794 # is modified. Unfortunately, this would make the contents of this
795 # file far more complex. Since "hack.h" depends on most of the include
796 # files, we kludge around this by making date.h dependent on hack.h,
797 # even though it doesn't include this file.
800 #SFD_INSTEAD $(I)date.h $(DAT)options:: $(HDEP) $(SBIN)makedefs $(AMIGAOBJ)
801 $(I)date.h $(DAT)options: $(HDEP) $(SBIN)makedefs $(AMIGAOBJ) $(I)patchlevel.h
803 $(EXECUTE) $(AMI)ifchange MOVE $(I)t.date.h $(I)date.h
806 $(I)onames.h: $(SBIN)makedefs
808 $(EXECUTE) $(AMI)ifchange TOUCH $(I)t.onames.h $(I)onames.h $(I)decl.h
809 $(EXECUTE) $(AMI)ifchange MOVE $(I)t.onames.h $(I)onames.h
812 $(I)pm.h: $(SBIN)makedefs
814 $(EXECUTE) $(AMI)ifchange TOUCH $(I)t.pm.h $(I)pm.h $(I)decl.h $(I)youprop.h
815 $(EXECUTE) $(AMI)ifchange MOVE $(I)t.pm.h $(I)pm.h
818 $(SLIB)quest.dat: $(DAT)quest.txt $(SBIN)makedefs
821 $(NHS)monstr.c: $(HDEP) $(SBIN)makedefs
825 $(SLIB)oracles: $(DAT)oracles.txt $(SBIN)makedefs
830 # The following programs vary depending on what OS you are using.
831 # As a result, they are not defined in HACKSRC and their dependencies
832 # are explicitly outlined here.
835 $(O)amidos.o: $(AMI)amidos.c $(HDEP)
837 $(O)amirip.o: $(AMI)amirip.c $(HDEP)
839 $(O)aglue.o: $(AMI)aglue.a
840 $(ASM) $(AFLAGS) $(AOBJSPEC)$(O)aglue.o $(AMI)aglue.a
842 $(O)amisnd.o: $(AMI)amisnd.c $(HDEP)
844 $(O)winchar.o: $(AMI)winchar.c $(NHS)tile.c $(HDEP)
846 $(NHS)tile.c: $(WSHARE)tilemap.c
847 #SFD_INSTEAD $(CCLINK) $(CLFLAGS) $(PNSPEC) $(SBIN)tilemap $(WSHARE)tilemap.c
848 $(CCLINK) $(CFLAGS) $(PNSPEC) $(SBIN)tilemap $(WSHARE)tilemap.c
851 $(O)winstr.o: $(AMI)winstr.c $(HDEP) $(AMDEP)
853 $(O)winreq.o: $(AMI)winreq.c $(HDEP) $(AMDEP) $(AMI)colorwin.c $(AMI)clipwin.c
855 $(O)winfuncs.o: $(AMI)winfuncs.c $(HDEP) $(AMDEP) $(I)patchlevel.h
857 $(O)winkey.o: $(AMI)winkey.c $(HDEP) $(AMDEP)
859 $(O)winmenu.o: $(AMI)winmenu.c $(HDEP) $(AMDEP)
861 $(O)winami.o: $(AMI)winami.c $(HDEP) $(AMDEP) #$(AMI)char.c $(AMI)randwin.c
863 #$(O)amilib.o: $(AMI)amilib.c $(HDEP) $(AMDEP)
865 $(O)amiwind.o: $(AMI)amiwind.c $(AMI)amimenu.c $(HDEP) $(AMDEP)
867 $(O)amiwbench.o: $(AMI)amiwbench.c $(HDEP)
869 $(O)random.o: $(SHARE)random.c
871 $(O)pcmain.o: $(SHARE)pcmain.c $(HDEP) $(I)dlb.h
873 $(O)dispmap.o: $(AMI)dispmap.s
874 $(ASM) $(AFLAGS) $(AOBJSPEC)$@ $<
876 # Stuff to build the front ends
877 $(NETHACK)HackWB: $(OO)wb.o $(OO)wbx.o $(OO)loader.o $(OO)multi.o
878 $(LINK) $(LNSPEC) $(NETHACK)HackWB $(LIN) $(OO)wb.o $(OO)wbx.o \
879 $(OO)loader.o $(OO)multi.o $(LLIB)
881 $(NETHACK)HackCli: $(OO)cli.o $(OO)loader.o $(OO)multi.o
882 $(LINK) $(LNSPEC) $(NETHACK)HackCli $(LIN) $(OO)cli.o $(OO)loader.o \
885 # This needs to exist to eliminate the HackWB startup message
886 #SFD_INSTEAD $(NETHACK)WBDefaults.def: $(NETHACK)WBDefaults.def
887 $(NETHACK)WBDefaults.def:
888 echo to $(NETHACK)WBDefaults.def
890 WBH = $(AMI)wbdefs.h $(AMI)wbstruct.h $(AMI)wbprotos.h
892 $(OO)wb.o: $(WBH) $(AMI)wb.c $(AMI)wbwin.c $(AMI)wbdata.c $(AMI)wbgads.c \
894 $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)wb.o $(AMI)wb.c
896 $(OO)wbx.o: $(WBH) $(AMI)wbcli.c $(AMI)wbwin.c $(AMI)wbdata.c \
897 $(I)patchlevel.h $(I)date.h
898 $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)wbx.o $(AMI)wbcli.c
900 $(OO)loader.o: $(ASP)/loader.c $(ASP)/split.h $(ASP)/amiout.h $(ASP)/multi.h
901 $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)loader.o $(ASP)/loader.c
903 $(OO)multi.o: $(ASP)/multi.c $(ASP)/multi.h
904 $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)multi.o $(ASP)/multi.c
906 $(OO)cli.o: $(WBH) $(AMI)wbcli.c $(I)patchlevel.h $(I)date.h
907 $(CC) $(WBCFLAGS) $(WBC2FLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)cli.o \
912 $(SBIN)splitter: $(OO)splitter.o $(OO)arg.o
913 $(LINK) $(LNSPEC) $(SBIN)splitter $(LIN) $(OO)splitter.o $(OO)arg.o \
916 $(NETHACK)NetHack.dir: $(SBIN)splitter $(SBIN)NetHack
917 $(SBIN)splitter $(SBIN)NetHack
919 $(OO)splitter.o: $(ASP)/splitter.c $(ASP)/split.h $(ASP)/amiout.h $(ASP)/arg.h
920 $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)splitter.o \
923 $(OO)arg.o: $(ASP)/arg.c $(ASP)/arg.h
924 $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)arg.o $(ASP)/arg.c
926 # Create/copy other stuff into NetHack: directory:
928 $(NETHACK)tomb.iff: $(SBIN)xpm2iff $(AMI)grave16.xpm
929 $(SBIN)xpm2iff $(AMI)grave16.xpm $(NETHACK)tomb.iff
931 $(OO)xpm2iff.o: $(AMI)xpm2iff.c
932 $(CC) $(CFLAGS) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(AMI)xpm2iff.c
934 $(SBIN)xpm2iff: $(OO)xpm2iff.o
935 $(LINK) $(LNSPEC) $@ $(LIN) $(OO)xpm2iff.o $(FLLIB)
937 # Tile installation for the tile version of the game
938 inst-tiles: $(TILEFILES)
940 #SFD_INSTEAD $(NETHACK)tiles: $(NETHACK)tiles
942 -makedir $(NETHACK)tiles
944 $(OO)txt2iff.o: $(AMI)txt2iff.c
945 $(CC) $(CFLAGS) $(CSYM) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ \
948 $(OO)ppmwrite.o: $(WSHARE)ppmwrite.c
949 $(CC) $(CFLAGS) $(CSYM) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(WSHARE)ppmwrite.c
951 $(OO)tiletext.o: $(WSHARE)tiletext.c $(I)config.h $(WSHARE)tile.h
952 $(CC) $(CFLAGS) $(CSYM) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(WSHARE)tiletext.c
954 $(OO)tiletxt.o: $(WSHARE)tilemap.c $(I)hack.h
955 $(CC) $(CFLAGS) $(CSYM) $(DEFSPEC)TILETEXT $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(WSHARE)tilemap.c
957 NAMEOBJS = $(O)drawing.o $(O)decl.o $(O)monst.o $(O)objects.o
959 $(SBIN)txt2ppm: $(OO)ppmwrite.o $(NAMEOBJS) $(O)alloc.o $(OO)panic.o $(OO)tiletext.o $(OO)tiletxt.o
960 $(LINK) $(LNSPEC) $@ $(LIN) $(OO)ppmwrite.o $(NAMEOBJS) $(OO)tiletext.o $(OO)tiletxt.o $(O)alloc.o $(OO)panic.o $(FLLIB)
962 $(SBIN)txt2iff: $(OO)txt2iff.o $(NAMEOBJS) $(OO)tiletext.o $(OO)tiletxt.o
963 $(LINK) $(LNSPEC) $@ $(LIN) $(OO)txt2iff.o $(NAMEOBJS) $(OO)tiletext.o \
964 $(OO)tiletxt.o $(FLLIB)
966 $(NETHACK)tiles/objects.iff: $(WSHARE)objects.txt $(SBIN)txt2iff
967 $(SBIN)txt2iff $(WSHARE)objects.txt $(NETHACK)tiles/objects.iff
969 $(NETHACK)tiles/monsters.iff: $(WSHARE)monsters.txt $(SBIN)txt2iff
970 $(SBIN)txt2iff $(WSHARE)monsters.txt $(NETHACK)tiles/monsters.iff
972 $(NETHACK)tiles/other.iff: $(WSHARE)other.txt $(SBIN)txt2iff
973 $(SBIN)txt2iff $(WSHARE)other.txt $(NETHACK)tiles/other.iff
975 # Sound installation rules.
976 inst-sounds: $(SOUNDFILES)
977 list to T:nhsdat.lst $(SLIB)sounds QUICK NOHEAD
978 echo >T:make-nhsdat $(SBIN)dlb cCfI $(SLIB)sounds $(NETHACK)nhsdat T:nhsdat.lst
979 echo >>T:make-nhsdat if not exists $(NETHACK)nhsdat
980 echo >>T:make-nhsdat copy $(SLIB)sounds/\#? $(NETHACK)sounds
981 echo >>T:make-nhsdat endif
982 execute T:make-nhsdat
983 -delete T:make-nhsdat
985 #SFD_INSTEAD $(SLIB)sounds: $(SLIB)sounds
987 -makedir $(SLIB)sounds
989 $(SBIN)cvtsnd: $(OO)cvtsnd.o
990 $(LINK) $(LNSPEC) $@ $(LIN) $(OO)cvtsnd.o $(FLLIB)
992 $(OO)cvtsnd.o: $(AMI)cvtsnd.c
993 #SFD_INSTEAD $(CC) $(CFLAGS) $(OBJSPEC)%(left) %(right)
996 $(SLIB)sounds/Bell: $(SHARE)sounds/bell.uu
997 $(UUDEC) $(SHARE)sounds/bell.uu
998 $(SBIN)cvtsnd Bell $(SLIB)sounds/Bell
1001 $(SLIB)sounds/Bugle: $(SHARE)sounds/bugle.uu
1002 $(UUDEC) $(SHARE)sounds/bugle.uu
1003 $(SBIN)cvtsnd Bugle $(SLIB)sounds/Bugle
1006 $(SLIB)sounds/Drum_Of_Earthquake: $(SHARE)sounds/erthdrum.uu
1007 $(UUDEC) $(SHARE)sounds/erthdrum.uu
1008 $(SBIN)cvtsnd Drum_Of_Earthquake $(SLIB)sounds/Drum_Of_Earthquake
1009 -delete Drum_Of_Earthquake
1011 $(SLIB)sounds/Fire_Horn: $(SHARE)sounds/firehorn.uu
1012 $(UUDEC) $(SHARE)sounds/firehorn.uu
1013 $(SBIN)cvtsnd Fire_Horn $(SLIB)sounds/Fire_Horn
1016 $(SLIB)sounds/Frost_Horn: $(SHARE)sounds/frsthorn.uu
1017 $(UUDEC) $(SHARE)sounds/frsthorn.uu
1018 $(SBIN)cvtsnd Frost_Horn $(SLIB)sounds/Frost_Horn
1021 $(SLIB)sounds/Leather_Drum: $(SHARE)sounds/lethdrum.uu
1022 $(UUDEC) $(SHARE)sounds/lethdrum.uu
1023 $(SBIN)cvtsnd Leather_Drum $(SLIB)sounds/Leather_Drum
1024 -delete Leather_Drum
1026 $(SLIB)sounds/Magic_Flute: $(SHARE)sounds/mgcflute.uu
1027 $(UUDEC) $(SHARE)sounds/mgcflute.uu
1028 $(SBIN)cvtsnd Magic_Flute $(SLIB)sounds/Magic_Flute
1031 $(SLIB)sounds/Magic_Harp: $(SHARE)sounds/mgcharp.uu
1032 $(UUDEC) $(SHARE)sounds/mgcharp.uu
1033 $(SBIN)cvtsnd Magic_Harp $(SLIB)sounds/Magic_Harp
1036 $(SLIB)sounds/Tooled_Horn: $(SHARE)sounds/toolhorn.uu
1037 $(UUDEC) $(SHARE)sounds/toolhorn.uu
1038 $(SBIN)cvtsnd Tooled_Horn $(SLIB)sounds/Tooled_Horn
1041 $(SLIB)sounds/Wooden_Flute: $(SHARE)sounds/wdnflute.uu
1042 $(UUDEC) $(SHARE)sounds/wdnflute.uu
1043 $(SBIN)cvtsnd Wooden_Flute $(SLIB)sounds/Wooden_Flute
1044 -delete Wooden_Flute
1046 $(SLIB)sounds/Wooden_Harp: $(SHARE)sounds/wdnharp.uu
1047 $(UUDEC) $(SHARE)sounds/wdnharp.uu
1048 $(SBIN)cvtsnd Wooden_Harp $(SLIB)sounds/Wooden_Harp
1051 inst-dungeon: $(INSTDUNGEONFILES)
1053 $(NETHACK)options : $(DAT)options
1054 copy $(DAT)options $@
1056 # Create compiled dungeon files
1057 BGM= $(SLIB)bigrm-2.lev $(SLIB)bigrm-3.lev $(SLIB)bigrm-4.lev $(SLIB)bigrm-5.lev
1058 $(BGM): $(SLIB)bigrm-1.lev
1060 $(SLIB)bigrm-1.lev: $(DAT)bigroom.des $(SBIN)lev_comp
1061 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)bigroom.des
1064 $(SLIB)castle.lev: $(DAT)castle.des $(SBIN)lev_comp
1066 ENDGAME1= $(SLIB)air.lev $(SLIB)earth.lev $(SLIB)fire.lev $(SLIB)water.lev
1067 $(ENDGAME1): $(SLIB)astral.lev
1069 $(SLIB)astral.lev: $(DAT)endgame.des $(SBIN)lev_comp
1070 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)endgame.des
1073 GEHENNOM1= $(SLIB)asmodeus.lev $(SLIB)baalz.lev $(SLIB)juiblex.lev \
1074 $(SLIB)orcus.lev $(SLIB)sanctum.lev
1075 $(GEHENNOM1): $(SLIB)valley.lev
1077 $(SLIB)valley.lev: $(DAT)gehennom.des $(SBIN)lev_comp
1078 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)gehennom.des
1081 $(SLIB)knox.lev: $(DAT)knox.des $(SBIN)lev_comp
1082 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)knox.des
1085 MINES1= $(SLIB)minend-1.lev $(SLIB)minend-2.lev $(SLIB)minetn-1.lev $(SLIB)minetn-2.lev
1086 $(MINES1): $(SLIB)minefill.lev
1088 $(SLIB)minefill.lev: $(DAT)mines.des $(SBIN)lev_comp
1089 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)mines.des
1092 $(SLIB)oracle.lev: $(DAT)oracle.des $(SBIN)lev_comp
1093 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)oracle.des
1096 TOWER1= $(SLIB)tower1.lev $(SLIB)tower2.lev
1097 $(TOWER1): $(SLIB)tower3.lev
1099 $(SLIB)tower3.lev: $(DAT)tower.des $(SBIN)lev_comp
1100 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)tower.des
1103 WIZARD1= $(SLIB)wizard1.lev $(SLIB)wizard2.lev $(SLIB)wizard3.lev \
1105 $(WIZARD1): $(SLIB)fakewiz2.lev
1107 $(SLIB)fakewiz2.lev: $(DAT)yendor.des $(SBIN)lev_comp
1108 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)yendor.des
1111 MEDUSA1= $(SLIB)medusa-1.lev
1112 $(MEDUSA1): $(SLIB)medusa-2.lev
1114 $(SLIB)medusa-2.lev: $(DAT)medusa.des $(SBIN)lev_comp
1115 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)medusa.des
1118 SOKOBAN1= $(SLIB)soko1-1.lev $(SLIB)soko1-2.lev $(SLIB)soko2-1.lev \
1119 $(SLIB)soko2-2.lev $(SLIB)soko3-1.lev $(SLIB)soko3-2.lev \
1121 $(SOKOBAN1): $(SLIB)soko4-2.lev
1123 $(SLIB)soko4-2.lev: $(DAT)sokoban.des $(SBIN)lev_comp
1124 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)sokoban.des
1127 $(ADFILES1): $(SLIB)Arc-goal.lev
1129 $(SLIB)Arc-goal.lev: $(DAT)Arch.des $(SBIN)lev_comp
1130 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)Arch.des
1133 $(BDFILES1): $(SLIB)Bar-goal.lev
1135 $(SLIB)Bar-goal.lev: $(DAT)Barb.des $(SBIN)lev_comp
1136 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)Barb.des
1139 $(CDFILES1): $(SLIB)Cav-goal.lev
1141 $(SLIB)Cav-goal.lev: $(DAT)Caveman.des $(SBIN)lev_comp
1142 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)Caveman.des
1145 $(HDFILES1): $(SLIB)Hea-goal.lev
1147 $(SLIB)Hea-goal.lev: $(DAT)Healer.des $(SBIN)lev_comp
1148 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)Healer.des
1151 $(KDFILES1): $(SLIB)Kni-goal.lev
1153 $(SLIB)Kni-goal.lev: $(DAT)Knight.des $(SBIN)lev_comp
1154 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)Knight.des
1157 $(MDFILES1): $(SLIB)Mon-goal.lev
1159 $(SLIB)Mon-goal.lev: $(DAT)Monk.des $(SBIN)lev_comp
1160 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)Monk.des
1163 $(PDFILES1): $(SLIB)Pri-goal.lev
1165 $(SLIB)Pri-goal.lev: $(DAT)Priest.des $(SBIN)lev_comp
1166 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)Priest.des
1169 $(RDFILES1): $(SLIB)Rog-goal.lev
1171 $(SLIB)Rog-goal.lev: $(DAT)Rogue.des $(SBIN)lev_comp
1172 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)Rogue.des
1175 $(RANFILES1): $(SLIB)Ran-goal.lev
1177 $(SLIB)Ran-goal.lev: $(DAT)Ranger.des $(SBIN)lev_comp
1178 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)Ranger.des
1181 $(SDFILES1): $(SLIB)Sam-goal.lev
1183 $(SLIB)Sam-goal.lev: $(DAT)Samurai.des $(SBIN)lev_comp
1184 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)Samurai.des
1187 $(TDFILES1): $(SLIB)Tou-goal.lev
1189 $(SLIB)Tou-goal.lev: $(DAT)Tourist.des $(SBIN)lev_comp
1190 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)Tourist.des
1193 $(VDFILES1): $(SLIB)Val-goal.lev
1195 $(SLIB)Val-goal.lev: $(DAT)Valkyrie.des $(SBIN)lev_comp
1196 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)Valkyrie.des
1199 $(WDFILES1): $(SLIB)Wiz-goal.lev
1201 $(SLIB)Wiz-goal.lev: $(DAT)Wizard.des $(SBIN)lev_comp
1202 #SFD_INSTEAD $(SBIN)lev_comp $(DAT)Wizard.des
1205 $(SLIB)dungeon: $(DAT)dungeon.def $(SBIN)makedefs $(SBIN)dgn_comp
1207 $(SBIN)dgn_comp $(DAT)dungeon.pdf
1208 copy $(DAT)dungeon $(SLIB)dungeon
1209 delete $(DAT)dungeon
1211 inst-data: $(INSTDATAFILES)
1213 $(NETHACK)amii.hlp: $(AMI)amii.hlp
1214 copy $(AMI)amii.hlp $@
1216 #$(NETHACK)data: $(DAT)data
1217 # copy $(DAT)data $@
1219 $(SLIB)data: $(DAT)data.base $(I)config.h $(SBIN)makedefs
1222 #$(NETHACK)rumors: $(DAT)rumors
1223 # copy $(DAT)rumors $@
1225 $(SLIB)rumors: $(DAT)rumors.tru $(DAT)rumors.fal $(SBIN)makedefs
1228 $(SLIB)cmdhelp: $(DAT)cmdhelp
1229 copy $(DAT)cmdhelp $@
1231 $(SLIB)help: $(DAT)help
1237 $(NETHACK)HackWB.hlp: $(AMI)HackWB.hlp
1238 copy $(AMI)HackWB.hlp $@
1240 $(SLIB)history: $(DAT)history
1241 copy $(DAT)history $@
1243 $(NETHACK)license: $(DAT)license
1244 copy $(DAT)license $@
1246 $(SLIB)opthelp: $(DAT)opthelp
1247 copy $(DAT)opthelp $@
1249 $(NETHACK)Recover.txt: $(DOC)Recover.txt
1250 copy $(DOC)Recover.txt $@
1252 $(NETHACK)GuideBook.txt: $(DOC)GuideBook.txt
1253 copy $(DOC)GuideBook.txt $@
1255 $(NETHACK)NetHack.txt: $(DOC)NetHack.txt
1256 copy $(DOC)NetHack.txt $@
1258 $(NETHACK)Install.ami: $(AMI)Install.ami
1259 copy $(AMI)Install.ami $@
1261 #SFD_INSTEAD $(NETHACK)logfile: $(NETHACK)logfile
1265 #SFD_INSTEAD $(NETHACK)record: $(NETHACK)record
1269 $(SLIB)wizhelp: $(DAT)wizhelp
1270 copy $(DAT)wizhelp $@
1272 # Create the directories here because NetHack.cnf puts them there by default
1273 $(NETHACK)NetHack.cnf: $(AMI)NetHack.cnf
1274 copy $(AMI)NetHack.cnf $@
1275 -makedir $(NETHACK)save
1276 -makedir $(NETHACK)levels
1280 $(O)NetHack.gst: $(GSTSRC) $(I)hack.h
1281 sc makegst=$(GSTFILE) $(CFLAGS) $(GSTSRC)
1284 # Unpack and install fonts
1286 INSTFONTFILES= $(NETHACK)hack.font $(NETHACK)hack $(NETHACK)hack/8
1288 inst-fonts: $(INSTFONTFILES)
1290 $(NETHACK)hack/8: $(AMI)amifont8.uu $(NETHACK)hack
1291 $(UUDEC) $(AMI)amifont8.uu
1292 copy 8 $(NETHACK)hack/8
1295 $(NETHACK)hack.font: $(AMI)amifont.uu
1296 $(UUDEC) $(AMI)amifont.uu
1297 copy hack.font $(NETHACK)hack.font
1300 #SFD_INSTEAD $(NETHACK)hack: $(NETHACK)hack
1305 $(NETHACK)default.icon $(NETHACK)NetHack.info $(NETHACK)NewGame.info \
1306 $(NETHACK)HackWB.info
1308 inst-icons: $(INSTICONFILES)
1310 # Unpack the icons into place
1312 $(NETHACK)default.icon: $(AMI)dflticon.uu
1313 $(UUDEC) $(AMI)dflticon.uu
1314 # copy default.icon $(NETHACK)default.icon
1315 # delete default.icon
1317 $(NETHACK)NetHack.info: $(AMI)NHinfo.uu
1318 $(UUDEC) $(AMI)NHinfo.uu
1319 # copy NetHack.info $(NETHACK)NetHack.info
1320 # delete NetHack.info
1322 $(NETHACK)NewGame.info: $(AMI)NewGame.uu
1323 $(UUDEC) $(AMI)NewGame.uu
1324 # copy NewGame.info $(NETHACK)NewGame.info
1325 # delete NewGame.info
1327 $(NETHACK)HackWB.info: $(AMI)HackWB.uu
1328 $(UUDEC) $(AMI)HackWB.uu
1329 # copy HackWB.info $(NETHACK)HackWB.info
1330 # delete HackWB.info
1332 # If DLB is defined, create the nhdat library file in the playground
1333 # directory. If not, move all the data files there.
1334 $(NETHACK)nhdat: $(LIBFILES) $(SBIN)dlb
1335 list to T:nhdat.lst $(SLIB) QUICK NOHEAD FILES
1336 echo >T:make-nhdat $(SBIN)dlb cCfI $(SLIB) $(NETHACK)nhdat T:nhdat.lst
1337 echo >>T:make-nhdat if not exists $(NETHACK)nhdat
1338 echo >>T:make-nhdat copy $(SLIB)\#? $(NETHACK)
1339 echo >>T:make-nhdat endif
1340 execute T:make-nhdat
1341 -delete T:make-nhdat
1343 # DO NOT DELETE THIS LINE
1345 $(O)allmain.o: $(NHS)allmain.c $(HDEP)
1347 $(O)alloc.o: $(NHS)alloc.c $(I)config.h
1349 $(O)apply.o: $(NHS)apply.c $(HDEP)
1351 $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)apply.c
1353 $(O)artifact.o: $(NHS)artifact.c $(HDEP) $(I)artifact.h $(I)artilist.h
1355 $(O)attrib.o: $(NHS)attrib.c $(HDEP) $(I)artifact.h
1357 $(O)ball.o: $(NHS)ball.c $(HDEP)
1359 $(O)bones.o: $(NHS)bones.c $(HDEP) $(I)lev.h
1361 $(O)botl.o: $(NHS)botl.c $(HDEP)
1363 $(O)cmd.o: $(NHS)cmd.c $(HDEP) $(I)func_tab.h
1365 $(O)dbridge.o: $(NHS)dbridge.c $(HDEP)
1367 $(O)decl.o: $(NHS)decl.c $(HDEP) $(I)quest.h
1369 $(O)detect.o: $(NHS)detect.c $(HDEP) $(I)artifact.h
1371 $(O)dig.o: $(NHS)dig.c $(HDEP)
1373 $(O)display.o: $(NHS)display.c $(HDEP)
1375 $(O)dlb.o: $(NHS)dlb.c $(HDEP) $(I)dlb.h
1377 $(O)do.o: $(NHS)do.c $(HDEP) $(I)lev.h
1379 $(O)do_name.o: $(NHS)do_name.c $(HDEP)
1381 $(O)do_wear.o: $(NHS)do_wear.c $(HDEP)
1383 $(O)dog.o: $(NHS)dog.c $(HDEP)
1385 $(O)dogmove.o: $(NHS)dogmove.c $(HDEP) $(I)mfndpos.h
1387 $(O)dokick.o: $(NHS)dokick.c $(HDEP)
1389 $(O)dothrow.o: $(NHS)dothrow.c $(HDEP)
1391 $(O)drawing.o: $(NHS)drawing.c $(HDEP) $(I)tcap.h
1392 $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)drawing.c
1394 $(O)dungeon.o: $(NHS)dungeon.c $(HDEP) $(I)dgn_file.h $(I)dlb.h
1396 $(O)eat.o: $(NHS)eat.c $(HDEP)
1398 $(O)end.o: $(NHS)end.c $(HDEP) $(I)lev.h $(I)dlb.h
1400 $(O)engrave.o: $(NHS)engrave.c $(HDEP) $(I)lev.h
1402 $(O)exper.o: $(NHS)exper.c $(HDEP)
1404 $(O)explode.o: $(NHS)explode.c $(HDEP)
1406 $(O)extralev.o: $(NHS)extralev.c $(HDEP)
1408 $(O)files.o: $(NHS)files.c $(HDEP) $(I)dlb.h $(I)date.h
1410 $(O)fountain.o: $(NHS)fountain.c $(HDEP)
1412 $(O)hack.o: $(NHS)hack.c $(HDEP)
1414 $(O)hacklib.o: $(NHS)hacklib.c $(HDEP)
1416 $(O)invent.o: $(NHS)invent.c $(HDEP) $(I)artifact.h
1418 $(O)light.o: $(NHS)light.c $(HDEP) $(I)lev.h
1420 $(O)lock.o: $(NHS)lock.c $(HDEP)
1422 $(O)mail.o: $(NHS)mail.c $(HDEP) $(I)mail.h
1424 $(O)makemon.o: $(NHS)makemon.c $(HDEP)
1426 $(O)mapglyph.o: $(NHS)mapglyph.c $(HDEP)
1428 $(O)mcastu.o: $(NHS)mcastu.c $(HDEP)
1430 $(O)mhitm.o: $(NHS)mhitm.c $(HDEP) $(I)artifact.h
1432 $(O)mhitu.o: $(NHS)mhitu.c $(HDEP) $(I)artifact.h
1433 $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)mhitu.c
1435 $(O)minion.o: $(NHS)minion.c $(HDEP)
1437 $(O)mklev.o: $(NHS)mklev.c $(HDEP)
1439 $(O)mkmap.o: $(NHS)mkmap.c $(HDEP) $(I)sp_lev.h
1441 $(O)mkmaze.o: $(NHS)mkmaze.c $(HDEP) $(I)sp_lev.h $(I)lev.h
1443 $(O)mkobj.o: $(NHS)mkobj.c $(HDEP) $(I)artifact.h $(I)prop.h
1445 $(O)mkroom.o: $(NHS)mkroom.c $(HDEP)
1447 $(O)mon.o: $(NHS)mon.c $(HDEP) $(I)mfndpos.h
1449 $(O)mondata.o: $(NHS)mondata.c $(HDEP)
1451 $(O)monmove.o: $(NHS)monmove.c $(HDEP) $(I)mfndpos.h $(I)artifact.h
1453 $(O)monst.o: $(NHS)monst.c $(I)config.h $(I)permonst.h $(I)monsym.h $(I)color.h
1455 $(O)monstr.o: $(NHS)monstr.c $(HDEP)
1456 #SFD_INSTEAD $(CC) $(CFLAGS) $(OBJSPEC)%(left) $(NHS)monstr.c
1459 $(O)mplayer.o: $(NHS)mplayer.c $(HDEP)
1461 $(O)mthrowu.o: $(NHS)mthrowu.c $(HDEP)
1463 $(O)muse.o: $(NHS)muse.c $(HDEP)
1464 $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)muse.c
1466 $(O)music.o: $(NHS)music.c $(HDEP) #interp.c
1468 $(O)o_init.o: $(NHS)o_init.c $(HDEP) $(I)lev.h
1470 $(O)objects.o: $(NHS)objects.c $(I)config.h $(I)obj.h $(I)objclass.h \
1471 $(I)prop.h $(I)skills.h $(I)color.h
1473 $(CC) $(CFLAGS) $(INCLSPEC)$(NHS) $(OBJSPEC)$@ $(NHS)objects.c
1475 $(O)objnam.o: $(NHS)objnam.c $(HDEP)
1477 $(O)options.o: $(NHS)options.c $(HDEP) $(I)tcap.h $(I)config.h \
1478 $(I)objclass.h $(I)flag.h
1480 $(O)pager.o: $(NHS)pager.c $(HDEP) $(I)dlb.h
1482 $(O)pickup.o: $(NHS)pickup.c $(HDEP)
1484 $(O)pline.o: $(NHS)pline.c $(HDEP)
1486 $(O)polyself.o: $(NHS)polyself.c $(HDEP)
1488 $(O)potion.o: $(NHS)potion.c $(HDEP)
1490 $(O)pray.o: $(NHS)pray.c $(HDEP)
1492 $(O)priest.o: $(NHS)priest.c $(HDEP) $(I)mfndpos.h
1494 $(O)quest.o: $(NHS)quest.c $(HDEP) $(I)quest.h $(I)qtext.h
1496 $(O)questpgr.o: $(NHS)questpgr.c $(HDEP) $(I)qtext.h $(I)dlb.h
1498 $(O)read.o: $(NHS)read.c $(HDEP)
1500 $(O)rect.o: $(NHS)rect.c $(HDEP)
1502 $(O)region.o: $(NHS)region.c $(HDEP)
1504 $(O)restore.o: $(NHS)restore.c $(HDEP) $(I)lev.h $(I)tcap.h $(I)quest.h
1506 $(O)rnd.o: $(NHS)rnd.c $(HDEP)
1508 $(O)role.o: $(NHS)role.c $(HDEP)
1510 $(O)rumors.o: $(NHS)rumors.c $(HDEP) $(I)dlb.h
1512 $(O)save.o: $(NHS)save.c $(HDEP) $(I)lev.h $(I)quest.h
1514 $(O)shk.o: $(NHS)shk.c $(HDEP)
1516 $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)shk.c
1518 $(O)shknam.o: $(NHS)shknam.c $(HDEP)
1520 $(O)sit.o: $(NHS)sit.c $(HDEP) $(I)artifact.h
1522 $(O)sounds.o: $(NHS)sounds.c $(HDEP)
1524 $(O)sp_lev.o: $(NHS)sp_lev.c $(HDEP) $(I)sp_lev.h $(I)rect.h $(I)dlb.h
1526 $(O)spell.o: $(NHS)spell.c $(HDEP)
1528 $(O)steal.o: $(NHS)steal.c $(HDEP)
1530 $(O)steed.o: $(NHS)steed.c $(HDEP)
1532 $(O)sys.o: $(NHS)sys.c $(HDEP)
1534 $(O)teleport.o: $(NHS)teleport.c $(HDEP)
1536 $(O)timeout.o: $(NHS)timeout.c $(HDEP) $(I)lev.h
1538 $(O)topten.o: $(NHS)topten.c $(HDEP) $(I)dlb.h
1540 $(O)track.o: $(NHS)track.c $(HDEP)
1542 $(O)trap.o: $(NHS)trap.c $(HDEP)
1544 $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)trap.c
1546 $(O)u_init.o: $(NHS)u_init.c $(HDEP)
1548 $(O)uhitm.o: $(NHS)uhitm.c $(HDEP)
1549 $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)uhitm.c
1551 $(O)vault.o: $(NHS)vault.c $(HDEP)
1553 $(O)version.o: $(NHS)version.c $(HDEP) $(I)date.h $(I)patchlevel.h
1555 # DMake doesn't grok mid-line comments
1556 #SFD_INSTEAD $(O)vision.o: $(NHS)vision.c $(HDEP)
1557 $(O)vision.o: $(NHS)vision.c $(HDEP) #$(I)vis_tab.h
1559 $(O)weapon.o: $(NHS)weapon.c $(HDEP)
1561 $(O)were.o: $(NHS)were.c $(HDEP)
1563 $(O)wield.o: $(NHS)wield.c $(HDEP)
1565 $(O)windows.o: $(NHS)windows.c $(HDEP) $(I)wintty.h
1567 $(O)wizard.o: $(NHS)wizard.c $(HDEP) $(I)qtext.h
1569 $(O)worm.o: $(NHS)worm.c $(HDEP) $(I)lev.h
1571 $(O)worn.o: $(NHS)worn.c $(HDEP)
1573 $(O)write.o: $(NHS)write.c $(HDEP)
1575 $(O)zap.o: $(NHS)zap.c $(HDEP)
1576 $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)zap.c
1578 $(O)getline.o: $(TTY)getline.c $(HDEP) $(I)wintty.h
1580 $(O)termcap.o: $(TTY)termcap.c $(HDEP) $(I)wintty.h $(I)tcap.h
1582 $(O)topl.o: $(TTY)topl.c $(HDEP) $(I)wintty.h $(I)tcap.h
1584 $(O)wintty.o: $(TTY)wintty.c $(HDEP) $(I)wintty.h $(I)tcap.h \
1585 $(I)date.h $(I)patchlevel.h
1587 $(O)amitty.o: $(AMI)amitty.c $(HDEP)
1589 $(O)amistack.o: $(AMI)amistack.c
1590 $(CC) $(CFLAGS3) $(CSYM) $(OBJSPEC)$@ $(AMI)amistack.c
1592 $(O)rip.o: $(NHS)rip.c $(HDEP)
1595 $(I)config.h: $(I)config1.h $(I)tradstdc.h $(I)global.h
1596 -setdate $(I)config.h
1599 # onames.h handled at onames.h target, pm.h
1601 $(I)decl.h: $(I)quest.h $(I)spell.h $(I)color.h $(I)obj.h $(I)you.h
1605 $(I)global.h: $(I)coord.h $(I)pcconf.h $(I)amiconf.h
1606 -setdate $(I)global.h
1609 $(I)hack.h: $(I)config.h $(I)context.h $(I)trap.h $(I)decl.h $(I)dungeon.h
1610 $(I)monsym.h $(I)mkroom.h $(I)objclass.h $(I)flag.h $(I)rm.h
1611 $(I)vision.h $(I)display.h $(I)wintype.h $(I)engrave.h
1612 $(I)rect.h $(I)region.h $(I)trampoli.h $(I)sys.h
1616 $(I)permonst.h: $(I)monattk.h $(I)monflag.h $(I)align.h
1617 -setdate $(I)permonst.h
1620 $(I)you.h: $(I)align.h $(I)attrib.h $(I)monst.h $(I)mextra.h $(I)youprop.h $(I)skills.h
1624 # pm.h handled at target
1626 $(I)youprop.h: $(I)prop.h $(I)permonst.h $(I)mondata.h
1627 -setdate $(I)youprop.h
1630 $(I)display.h: $(I)vision.h $(I)mondata.h
1631 -setdate $(I)display.h
1634 $(I)dungeon.h: $(I)align.h
1635 -setdate $(I)dungeon.h
1638 $(I)engrave.h: $(I)trampoli.h $(I)rect.h
1639 -setdate $(I)engrave.h
1642 $(I)mextra.h: $(I)align.h
1643 -setdate $(I)mextra.h
1646 $(I)mondata.h: $(I)align.h
1647 -setdate $(I)mondata.h
1650 $(I)monst.h: $(I)align.h $(I)mextra.h
1651 -setdate $(I)monst.h
1654 $(I)pcconf.h: $(I)micro.h $(I)system.h
1655 -setdate $(I)pcconf.h
1658 $(I)rm.h: $(I)align.h
1664 # install keeps doing re-install because it keeps rebuilding lev_comp???
1665 # fixed(?) - deleted setdate
1666 # make nhdat rebuils sys/amiga objects