diff --git a/Files b/Files index 50d8ecfba..be2f6d514 100644 --- a/Files +++ b/Files @@ -132,11 +132,6 @@ wceconf.h mac-carbon.h mac-qt.h mac-term.h macconf.h macpopup.h mactty.h macwin.h mttypriv.h -outdated/sys/amiga: -(files for Amiga versions - untested for 5.0) -Build.ami Install.ami Makefile.agc Makefile.ami NetHack.cnf -ifchange mkdmake txt2iff.c xpm2iff.c - outdated/sys/atari: (files for Atari version - untested for 5.0) Install.tos atarifnt.uue nethack.mnu setup.g tos.c diff --git a/outdated/sys/amiga/.gitattributes b/outdated/sys/amiga/.gitattributes deleted file mode 100644 index 483f30202..000000000 --- a/outdated/sys/amiga/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -*.p NHSUBST -* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_5.0) diff --git a/outdated/sys/amiga/Build.ami b/outdated/sys/amiga/Build.ami deleted file mode 100644 index 2b435d827..000000000 --- a/outdated/sys/amiga/Build.ami +++ /dev/null @@ -1,140 +0,0 @@ - - Compiling Amiga NetHack 3.4 - Last Revision: 21 February 2002 for NetHack 3.4.1 - - - We would like to thank each and every one of the people who took - the time and effort to report bugs to us. THANK YOU! (And keep - up the good work!) - -I. Introduction - - The Amiga-specific documentation has been split since the 3.1.3 release - - please read the file Install.ami for information specific to the - Amiga port before continuing. - - If you have problems with compilation, installation, or think you have - found a bug in the game, please report it by electronic mail to the - development group at nethack-bugs@nethack.org, where it will be routed - to the appropriate person. Include your configuration, the version of - NetHack you are playing (use the 'v' command or see - include/patchlevel.h), and as much specific information as possible. - As NetHack runs on many different machines, be sure to mention that you - are playing the Amiga version and also mention if you are using the - version for mc68k or ppc. - - If you want to find out about distributing NetHack, read the license - (in NetHack:license or type ?i during the game). - -II. Compiling Amiga NetHack 3.4 - -II.A. Compilation Overview - Compiling NetHack is not very hard - basically you do a little - configuration and start make. It does, however, require a good amount - of disk space and time. It also needs a good bit of memory, especially - for linking. - -II.B. Basic Compilation - - NetHack can be built with SAS/C version 6.5x. The commercial version - of DICE might work, but NetHack version 3.2.2 or later haven't been - compiled with it. The "official" compiler for NetHack 3.6 is SAS/C 6.58 - - we have dropped support for SAS/C 5.x. - - The Manx/Aztec port has not been tested recently and is certainly - broken. Anyone managing to compile NetHack with this compiler is - encouraged to submit context diffs of the required changes. When last - tested, NetHack required version 5.0B of that compiler. - - Compiling with gcc should also work. - -II.B.1. Introduction to Compiling NetHack - Before doing any compilation, read the README files distributed with - the source. These should familiarize you with the source tree layout - and what files are shared with what computers; everything in the - sys/amiga directory is used exclusively by the Amiga. - - The makefile (sys/amiga/Makefile.ami) depends on certain assignments, - providing the developer with a fairly flexible environment. See - sys/amiga/Makefile.ami for assignment assumptions. DICE users should - see section II.B.3 for information on creating a DMakefile usable with - DMake. - - Edit config.h to your liking and system configuration. The defaults - should be satisfactory for most systems. - - Read VERY CAREFULLY through the Makefile to familiarize yourself - with which assignments are assumed. Otherwise, you're going to get - something like "Insert NH: in any drive." You will need uudecode, - and, if you need to modify dgn_comp or lev_comp, flex, and bison. - The first thing Makefile.ami does is build makedefs, which handles - a variety of data file generation, and then lev_comp and dgn_comp - which compile the special levels. Makedefs will then be run to create - a few files, followed by a roughly alphabetically sorted compilation - of the entire source tree. This process will compile selected files - from the sys/amiga, sys/share, win/tty, and src directories, eventually - creating sbin/nethack. After building the main binary, a make install - will build the auxiliary files including help files, special levels, - icons, and the font files and will put these files into their final - positions - most will be in dlb archives (if DLB was defined in config.h). - The first make run should be done in NH:obj and the make install should be - done in NetHack:; for both runs, the makefile is NH:sys/amiga/Makefile.ami - (or NH:sys/amiga/DMakefile for DMake and NH:sys/amiga/Makefile.agc for - gcc). - - Note that not all the source is simple C code. If you are modifying - lev_comp or dgn_comp you may need bison and/or flex (depending on what - modifications you are making). You do not need any of these tools to - simply build NetHack - all the C output files are provided in the source - distribution. Also, the ifchange script requires a version of diff that - produces standard Unix format context diffs for proper operation - the - version shipped with SAS/C is not sufficient. - - If you do not have bison and flex, copy the files from sys/share. The - include files go in include/ and the C files go in util/. If the compile - fails due to prototype errors for malloc and realloc, try deleting - the first line of lev_comp.c and dgn_comp.c. - -II.B.2. Compiling NetHack with SAS/C version 6.58 - - NOTE WELL - Amiga NetHack has dropped support for SAS/C version 5. - This version of NetHack was developed with SAS/C 6.58. Earlier versions - than version of the compiler are known to cause problems - don't use them. - - A couple of notes and warnings from the SAS/C users on the team: - - * Included in the SAS/C port is code for generating a SnapShot.tb - file upon catching various internal disasters. That is why the - debug=l flag is in the makefile. This adds about 270K to the disk - image, but it does not increase the run time memory requirements. - - * The 5.10b optimizer did not produce correct code for NetHack. The - current optimizer has not been tested. - -II.B.3. Compiling NetHack with the commercial version of DICE - - IMPORTANT NOTE: If you are using DMake, you need to create DMakefile - from Makefile.ami. Do the following: - - cd NH:sys/amiga - edit from Makefile.ami to DMakefile with mkdmake opt w255 - - Some versions of DMake have been known to crash horribly on the - makefile - if this happens, you'll need to download another make - utility, such as AMake (ftp://ftp.dragonfire.net/amiga/utils/amake), - which will run in DMake-compatibility mode if invoked with the -C switch - (e.g. "amake -C -f NH:sys/amiga/DMakefile", or just - "alias dmake amake -C"). - - SECOND IMPORTANT NOTE: The score list is currently disabled when - compiling under DICE, due to an as-yet-unknown problem which causes - system crashes when displaying the score list. - - NetHack can be compiled using the commercial version of DICE only. The - registered shareware version had a bug in it which resulted in odd- - aligned procedures. (It is possible to patch DC1 to fix this problem; - however, this is not recommended, and you should upgrade to the - commercial version.) - - During compilation, DICE will output a lot of warnings; they can be - safely ignored. diff --git a/outdated/sys/amiga/Install.ami b/outdated/sys/amiga/Install.ami deleted file mode 100644 index 58ad2409b..000000000 --- a/outdated/sys/amiga/Install.ami +++ /dev/null @@ -1,200 +0,0 @@ - - Using and Installing Amiga NetHack 3.4 - (or Everything You Never Wanted to Know Before NetHacking) - (or Not Everything That Happens Always Comes Knocking) - - Last Revision: 28 March 2000 for NetHack 3.4.1 - - -0. Pre-intro for NetHack 3.4.1: - Amiga-specific changes for 3.4.1: - Most (around 99%) known bugs fixed (volunteers welcome). - HackWB and HackCli are no longer supported. Use the main binary. - - We would like to thank each and every one of the people who took - the time and effort to report bugs to us. THANK YOU! - -I. Introduction - -I.A. Overview - Welcome to Amiga NetHack! If this is your first visit to our fair - city, you are in for an amazing but dangerous journey; if you have - visited us before, beware! the city has changed in many strange and - subtle ways; it has also grown quite a bit. This missive brings to - light those mundane tasks which must be dealt with before beginning - your journey; for those of you who are faced with the task of - installing the pre-fabricated version of our town, section III - (Installing Amiga NetHack 3.6) will guide you through the task at - hand. If you are ready to visit, the local visitors guide is in - section II (Using Amiga NetHack 3.6); please also see the general - guide packaged separately (the file "GuideBook"). - - To all our visitors, a hearty Welcome! - and please be careful. - - [Those responsible for the previous paragraphs have been sacked. The - documentation has been completed at great expense in a more traditional - style. -- The Management] - -I.B. Getting Help - If you have questions about strategy, weapons, or monsters, the best - place to go for help is the Usenet newsgroup rec.games.roguelike.nethack. - - If you have problems with installation or think you have found a bug - in the game, please report it by electronic mail to the development - team at nethack-bugs@nethack.org, where it will be routed to the - appropriate person. Include your configuration, the version of - NetHack you are playing (use the 'v' command), whether or not you are - using an official binary release (and if so which one) and as much - specific information as possible. As NetHack runs on many different - machines, be sure to mention that you are playing the Amiga version. - -I.C. Credits - Olaf Seibert first ported NetHack 2.3 and 3.0 to the Amiga. Richard - Addison, Andrew Church, Jochen Erwied, Mark Gooderum, Ken Lorber, - Greg Olson, Mike Passaretti, and Gregg Wonderly polished and extended - the 3.0 and 3.1 ports. Andrew Church, Ken Lorber, and Gregg Wonderly - are responsible for the 3.2 port. Janne Salmijärvi resurrected the - amigaport for 3.3 and Teemu Suikki joined before 3.4.0. - -II. Using Amiga NetHack 3.4 - Run NetHack from the shell or from some tool that allows that, - ie. ToolManager. See the NetHack.txt file for command line options - and other usage. - -II.A. Sources of Information - Where to go depends on what you want to find out. If you want to find - out about distributing NetHack, read the license (in NetHack:license - or type ?i during the game). For an introduction to NetHack, read - the GuideBook file. To find out what options are compiled into your - copy of NetHack, type #v during the game. Finally, for information - during the game on all kinds of things, type ? and select from the - menu or by pressing Help key. - -II.B. The Amiga NetHack WorkBench Front End - Starting from 3.3.0 HackWB is not supported. - -II.C. The Amiga NetHack CLI Front End - Starting from 3.3.0 CLI Front end is not supported either. - - Instead, use the main binary. See NetHack.txt file for the standard Unix - flags for NetHack. In addition to those flags, Amiga NetHack accepts - the flags -l to force non-interlaced mode and -L to force interlaced mode. - -II.D. Amiga-Specific Information for NetHack - - There are several options that are unique to the Amiga version of - NetHack that may be specified in the NetHack.cnf file or on an - OPTIONS line: - - altmeta allows the ALT keys to function as META keys. The default - is altmeta. - flush flush discards all characters in the queue except the first, - which limits typeahead accidents. The default is !flush. - silent turn off the audio output. The default is silent. - - The current version of Amiga NetHack also supports menu accelerators. - See Guidebook.txt for a detailed description. Also supported is - selecting the number of stacked objects to drop, used with the (D)rop - command. Type the number and then select an item (or items with - accelerators). Items with a count associated with them are denoted - with # in place of -. I.e. 'd - 3 blessed daggers' becomes - 'd # 3 blessed daggers'. You can clear the count by hitting esc - while counting or deselect and reselect the item. The default - is to drop all selected items (as before). - - For other options how to configure the screen setting and colors refer - to Nethack.cnf. - -III. Installing Amiga NetHack 3.4 - -III.A. General Installation - Installation should be easy - basically it consists of putting files - where they belong and adding an assign to your startup. If you are - installing from the official binary distribution, simply unpacking - the archive in the appropriate directory will put the files in the - places they belong. - - IF YOU ALREADY HAVE A PREVIOUS VERSION INSTALLED YOU MUST DELETE THE - OLD SAVE AND BONES FILES - THEY WILL NOT WORK! This includes save - and bones files from all previous versions of NetHack (yes, even 3.3.1). - If you have a game in progress and want to finish it, use your - current version and then update. - -Will NetHack fit on your machine? - NetHack 3.6 is large. NetHack 3.4 is very large. You will need: - > Any standard series Amiga: 500, 600, 1000, 1200, 2000, 2500, 3000, 4000. - > WorkBench 2.04 or later. - > At least 3 meg of RAM. NetHack will NOT run in 1 meg (probably even 2). - > Mass storage: A hard drive with over 3 meg of free space is highly - recommended. - -Hard Disk Installation: - Unpack the archive to your place of choice. Since you are reading this - you've probably done that already. Now just assign NetHack: to - NetHack directory containing the executable and datafiles and other needed - directories. - - Use the table in the next section to see where things should end up. - Be sure that the file 8 ends up in NetHack:hack/8. - -Configuration - Using your favorite text editor, edit NetHack:NetHack.cnf to match - your system. - - Create the save file directory (makedir NetHack:save) and the levels file - directory (makedir NetHack:levels), if they don't already exist. - - Create the score file (echo to NetHack:record) and, if desired, the log - file (echo to NetHack:logfile), if they don't already exist. You may - leave out logfile, but record is needed. - -III.B. File Location Table -NetHack: - amii.hlp Guidebook.txt hack.font - license NetHack NetHack.cnf - NetHack.txt nhdat nhsdat - record Recover Recover.txt - logfile (optional, but useful) -NetHack:hack - 8 -NetHack:tiles - monsters.iff objects.iff other.iff - -IV. BBS Interface - - [Since HackCli and split binary is no longer supported the following - probably doesn't apply anymore. Due to lack of a suitable environment - it is also untested.] - - The BBS mode is based on the standard NetHack tty port and is designed - for use in a BBS setting - it is specifically not recommended for use - on the console. The current TTY mode has changed significantly since - the preliminary version released with 3.1.2. In particular, BBS mode - now works with split binaries (only), and now supports multiple games - in progress at the same time for multi-line boards (note however that - any individual user should not be allowed to run two instances of - NetHack at the same time). - - To set up NetHack for use with a BBS, set OPTIONS=windowtype:tty - and unset DUNGEONS, TRAPS, and EFFECTS in NetHack.cnf. Configure - the BBS to expect I/O through stdin and stdout, and have NetHack - invoked as: - HackCLI :uid -u uname options... - where uid is any string (without embedded spaces, colons, or slashes) - that is unique for each BBS user and uname is some corresponding human- - readable name for that user. Uid is used in constructing file names - to prevent collisions between simultaneous games and to prevent - people from using other people's save files. Uname is the name the - character will have in the game and the name that will appear in the - record file. - - The terminal is assumed to be a 24x80 ANSI-compatible terminal. - The present version does not deal with situations such as low - memory gracefully - as NetHack uses a considerable amount of - memory this is particularly painful with multiple games in - progress. Sysops are reminded to be familiar with the recover - utility, which may be needed from time to time and which should - probably not be available directly to users. Bug reports and - suggestions for improvements are requested from the user community - - this is still considered alpha software. - diff --git a/outdated/sys/amiga/Makefile.agc b/outdated/sys/amiga/Makefile.agc deleted file mode 100644 index 5f36d0049..000000000 --- a/outdated/sys/amiga/Makefile.agc +++ /dev/null @@ -1,1241 +0,0 @@ -# NetHack Makefile. -# Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991,1992,1993,1996. -# NetHack may be freely redistributed. See license for details. - -### -### modified for gcc by Teemu Suikki (zu@iki.fi) -### -### note: you need to use smake.. sorry -### - -### -### DIRECTORY STRUCTURE -### - -NH = nh: - -SBIN = $(NH)sbin/ -SLIB = $(NH)slib/ -NETHACK = $(NH)NetHack/ -HACKEXE = $(NH)HackExe/ -AMI = $(NH)sys/amiga/ -DAT = $(NH)dat/ -DOC = $(NH)doc/ -I = $(NH)include/ -SHARE = $(NH)sys/share/ -NHS = $(NH)src/ -TTY = $(NH)win/tty/ -WSHARE = $(NH)win/share/ -UTIL = $(NH)util/ -O = $(NH)obj/ -OO = $(NH)objo/ -# NB: O and OO MUST be different directories - -### -### INVOCATION -### - -MAKE = smake - -# Startup makefile with: -# -# $(MAKE) -f $(AMI)Makefile.amigcc -# $(MAKE) -f $(AMI)Makefile.amigcc install -# -# You may use following targets on $(MAKE) command lines: -# all do it all (default) -# link just create binary from object files -# obj just create common object files -# obja just create amiga object files -# objs just create shared object files -# clean deletes the object files -# spotless deletes the object files, main binary, and more -# -# Note: We do not build the Guidebook here since it needs tbl -# (See the file sys/unix/Makefile.doc for more information) - -#[SAS5] [and gcc?] -# If we were to use the precompiled header file feature in a newer version -# of SAS/C, we would comment out these following two lines. -# If we don't use precompiled header files, we uncomment it as well. - -HDEP = $(I)hack.h -CSYM = - -#Pathname for uudecode program: -UUDEC = uudecode - -# Flex/Bison command assignments -- Useful only if you have flex/bison -FLEX = flex -BISON = bison -# FBFIL and FBLIB may be used, if required by your version of flex or bison, -# to specify additional files or libraries to be linked with -FBFIL = -FBLIB = #lib lib:compat.lib - -# If you're compiling this on a 1.3 system, you'll have to uncomment the -# following (for use with the ifchange script below). Also useful instead of -# "protect ifchange +s" -EXECUTE = execute - -# Headers we depend on -AMDEP = $(AMI)winproto.h $(AMI)winext.h $(AMI)windefs.h $(I)winami.h - -# Pathname for the C compiler being used. - -CC = gcc -c -ASM = as - -# Compilation flags for selected C Compiler: -# $(CFLAGS) should appear before filename arguments of $(CC) command line. - -CFLAGS = -O3 -I $(I) - -# Components of various link command lines: -# $(LINK) should be the pathname of the linker being used (with any options -# that should appear at the beginning of the command line). The name of the -# output file should appear immediately after $(LNSPEC). $(LIN) should -# appear before the list of object files in each link command. $(LLINK) -# should appear as the list of object files in the link command line that -# creates the NetHack executable. $(LLIB) should appear at the end of each -# link command line. - -LINK = gcc -noixemul -O3 -LIN = -LLINK = -LLIB = -FLLIB = -OBJSPEC = -o -PNSPEC = -o -LNSPEC = -o -CCLINK = gcc -noixemul -CLFLAGS = -O3 -INCLSPEC = -I -DEFSPEC = -D -IGNSPEC = -j - -### -### FILE LISTS -### - -# A more reasonable random number generator (recommended for the Amiga): - -RANDOBJ = $(O)random.o - -.PRECIOUS: $(I)config.h $(I)decl.h $(I)hack.h $(I)permonst.h $(I)you.h - -# Almost nothing below this line should have to be changed. -# (Exceptions are marked by [SAS6], [MANX], etc.) -# -# Other things that have to be reconfigured are in config.h, -# (amiconf.h, pcconf.h), and possibly system.h, tradstdc.h. - -# Object files for makedefs: - -MAKEOBJS = \ - $(OO)makedefs.o $(O)monst.o $(O)objects.o - -# Object files for special levels compiler: - -SPLEVOBJS = \ - $(OO)lev_yacc.o $(OO)lev_lex.o $(OO)lev_main.o \ - $(O)decl.o $(O)drawing.o $(O)monst.o \ - $(O)objects.o $(OO)panic.o - -# Object files for dungeon compiler - -DGNCOMPOBJS = \ - $(OO)dgn_yacc.o $(OO)dgn_lex.o $(OO)dgn_main.o $(O)alloc.o $(OO)panic.o - -# Object files for NetHack: - -COMMOBJ = \ - $(O)allmain.o $(O)alloc.o $(O)apply.o $(O)artifact.o \ - $(O)attrib.o $(O)ball.o $(O)bones.o $(O)botl.o \ - $(O)cmd.o $(O)dbridge.o $(O)decl.o $(O)detect.o \ - $(O)dig.o $(O)display.o $(O)dlb.o $(O)do.o \ - $(O)do_name.o $(O)do_wear.o $(O)dog.o $(O)dogmove.o \ - $(O)dokick.o $(O)dothrow.o $(O)drawing.o $(O)dungeon.o \ - $(O)eat.o $(O)end.o $(O)engrave.o $(O)exper.o \ - $(O)explode.o $(O)extralev.o $(O)files.o $(O)fountain.o \ - $(O)hack.o $(O)hacklib.o $(O)invent.o $(O)light.o \ - $(O)lock.o $(O)mail.o $(O)makemon.o $(O)mapglyph.o \ - $(O)mcastu.o $(O)mhitm.o $(O)mhitu.o $(O)minion.o \ - $(O)mklev.o $(O)mkmap.o $(O)mkmaze.o $(O)mkobj.o \ - $(O)mkroom.o $(O)mon.o $(O)mondata.o $(O)monmove.o \ - $(O)monst.o $(O)mplayer.o $(O)mthrowu.o $(O)muse.o \ - $(O)music.o $(O)o_init.o $(O)objects.o $(O)objnam.o \ - $(O)options.o $(O)pager.o $(O)pickup.o $(O)pline.o \ - $(O)polyself.o $(O)potion.o $(O)pray.o $(O)priest.o \ - $(O)quest.o $(O)questpgr.o $(O)read.o $(O)rect.o \ - $(O)region.o $(O)restore.o $(O)rnd.o $(O)role.o \ - $(O)rumors.o $(O)save.o $(O)shk.o $(O)shknam.o \ - $(O)sit.o $(O)sounds.o $(O)sp_lev.o $(O)spell.o \ - $(O)steal.o $(O)steed.o $(O)sys.o $(O)teleport.o \ - $(O)timeout.o $(O)topten.o $(O)track.o $(O)trap.o \ - $(O)u_init.o $(O)uhitm.o $(O)vault.o $(O)version.o \ - $(O)vision.o $(O)weapon.o $(O)were.o $(O)wield.o \ - $(O)windows.o $(O)wizard.o $(O)worm.o $(O)worn.o \ - $(O)write.o $(O)zap.o - -MAKEDEFOBJ = \ - $(O)monstr.o - -AMIGAOBJ = \ - $(O)amidos.o $(O)amirip.o $(O)amistack.o \ - $(O)amiwind.o $(O)winami.o $(O)winchar.o $(O)winfuncs.o \ - $(O)winkey.o $(O)winamenu.o $(O)winreq.o $(O)winstr.o - -# Objects from assembly sources (because DMake can't handle default rules) -AMIGAOBJ2 = \ -# $(O)dispmap.o - -SHAREOBJ = \ - $(O)pcmain.o $(RANDOBJ) - -TTYOBJ = \ - $(O)getline.o $(O)termcap.o $(O)topl.o $(O)wintty.o $(O)amitty.o \ - $(O)rip.o - -# Yuck yuck yuck. Have to tell DMake where these are, since they're not -# all in the same place. -TTYSRC = \ - $(TTY)getline.c $(TTY)termcap.c $(TTY)topl.c $(TTY)wintty.c \ - $(AMI)amitty.c $(NHS)rip.c - -# All the object files for NetHack: - -HOBJ = $(COMMOBJ) $(AMIGAOBJ) $(AMIGAOBJ2) $(SHAREOBJ) $(MAKEDEFOBJ) $(TTYOBJ) - -### -### DATA FILES -### - -# quest files -ADFILES1= $(SLIB)Arc-fila.lev $(SLIB)Arc-filb.lev $(SLIB)Arc-loca.lev \ - $(SLIB)Arc-strt.lev -ADFILES= $(SLIB)Arc-goal.lev $(ADFILES1) - -BDFILES1= $(SLIB)Bar-fila.lev $(SLIB)Bar-filb.lev $(SLIB)Bar-loca.lev \ - $(SLIB)Bar-strt.lev -BDFILES= $(SLIB)Bar-goal.lev $(BDFILES1) - -CDFILES1= $(SLIB)Cav-fila.lev $(SLIB)Cav-filb.lev $(SLIB)Cav-loca.lev \ - $(SLIB)Cav-strt.lev -CDFILES= $(SLIB)Cav-goal.lev $(CDFILES1) - -HDFILES1= $(SLIB)Hea-fila.lev $(SLIB)Hea-filb.lev $(SLIB)Hea-loca.lev \ - $(SLIB)Hea-strt.lev -HDFILES= $(SLIB)Hea-goal.lev $(HDFILES1) - -KDFILES1= $(SLIB)Kni-fila.lev $(SLIB)Kni-filb.lev $(SLIB)Kni-loca.lev \ - $(SLIB)Kni-strt.lev -KDFILES= $(SLIB)Kni-goal.lev $(KDFILES1) - -MDFILES1= $(SLIB)Mon-fila.lev $(SLIB)Mon-filb.lev $(SLIB)Mon-loca.lev \ - $(SLIB)Mon-strt.lev -MDFILES= $(SLIB)Mon-goal.lev $(MDFILES1) - -PDFILES1= $(SLIB)Pri-fila.lev $(SLIB)Pri-filb.lev $(SLIB)Pri-loca.lev \ - $(SLIB)Pri-strt.lev -PDFILES= $(SLIB)Pri-goal.lev $(PDFILES1) - -RDFILES1= $(SLIB)Rog-fila.lev $(SLIB)Rog-filb.lev $(SLIB)Rog-loca.lev \ - $(SLIB)Rog-strt.lev -RDFILES= $(SLIB)Rog-goal.lev $(RDFILES1) - -RANFILES1= $(SLIB)Ran-fila.lev $(SLIB)Ran-filb.lev $(SLIB)Ran-loca.lev \ - $(SLIB)Ran-strt.lev -RANFILES= $(SLIB)Ran-goal.lev $(RANFILES1) - -SDFILES1= $(SLIB)Sam-fila.lev $(SLIB)Sam-filb.lev $(SLIB)Sam-loca.lev \ - $(SLIB)Sam-strt.lev -SDFILES= $(SLIB)Sam-goal.lev $(SDFILES1) - -TDFILES1= $(SLIB)Tou-fila.lev $(SLIB)Tou-filb.lev $(SLIB)Tou-loca.lev \ - $(SLIB)Tou-strt.lev -TDFILES= $(SLIB)Tou-goal.lev $(TDFILES1) - -VDFILES1= $(SLIB)Val-fila.lev $(SLIB)Val-filb.lev $(SLIB)Val-loca.lev \ - $(SLIB)Val-strt.lev -VDFILES= $(SLIB)Val-goal.lev $(VDFILES1) - -WDFILES1= $(SLIB)Wiz-fila.lev $(SLIB)Wiz-filb.lev $(SLIB)Wiz-loca.lev \ - $(SLIB)Wiz-strt.lev -WDFILES= $(SLIB)Wiz-goal.lev $(WDFILES1) - -XDFILES= $(ADFILES) $(BDFILES) $(CDFILES) $(HDFILES) $(KDFILES) \ - $(MDFILES) $(PDFILES) $(RDFILES) $(RANFILES) $(SDFILES) $(TDFILES) \ - $(VDFILES) $(WDFILES) - -TILEFILES= \ - $(SBIN)txt2iff \ - $(NETHACK)tiles \ - $(NETHACK)tiles/objects.iff \ - $(NETHACK)tiles/monsters.iff \ - $(NETHACK)tiles/other.iff - -INSTDUNGEONFILES1= \ - $(SLIB)air.lev $(SLIB)asmodeus.lev $(SLIB)astral.lev \ - $(SLIB)baalz.lev $(SLIB)bigrm-1.lev $(SLIB)bigrm-2.lev \ - $(SLIB)bigrm-3.lev $(SLIB)bigrm-4.lev $(SLIB)bigrm-5.lev \ - $(SLIB)castle.lev $(SLIB)dungeon $(SLIB)earth.lev \ - $(SLIB)fakewiz1.lev $(SLIB)fakewiz2.lev $(SLIB)fire.lev \ - $(SLIB)juiblex.lev $(SLIB)knox.lev $(SLIB)medusa-1.lev \ - $(SLIB)medusa-2.lev $(SLIB)minend-1.lev $(SLIB)minend-2.lev \ - $(SLIB)minetn-1.lev $(SLIB)minetn-2.lev $(SLIB)minefill.lev \ - $(SLIB)options $(SLIB)oracle.lev $(SLIB)orcus.lev \ - $(SLIB)sanctum.lev $(SLIB)soko1-1.lev $(SLIB)soko1-2.lev \ - $(SLIB)soko2-1.lev $(SLIB)soko2-2.lev $(SLIB)soko3-1.lev \ - $(SLIB)soko3-2.lev $(SLIB)soko4-1.lev $(SLIB)soko4-2.lev \ - $(SLIB)tower1.lev $(SLIB)tower2.lev $(SLIB)tower3.lev \ - $(SLIB)valley.lev $(SLIB)water.lev $(SLIB)wizard1.lev \ - $(SLIB)wizard2.lev $(SLIB)wizard3.lev \ - $(XDFILES) - -INSTDUNGEONFILES= $(NETHACK)NetHack.cnf $(INSTDUNGEONFILES1) - - -INSTDATAFILES= \ - $(NETHACK)license $(NETHACK)logfile $(NETHACK)record \ - $(NETHACK)tomb.iff $(NETHACK)amii.hlp $(NETHACK)Recover.txt \ - $(NETHACK)GuideBook.txt $(NETHACK)NetHack.txt $(NETHACK)Install.ami \ -# $(NETHACK)HackWB.hlp $(NETHACK)WBDefaults.def - -LIBFILES= \ - $(INSTDUNGEONFILES1) \ - $(SLIB)cmdhelp $(SLIB)data $(SLIB)dungeon \ - $(SLIB)help $(SLIB)hh $(SLIB)history \ - $(SLIB)opthelp $(SLIB)oracles $(SLIB)rumors \ - $(SLIB)quest.dat $(SLIB)wizhelp - -### -### Getting down to business: -### - -all: $(COMPACT_HEADERS) $(SBIN)lev_comp $(SBIN)dgn_comp $(SBIN)NetHack \ - $(SBIN)dlb $(NETHACK)recover #$(NETHACK)HackCli $(SBIN)splitter \ -# $(NETHACK)HackWB - -install: inst-data inst-dungeon inst-fonts inst-tiles \ - $(NETHACK)recover $(NETHACK)NetHack $(NETHACK)nhdat - #$(NETHACK)NetHack.dir inst-icons - -$(SBIN)NetHack: link - -$(NETHACK)NetHack: $(SBIN)NetHack - copy $(SBIN)NetHack $(NETHACK)NetHack - -## uuh this is messy.. smake has weird command line length limit -link: $(HOBJ) - list to t:link lformat="$(O)%s" $(O)\#?.o QUICK NOHEAD - echo "\#sh" to t:cc - echo "$(LINK) $(LNSPEC) $(SBIN)NetHack $(LIN) $(LLIB) $(LLINK) " >>t:cc noline - fmt -u -w 2500 t:link >>t:cc - sh t:cc - delete t:cc t:link - - -## dlb support -$(OO)dlb_main.o: $(UTIL)dlb_main.c $(HDEP) $(I)dlb.h $(I)date.h - $(CC) $(CFLAGS) $(OBJSPEC)$(OO)dlb_main.o $(UTIL)dlb_main.c - -$(SBIN)dlb: $(OO)dlb_main.o $(O)dlb.o $(O)alloc.o $(OO)panic.o - $(LINK) $(PNSPEC) $(SBIN)dlb $(LIN) $(OO)dlb_main.o $(O)dlb.o \ - $(O)alloc.o $(OO)panic.o $(LLIB) - -obj: $(HOBJ) - -obja: $(AMIGAOBJ) - -objs: $(SHAREOBJ) - - -SUFFIXES = .lev .des -.des.lev: - $(SBIN)lev_comp $< - -# The default method for creating object files: - -#$(O)%.o: $(NHS)%.c -.c.o: - $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)$@ $< - -clean: - -delete $(O)\#?.o $(OO)\#?.o - -spotless: clean - -delete $(SBIN)NetHack $(SBIN)lev_comp $(SBIN)makedefs $(SBIN)dgn_comp - -delete $(SBIN)dlb $(SBIN)txt2iff $(SBIN)splitter - -delete $(SBIN)tilemap - -delete $(SLIB)data $(SLIB)rumors - -delete $(SLIB)\#?.lev - -delete $(SLIB)dungeon - -delete $(SLIB)cmdhelp $(SLIB)help $(SLIB)hh $(SLIB)history - -delete $(SLIB)opthelp $(SLIB)options $(SLIB)oracles - -delete $(SLIB)quest.dat $(SLIB)wizhelp -# -delete $(SLIB)earth.lev $(SLIB)air.lev $(SLIB)fire.lev -# -delete $(SLIB)water.lev $(SLIB)astral.lev -# -delete $(SLIB)tower1.lev $(SLIB)tower2.lev $(SLIB)tower3.lev -# -delete $(SLIB)fakewiz1.lev $(SLIB)fakewiz2.lev -# -delete $(SLIB)medusa-1.lev $(SLIB)medusa-2.lev -# -delete $(SLIB)oracle.lev $(SLIB)wizard1.lev $(SLIB)wizard2.lev -# -delete $(SLIB)wizard3.lev $(DAT)dungeon.pdf $(SLIB)valley.lev -# -delete $(SLIB)minefill.lev -# -delete $(SLIB)minetn-1 $(SLIB)minetn-2 $(SLIB)minend-1 $(SLIB)minend-2 -# -delete $(SLIB)soko1-1.lev $(SLIB)soko1-2.lev $(SLIB)soko2-1.lev -# -delete $(SLIB)soko2-2.lev $(SLIB)soko3-1.lev $(SLIB)soko3-2.lev -# -delete $(SLIB)soko4-1.lev $(SLIB)soko4-2.lev -# -delete $(ADFILES) -# -delete $(BDFILES) -# -delete $(CDFILES) -# -delete $(HDFILES) -# -delete $(KDFILES) -# -delete $(MDFILES) -# -delete $(PDFILES) -# -delete $(RDFILES) -# -delete $(RANFILES) -# -delete $(SDFILES) -# -delete $(TDFILES) -# -delete $(VDFILES) -# -delete $(WDFILES) - -delete $(I)onames.h $(I)pm.h $(I)date.h - -delete $(NHS)tile.c $(NHS)monstr.c - -delete $(I)tile.h -# -echo to $(I)onames.h "" noline -# -c:wait 2 -# -echo to $(I)pm.h "" noline -# -c:wait 2 -# -setdate $(UTIL)makedefs.c -# -c:wait 2 - -# Creating precompiled version of $(I)hack.h to save disk I/O. - -# -# Please note: The dependency lines for the modules here are -# deliberately incorrect. Including "hack.h" in -# the dependency list would cause a dependency -# loop. -# - -$(SBIN)makedefs: $(MAKEOBJS) - $(LINK) $(LNSPEC) $(SBIN)makedefs $(LIN) $(MAKEOBJS) $(LLIB) - -$(OO)makedefs.o: $(UTIL)makedefs.c $(I)config.h $(I)permonst.h $(I)monsym.h \ - $(I)objclass.h $(I)patchlevel.h $(I)artilist.h - $(CC) $(DEFSPEC)MAKEDEFS_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)makedefs.c - -$(SBIN)lev_comp: $(SPLEVOBJS) - $(LINK) $(LNSPEC) $(SBIN)lev_comp $(LIN) $(SPLEVOBJS) $(FBFIL) $(FLLIB) - -$(SBIN)dgn_comp: $(DGNCOMPOBJS) - $(LINK) $(LNSPEC) $(SBIN)dgn_comp $(LIN) $(DGNCOMPOBJS) $(FBFIL) $(FLLIB) - -$(OO)lev_yacc.o: $(UTIL)lev_yacc.c $(HDEP) $(I)sp_lev.h $(I)pm.h $(I)onames.h -# setdate $(UTIL)lev_yacc.c - $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)PREFIX="NH:slib/" $(CFLAGS) \ - $(DEFSPEC)alloca=malloc $(OBJSPEC)$@ $(UTIL)lev_yacc.c - -$(OO)lev_lex.o: $(UTIL)lev_lex.c $(HDEP) $(I)lev_comp.h $(I)sp_lev.h - $(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)lev_lex.c - -$(OO)lev_main.o: $(UTIL)lev_main.c $(HDEP) $(I)pm.h $(I)onames.h $(I)date.h - $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ \ - $(UTIL)lev_main.c - -$(OO)dgn_yacc.o: $(UTIL)dgn_yacc.c $(HDEP) $(I)dgn_file.h $(I)patchlevel.h - $(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(DEFSPEC)alloca=malloc \ - $(OBJSPEC)$@ $(UTIL)dgn_yacc.c - -$(OO)dgn_lex.o: $(UTIL)dgn_lex.c $(I)config.h $(I)dgn_comp.h $(I)dgn_file.h - $(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)dgn_lex.c - -$(OO)dgn_main.o: $(UTIL)dgn_main.c $(I)config.h $(I)date.h - $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ \ - $(UTIL)dgn_main.c - -$(OO)panic.o: $(UTIL)panic.c $(HDEP) - -$(OO)recover.o: $(UTIL)recover.c $(I)config.h $(I)date.h - $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ \ - $(UTIL)recover.c - -$(NETHACK)recover: $(OO)recover.o - $(LINK) $(LNSPEC) $(NETHACK)recover $(LIN) $(OO)recover.o $(LLIB) - -# [OPTION] -- If you have flex/bison, leave these uncommented. Otherwise, -# comment them out and be careful! (You're not guaranteed to have the most -# up to date *_comp.c, *_comp.h and *_lex.c) - -$(I)lev_comp.h: $(UTIL)lev_yacc.c $(I)patchlevel.h - -$(UTIL)lev_yacc.c: $(UTIL)lev_comp.y $(I)patchlevel.h - $(BISON) -d $(UTIL)lev_comp.y -# copy y.tab.c $(UTIL)lev_yacc.c -# copy y.tab.h $(I)lev_comp.h - copy $(UTIL)lev_comp.tab.c $(UTIL)lev_yacc.c - copy $(UTIL)lev_comp.tab.h $(I)lev_comp.h -# delete y.tab.c -# delete y.tab.h - delete $(UTIL)lev_comp.tab.c - delete $(UTIL)lev_comp.tab.h - -$(UTIL)lev_lex.c: $(UTIL)lev_comp.l $(I)patchlevel.h - $(FLEX) $(UTIL)lev_comp.l - copy lex.yy.c $(UTIL)lev_lex.c - delete lex.yy.c - -$(I)dgn_comp.h: $(UTIL)dgn_yacc.c $(I)patchlevel.h - -$(UTIL)dgn_yacc.c: $(UTIL)dgn_comp.y $(I)patchlevel.h - $(BISON) -d $(UTIL)dgn_comp.y -# copy y.tab.c $(UTIL)dgn_yacc.c -# copy y.tab.h $(I)dgn_comp.h - copy $(UTIL)dgn_comp.tab.c $(UTIL)dgn_yacc.c - copy $(UTIL)dgn_comp.tab.h $(I)dgn_comp.h -# delete y.tab.c -# delete y.tab.h - delete $(UTIL)dgn_comp.tab.c - delete $(UTIL)dgn_comp.tab.h - -$(UTIL)dgn_lex.c: $(UTIL)dgn_comp.l $(I)patchlevel.h - $(FLEX) $(UTIL)dgn_comp.l - copy lex.yy.c $(UTIL)dgn_lex.c - delete lex.yy.c - -# -# The following include files depend on makedefs to be created. -# As a result, they are not defined in HACKINCL, instead, their -# dependencies are explicitly outlined here. -# - -# -# date.h should be remade any time any of the source or include code -# is modified. Unfortunately, this would make the contents of this -# file far more complex. Since "hack.h" depends on most of the include -# files, we kludge around this by making date.h dependent on hack.h, -# even though it doesn't include this file. -# - -$(I)date.h $(DAT)options: $(HDEP) $(SBIN)makedefs $(AMIGAOBJ) $(I)patchlevel.h - $(SBIN)makedefs -v - $(EXECUTE) ifchange MOVE $(I)t.date.h $(I)date.h - -c:wait 2 - -$(I)onames.h: $(SBIN)makedefs - $(SBIN)makedefs -o - $(EXECUTE) ifchange TOUCH $(I)t.onames.h $(I)onames.h $(I)decl.h - $(EXECUTE) ifchange MOVE $(I)t.onames.h $(I)onames.h - -c:wait 2 - -$(I)pm.h: $(SBIN)makedefs - $(SBIN)makedefs -p - $(EXECUTE) ifchange TOUCH $(I)t.pm.h $(I)pm.h $(I)decl.h $(I)youprop.h - $(EXECUTE) ifchange MOVE $(I)t.pm.h $(I)pm.h - -c:wait 2 - -$(SLIB)quest.dat: $(DAT)quest.txt $(SBIN)makedefs - $(SBIN)makedefs -q - -$(NHS)monstr.c: $(HDEP) $(SBIN)makedefs - $(SBIN)makedefs -m - -c:wait 2 - -$(SLIB)oracles: $(DAT)oracles.txt $(SBIN)makedefs - $(SBIN)makedefs -h - -c:wait 2 - -# -# The following programs vary depending on what OS you are using. -# As a result, they are not defined in HACKSRC and their dependencies -# are explicitly outlined here. -# - -$(O)amidos.o: $(AMI)amidos.c $(HDEP) - -$(O)amirip.o: $(AMI)amirip.c $(HDEP) - -$(O)aglue.o: $(AMI)aglue.a - $(ASM) $(AFLAGS) $(AOBJSPEC)$(O)aglue.o $(AMI)aglue.a - -$(O)winchar.o: $(AMI)winchar.c $(NHS)tile.c $(HDEP) - -$(NHS)tile.c: $(WSHARE)tilemap.c - $(CCLINK) $(CFLAGS) $(PNSPEC) $(SBIN)tilemap $(WSHARE)tilemap.c - $(SBIN)tilemap - -$(O)winstr.o: $(AMI)winstr.c $(HDEP) $(AMDEP) - -$(O)winreq.o: $(AMI)winreq.c $(HDEP) $(AMDEP) $(AMI)colorwin.c $(AMI)clipwin.c - -$(O)winfuncs.o: $(AMI)winfuncs.c $(HDEP) $(AMDEP) $(I)patchlevel.h - -$(O)winkey.o: $(AMI)winkey.c $(HDEP) $(AMDEP) - -$(O)winamenu.o: $(AMI)winamenu.c $(HDEP) $(AMDEP) - -$(O)winami.o: $(AMI)winami.c $(HDEP) $(AMDEP) #$(AMI)char.c $(AMI)randwin.c - -#$(O)amilib.o: $(AMI)amilib.c $(HDEP) $(AMDEP) - -$(O)amiwind.o: $(AMI)amiwind.c $(AMI)amimenu.c $(HDEP) $(AMDEP) - -$(O)amiwbench.o: $(AMI)amiwbench.c $(HDEP) - -$(O)random.o: $(SHARE)random.c - -$(O)pcmain.o: $(SHARE)pcmain.c $(HDEP) $(I)dlb.h - -$(O)dispmap.o: $(AMI)dispmap.s - $(ASM) $(AFLAGS) $(AOBJSPEC)$@ $< - -# Stuff to build the front ends -$(NETHACK)HackWB: $(OO)wb.o $(OO)wbx.o $(OO)loader.o $(OO)multi.o - $(LINK) $(LNSPEC) $(NETHACK)HackWB $(LIN) $(OO)wb.o $(OO)wbx.o \ - $(OO)loader.o $(OO)multi.o $(LLIB) - -$(NETHACK)HackCli: $(OO)cli.o $(OO)loader.o $(OO)multi.o - $(LINK) $(LNSPEC) $(NETHACK)HackCli $(LIN) $(OO)cli.o $(OO)loader.o \ - $(OO)multi.o $(LLIB) - -# This needs to exist to eliminate the HackWB startup message -$(NETHACK)WBDefaults.def: - echo to $(NETHACK)WBDefaults.def - -WBH = $(AMI)wbdefs.h $(AMI)wbstruct.h $(AMI)wbprotos.h -ASP = $(AMI)splitter -$(OO)wb.o: $(WBH) $(AMI)wb.c $(AMI)wbwin.c $(AMI)wbdata.c $(AMI)wbgads.c \ - $(I)patchlevel.h - $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)wb.o $(AMI)wb.c - -$(OO)wbx.o: $(WBH) $(AMI)wbcli.c $(AMI)wbwin.c $(AMI)wbdata.c \ - $(I)patchlevel.h $(I)date.h - $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)wbx.o $(AMI)wbcli.c - -$(OO)loader.o: $(ASP)/loader.c $(ASP)/split.h $(ASP)/amiout.h $(ASP)/multi.h - $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)loader.o $(ASP)/loader.c - -$(OO)multi.o: $(ASP)/multi.c $(ASP)/multi.h - $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)multi.o $(ASP)/multi.c - -$(OO)cli.o: $(WBH) $(AMI)wbcli.c $(I)patchlevel.h $(I)date.h - $(CC) $(WBCFLAGS) $(WBC2FLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)cli.o \ - $(AMI)wbcli.c - -#### -# splitter support -$(SBIN)splitter: $(OO)splitter.o $(OO)arg.o - $(LINK) $(LNSPEC) $(SBIN)splitter $(LIN) $(OO)splitter.o $(OO)arg.o \ - $(LLIB) - -$(NETHACK)NetHack.dir: $(SBIN)splitter $(SBIN)NetHack - $(SBIN)splitter $(SBIN)NetHack - -$(OO)splitter.o: $(ASP)/splitter.c $(ASP)/split.h $(ASP)/amiout.h $(ASP)/arg.h - $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)splitter.o \ - $(ASP)/splitter.c - -$(OO)arg.o: $(ASP)/arg.c $(ASP)/arg.h - $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)arg.o $(ASP)/arg.c - -# Create/copy other stuff into NetHack: directory: - -$(NETHACK)tomb.iff: $(SBIN)xpm2iff $(AMI)grave16.xpm - $(SBIN)xpm2iff $(AMI)grave16.xpm $(NETHACK)tomb.iff - -$(OO)xpm2iff.o: $(AMI)xpm2iff.c - $(CC) $(CFLAGS) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(AMI)xpm2iff.c - -$(SBIN)xpm2iff: $(OO)xpm2iff.o - $(LINK) $(LNSPEC) $@ $(LIN) $(OO)xpm2iff.o $(FLLIB) - -# Tile installation for the tile version of the game -inst-tiles: $(TILEFILES) - -$(NETHACK)tiles: - -makedir $(NETHACK)tiles - -$(OO)txt2iff.o: $(AMI)txt2iff.c - $(CC) $(CFLAGS) $(CSYM) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ \ - $(AMI)txt2iff.c - -$(OO)ppmwrite.o: $(WSHARE)ppmwrite.c - $(CC) $(CFLAGS) $(CSYM) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(WSHARE)ppmwrite.c - -$(OO)tiletext.o: $(WSHARE)tiletext.c $(I)config.h $(WSHARE)tile.h - $(CC) $(CFLAGS) $(CSYM) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(WSHARE)tiletext.c - -$(OO)tiletxt.o: $(WSHARE)tilemap.c $(I)hack.h - $(CC) $(CFLAGS) $(CSYM) $(DEFSPEC)TILETEXT $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(WSHARE)tilemap.c - -NAMEOBJS = $(O)drawing.o $(O)decl.o $(O)monst.o $(O)objects.o - -$(SBIN)txt2ppm: $(OO)ppmwrite.o $(NAMEOBJS) $(O)alloc.o $(OO)panic.o $(OO)tiletext.o $(OO)tiletxt.o - $(LINK) $(LNSPEC) $@ $(LIN) $(OO)ppmwrite.o $(NAMEOBJS) $(OO)tiletext.o $(OO)tiletxt.o $(O)alloc.o $(OO)panic.o $(FLLIB) - -$(SBIN)txt2iff: $(OO)txt2iff.o $(NAMEOBJS) $(OO)tiletext.o $(OO)tiletxt.o - $(LINK) $(LNSPEC) $@ $(LIN) $(OO)txt2iff.o $(NAMEOBJS) $(OO)tiletext.o \ - $(OO)tiletxt.o $(FLLIB) - -$(NETHACK)tiles/objects.iff: $(WSHARE)objects.txt $(SBIN)txt2iff - $(SBIN)txt2iff $(WSHARE)objects.txt $(NETHACK)tiles/objects.iff - -$(NETHACK)tiles/monsters.iff: $(WSHARE)monsters.txt $(SBIN)txt2iff - $(SBIN)txt2iff $(WSHARE)monsters.txt $(NETHACK)tiles/monsters.iff - -$(NETHACK)tiles/other.iff: $(WSHARE)other.txt $(SBIN)txt2iff - $(SBIN)txt2iff $(WSHARE)other.txt $(NETHACK)tiles/other.iff - -inst-dungeon: $(INSTDUNGEONFILES) - -$(NETHACK)options : $(DAT)options - copy $(DAT)options $@ - -# Create compiled dungeon files -BGM= $(SLIB)bigrm-2.lev $(SLIB)bigrm-3.lev $(SLIB)bigrm-4.lev $(SLIB)bigrm-5.lev -$(BGM): $(SLIB)bigrm-1.lev - -$(SLIB)bigrm-1.lev: $(DAT)bigroom.des $(SBIN)lev_comp - -$(SLIB)castle.lev: $(DAT)castle.des $(SBIN)lev_comp - -ENDGAME1= $(SLIB)air.lev $(SLIB)earth.lev $(SLIB)fire.lev $(SLIB)water.lev -$(ENDGAME1): $(SLIB)astral.lev - -$(SLIB)astral.lev: $(DAT)endgame.des $(SBIN)lev_comp - -GEHENNOM1= $(SLIB)asmodeus.lev $(SLIB)baalz.lev $(SLIB)juiblex.lev \ - $(SLIB)orcus.lev $(SLIB)sanctum.lev -$(GEHENNOM1): $(SLIB)valley.lev - -$(SLIB)valley.lev: $(DAT)gehennom.des $(SBIN)lev_comp - -$(SLIB)knox.lev: $(DAT)knox.des $(SBIN)lev_comp - -MINES1= $(SLIB)minend-1.lev $(SLIB)minend-2.lev $(SLIB)minetn-1.lev $(SLIB)minetn-2.lev -$(MINES1): $(SLIB)minefill.lev - -$(SLIB)minefill.lev: $(DAT)mines.des $(SBIN)lev_comp - -$(SLIB)oracle.lev: $(DAT)oracle.des $(SBIN)lev_comp - -TOWER1= $(SLIB)tower1.lev $(SLIB)tower2.lev -$(TOWER1): $(SLIB)tower3.lev - -$(SLIB)tower3.lev: $(DAT)tower.des $(SBIN)lev_comp - -WIZARD1= $(SLIB)wizard1.lev $(SLIB)wizard2.lev $(SLIB)wizard3.lev \ - $(SLIB)fakewiz1.lev -$(WIZARD1): $(SLIB)fakewiz2.lev - -$(SLIB)fakewiz2.lev: $(DAT)yendor.des $(SBIN)lev_comp - -MEDUSA1= $(SLIB)medusa-1.lev -$(MEDUSA1): $(SLIB)medusa-2.lev - -$(SLIB)medusa-2.lev: $(DAT)medusa.des $(SBIN)lev_comp - -SOKOBAN1= $(SLIB)soko1-1.lev $(SLIB)soko1-2.lev $(SLIB)soko2-1.lev \ - $(SLIB)soko2-2.lev $(SLIB)soko3-1.lev $(SLIB)soko3-2.lev \ - $(SLIB)soko4-1.lev -$(SOKOBAN1): $(SLIB)soko4-2.lev - -$(SLIB)soko4-2.lev: $(DAT)sokoban.des $(SBIN)lev_comp - -$(ADFILES1): $(SLIB)Arc-goal.lev - -$(SLIB)Arc-goal.lev: $(DAT)Arch.des $(SBIN)lev_comp - -$(BDFILES1): $(SLIB)Bar-goal.lev - -$(SLIB)Bar-goal.lev: $(DAT)Barb.des $(SBIN)lev_comp - -$(CDFILES1): $(SLIB)Cav-goal.lev - -$(SLIB)Cav-goal.lev: $(DAT)Caveman.des $(SBIN)lev_comp - -$(HDFILES1): $(SLIB)Hea-goal.lev - -$(SLIB)Hea-goal.lev: $(DAT)Healer.des $(SBIN)lev_comp - -$(KDFILES1): $(SLIB)Kni-goal.lev - -$(SLIB)Kni-goal.lev: $(DAT)Knight.des $(SBIN)lev_comp - -$(MDFILES1): $(SLIB)Mon-goal.lev - -$(SLIB)Mon-goal.lev: $(DAT)Monk.des $(SBIN)lev_comp - -$(PDFILES1): $(SLIB)Pri-goal.lev - -$(SLIB)Pri-goal.lev: $(DAT)Priest.des $(SBIN)lev_comp - -$(RDFILES1): $(SLIB)Rog-goal.lev - -$(SLIB)Rog-goal.lev: $(DAT)Rogue.des $(SBIN)lev_comp - -$(RANFILES1): $(SLIB)Ran-goal.lev - -$(SLIB)Ran-goal.lev: $(DAT)Ranger.des $(SBIN)lev_comp - -$(SDFILES1): $(SLIB)Sam-goal.lev - -$(SLIB)Sam-goal.lev: $(DAT)Samurai.des $(SBIN)lev_comp - -$(TDFILES1): $(SLIB)Tou-goal.lev - -$(SLIB)Tou-goal.lev: $(DAT)Tourist.des $(SBIN)lev_comp - -$(VDFILES1): $(SLIB)Val-goal.lev - -$(SLIB)Val-goal.lev: $(DAT)Valkyrie.des $(SBIN)lev_comp - -$(WDFILES1): $(SLIB)Wiz-goal.lev - -$(SLIB)Wiz-goal.lev: $(DAT)Wizard.des $(SBIN)lev_comp - -$(SLIB)dungeon: $(DAT)dungeon.def $(SBIN)makedefs $(SBIN)dgn_comp - $(SBIN)makedefs -e - $(SBIN)dgn_comp $(DAT)dungeon.pdf - copy $(DAT)dungeon $(SLIB)dungeon - delete $(DAT)dungeon - -inst-data: $(INSTDATAFILES) - -$(NETHACK)amii.hlp: $(AMI)amii.hlp - copy $(AMI)amii.hlp $@ - -#$(NETHACK)data: $(DAT)data -# copy $(DAT)data $@ - -$(SLIB)data: $(DAT)data.base $(I)config.h $(SBIN)makedefs - $(SBIN)makedefs -d - -#$(NETHACK)rumors: $(DAT)rumors -# copy $(DAT)rumors $@ - -$(SLIB)rumors: $(DAT)rumors.tru $(DAT)rumors.fal $(SBIN)makedefs - $(SBIN)makedefs -r - -$(SLIB)cmdhelp: $(DAT)cmdhelp - copy $(DAT)cmdhelp $@ - -$(SLIB)help: $(DAT)help - copy $(DAT)help $@ - -$(SLIB)hh: $(DAT)hh - copy $(DAT)hh $@ - -$(NETHACK)HackWB.hlp: $(AMI)HackWB.hlp - copy $(AMI)HackWB.hlp $@ - -$(SLIB)history: $(DAT)history - copy $(DAT)history $@ - -$(NETHACK)license: $(DAT)license - copy $(DAT)license $@ - -$(SLIB)opthelp: $(DAT)opthelp - copy $(DAT)opthelp $@ - -$(NETHACK)Recover.txt: $(DOC)Recover.txt - copy $(DOC)Recover.txt $@ - -$(NETHACK)GuideBook.txt: $(DOC)GuideBook.txt - copy $(DOC)GuideBook.txt $@ - -$(NETHACK)NetHack.txt: $(DOC)NetHack.txt - copy $(DOC)NetHack.txt $@ - -$(NETHACK)Install.ami: $(AMI)Install.ami - copy $(AMI)Install.ami $@ - -$(NETHACK)logfile: - echo to $@ - -$(NETHACK)record: - echo to $@ - -$(SLIB)wizhelp: $(DAT)wizhelp - copy $(DAT)wizhelp $@ - -# Create the directories here because NetHack.cnf puts them there by default -$(NETHACK)NetHack.cnf: $(AMI)NetHack.cnf - copy $(AMI)NetHack.cnf $@ - -makedir $(NETHACK)save - -makedir $(NETHACK)levels - -# Unpack and install fonts - -INSTFONTFILES= $(NETHACK)hack.font $(NETHACK)hack $(NETHACK)hack/8 - -inst-fonts: $(INSTFONTFILES) - -$(NETHACK)hack/8: $(AMI)amifont8.uu $(NETHACK)hack - $(UUDEC) $(AMI)amifont8.uu - copy 8 $(NETHACK)hack/8 - delete 8 - -$(NETHACK)hack.font: $(AMI)amifont.uu - $(UUDEC) $(AMI)amifont.uu - copy hack.font $(NETHACK)hack.font - delete hack.font - -$(NETHACK)hack: - -makedir $@ - -INSTICONFILES= \ - $(NETHACK)default.icon $(NETHACK)NetHack.info $(NETHACK)NewGame.info \ - $(NETHACK)HackWB.info - -inst-icons: $(INSTICONFILES) - -# Unpack the icons into place - -$(NETHACK)default.icon: $(AMI)dflticon.uu - $(UUDEC) $(AMI)dflticon.uu -# copy default.icon $(NETHACK)default.icon -# delete default.icon - -$(NETHACK)NetHack.info: $(AMI)NHinfo.uu - $(UUDEC) $(AMI)NHinfo.uu -# copy NetHack.info $(NETHACK)NetHack.info -# delete NetHack.info - -$(NETHACK)NewGame.info: $(AMI)NewGame.uu - $(UUDEC) $(AMI)NewGame.uu -# copy NewGame.info $(NETHACK)NewGame.info -# delete NewGame.info - -$(NETHACK)HackWB.info: $(AMI)HackWB.uu - $(UUDEC) $(AMI)HackWB.uu -# copy HackWB.info $(NETHACK)HackWB.info -# delete HackWB.info - -# If DLB is defined, create the nhdat library file in the playground -# directory. If not, move all the data files there. -$(NETHACK)nhdat: $(LIBFILES) - list to T:nhdat.lst $(SLIB) QUICK NOHEAD FILES - echo >T:make-nhdat $(SBIN)dlb cCfI $(SLIB) $(NETHACK)nhdat T:nhdat.lst - echo >>T:make-nhdat if not exists $(NETHACK)nhdat - echo >>T:make-nhdat copy $(SLIB)\#? $(NETHACK) - echo >>T:make-nhdat endif - execute T:make-nhdat - -delete T:make-nhdat - -# DO NOT DELETE THIS LINE - -$(O)allmain.o: $(NHS)allmain.c $(HDEP) - -$(O)alloc.o: $(NHS)alloc.c $(I)config.h - -$(O)apply.o: $(NHS)apply.c $(HDEP) - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)apply.c - -$(O)artifact.o: $(NHS)artifact.c $(HDEP) $(I)artifact.h $(I)artilist.h - -$(O)attrib.o: $(NHS)attrib.c $(HDEP) $(I)artifact.h - -$(O)ball.o: $(NHS)ball.c $(HDEP) - -$(O)bones.o: $(NHS)bones.c $(HDEP) - -$(O)botl.o: $(NHS)botl.c $(HDEP) - -$(O)cmd.o: $(NHS)cmd.c $(HDEP) $(I)func_tab.h - -$(O)dbridge.o: $(NHS)dbridge.c $(HDEP) - -$(O)decl.o: $(NHS)decl.c $(HDEP) $(I)quest.h - -$(O)detect.o: $(NHS)detect.c $(HDEP) $(I)artifact.h - -$(O)dig.o: $(NHS)dig.c $(HDEP) - -$(O)display.o: $(NHS)display.c $(HDEP) - -$(O)dlb.o: $(NHS)dlb.c $(HDEP) $(I)dlb.h - -$(O)do.o: $(NHS)do.c $(HDEP) - -$(O)do_name.o: $(NHS)do_name.c $(HDEP) - -$(O)do_wear.o: $(NHS)do_wear.c $(HDEP) - -$(O)dog.o: $(NHS)dog.c $(HDEP) - -$(O)dogmove.o: $(NHS)dogmove.c $(HDEP) $(I)mfndpos.h - -$(O)dokick.o: $(NHS)dokick.c $(HDEP) - -$(O)dothrow.o: $(NHS)dothrow.c $(HDEP) - -$(O)drawing.o: $(NHS)drawing.c $(HDEP) $(I)tcap.h - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)drawing.c - -$(O)dungeon.o: $(NHS)dungeon.c $(HDEP) $(I)dgn_file.h $(I)dlb.h - -$(O)eat.o: $(NHS)eat.c $(HDEP) - -$(O)end.o: $(NHS)end.c $(HDEP) $(I)dlb.h - -$(O)engrave.o: $(NHS)engrave.c $(HDEP) - -$(O)exper.o: $(NHS)exper.c $(HDEP) - -$(O)explode.o: $(NHS)explode.c $(HDEP) - -$(O)extralev.o: $(NHS)extralev.c $(HDEP) - -$(O)files.o: $(NHS)files.c $(HDEP) $(I)dlb.h $(I)date.h - -$(O)fountain.o: $(NHS)fountain.c $(HDEP) - -$(O)hack.o: $(NHS)hack.c $(HDEP) - -$(O)hacklib.o: $(NHS)hacklib.c $(HDEP) - -$(O)invent.o: $(NHS)invent.c $(HDEP) $(I)artifact.h - -$(O)light.o: $(NHS)light.c $(HDEP) - -$(O)lock.o: $(NHS)lock.c $(HDEP) - -$(O)mail.o: $(NHS)mail.c $(HDEP) $(I)mail.h - -$(O)makemon.o: $(NHS)makemon.c $(HDEP) - -$(O)mapglyph.o: $(NHS)mapglyph.c $(HDEP) - -$(O)mcastu.o: $(NHS)mcastu.c $(HDEP) - -$(O)mhitm.o: $(NHS)mhitm.c $(HDEP) $(I)artifact.h - -$(O)mhitu.o: $(NHS)mhitu.c $(HDEP) $(I)artifact.h - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)mhitu.c - -$(O)minion.o: $(NHS)minion.c $(HDEP) - -$(O)mklev.o: $(NHS)mklev.c $(HDEP) - -$(O)mkmap.o: $(NHS)mkmap.c $(HDEP) $(I)sp_lev.h - -$(O)mkmaze.o: $(NHS)mkmaze.c $(HDEP) $(I)sp_lev.h - -$(O)mkobj.o: $(NHS)mkobj.c $(HDEP) $(I)artifact.h $(I)prop.h - -$(O)mkroom.o: $(NHS)mkroom.c $(HDEP) - -$(O)mon.o: $(NHS)mon.c $(HDEP) $(I)mfndpos.h - -$(O)mondata.o: $(NHS)mondata.c $(HDEP) - -$(O)monmove.o: $(NHS)monmove.c $(HDEP) $(I)mfndpos.h $(I)artifact.h - -$(O)monst.o: $(NHS)monst.c $(I)config.h $(I)permonst.h $(I)monsym.h \ - $(I)color.h - -$(O)monstr.o: $(NHS)monstr.c $(HDEP) - -$(O)mplayer.o: $(NHS)mplayer.c $(HDEP) - -$(O)mthrowu.o: $(NHS)mthrowu.c $(HDEP) - -$(O)muse.o: $(NHS)muse.c $(HDEP) - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)muse.c - -$(O)music.o: $(NHS)music.c $(HDEP) #interp.c - -$(O)o_init.o: $(NHS)o_init.c $(HDEP) - -$(O)objects.o: $(NHS)objects.c $(I)config.h $(I)obj.h $(I)objclass.h \ - $(I)prop.h $(I)skills.h $(I)color.h - $(CC) $(CFLAGS) $(INCLSPEC)$(NHS) $(OBJSPEC)$@ $(NHS)objects.c - -$(O)objnam.o: $(NHS)objnam.c $(HDEP) - -$(O)options.o: $(NHS)options.c $(HDEP) $(I)tcap.h $(I)config.h \ - $(I)objclass.h $(I)flag.h - -$(O)pager.o: $(NHS)pager.c $(HDEP) $(I)dlb.h - -$(O)pickup.o: $(NHS)pickup.c $(HDEP) - -$(O)pline.o: $(NHS)pline.c $(HDEP) - -$(O)polyself.o: $(NHS)polyself.c $(HDEP) - -$(O)potion.o: $(NHS)potion.c $(HDEP) - -$(O)pray.o: $(NHS)pray.c $(HDEP) - -$(O)priest.o: $(NHS)priest.c $(HDEP) $(I)mfndpos.h - -$(O)quest.o: $(NHS)quest.c $(HDEP) $(I)quest.h - -$(O)questpgr.o: $(NHS)questpgr.c $(HDEP) $(I)dlb.h - -$(O)read.o: $(NHS)read.c $(HDEP) - -$(O)rect.o: $(NHS)rect.c $(HDEP) - -$(O)region.o: $(NHS)region.c $(HDEP) - -$(O)restore.o: $(NHS)restore.c $(HDEP) $(I)tcap.h $(I)quest.h - -$(O)rnd.o: $(NHS)rnd.c $(HDEP) - -$(O)role.o: $(NHS)role.c $(HDEP) - -$(O)rumors.o: $(NHS)rumors.c $(HDEP) $(I)dlb.h - -$(O)save.o: $(NHS)save.c $(HDEP) $(I)quest.h - -$(O)shk.o: $(NHS)shk.c $(HDEP) - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)shk.c - -$(O)shknam.o: $(NHS)shknam.c $(HDEP) - -$(O)sit.o: $(NHS)sit.c $(HDEP) $(I)artifact.h - -$(O)sounds.o: $(NHS)sounds.c $(HDEP) - -$(O)sp_lev.o: $(NHS)sp_lev.c $(HDEP) $(I)sp_lev.h $(I)rect.h $(I)dlb.h - -$(O)spell.o: $(NHS)spell.c $(HDEP) - -$(O)steal.o: $(NHS)steal.c $(HDEP) - -$(O)steed.o: $(NHS)steed.c $(HDEP) - -$(O)sys.o: $(NHS)sys.c $(HDEP) - -$(O)teleport.o: $(NHS)teleport.c $(HDEP) - -$(O)timeout.o: $(NHS)timeout.c $(HDEP) - -$(O)topten.o: $(NHS)topten.c $(HDEP) $(I)dlb.h - -$(O)track.o: $(NHS)track.c $(HDEP) - -$(O)trap.o: $(NHS)trap.c $(HDEP) - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)trap.c - -$(O)u_init.o: $(NHS)u_init.c $(HDEP) - -$(O)uhitm.o: $(NHS)uhitm.c $(HDEP) - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)uhitm.c - -$(O)vault.o: $(NHS)vault.c $(HDEP) - -$(O)version.o: $(NHS)version.c $(HDEP) $(I)date.h $(I)patchlevel.h - -$(O)vision.o: $(NHS)vision.c $(HDEP) #$(I)vis_tab.h - -$(O)weapon.o: $(NHS)weapon.c $(HDEP) - -$(O)were.o: $(NHS)were.c $(HDEP) - -$(O)wield.o: $(NHS)wield.c $(HDEP) - -$(O)windows.o: $(NHS)windows.c $(HDEP) $(I)wintty.h - -$(O)wizard.o: $(NHS)wizard.c $(HDEP) - -$(O)worm.o: $(NHS)worm.c $(HDEP) - -$(O)worn.o: $(NHS)worn.c $(HDEP) - -$(O)write.o: $(NHS)write.c $(HDEP) - -$(O)zap.o: $(NHS)zap.c $(HDEP) - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)zap.c - -$(O)getline.o: $(TTY)getline.c $(HDEP) $(I)wintty.h - -$(O)termcap.o: $(TTY)termcap.c $(HDEP) $(I)wintty.h $(I)tcap.h - -$(O)topl.o: $(TTY)topl.c $(HDEP) $(I)wintty.h $(I)tcap.h - -$(O)wintty.o: $(TTY)wintty.c $(HDEP) $(I)wintty.h $(I)tcap.h \ - $(I)date.h $(I)patchlevel.h - -$(O)amitty.o: $(AMI)amitty.c $(HDEP) - -$(O)amistack.o: $(AMI)amistack.c - $(CC) $(CFLAGS3) $(CSYM) $(OBJSPEC)$@ $(AMI)amistack.c - -$(O)rip.o: $(NHS)rip.c $(HDEP) - - -$(I)config.h: $(I)config1.h $(I)tradstdc.h $(I)global.h - -setdate $(I)config.h - -c:wait 2 - -# onames.h handled at onames.h target, pm.h - -$(I)decl.h: $(I)quest.h $(I)spell.h $(I)color.h $(I)obj.h $(I)you.h - -setdate $(I)decl.h - -c:wait 2 - -$(I)global.h: $(I)coord.h $(I)pcconf.h $(I)amiconf.h - -setdate $(I)global.h - -c:wait 2 - -$(I)hack.h: $(I)config.h $(I)context.h $(I)trap.h $(I)decl.h $(I)dungeon.h - $(I)monsym.h $(I)mkroom.h $(I)objclass.h $(I)flag.h $(I)rm.h - $(I)vision.h $(I)display.h $(I)wintype.h $(I)engrave.h - $(I)rect.h $(I)region.h $(I)sys.h - -setdate $(I)hack.h - -c:wait 2 - -$(I)permonst.h: $(I)monattk.h $(I)monflag.h $(I)align.h - -setdate $(I)permonst.h - -c:wait 2 - -$(I)you.h: $(I)align.h $(I)attrib.h $(I)monst.h $(I)mextra.h $(I)youprop.h $(I)skills.h - -setdate $(I)you.h - -c:wait 2 - -# pm.h handled at target - -$(I)youprop.h: $(I)prop.h $(I)permonst.h $(I)mondata.h - -setdate $(I)youprop.h - -c:wait 2 - -$(I)display.h: $(I)vision.h $(I)mondata.h - -setdate $(I)display.h - -c:wait 2 - -$(I)dungeon.h: $(I)align.h - -setdate $(I)dungeon.h - -c:wait 2 - -$(I)engrave.h: $(I)rect.h - -setdate $(I)engrave.h - -c:wait 2 - -$(I)mextra.h: $(I)align.h - -setdate $(I)mextra.h - -c:wait 2 - -$(I)mondata.h: $(I)align.h - -setdate $(I)mondata.h - -c:wait 2 - -$(I)monst.h: $(I)align.h $(I)mextra.h - -setdate $(I)monst.h - -c:wait 2 - -$(I)pcconf.h: $(I)micro.h $(I)system.h - -setdate $(I)pcconf.h - -c:wait 2 - -$(I)rm.h: $(I)align.h - -setdate $(I)rm.h - -c:wait 2 - - -#notes -# install keeps doing re-install because it keeps rebuilding lev_comp??? -# fixed(?) - deleted setdate diff --git a/outdated/sys/amiga/Makefile.ami b/outdated/sys/amiga/Makefile.ami deleted file mode 100644 index d07a6633b..000000000 --- a/outdated/sys/amiga/Makefile.ami +++ /dev/null @@ -1,1578 +0,0 @@ -# NetHack Makefile. -# Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991,1992,1993,1996. -# NetHack may be freely redistributed. See license for details. - -### -### INTRODUCTION -### - -# This makefile is arranged for compiling for the Amiga with SAS/C 6.51 but -# can be configured for compiling with Manx C 5 or commercial DICE with -# simple changes. The appropriate changes are identified by #[compiler] -# where compiler is one of: SAS6, MANX, or DICE; the options in this -# makefile as should be set according to the compiler being used. (But see -# note 3 below.) - -# Note: When using the Manx compiler, an alternate make utility is -# required. The bundled Aztec make is just too damaged. - -# Note 2: The #SFD_xxx lines are used with mkdmake to generate a DMake- -# compatible makefile (DMakefile) from this file. Any line beginning with -# #SFD_INSTEAD replaces, in DMakefile, the following line from Makefile.ami. -# #SFD_BEGIN, #SFD_ELSE, and #SFD_END bracket multi-line sections for the two -# makefile formats. -# When changing this file, #SFD_INSTEAD lines will need to be inserted for -# the following cases: -# - Dependencies with different numbers of filenames (both > 1) on -# either side. The #SFD_INSTEAD line should immediately precede -# the line with the colon, and should contain a double colon "::" -# instead of a single colon. -# - Special command lists that override the default. A line containing -# "#SFD_INSTEAD #none" should precede such a rule. If the rule is -# more than one line long, precede it with "#SFD_BEGIN" and -# "#SFD_ELSE", and follow it with "#SFD_END". -# - Files not in the src, sys/amiga, sys/share, or win/tty directories -# that rely on the default ".c.o" rule. Following the dependency -# should be "#SFD_INSTEAD " with the filename inserted -# into the default rule where appropriate, then a line contianing -# "#none". -# In any SFD_BEGIN/ELSE/END block added, put a '##' before every line -# between the BEGIN and ELSE. Any line that's really a comment needs three -# '#'s, e.g. "### DICE comment". - -# Note 2A: Whenever an SFD line/block is added, the appropriate repeat count -# in mkdmake must be changed. (The repeat count "0" meaning "repeat -# until end of file" doesn't work as advertised.) - -# Note 3: mkdmake will automatically substitute DICE flags, etc. for SAS -# where appropriate. Since the makefile is already set up for SAS, -# the only people who end up having to make changes here are Manx -# users (or people who want to change the defaults). - -### -### DIRECTORY STRUCTURE -### - -NH = NH: -SBIN = $(NH)sbin/ -SLIB = $(NH)slib/ -NETHACK = $(NH)NetHack/ -HACKEXE = $(NH)HackExe/ -AMI = $(NH)sys/amiga/ -DAT = $(NH)dat/ -DOC = $(NH)doc/ -I = $(NH)include/ -SHARE = $(NH)sys/share/ -NHS = $(NH)src/ -TTY = $(NH)win/tty/ -WSHARE = $(NH)win/share/ -UTIL = $(NH)util/ -O = $(NH)obj/ -OO = $(NH)objo/ -# NB: O and OO MUST be different directories - -### -### INVOCATION -### - -#[SAS6] -#MAKE = smake -#[MANX] -#MAKE = make -#[DICE] -#MAKE = dmake - -# Startup makefile with: -# -#[SAS6] -#[MANX] -# $(MAKE) -f $(AMI)Makefile.ami -# $(MAKE) -f $(AMI)Makefile.ami install -# -#[DICE] -# $(MAKE) -f $(AMI)DMakefile -# $(MAKE) -f $(AMI)DMakefile install -# -# -# You may use following targets on $(MAKE) command lines: -# all do it all (default) -# link just create binary from object files -# obj just create common object files -# obja just create amiga object files -# objs just create shared object files -# clean deletes the object files -# spotless deletes the object files, main binary, and more -# -# Note: We do not build the Guidebook here since it needs tbl -# (See the file sys/unix/Makefile.doc for more information) - -#X# Precompiled header files: -#X# $(HDEP) should appear in any dependency list for an object file where -#X# we would want to make use of the precompiled version of $(I)hack.h, -#X# while $(CSYM) should appear in the C compiler command line that creates -#X# any such object file. (Changes made here should agree with the $(HDEP): -#X# target that appears later in this makefile.) -#X# - -#SFD_BEGIN -## -###[DICE] -### If we were compiling with DICE and wanted to use the symbol table -### pre-loading feature, we would uncomment these following two lines. -## -##HDEP = $(I)hack.sym -##CSYM = -H$(I)hack.sym=hack.h -## -#SFD_ELSE - -#[SAS5] -# If we were to use the precompiled header file feature in a newer version -# of SAS/C, we would comment out these following two lines. -# If we don't use precompiled header files, we uncomment it as well. - -HDEP = $(I)hack.h $(I)pm.h $(I)onames.h -CSYM = - -#[MANX] -# If we were compiling with Aztec, and wanted to use the symbol table -# pre-loading feature, we would uncomment these following two lines. - -#HDEP = Ram:hack.sym -#CSYM = +IRam:hack.sym - -#SFD_END - -#Pathname for uudecode program: -UUDEC = uudecode - -# Flex/Bison command assignments -- Useful only if you have flex/bison -FLEX = flex -BISON = bison -# FBFIL and FBLIB may be used, if required by your version of flex or bison, -# to specify additional files or libraries to be linked with -FBFIL = -FBLIB = #lib lib:compat.lib - -# If you're compiling this on a 1.3 system, you'll have to uncomment the -# following (for use with the ifchange script below). Also useful instead of -# "protect ifchange +s" -EXECUTE = execute - -# Headers we depend on -AMDEP = $(AMI)winproto.h $(AMI)winext.h $(AMI)windefs.h $(I)winami.h - -# Pathname for the C compiler being used. - -#SFD_BEGIN -## -###[DICE] -##CC = dcc -##ASM = das -## -#SFD_ELSE - -#[SAS6] -CC = sc -ASM = asm - -#[MANX] -#CC = cc - -#SFD_END - -# Compilation flags for selected C Compiler: -# $(CFLAGS) should appear before filename arguments of $(CC) command line. - -#SFD_BEGIN -## -###[DICE] -##CFLAGS = -c -I$(I) -mC -mD -ms -// -##CFLAGS2 = -##WBCFLAGS = -c -I$(I) -mC -mD -ms -// -##WBC2FLAGS = -DCLI -##SPLFLAGS = -DSPLIT -## -#SFD_ELSE - -#[SAS6] -# Note: make sure your CLI stack size is large (at least 50K) or lev_comp -# and makedefs may fail terribly - stack checking is disabled. -# -# **** WARNING **** GST support is not fool proof. You must make makedefs -# without a GST first so that the generated headers -# that are part of the GST can be made. -# -#GSTSRC=$(AMI)gst.c -# -#GSTHEAD=$(I)hack.h $(I)pm.h $(I)trap.h $(I)onames.h \ -# $(AMI)winami.p $(AMI)amidos.p $(AMI)amiwind.p -# -#GSTFILE=$(O)NetHack.gst -# undefine this to not compile with GSTs -#GST=gst=$(GSTFILE) -# -DEBUG=debug=symbol -CPU=cpu=68000 -#OPTFLAGS=opt opttime optpeep optgo optinl optsched optcomp=10 optdep=5 optrdep=5 #optalias +OPTTIME -OPTSIZE -CFLAGS = data=far nominc $(DEBUG) idir=$(I) $(CPU) nostkchk nover \ - codename=nhcode dataname=nhdata strmerge $(OPTFLAGS) $(TILES) $(SAVEDS) \ - afp $(ERRREXX) $(GST) -# for files that are too large for the standard flags: -CFLAGS2 = code=far strmerge $(SAVEDS) -WBCFLAGS = ignore=217,62 data=far ansi nminc code=far idir=$(I) $(CPU) afp \ - $(DEBUG) $(ERRREXX) define=AMIGA $(GST) -XXX = data=far ansi nminc idir=$(I) $(CPU) afp opt optinline optinlocal \ - optloop opttime -WBC2FLAGS = define=CLI -SPLFLAGS = define=SPLIT #dollarok -#for amistack.c -CFLAGS3 = data=near dataname=__MERGED nominc $(DEBUG) idir=$(I) $(CPU) nover nostkchk \ - codename=nhcode strmerge $(OPTFLAGS) $(TILES) $(SAVEDS) \ - afp $(ERRREXX) $(GST) - -#[MANX] -#CFLAGS = -i$(I) -mc -md -ms -pa -ps -bs -wo -qq -#WBCFLAGS = -mc -md -ms -pa -ps -bs -wo -qq -pp - -#SFD_END - -# Assembly flags: - -#SFD_BEGIN -## -###[DICE] -##AFLAGS = -##AOBJSPEC = -o -## -#SFD_ELSE - -#[SAS6] -AFLAGS = #what to put here? -AOBJSPEC = -o - -#SFD_END - -# Components of various link command lines: -# $(LINK) should be the pathname of the linker being used (with any options -# that should appear at the beginning of the command line). The name of the -# output file should appear immediately after $(LNSPEC). $(LIN) should -# appear before the list of object files in each link command. $(LLINK) -# should appear as the list of object files in the link command line that -# creates the NetHack executable. $(LLIB) should appear at the end of each -# link command line. - -# Note: amiga.lib added due to missing prototypes/pragmas. -# Should be deleted when this is resolved. - -#SFD_BEGIN -## -###[DICE] -### If you have flex/bison libraries, use the second definition of FLLIB -### instead of the first. -## -##LINK = dcc -mD -##LIN = -##LLINK = @$(AMI)ami.lnk -##LLIB = -##FLLIB = -###FLLIB = -l$(FBLIB) -##OBJSPEC = -o -##PNSPEC = -o -##LNSPEC = -o -##CCLINK = dcc -##CLFLAGS = -I$(I) -mC -mD -ms -// -##INCLSPEC = -I -##DEFSPEC = -D -##IGNSPEC = -j -## -#SFD_ELSE - -#[SAS6] - -LINK = slink noicons verbose maxhunk 262144 stripdebug -LIN = from lib:catch.o -LLINK = with $(AMI)ami.lnk -LLIB = lib lib:scnb.lib BATCH #lib lib:amiga.lib BATCH #scnb.lib or sc.lib -FLLIB = $(FBLIB) lib Lib:sc.lib BATCH -OBJSPEC = objname= -PNSPEC = noicons to #pname= -LNSPEC = to -CCLINK = sc link -INCLSPEC = idir= -DEFSPEC = define= -IGNSPEC = ignore= -COMPACT_HEADERS=$(GSTFILE) - -#[MANX] - -#LINK = ln -g +q +ss -o -#LIN = -#LLINK = -f $(AMI)ami.lnk -#LLIB = -lcl16 -#FLLIB = -lcl16 -#OBJSPEC = -o -#PNSPEC = -o -#LNSPEC = -o -#CCLINK = cc -#INCLSPEC = -i -#DEFSPEC = -d -#IGNSPEC = -j - -#SFD_END - -### -### FILE LISTS -### - -# A more reasonable random number generator (recommended for the Amiga): - -RANDOBJ = $(O)random.o - -#SFD_INSTEAD #none -.PRECIOUS: $(I)config.h $(I)decl.h $(I)hack.h $(I)permonst.h $(I)you.h - -# Almost nothing below this line should have to be changed. -# (Exceptions are marked by [SAS6], [MANX], etc.) -# -# Other things that have to be reconfigured are in config.h, -# (amiconf.h, pcconf.h), and possibly system.h, tradstdc.h. - -# Object files for makedefs: - -MAKEOBJS = \ - $(OO)makedefs.o $(O)monst.o $(O)objects.o - -# Object files for special levels compiler: - -SPLEVOBJS = \ - $(OO)lev_yacc.o $(OO)lev_lex.o $(OO)lev_main.o \ - $(O)decl.o $(O)drawing.o $(O)monst.o \ - $(O)objects.o $(OO)panic.o - -# Object files for dungeon compiler - -DGNCOMPOBJS = \ - $(OO)dgn_yacc.o $(OO)dgn_lex.o $(OO)dgn_main.o $(O)alloc.o $(OO)panic.o - -# Object files for NetHack: - -COMMOBJ = \ - $(O)allmain.o $(O)alloc.o $(O)apply.o $(O)artifact.o \ - $(O)attrib.o $(O)ball.o $(O)bones.o $(O)botl.o \ - $(O)cmd.o $(O)dbridge.o $(O)decl.o $(O)detect.o \ - $(O)dig.o $(O)display.o $(O)dlb.o $(O)do.o \ - $(O)do_name.o $(O)do_wear.o $(O)dog.o $(O)dogmove.o \ - $(O)dokick.o $(O)dothrow.o $(O)drawing.o $(O)dungeon.o \ - $(O)eat.o $(O)end.o $(O)engrave.o $(O)exper.o \ - $(O)explode.o $(O)extralev.o $(O)files.o $(O)fountain.o \ - $(O)hack.o $(O)hacklib.o $(O)invent.o $(O)light.o \ - $(O)lock.o $(O)mail.o $(O)makemon.o $(O)mapglyph.o \ - $(O)mcastu.o $(O)mhitm.o $(O)mhitu.o $(O)minion.o \ - $(O)mklev.o $(O)mkmap.o $(O)mkmaze.o $(O)mkobj.o \ - $(O)mkroom.o $(O)mon.o $(O)mondata.o $(O)monmove.o \ - $(O)monst.o $(O)mplayer.o $(O)mthrowu.o $(O)muse.o \ - $(O)music.o $(O)o_init.o $(O)objects.o $(O)objnam.o \ - $(O)options.o $(O)pager.o $(O)pickup.o $(O)pline.o \ - $(O)polyself.o $(O)potion.o $(O)pray.o $(O)priest.o \ - $(O)quest.o $(O)questpgr.o $(O)read.o $(O)rect.o \ - $(O)region.o $(O)restore.o $(O)rnd.o $(O)role.o \ - $(O)rumors.o $(O)save.o $(O)shk.o $(O)shknam.o \ - $(O)sit.o $(O)sounds.o $(O)sp_lev.o $(O)spell.o \ - $(O)steal.o $(O)steed.o $(O)sys.o $(O)teleport.o \ - $(O)timeout.o $(O)topten.o $(O)track.o $(O)trap.o \ - $(O)u_init.o $(O)uhitm.o $(O)vault.o $(O)version.o \ - (O)vision.o $(O)weapon.o $(O)were.o $(O)wield.o \ - $(O)windows.o $(O)wizard.o $(O)worm.o $(O)worn.o \ - $(O)write.o $(O)zap.o - -MAKEDEFOBJ = \ - $(O)monstr.o - -AMIGAOBJ = \ - $(O)amidos.o $(O)amirip.o $(O)amistack.o \ - $(O)amiwind.o $(O)winami.o $(O)winchar.o $(O)winfuncs.o \ - $(O)winkey.o $(O)winamenu.o $(O)winreq.o $(O)winstr.o - -# Objects from assembly sources (because DMake can't handle default rules) -AMIGAOBJ2 = \ -# $(O)dispmap.o - -SHAREOBJ = \ - $(O)pcmain.o $(RANDOBJ) - -TTYOBJ = \ - $(O)getline.o $(O)termcap.o $(O)topl.o $(O)wintty.o $(O)amitty.o \ - $(O)rip.o - -# Yuck yuck yuck. Have to tell DMake where these are, since they're not -# all in the same place. -TTYSRC = \ - $(TTY)getline.c $(TTY)termcap.c $(TTY)topl.c $(TTY)wintty.c \ - $(AMI)amitty.c $(NHS)rip.c - -# All the object files for NetHack: - -HOBJ = $(COMMOBJ) $(AMIGAOBJ) $(AMIGAOBJ2) $(SHAREOBJ) $(MAKEDEFOBJ) $(TTYOBJ) - -### -### DATA FILES -### - -# quest files -ADFILES1= $(SLIB)Arc-fila.lev $(SLIB)Arc-filb.lev $(SLIB)Arc-loca.lev \ - $(SLIB)Arc-strt.lev -ADFILES= $(SLIB)Arc-goal.lev $(ADFILES1) - -BDFILES1= $(SLIB)Bar-fila.lev $(SLIB)Bar-filb.lev $(SLIB)Bar-loca.lev \ - $(SLIB)Bar-strt.lev -BDFILES= $(SLIB)Bar-goal.lev $(BDFILES1) - -CDFILES1= $(SLIB)Cav-fila.lev $(SLIB)Cav-filb.lev $(SLIB)Cav-loca.lev \ - $(SLIB)Cav-strt.lev -CDFILES= $(SLIB)Cav-goal.lev $(CDFILES1) - -HDFILES1= $(SLIB)Hea-fila.lev $(SLIB)Hea-filb.lev $(SLIB)Hea-loca.lev \ - $(SLIB)Hea-strt.lev -HDFILES= $(SLIB)Hea-goal.lev $(HDFILES1) - -KDFILES1= $(SLIB)Kni-fila.lev $(SLIB)Kni-filb.lev $(SLIB)Kni-loca.lev \ - $(SLIB)Kni-strt.lev -KDFILES= $(SLIB)Kni-goal.lev $(KDFILES1) - -MDFILES1= $(SLIB)Mon-fila.lev $(SLIB)Mon-filb.lev $(SLIB)Mon-loca.lev \ - $(SLIB)Mon-strt.lev -MDFILES= $(SLIB)Mon-goal.lev $(MDFILES1) - -PDFILES1= $(SLIB)Pri-fila.lev $(SLIB)Pri-filb.lev $(SLIB)Pri-loca.lev \ - $(SLIB)Pri-strt.lev -PDFILES= $(SLIB)Pri-goal.lev $(PDFILES1) - -RDFILES1= $(SLIB)Rog-fila.lev $(SLIB)Rog-filb.lev $(SLIB)Rog-loca.lev \ - $(SLIB)Rog-strt.lev -RDFILES= $(SLIB)Rog-goal.lev $(RDFILES1) - -RANFILES1= $(SLIB)Ran-fila.lev $(SLIB)Ran-filb.lev $(SLIB)Ran-loca.lev \ - $(SLIB)Ran-strt.lev -RANFILES= $(SLIB)Ran-goal.lev $(RANFILES1) - -SDFILES1= $(SLIB)Sam-fila.lev $(SLIB)Sam-filb.lev $(SLIB)Sam-loca.lev \ - $(SLIB)Sam-strt.lev -SDFILES= $(SLIB)Sam-goal.lev $(SDFILES1) - -TDFILES1= $(SLIB)Tou-fila.lev $(SLIB)Tou-filb.lev $(SLIB)Tou-loca.lev \ - $(SLIB)Tou-strt.lev -TDFILES= $(SLIB)Tou-goal.lev $(TDFILES1) - -VDFILES1= $(SLIB)Val-fila.lev $(SLIB)Val-filb.lev $(SLIB)Val-loca.lev \ - $(SLIB)Val-strt.lev -VDFILES= $(SLIB)Val-goal.lev $(VDFILES1) - -WDFILES1= $(SLIB)Wiz-fila.lev $(SLIB)Wiz-filb.lev $(SLIB)Wiz-loca.lev \ - $(SLIB)Wiz-strt.lev -WDFILES= $(SLIB)Wiz-goal.lev $(WDFILES1) - -XDFILES= $(ADFILES) $(BDFILES) $(CDFILES) $(HDFILES) $(KDFILES) \ - $(MDFILES) $(PDFILES) $(RDFILES) $(RANFILES) $(SDFILES) $(TDFILES) \ - $(VDFILES) $(WDFILES) - -TILEFILES= \ - $(SBIN)txt2iff \ - $(NETHACK)tiles \ - $(NETHACK)tiles/objects.iff \ - $(NETHACK)tiles/monsters.iff \ - $(NETHACK)tiles/other.iff - -INSTDUNGEONFILES1= \ - $(SLIB)air.lev $(SLIB)asmodeus.lev $(SLIB)astral.lev \ - $(SLIB)baalz.lev $(SLIB)bigrm-1.lev $(SLIB)bigrm-2.lev \ - $(SLIB)bigrm-3.lev $(SLIB)bigrm-4.lev $(SLIB)bigrm-5.lev \ - $(SLIB)castle.lev $(SLIB)dungeon $(SLIB)earth.lev \ - $(SLIB)fakewiz1.lev $(SLIB)fakewiz2.lev $(SLIB)fire.lev \ - $(SLIB)juiblex.lev $(SLIB)knox.lev $(SLIB)medusa-1.lev \ - $(SLIB)medusa-2.lev $(SLIB)minend-1.lev $(SLIB)minend-2.lev \ - $(SLIB)minetn-1.lev $(SLIB)minetn-2.lev $(SLIB)minefill.lev \ - $(SLIB)options $(SLIB)oracle.lev $(SLIB)orcus.lev \ - $(SLIB)sanctum.lev $(SLIB)soko1-1.lev $(SLIB)soko1-2.lev \ - $(SLIB)soko2-1.lev $(SLIB)soko2-2.lev $(SLIB)soko3-1.lev \ - $(SLIB)soko3-2.lev $(SLIB)soko4-1.lev $(SLIB)soko4-2.lev \ - $(SLIB)tower1.lev $(SLIB)tower2.lev $(SLIB)tower3.lev \ - $(SLIB)valley.lev $(SLIB)water.lev $(SLIB)wizard1.lev \ - $(SLIB)wizard2.lev $(SLIB)wizard3.lev \ - $(XDFILES) - -INSTDUNGEONFILES= $(NETHACK)NetHack.cnf $(INSTDUNGEONFILES1) - - -INSTDATAFILES= \ - $(NETHACK)license $(NETHACK)logfile $(NETHACK)record \ - $(NETHACK)tomb.iff $(NETHACK)amii.hlp $(NETHACK)Recover.txt \ - $(NETHACK)GuideBook.txt $(NETHACK)NetHack.txt $(NETHACK)Install.ami - -LIBFILES= \ - $(INSTDUNGEONFILES1) \ - $(SLIB)cmdhelp $(SLIB)data $(SLIB)dungeon \ - $(SLIB)help $(SLIB)hh $(SLIB)history \ - $(SLIB)opthelp $(SLIB)oracles $(SLIB)rumors \ - $(SLIB)quest.dat $(SLIB)wizhelp - -### -### Getting down to business: -### - -#SFD_INSTEAD all: $(SBIN)lev_comp $(SBIN)dgn_comp $(SBIN)NetHack \ -all: $(COMPACT_HEADERS) $(SBIN)lev_comp $(SBIN)dgn_comp $(SBIN)NetHack \ - $(SBIN)dlb $(NETHACK)recover - -install: all inst-data inst-dungeon inst-fonts inst-tiles \ - $(NETHACK)nhdat $(NETHACK)NetHack - -$(SBIN)NetHack: $(HOBJ) $(AMI)ami.lnk - $(LINK) $(LNSPEC) $(SBIN)NetHack $(LIN) $(LLINK) $(LLIB) - -$(NETHACK)NetHack: $(SBIN)NetHack - copy $(SBIN)NetHack $(NETHACK)NetHack - -link: - $(LINK) $(LNSPEC) $(SBIN)NetHack $(LIN) $(LLINK) $(LLIB) - -$(AMI)ami.lnk: $(AMI)Makefile.ami - list to $(AMI)ami.lnk lformat="$(O)%s" $(O)\#?.o QUICK NOHEAD - -## dlb support -$(OO)dlb_main.o: $(UTIL)dlb_main.c $(HDEP) $(I)dlb.h $(I)date.h - $(CC) $(CFLAGS) $(OBJSPEC)$(OO)dlb_main.o $(UTIL)dlb_main.c - -$(SBIN)dlb: $(OO)dlb_main.o $(O)dlb.o $(O)alloc.o $(OO)panic.o - $(LINK) $(PNSPEC) $(SBIN)dlb $(LIN) $(OO)dlb_main.o $(O)dlb.o \ - $(O)alloc.o $(OO)panic.o $(LLIB) - -obj: $(HOBJ) - -obja: $(AMIGAOBJ) - -objs: $(SHAREOBJ) - - -#SFD_BEGIN -#SFD_ELSE -SUFFIXES = .lev .des -.des.lev: - $(SBIN)lev_comp $< -#SFD_END - - -# The default method for creating object files: - -#SFD_BEGIN -## -###[DICE] -## -##$(COMMOBJ): $(COMMOBJ:"$(O)*.o":"$(NHS)%1.c") -## $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)%(left) %(right) -## -##$(AMIGAOBJ): $(AMIGAOBJ:"$(O)*.o":"$(AMI)%1.c") -## $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)%(left) %(right) -## -##$(SHAREOBJ): $(SHAREOBJ:"$(O)*.o":"$(SHARE)%1.c") -## $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)%(left) %(right) -## -##$(TTYOBJ): $(TTYSRC) -## $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)%(left) %(right) -## -#SFD_ELSE - -#[SAS6] - -.c.o: - $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)$@ $< - -#SFD_END - - -clean: - -delete $(O)\#?.o $(OO)\#?.o - -spotless: clean - -delete $(SBIN)NetHack $(SBIN)lev_comp $(SBIN)makedefs $(SBIN)dgn_comp - -delete $(SBIN)dlb $(SBIN)txt2iff $(SBIN)splitter - -delete $(SBIN)tilemap - -delete $(SLIB)data $(SLIB)rumors - -delete $(SLIB)\#?.lev - -delete $(SLIB)dungeon - -delete $(SLIB)cmdhelp $(SLIB)help $(SLIB)hh $(SLIB)history - -delete $(SLIB)opthelp $(SLIB)options $(SLIB)oracles - -delete $(SLIB)quest.dat $(SLIB)wizhelp -# -delete $(SLIB)earth.lev $(SLIB)air.lev $(SLIB)fire.lev -# -delete $(SLIB)water.lev $(SLIB)astral.lev -# -delete $(SLIB)tower1.lev $(SLIB)tower2.lev $(SLIB)tower3.lev -# -delete $(SLIB)fakewiz1.lev $(SLIB)fakewiz2.lev -# -delete $(SLIB)medusa-1.lev $(SLIB)medusa-2.lev -# -delete $(SLIB)oracle.lev $(SLIB)wizard1.lev $(SLIB)wizard2.lev -# -delete $(SLIB)wizard3.lev $(DAT)dungeon.pdf $(SLIB)valley.lev -# -delete $(SLIB)minefill.lev -# -delete $(SLIB)minetn-1 $(SLIB)minetn-2 $(SLIB)minend-1 $(SLIB)minend-2 -# -delete $(SLIB)soko1-1.lev $(SLIB)soko1-2.lev $(SLIB)soko2-1.lev -# -delete $(SLIB)soko2-2.lev $(SLIB)soko3-1.lev $(SLIB)soko3-2.lev -# -delete $(SLIB)soko4-1.lev $(SLIB)soko4-2.lev -# -delete $(ADFILES) -# -delete $(BDFILES) -# -delete $(CDFILES) -# -delete $(HDFILES) -# -delete $(KDFILES) -# -delete $(MDFILES) -# -delete $(PDFILES) -# -delete $(RDFILES) -# -delete $(RANFILES) -# -delete $(SDFILES) -# -delete $(TDFILES) -# -delete $(VDFILES) -# -delete $(WDFILES) - -delete $(I)onames.h $(I)pm.h $(I)date.h - -delete $(NHS)tile.c $(NHS)monstr.c - -delete $(I)tile.h -# -echo to $(I)onames.h "" noline -# -wait 2 -# -echo to $(I)pm.h "" noline -# -wait 2 -# -setdate $(UTIL)makedefs.c -# -wait 2 - -# Creating precompiled version of $(I)hack.h to save disk I/O. - -#SFD_BEGIN -## -###[DICE] -### If we were compiling with DICE and wanted to use the symbol table -### pre-loading feature, we would technically not need a rule to make the -### precompiled header file, because DCC handles this automatically; -### however, we must delete the precompiled header file if any of the -### includes change, and we need to create it manually because the -### sys/amiga sources, compiled first, define things differently than the -### main sources want them. -## -##$(HDEP): $(I)hack.h $(I)pm.h $(I)onames.h -## -delete $(I)hack.sym -## echo to Ram:hackincl.c "#include " -## $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)Ram:hackincl.o Ram:hackincl.c -## -delete Ram:hackincl.c Ram:hackincl.o -## -#SFD_ELSE - -#X#[SAS5] -#X# If we were to use the precompiled header file feature of SAS/C, we -#X# would uncomment the following lines. (Also see defines for HDEP and -#X# CSYM near the beginning of this file, as these should be appropriately -#X# defined.) - -#X#$(HDEP): $(I)hack.h $(SBIN)makedefs -#X# echo to Ram:hackincl.c "#include <$(I)hack.h>" -#X# $(CC) $(CFLAGS) -ph $(OBJSPEC)$@ Ram:hackincl.c -#X# -delete Ram:hackincl.c - -#[MANX] -# If we were compiling with Aztec, and wanted to use the symbol table -# pre-loading feature, we would uncomment these following two lines. - -#$(HDEP): $(I)hack.h $(SBIN)makedefs -# $(CC) $(CFLAGS) -a $(OBJSPEC)Ram:hack.asm +h$@ $(I)hack.h -# -delete Ram:hack.asm - -#SFD_END - -# -# Please note: The dependency lines for the modules here are -# deliberately incorrect. Including "hack.h" in -# the dependency list would cause a dependency -# loop. -# - -$(SBIN)makedefs: $(MAKEOBJS) - $(LINK) $(LNSPEC) $(SBIN)makedefs $(LIN) $(MAKEOBJS) $(LLIB) - -$(OO)makedefs.o: $(UTIL)makedefs.c $(I)config.h $(I)permonst.h $(I)monsym.h \ - $(I)objclass.h $(I)patchlevel.h $(I)artilist.h - $(CC) $(DEFSPEC)MAKEDEFS_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)makedefs.c - -$(SBIN)lev_comp: $(SPLEVOBJS) - $(LINK) $(LNSPEC) $(SBIN)lev_comp $(LIN) $(SPLEVOBJS) $(FBFIL) $(FLLIB) - -$(SBIN)dgn_comp: $(DGNCOMPOBJS) - $(LINK) $(LNSPEC) $(SBIN)dgn_comp $(LIN) $(DGNCOMPOBJS) $(FBFIL) $(FLLIB) - -$(OO)lev_yacc.o: $(UTIL)lev_yacc.c $(HDEP) $(I)sp_lev.h $(I)pm.h $(I)onames.h -# setdate $(UTIL)lev_yacc.c - $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)PREFIX="NH:slib/" $(CFLAGS) \ - $(DEFSPEC)alloca=malloc $(OBJSPEC)$@ $(UTIL)lev_yacc.c - -$(OO)lev_lex.o: $(UTIL)lev_lex.c $(HDEP) $(I)lev_comp.h $(I)sp_lev.h - $(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)lev_lex.c - -$(OO)lev_main.o: $(UTIL)lev_main.c $(HDEP) $(I)pm.h $(I)onames.h $(I)date.h - $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ \ - $(UTIL)lev_main.c - -$(OO)dgn_yacc.o: $(UTIL)dgn_yacc.c $(HDEP) $(I)dgn_file.h $(I)patchlevel.h - $(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(DEFSPEC)alloca=malloc \ - $(OBJSPEC)$@ $(UTIL)dgn_yacc.c - -$(OO)dgn_lex.o: $(UTIL)dgn_lex.c $(I)config.h $(I)dgn_comp.h $(I)dgn_file.h - $(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(OBJSPEC)$@ $(UTIL)dgn_lex.c - -$(OO)dgn_main.o: $(UTIL)dgn_main.c $(I)config.h $(I)date.h - $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ \ - $(UTIL)dgn_main.c - -$(OO)panic.o: $(UTIL)panic.c $(HDEP) -#SFD_INSTEAD $(CC) $(CFLAGS) $(OBJSPEC)%(left) $(UTIL)panic.c -#none - -$(OO)recover.o: $(UTIL)recover.c $(I)config.h $(I)date.h - $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ \ - $(UTIL)recover.c - -$(NETHACK)recover: $(OO)recover.o - $(LINK) $(LNSPEC) $(NETHACK)recover $(LIN) $(OO)recover.o $(LLIB) - -# [OPTION] -- If you have flex/bison, leave these uncommented. Otherwise, -# comment them out and be careful! (You're not guaranteed to have the most -# up to date *_comp.c, *_comp.h and *_lex.c) - -$(I)lev_comp.h: $(UTIL)lev_yacc.c $(I)patchlevel.h - -$(UTIL)lev_yacc.c: $(UTIL)lev_comp.y $(I)patchlevel.h - $(BISON) -d $(UTIL)lev_comp.y -# copy y.tab.c $(UTIL)lev_yacc.c -# copy y.tab.h $(I)lev_comp.h - copy $(UTIL)lev_comp.tab.c $(UTIL)lev_yacc.c - copy $(UTIL)lev_comp.tab.h $(I)lev_comp.h -# delete y.tab.c -# delete y.tab.h - delete $(UTIL)lev_comp.tab.c - delete $(UTIL)lev_comp.tab.h - -$(UTIL)lev_lex.c: $(UTIL)lev_comp.l $(I)patchlevel.h - $(FLEX) $(UTIL)lev_comp.l - copy lex.yy.c $(UTIL)lev_lex.c - delete lex.yy.c - -$(I)dgn_comp.h: $(UTIL)dgn_yacc.c $(I)patchlevel.h - -$(UTIL)dgn_yacc.c: $(UTIL)dgn_comp.y $(I)patchlevel.h - $(BISON) -d $(UTIL)dgn_comp.y -# copy y.tab.c $(UTIL)dgn_yacc.c -# copy y.tab.h $(I)dgn_comp.h - copy $(UTIL)dgn_comp.tab.c $(UTIL)dgn_yacc.c - copy $(UTIL)dgn_comp.tab.h $(I)dgn_comp.h -# delete y.tab.c -# delete y.tab.h - delete $(UTIL)dgn_comp.tab.c - delete $(UTIL)dgn_comp.tab.h - -$(UTIL)dgn_lex.c: $(UTIL)dgn_comp.l $(I)patchlevel.h - $(FLEX) $(UTIL)dgn_comp.l - copy lex.yy.c $(UTIL)dgn_lex.c - delete lex.yy.c - -# -# The following include files depend on makedefs to be created. -# As a result, they are not defined in HACKINCL, instead, their -# dependencies are explicitly outlined here. -# - -# -# date.h should be remade any time any of the source or include code -# is modified. Unfortunately, this would make the contents of this -# file far more complex. Since "hack.h" depends on most of the include -# files, we kludge around this by making date.h dependent on hack.h, -# even though it doesn't include this file. -# - -#SFD_INSTEAD $(I)date.h $(DAT)options:: $(HDEP) $(SBIN)makedefs $(AMIGAOBJ) -$(I)date.h $(DAT)options: $(HDEP) $(SBIN)makedefs $(AMIGAOBJ) $(I)patchlevel.h - $(SBIN)makedefs -v - $(EXECUTE) $(AMI)ifchange MOVE $(I)t.date.h $(I)date.h - -wait 2 - -$(I)onames.h: $(SBIN)makedefs - $(SBIN)makedefs -o - $(EXECUTE) $(AMI)ifchange TOUCH $(I)t.onames.h $(I)onames.h $(I)decl.h - $(EXECUTE) $(AMI)ifchange MOVE $(I)t.onames.h $(I)onames.h - -wait 2 - -$(I)pm.h: $(SBIN)makedefs - $(SBIN)makedefs -p - $(EXECUTE) $(AMI)ifchange TOUCH $(I)t.pm.h $(I)pm.h $(I)decl.h $(I)youprop.h - $(EXECUTE) $(AMI)ifchange MOVE $(I)t.pm.h $(I)pm.h - -wait 2 - -$(SLIB)quest.dat: $(DAT)quest.txt $(SBIN)makedefs - $(SBIN)makedefs -q - -$(NHS)monstr.c: $(HDEP) $(SBIN)makedefs - $(SBIN)makedefs -m - -wait 2 - -$(SLIB)oracles: $(DAT)oracles.txt $(SBIN)makedefs - $(SBIN)makedefs -h - -wait 2 - -# -# The following programs vary depending on what OS you are using. -# As a result, they are not defined in HACKSRC and their dependencies -# are explicitly outlined here. -# - -$(O)amidos.o: $(AMI)amidos.c $(HDEP) - -$(O)amirip.o: $(AMI)amirip.c $(HDEP) - -$(O)aglue.o: $(AMI)aglue.a - $(ASM) $(AFLAGS) $(AOBJSPEC)$(O)aglue.o $(AMI)aglue.a - -$(O)winchar.o: $(AMI)winchar.c $(NHS)tile.c $(HDEP) - -$(NHS)tile.c: $(WSHARE)tilemap.c -#SFD_INSTEAD $(CCLINK) $(CLFLAGS) $(PNSPEC) $(SBIN)tilemap $(WSHARE)tilemap.c - $(CCLINK) $(CFLAGS) $(PNSPEC) $(SBIN)tilemap $(WSHARE)tilemap.c - $(SBIN)tilemap - -$(O)winstr.o: $(AMI)winstr.c $(HDEP) $(AMDEP) - -$(O)winreq.o: $(AMI)winreq.c $(HDEP) $(AMDEP) $(AMI)colorwin.c $(AMI)clipwin.c - -$(O)winfuncs.o: $(AMI)winfuncs.c $(HDEP) $(AMDEP) $(I)patchlevel.h - -$(O)winkey.o: $(AMI)winkey.c $(HDEP) $(AMDEP) - -$(O)winamenu.o: $(AMI)winamenu.c $(HDEP) $(AMDEP) - -$(O)winami.o: $(AMI)winami.c $(HDEP) $(AMDEP) #$(AMI)char.c $(AMI)randwin.c - -#$(O)amilib.o: $(AMI)amilib.c $(HDEP) $(AMDEP) - -$(O)amiwind.o: $(AMI)amiwind.c $(AMI)amimenu.c $(HDEP) $(AMDEP) - -$(O)amiwbench.o: $(AMI)amiwbench.c $(HDEP) - -$(O)random.o: $(SHARE)random.c - -$(O)pcmain.o: $(SHARE)pcmain.c $(HDEP) $(I)dlb.h - -$(O)dispmap.o: $(AMI)dispmap.s - $(ASM) $(AFLAGS) $(AOBJSPEC)$@ $< - -# Stuff to build the front ends -$(NETHACK)HackWB: $(OO)wb.o $(OO)wbx.o $(OO)loader.o $(OO)multi.o - $(LINK) $(LNSPEC) $(NETHACK)HackWB $(LIN) $(OO)wb.o $(OO)wbx.o \ - $(OO)loader.o $(OO)multi.o $(LLIB) - -$(NETHACK)HackCli: $(OO)cli.o $(OO)loader.o $(OO)multi.o - $(LINK) $(LNSPEC) $(NETHACK)HackCli $(LIN) $(OO)cli.o $(OO)loader.o \ - $(OO)multi.o $(LLIB) - -# This needs to exist to eliminate the HackWB startup message -#SFD_INSTEAD $(NETHACK)WBDefaults.def: $(NETHACK)WBDefaults.def -$(NETHACK)WBDefaults.def: - echo to $(NETHACK)WBDefaults.def - -WBH = $(AMI)wbdefs.h $(AMI)wbstruct.h $(AMI)wbprotos.h -ASP = $(AMI)splitter -$(OO)wb.o: $(WBH) $(AMI)wb.c $(AMI)wbwin.c $(AMI)wbdata.c $(AMI)wbgads.c \ - $(I)patchlevel.h - $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)wb.o $(AMI)wb.c - -$(OO)wbx.o: $(WBH) $(AMI)wbcli.c $(AMI)wbwin.c $(AMI)wbdata.c \ - $(I)patchlevel.h $(I)date.h - $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)wbx.o $(AMI)wbcli.c - -$(OO)loader.o: $(ASP)/loader.c $(ASP)/split.h $(ASP)/amiout.h $(ASP)/multi.h - $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)loader.o $(ASP)/loader.c - -$(OO)multi.o: $(ASP)/multi.c $(ASP)/multi.h - $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)multi.o $(ASP)/multi.c - -$(OO)cli.o: $(WBH) $(AMI)wbcli.c $(I)patchlevel.h $(I)date.h - $(CC) $(WBCFLAGS) $(WBC2FLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)cli.o \ - $(AMI)wbcli.c - -#### -# splitter support -$(SBIN)splitter: $(OO)splitter.o $(OO)arg.o - $(LINK) $(LNSPEC) $(SBIN)splitter $(LIN) $(OO)splitter.o $(OO)arg.o \ - $(LLIB) - -$(NETHACK)NetHack.dir: $(SBIN)splitter $(SBIN)NetHack - $(SBIN)splitter $(SBIN)NetHack - -$(OO)splitter.o: $(ASP)/splitter.c $(ASP)/split.h $(ASP)/amiout.h $(ASP)/arg.h - $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)splitter.o \ - $(ASP)/splitter.c - -$(OO)arg.o: $(ASP)/arg.c $(ASP)/arg.h - $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)$(OO)arg.o $(ASP)/arg.c - -# Create/copy other stuff into NetHack: directory: - -$(NETHACK)tomb.iff: $(SBIN)xpm2iff $(AMI)grave16.xpm - $(SBIN)xpm2iff $(AMI)grave16.xpm $(NETHACK)tomb.iff - -$(OO)xpm2iff.o: $(AMI)xpm2iff.c - $(CC) $(CFLAGS) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(AMI)xpm2iff.c - -$(SBIN)xpm2iff: $(OO)xpm2iff.o - $(LINK) $(LNSPEC) $@ $(LIN) $(OO)xpm2iff.o $(FLLIB) - -# Tile installation for the tile version of the game -inst-tiles: $(TILEFILES) - -#SFD_INSTEAD $(NETHACK)tiles: $(NETHACK)tiles -$(NETHACK)tiles: - -makedir $(NETHACK)tiles - -$(OO)txt2iff.o: $(AMI)txt2iff.c - $(CC) $(CFLAGS) $(CSYM) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ \ - $(AMI)txt2iff.c - -$(OO)ppmwrite.o: $(WSHARE)ppmwrite.c - $(CC) $(CFLAGS) $(CSYM) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(WSHARE)ppmwrite.c - -$(OO)tiletext.o: $(WSHARE)tiletext.c $(I)config.h $(WSHARE)tile.h - $(CC) $(CFLAGS) $(CSYM) $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(WSHARE)tiletext.c - -$(OO)tiletxt.o: $(WSHARE)tilemap.c $(I)hack.h - $(CC) $(CFLAGS) $(CSYM) $(DEFSPEC)TILETEXT $(INCLSPEC)$(WSHARE) $(OBJSPEC)$@ $(WSHARE)tilemap.c - -NAMEOBJS = $(O)drawing.o $(O)decl.o $(O)monst.o $(O)objects.o - -$(SBIN)txt2ppm: $(OO)ppmwrite.o $(NAMEOBJS) $(O)alloc.o $(OO)panic.o $(OO)tiletext.o $(OO)tiletxt.o - $(LINK) $(LNSPEC) $@ $(LIN) $(OO)ppmwrite.o $(NAMEOBJS) $(OO)tiletext.o $(OO)tiletxt.o $(O)alloc.o $(OO)panic.o $(FLLIB) - -$(SBIN)txt2iff: $(OO)txt2iff.o $(NAMEOBJS) $(OO)tiletext.o $(OO)tiletxt.o - $(LINK) $(LNSPEC) $@ $(LIN) $(OO)txt2iff.o $(NAMEOBJS) $(OO)tiletext.o \ - $(OO)tiletxt.o $(FLLIB) - -$(NETHACK)tiles/objects.iff: $(WSHARE)objects.txt $(SBIN)txt2iff - $(SBIN)txt2iff $(WSHARE)objects.txt $(NETHACK)tiles/objects.iff - -$(NETHACK)tiles/monsters.iff: $(WSHARE)monsters.txt $(SBIN)txt2iff - $(SBIN)txt2iff $(WSHARE)monsters.txt $(NETHACK)tiles/monsters.iff - -$(NETHACK)tiles/other.iff: $(WSHARE)other.txt $(SBIN)txt2iff - $(SBIN)txt2iff $(WSHARE)other.txt $(NETHACK)tiles/other.iff - -inst-dungeon: $(INSTDUNGEONFILES) - -$(NETHACK)options : $(DAT)options - copy $(DAT)options $@ - -# Create compiled dungeon files -BGM= $(SLIB)bigrm-2.lev $(SLIB)bigrm-3.lev $(SLIB)bigrm-4.lev $(SLIB)bigrm-5.lev -$(BGM): $(SLIB)bigrm-1.lev - -$(SLIB)bigrm-1.lev: $(DAT)bigroom.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)bigroom.des -#none - -$(SLIB)castle.lev: $(DAT)castle.des $(SBIN)lev_comp - -ENDGAME1= $(SLIB)air.lev $(SLIB)earth.lev $(SLIB)fire.lev $(SLIB)water.lev -$(ENDGAME1): $(SLIB)astral.lev - -$(SLIB)astral.lev: $(DAT)endgame.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)endgame.des -#none - -GEHENNOM1= $(SLIB)asmodeus.lev $(SLIB)baalz.lev $(SLIB)juiblex.lev \ - $(SLIB)orcus.lev $(SLIB)sanctum.lev -$(GEHENNOM1): $(SLIB)valley.lev - -$(SLIB)valley.lev: $(DAT)gehennom.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)gehennom.des -#none - -$(SLIB)knox.lev: $(DAT)knox.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)knox.des -#none - -MINES1= $(SLIB)minend-1.lev $(SLIB)minend-2.lev $(SLIB)minetn-1.lev $(SLIB)minetn-2.lev -$(MINES1): $(SLIB)minefill.lev - -$(SLIB)minefill.lev: $(DAT)mines.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)mines.des -#none - -$(SLIB)oracle.lev: $(DAT)oracle.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)oracle.des -#none - -TOWER1= $(SLIB)tower1.lev $(SLIB)tower2.lev -$(TOWER1): $(SLIB)tower3.lev - -$(SLIB)tower3.lev: $(DAT)tower.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)tower.des -#none - -WIZARD1= $(SLIB)wizard1.lev $(SLIB)wizard2.lev $(SLIB)wizard3.lev \ - $(SLIB)fakewiz1.lev -$(WIZARD1): $(SLIB)fakewiz2.lev - -$(SLIB)fakewiz2.lev: $(DAT)yendor.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)yendor.des -#none - -MEDUSA1= $(SLIB)medusa-1.lev -$(MEDUSA1): $(SLIB)medusa-2.lev - -$(SLIB)medusa-2.lev: $(DAT)medusa.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)medusa.des -#none - -SOKOBAN1= $(SLIB)soko1-1.lev $(SLIB)soko1-2.lev $(SLIB)soko2-1.lev \ - $(SLIB)soko2-2.lev $(SLIB)soko3-1.lev $(SLIB)soko3-2.lev \ - $(SLIB)soko4-1.lev -$(SOKOBAN1): $(SLIB)soko4-2.lev - -$(SLIB)soko4-2.lev: $(DAT)sokoban.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)sokoban.des -#none - -$(ADFILES1): $(SLIB)Arc-goal.lev - -$(SLIB)Arc-goal.lev: $(DAT)Arch.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Arch.des -#none - -$(BDFILES1): $(SLIB)Bar-goal.lev - -$(SLIB)Bar-goal.lev: $(DAT)Barb.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Barb.des -#none - -$(CDFILES1): $(SLIB)Cav-goal.lev - -$(SLIB)Cav-goal.lev: $(DAT)Caveman.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Caveman.des -#none - -$(HDFILES1): $(SLIB)Hea-goal.lev - -$(SLIB)Hea-goal.lev: $(DAT)Healer.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Healer.des -#none - -$(KDFILES1): $(SLIB)Kni-goal.lev - -$(SLIB)Kni-goal.lev: $(DAT)Knight.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Knight.des -#none - -$(MDFILES1): $(SLIB)Mon-goal.lev - -$(SLIB)Mon-goal.lev: $(DAT)Monk.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Monk.des -#none - -$(PDFILES1): $(SLIB)Pri-goal.lev - -$(SLIB)Pri-goal.lev: $(DAT)Priest.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Priest.des -#none - -$(RDFILES1): $(SLIB)Rog-goal.lev - -$(SLIB)Rog-goal.lev: $(DAT)Rogue.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Rogue.des -#none - -$(RANFILES1): $(SLIB)Ran-goal.lev - -$(SLIB)Ran-goal.lev: $(DAT)Ranger.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Ranger.des -#none - -$(SDFILES1): $(SLIB)Sam-goal.lev - -$(SLIB)Sam-goal.lev: $(DAT)Samurai.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Samurai.des -#none - -$(TDFILES1): $(SLIB)Tou-goal.lev - -$(SLIB)Tou-goal.lev: $(DAT)Tourist.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Tourist.des -#none - -$(VDFILES1): $(SLIB)Val-goal.lev - -$(SLIB)Val-goal.lev: $(DAT)Valkyrie.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Valkyrie.des -#none - -$(WDFILES1): $(SLIB)Wiz-goal.lev - -$(SLIB)Wiz-goal.lev: $(DAT)Wizard.des $(SBIN)lev_comp -#SFD_INSTEAD $(SBIN)lev_comp $(DAT)Wizard.des -#none - -$(SLIB)dungeon: $(DAT)dungeon.def $(SBIN)makedefs $(SBIN)dgn_comp - $(SBIN)makedefs -e - $(SBIN)dgn_comp $(DAT)dungeon.pdf - copy $(DAT)dungeon $(SLIB)dungeon - delete $(DAT)dungeon - -inst-data: $(INSTDATAFILES) - -$(NETHACK)amii.hlp: $(AMI)amii.hlp - copy $(AMI)amii.hlp $@ - -#$(NETHACK)data: $(DAT)data -# copy $(DAT)data $@ - -$(SLIB)data: $(DAT)data.base $(I)config.h $(SBIN)makedefs - $(SBIN)makedefs -d - -#$(NETHACK)rumors: $(DAT)rumors -# copy $(DAT)rumors $@ - -$(SLIB)rumors: $(DAT)rumors.tru $(DAT)rumors.fal $(SBIN)makedefs - $(SBIN)makedefs -r - -$(SLIB)cmdhelp: $(DAT)cmdhelp - copy $(DAT)cmdhelp $@ - -$(SLIB)help: $(DAT)help - copy $(DAT)help $@ - -$(SLIB)hh: $(DAT)hh - copy $(DAT)hh $@ - -$(NETHACK)HackWB.hlp: $(AMI)HackWB.hlp - copy $(AMI)HackWB.hlp $@ - -$(SLIB)history: $(DAT)history - copy $(DAT)history $@ - -$(NETHACK)license: $(DAT)license - copy $(DAT)license $@ - -$(SLIB)opthelp: $(DAT)opthelp - copy $(DAT)opthelp $@ - -$(NETHACK)Recover.txt: $(DOC)Recover.txt - copy $(DOC)Recover.txt $@ - -$(NETHACK)GuideBook.txt: $(DOC)GuideBook.txt - copy $(DOC)GuideBook.txt $@ - -$(NETHACK)NetHack.txt: $(DOC)NetHack.txt - copy $(DOC)NetHack.txt $@ - -$(NETHACK)Install.ami: $(AMI)Install.ami - copy $(AMI)Install.ami $@ - -#SFD_INSTEAD $(NETHACK)logfile: $(NETHACK)logfile -$(NETHACK)logfile: - echo to $@ - -#SFD_INSTEAD $(NETHACK)record: $(NETHACK)record -$(NETHACK)record: - echo to $@ - -$(SLIB)wizhelp: $(DAT)wizhelp - copy $(DAT)wizhelp $@ - -# Create the directories here because NetHack.cnf puts them there by default -$(NETHACK)NetHack.cnf: $(AMI)NetHack.cnf - copy $(AMI)NetHack.cnf $@ - -makedir $(NETHACK)save - -makedir $(NETHACK)levels - -#SFD_BEGIN -#SFD_ELSE -$(O)NetHack.gst: $(GSTSRC) $(I)hack.h - sc makegst=$(GSTFILE) $(CFLAGS) $(GSTSRC) -#SFD_END - -# Unpack and install fonts - -INSTFONTFILES= $(NETHACK)hack.font $(NETHACK)hack $(NETHACK)hack/8 - -inst-fonts: $(INSTFONTFILES) - -$(NETHACK)hack/8: $(AMI)amifont8.uu $(NETHACK)hack - $(UUDEC) $(AMI)amifont8.uu - copy 8 $(NETHACK)hack/8 - delete 8 - -$(NETHACK)hack.font: $(AMI)amifont.uu - $(UUDEC) $(AMI)amifont.uu - copy hack.font $(NETHACK)hack.font - delete hack.font - -#SFD_INSTEAD $(NETHACK)hack: $(NETHACK)hack -$(NETHACK)hack: - -makedir $@ - -INSTICONFILES= \ - $(NETHACK)default.icon $(NETHACK)NetHack.info $(NETHACK)NewGame.info \ - $(NETHACK)HackWB.info - -inst-icons: $(INSTICONFILES) - -# Unpack the icons into place - -$(NETHACK)default.icon: $(AMI)dflticon.uu - $(UUDEC) $(AMI)dflticon.uu -# copy default.icon $(NETHACK)default.icon -# delete default.icon - -$(NETHACK)NetHack.info: $(AMI)NHinfo.uu - $(UUDEC) $(AMI)NHinfo.uu -# copy NetHack.info $(NETHACK)NetHack.info -# delete NetHack.info - -$(NETHACK)NewGame.info: $(AMI)NewGame.uu - $(UUDEC) $(AMI)NewGame.uu -# copy NewGame.info $(NETHACK)NewGame.info -# delete NewGame.info - -$(NETHACK)HackWB.info: $(AMI)HackWB.uu - $(UUDEC) $(AMI)HackWB.uu -# copy HackWB.info $(NETHACK)HackWB.info -# delete HackWB.info - -# If DLB is defined, create the nhdat library file in the playground -# directory. If not, move all the data files there. -$(NETHACK)nhdat: $(LIBFILES) $(SBIN)dlb - list to T:nhdat.lst $(SLIB) QUICK NOHEAD FILES - echo >T:make-nhdat $(SBIN)dlb cCfI $(SLIB) $(NETHACK)nhdat T:nhdat.lst - echo >>T:make-nhdat if not exists $(NETHACK)nhdat - echo >>T:make-nhdat copy $(SLIB)\#? $(NETHACK) - echo >>T:make-nhdat endif - execute T:make-nhdat - -delete T:make-nhdat - -# DO NOT DELETE THIS LINE - -$(O)allmain.o: $(NHS)allmain.c $(HDEP) - -$(O)alloc.o: $(NHS)alloc.c $(I)config.h - -$(O)apply.o: $(NHS)apply.c $(HDEP) -#SFD_INSTEAD #none - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)apply.c - -$(O)artifact.o: $(NHS)artifact.c $(HDEP) $(I)artifact.h $(I)artilist.h - -$(O)attrib.o: $(NHS)attrib.c $(HDEP) $(I)artifact.h - -$(O)ball.o: $(NHS)ball.c $(HDEP) - -$(O)bones.o: $(NHS)bones.c $(HDEP) - -$(O)botl.o: $(NHS)botl.c $(HDEP) - -$(O)cmd.o: $(NHS)cmd.c $(HDEP) $(I)func_tab.h - -$(O)dbridge.o: $(NHS)dbridge.c $(HDEP) - -$(O)decl.o: $(NHS)decl.c $(HDEP) $(I)quest.h - -$(O)detect.o: $(NHS)detect.c $(HDEP) $(I)artifact.h - -$(O)dig.o: $(NHS)dig.c $(HDEP) - -$(O)display.o: $(NHS)display.c $(HDEP) - -$(O)dlb.o: $(NHS)dlb.c $(HDEP) $(I)dlb.h - -$(O)do.o: $(NHS)do.c $(HDEP) - -$(O)do_name.o: $(NHS)do_name.c $(HDEP) - -$(O)do_wear.o: $(NHS)do_wear.c $(HDEP) - -$(O)dog.o: $(NHS)dog.c $(HDEP) - -$(O)dogmove.o: $(NHS)dogmove.c $(HDEP) $(I)mfndpos.h - -$(O)dokick.o: $(NHS)dokick.c $(HDEP) - -$(O)dothrow.o: $(NHS)dothrow.c $(HDEP) - -$(O)drawing.o: $(NHS)drawing.c $(HDEP) $(I)tcap.h - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)drawing.c - -$(O)dungeon.o: $(NHS)dungeon.c $(HDEP) $(I)dgn_file.h $(I)dlb.h - -$(O)eat.o: $(NHS)eat.c $(HDEP) - -$(O)end.o: $(NHS)end.c $(HDEP) $(I)dlb.h - -$(O)engrave.o: $(NHS)engrave.c $(HDEP) - -$(O)exper.o: $(NHS)exper.c $(HDEP) - -$(O)explode.o: $(NHS)explode.c $(HDEP) - -$(O)extralev.o: $(NHS)extralev.c $(HDEP) - -$(O)files.o: $(NHS)files.c $(HDEP) $(I)dlb.h $(I)date.h - -$(O)fountain.o: $(NHS)fountain.c $(HDEP) - -$(O)hack.o: $(NHS)hack.c $(HDEP) - -$(O)hacklib.o: $(NHS)hacklib.c $(HDEP) - -$(O)invent.o: $(NHS)invent.c $(HDEP) $(I)artifact.h - -$(O)light.o: $(NHS)light.c $(HDEP) - -$(O)lock.o: $(NHS)lock.c $(HDEP) - -$(O)mail.o: $(NHS)mail.c $(HDEP) $(I)mail.h - -$(O)makemon.o: $(NHS)makemon.c $(HDEP) - -$(O)mapglyph.o: $(NHS)mapglyph.c $(HDEP) - -$(O)mcastu.o: $(NHS)mcastu.c $(HDEP) - -$(O)mhitm.o: $(NHS)mhitm.c $(HDEP) $(I)artifact.h - -$(O)mhitu.o: $(NHS)mhitu.c $(HDEP) $(I)artifact.h - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)mhitu.c - -$(O)minion.o: $(NHS)minion.c $(HDEP) - -$(O)mklev.o: $(NHS)mklev.c $(HDEP) - -$(O)mkmap.o: $(NHS)mkmap.c $(HDEP) $(I)sp_lev.h - -$(O)mkmaze.o: $(NHS)mkmaze.c $(HDEP) $(I)sp_lev.h - -$(O)mkobj.o: $(NHS)mkobj.c $(HDEP) $(I)artifact.h $(I)prop.h - -$(O)mkroom.o: $(NHS)mkroom.c $(HDEP) - -$(O)mon.o: $(NHS)mon.c $(HDEP) $(I)mfndpos.h - -$(O)mondata.o: $(NHS)mondata.c $(HDEP) - -$(O)monmove.o: $(NHS)monmove.c $(HDEP) $(I)mfndpos.h $(I)artifact.h - -$(O)monst.o: $(NHS)monst.c $(I)config.h $(I)permonst.h $(I)monsym.h $(I)color.h - -$(O)monstr.o: $(NHS)monstr.c $(HDEP) -#SFD_INSTEAD $(CC) $(CFLAGS) $(OBJSPEC)%(left) $(NHS)monstr.c -#none - -$(O)mplayer.o: $(NHS)mplayer.c $(HDEP) - -$(O)mthrowu.o: $(NHS)mthrowu.c $(HDEP) - -$(O)muse.o: $(NHS)muse.c $(HDEP) - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)muse.c - -$(O)music.o: $(NHS)music.c $(HDEP) #interp.c - -$(O)o_init.o: $(NHS)o_init.c $(HDEP) - -$(O)objects.o: $(NHS)objects.c $(I)config.h $(I)obj.h $(I)objclass.h \ - $(I)prop.h $(I)skills.h $(I)color.h -#SFD_INSTEAD #none - $(CC) $(CFLAGS) $(INCLSPEC)$(NHS) $(OBJSPEC)$@ $(NHS)objects.c - -$(O)objnam.o: $(NHS)objnam.c $(HDEP) - -$(O)options.o: $(NHS)options.c $(HDEP) $(I)tcap.h $(I)config.h \ - $(I)objclass.h $(I)flag.h - -$(O)pager.o: $(NHS)pager.c $(HDEP) $(I)dlb.h - -$(O)pickup.o: $(NHS)pickup.c $(HDEP) - -$(O)pline.o: $(NHS)pline.c $(HDEP) - -$(O)polyself.o: $(NHS)polyself.c $(HDEP) - -$(O)potion.o: $(NHS)potion.c $(HDEP) - -$(O)pray.o: $(NHS)pray.c $(HDEP) - -$(O)priest.o: $(NHS)priest.c $(HDEP) $(I)mfndpos.h - -$(O)quest.o: $(NHS)quest.c $(HDEP) $(I)quest.h - -$(O)questpgr.o: $(NHS)questpgr.c $(HDEP) $(I)dlb.h - -$(O)read.o: $(NHS)read.c $(HDEP) - -$(O)rect.o: $(NHS)rect.c $(HDEP) - -$(O)region.o: $(NHS)region.c $(HDEP) - -$(O)restore.o: $(NHS)restore.c $(HDEP) $(I)tcap.h $(I)quest.h - -$(O)rnd.o: $(NHS)rnd.c $(HDEP) - -$(O)role.o: $(NHS)role.c $(HDEP) - -$(O)rumors.o: $(NHS)rumors.c $(HDEP) $(I)dlb.h - -$(O)save.o: $(NHS)save.c $(HDEP) $(I)quest.h - -$(O)shk.o: $(NHS)shk.c $(HDEP) -#SFD_INSTEAD #none - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)shk.c - -$(O)shknam.o: $(NHS)shknam.c $(HDEP) - -$(O)sit.o: $(NHS)sit.c $(HDEP) $(I)artifact.h - -$(O)sounds.o: $(NHS)sounds.c $(HDEP) - -$(O)sp_lev.o: $(NHS)sp_lev.c $(HDEP) $(I)sp_lev.h $(I)rect.h $(I)dlb.h - -$(O)spell.o: $(NHS)spell.c $(HDEP) - -$(O)steal.o: $(NHS)steal.c $(HDEP) - -$(O)steed.o: $(NHS)steed.c $(HDEP) - -$(O)sys.o: $(NHS)sys.c $(HDEP) - -$(O)teleport.o: $(NHS)teleport.c $(HDEP) - -$(O)timeout.o: $(NHS)timeout.c $(HDEP) - -$(O)topten.o: $(NHS)topten.c $(HDEP) $(I)dlb.h - -$(O)track.o: $(NHS)track.c $(HDEP) - -$(O)trap.o: $(NHS)trap.c $(HDEP) -#SFD_INSTEAD #none - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)trap.c - -$(O)u_init.o: $(NHS)u_init.c $(HDEP) - -$(O)uhitm.o: $(NHS)uhitm.c $(HDEP) - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)uhitm.c - -$(O)vault.o: $(NHS)vault.c $(HDEP) - -$(O)version.o: $(NHS)version.c $(HDEP) $(I)date.h $(I)patchlevel.h - -# DMake doesn't grok mid-line comments -#SFD_INSTEAD $(O)vision.o: $(NHS)vision.c $(HDEP) -$(O)vision.o: $(NHS)vision.c $(HDEP) #$(I)vis_tab.h - -$(O)weapon.o: $(NHS)weapon.c $(HDEP) - -$(O)were.o: $(NHS)were.c $(HDEP) - -$(O)wield.o: $(NHS)wield.c $(HDEP) - -$(O)windows.o: $(NHS)windows.c $(HDEP) $(I)wintty.h - -$(O)wizard.o: $(NHS)wizard.c $(HDEP) - -$(O)worm.o: $(NHS)worm.c $(HDEP) - -$(O)worn.o: $(NHS)worn.c $(HDEP) - -$(O)write.o: $(NHS)write.c $(HDEP) - -$(O)zap.o: $(NHS)zap.c $(HDEP) - $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ $(NHS)zap.c - -$(O)getline.o: $(TTY)getline.c $(HDEP) $(I)wintty.h - -$(O)termcap.o: $(TTY)termcap.c $(HDEP) $(I)wintty.h $(I)tcap.h - -$(O)topl.o: $(TTY)topl.c $(HDEP) $(I)wintty.h $(I)tcap.h - -$(O)wintty.o: $(TTY)wintty.c $(HDEP) $(I)wintty.h $(I)tcap.h \ - $(I)date.h $(I)patchlevel.h - -$(O)amitty.o: $(AMI)amitty.c $(HDEP) - -$(O)amistack.o: $(AMI)amistack.c - $(CC) $(CFLAGS3) $(CSYM) $(OBJSPEC)$@ $(AMI)amistack.c - -$(O)rip.o: $(NHS)rip.c $(HDEP) - - -$(I)config.h: $(I)config1.h $(I)tradstdc.h $(I)global.h - -setdate $(I)config.h - -wait 2 - -# onames.h handled at onames.h target, pm.h - -$(I)decl.h: $(I)quest.h $(I)spell.h $(I)color.h $(I)obj.h $(I)you.h - -setdate $(I)decl.h - -wait 2 - -$(I)global.h: $(I)coord.h $(I)pcconf.h $(I)amiconf.h - -setdate $(I)global.h - -wait 2 - -$(I)hack.h: $(I)config.h $(I)context.h $(I)trap.h $(I)decl.h $(I)dungeon.h \ - $(I)monsym.h $(I)mkroom.h $(I)objclass.h $(I)flag.h $(I)rm.h \ - $(I)vision.h $(I)display.h $(I)wintype.h $(I)engrave.h \ - $(I)rect.h $(I)region.h $(I)sys.h - -setdate $(I)hack.h - -wait 2 - -$(I)permonst.h: $(I)monattk.h $(I)monflag.h $(I)align.h - -setdate $(I)permonst.h - -wait 2 - -$(I)you.h: $(I)align.h $(I)attrib.h $(I)monst.h $(I)mextra.h $(I)youprop.h $(I)skills.h - -setdate $(I)you.h - -wait 2 - -# pm.h handled at target - -$(I)youprop.h: $(I)prop.h $(I)permonst.h $(I)mondata.h - -setdate $(I)youprop.h - -wait 2 - -$(I)display.h: $(I)vision.h $(I)mondata.h - -setdate $(I)display.h - -wait 2 - -$(I)dungeon.h: $(I)align.h - -setdate $(I)dungeon.h - -wait 2 - -$(I)engrave.h: $(I)rect.h - -setdate $(I)engrave.h - -wait 2 - -$(I)mextra.h: $(I)align.h - -setdate $(I)mextra.h - -wait 2 - -$(I)mondata.h: $(I)align.h - -setdate $(I)mondata.h - -wait 2 - -$(I)monst.h: $(I)align.h $(I)mextra.h - -setdate $(I)monst.h - -wait 2 - -$(I)pcconf.h: $(I)micro.h $(I)system.h - -setdate $(I)pcconf.h - -wait 2 - -$(I)rm.h: $(I)align.h - -setdate $(I)rm.h - -wait 2 - - -#notes -# install keeps doing re-install because it keeps rebuilding lev_comp??? -# fixed(?) - deleted setdate -# make nhdat rebuils sys/amiga objects diff --git a/outdated/sys/amiga/NetHack.cnf b/outdated/sys/amiga/NetHack.cnf deleted file mode 100644 index 89794c094..000000000 --- a/outdated/sys/amiga/NetHack.cnf +++ /dev/null @@ -1,213 +0,0 @@ -# A '#' at the beginning of a line means the rest of the line is a comment. - -# This is an example configuration file. -# If several people are to use it, don't specify "name" or personal -# prefences like "dogname" or "packorder" in OPTIONS. - -# To change configuration, comment out the unwanted configurations, and -# remove the comment from the configuration you want. - -# Some options to set personal preferences. If several people are to -# use it, options like these should not be set here - use the command line -#OPTIONS=name:Janet-V,female,dogname:Fido,fruit:apricot -#OPTIONS=packorder:")[%?+/=!(*0_`,scores:10t/2a,noverbose -#OPTIONS=gender:male -#OPTIONS=role:random -#OPTIONS=race:random -#OPTIONS=align:chaotic -# Other general options -#OPTIONS=time,rest_on_space,noautopickup - -# The search path for files like record, help, opthelp, etc. -PATH=NetHack: - -# My own setup -#OPTIONS=nolegacy,fruit:lemon,time,autopickup,checkpoint,showexp,showscore,standout,nonews -#OPTIONS=nomail,flush,eight_bit_tty,scores:10t/2a,pickup_types:$,suppress_alert:3.3.0,autoquiver - -# The windowtype option must be set before any options regarding colors and palette -# are set otherwise previously set values will be overridden by the defaults -# -# The font version of the game -OPTIONS=windowtype:amii -# -# New tile version of the game -#OPTIONS=windowtype:amitile -# -# A hard disk configuration. -# -HACKDIR=NetHack: -LEVELS=Nethack:Levels -SAVE=Nethack:Save -BONESDIR=Nethack:Levels -SCOREDIR=Nethack: -LOCKDIR=Nethack: -CONFIGDIR=Nethack: -DATADIR=Nethack: -TROUBLEDIR=Nethack: - -# *** CHARACTER GRAPHICS *** -# -# See the on-line help or the Guidebook for which symbols are in which -# positions. -# -# Note that the hack.font has special graphics characters from 192 on. - -# An example using the hack.font graphics character set: -DUNGEON = 032 192 193 194 195 196 197 198 216 214 \ - 215 213 217 145 146 147 148 035 035 217 \ - 218 229 060 062 060 062 095 124 092 035 \ - 123 125 042 125 042 042 035 035 046 035 \ - 125 - -TRAPS = 094 094 094 094 094 094 094 094 094 094 \ - 094 094 094 094 094 094 094 034 094 094 \ - 094 094 - -EFFECTS = 241 240 242 243 042 033 123 125 \ - 064 038 042 035 \ - 244 245 246 247 239 248 249 250 \ - 230 234 231 236 212 237 232 235 233 - -WARNINGS = 048 049 050 051 052 053 - -# Monitors vary greatly in their color response. If the default colors -# are not good on your monitor, here are some other alternatives for the -# font version of the game: -# -# Last color of the palette is always used for the cursor. -# -#CBM 1960, set color/contrast for good pure red, green, and blue. True colors. -#PENS=000,fff,a61,7bb,0f0,e0c,00f,f00 -#CBM 1960, set color/contrast as above, better colors for NetHack. -#PENS=667,fff,da1,7bb,2f0,e0d,0af,f42 -#and other suggestions: -#PENS=888,ffc,840,0b8,4e4,e8b,7be,a04 -#PENS=000,fff,830,7ae,181,c06,23e,c00 -# -# For an "interlaced"+ line screen, the default font is courier:13. If you want -# a different font, set it here. The format is "fontname.font:size"; i.e. the -# .font extension is required. -#FONT=courier.font:13 -#FONT=topaz.font:8 -# -# Proportional fonts such as CGTimes are probably not a good idea because they -# result in many things not being spaced out correctly. -#FONT=CGTimes.font:15 -# -# This sized proportional font is readable, but still has spacing problems -#FONT=CGTimes.font:21 -# -# FOR AGA OR OTHER DISPLAYS CAPABLE OF 5 OR MORE PLANES... -# -# For a screen of depth 5 the following dripens provide a brown border -# using pens 16-31. -# -# Pens 16-31 can be redefined with PENS= if you want different colors, -# using the PENS= values below for a 4 plane screen as the first 16 colors. -# -#DEPTH=5 -#DRIPENS=0,0,0,17,27,23,1,23,15,0,23,27 -# -# The APEN and BPEN values in the various types of windows can be set in -# the manner shown below. These values are for the 16 color version of -# the tile game. -# -# These values are specified as APEN,BPEN (foreground,background) -# -#MSGPENS=1,12 -#STATUSPENS=1,12 -#MENUPENS=1,23 -#TEXTPENS=1,23 -#OTHERPENS=1,23 -# -# FOR ECS OR OTHERS ONLY CAPABLE OF 4 PLANES... -# -# These values work good for the TILE version of the game on ECS machines -# These are the default values for reference purposes. -# -#DEPTH=4 -#defaults for tilemode: -#PENS=000,fff,0bf,f60,00f,090,69b,f00,6f0,ff0,f0f,940,466,c40,ddb,fb9 -#DRIPENS=0,1,0,2,4,12,14,12,7,1,12,4 -#defaults for fontmode: -#PENS=000,fff,830,7ac,181,c06,23e,c00 -#DRIPENS=0,6,2,1,6,3,1,3,7,1,3,6 -# -# The APEN and BPEN values in the various types of windows can be set in -# the manner shown below. These values are for a 32 color version of -# the tile game. -# -# These values are specified as APEN,BPEN (foreground,background) -# -#MSGPENS=1,12 -#STATUSPENS=1,12 -#MENUPENS=0,14 -#TEXTPENS=0,14 -#OTHERPENS=1,12 -# -# New alternative color scheme for 16 color font mode. -# This changes the colors of monsters, objects etc. -# -# FGPENS and BGPENS define APEN and BPEN for objects and monsters on the map. -# The colors are in the following order: -# black, red, green, brown, blue, magenta, cyan, gray, no color, orange, -# bright green, yellow, bright blue, bright magenta, bright cyan, white -# -DEPTH=4 -PENS=000,fff,830,7ac,181,c06,23e,c00,888,f60,4f4,ff0,4af,f8f,8ff,f00 -FGPENS= 0, 7, 4, 2, 6, 5, 3, 8, 1, 9,10,11,12,13,14, 1 -BGPENS= 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -# -# Screen mode selections below should all work for either the font or tile -# version of the game. Other modes can be tried and as long as they are at -# least 640x200, the game should adapt to them... -# -# Select screenmode with a requester -#SCREENMODE=Req -# NTSC_MONITOR_ID -#SCREENMODE=0x00019000 -# PAL_MONITOR_ID -#SCREENMODE=0x00029000 -# NTSC_MONITOR_ID+LACE -#SCREENMODE=0x00019004 -# PAL_MONITOR_ID+LACE -#SCREENMODE=0x00029004 -# NTSC_MONITOR_ID+HIRES+LACE -#SCREENMODE=0x00019024 -# PAL_MONITOR_ID+HIRES+LACE -#SCREENMODE=0x00029024 -# VGA_MONITOR_ID -#SCREENMODE=0x00031000 -# VGAPRODUCT_KEY -#SCREENMODE=0x00039024 -# A2024TENHERTZ_KEY -#SCREENMODE=0x00041000 -# A2024FIFTEENHERTZ_KEY -#SCREENMODE=0x00049000 -# EURO72_MONITOR_ID -#SCREENMODE=0x00061000 -# EURO72PRODUCT_KEY -#SCREENMODE=0x00069024 -# EURO72PRODUCTLACE_KEY -#SCREENMODE=0x00069025 -# EURO72PRODUCTDBL_KEY -#SCREENMODE=0x00069020 -# EURO36_MONITOR_ID -#SCREENMODE=0x00071000 -# SUPER72HIRESDBL_KEY -#SCREENMODE=0x00089008 -# SUPER72SUPERDBL_KEY -#SCREENMODE=0x00089028 -# DBLNTSCHIRES_KEY -#SCREENMODE=0x00099000 -# DBLNTSCHIRESFF_KEY -#SCREENMODE=0x00099004 -# DBLNTSCHIRESLACE_KEY -#SCREENMODE=0x00099005 -# DBLPALHIRES_KEY -#SCREENMODE=0x000a9000 -# DBLPALHIRESFF_KEY -#SCREENMODE=0x000a9004 -# DBLPALHIRESLACE_KEY -#SCREENMODE=0x000a9005 diff --git a/outdated/sys/amiga/ifchange b/outdated/sys/amiga/ifchange deleted file mode 100644 index d06450c08..000000000 --- a/outdated/sys/amiga/ifchange +++ /dev/null @@ -1,55 +0,0 @@ -.KEY oper/a,tmp/a,real/a,f1,f2,f3,f4,f5 - -. ; miscellaneous script functions for the Amiga -. ; Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993, 1996. -. ; NetHack may be freely redistributed. See license for details. - -FAILAT 6 -IF EQ "MOVE" - IF EXISTS - diff >T:mic -c - search from T:mic SEARCH "---" QUIET - IF WARN - echo "MOVE: no change" - delete - ELSE - echo "MOVE: copy" - copy clone - delete - ENDIF - ELSE - echo "MOVE: copy2" - copy clone - delete - ENDIF - QUIT -ENDIF - -IF EQ "TOUCH" - IF EXISTS - diff >T:mic -c - search from T:mic SEARCH "---" QUIET - IF NOT WARN - echo "TOUCH: touch" - IF NOT EQ "@" - setdate - ENDIF - IF NOT EQ "@" - setdate - ENDIF - IF NOT EQ "@" - setdate - ENDIF - IF NOT EQ "@" - setdate - ENDIF - IF NOT EQ "@" - setdate - ENDIF - ENDIF - ENDIF - QUIT -ENDIF - -echo "ifchange: '' not recognized" -quit 10 diff --git a/outdated/sys/amiga/mkdmake b/outdated/sys/amiga/mkdmake deleted file mode 100644 index fc002ef10..000000000 --- a/outdated/sys/amiga/mkdmake +++ /dev/null @@ -1,13 +0,0 @@ -GE/$@/%(left)/ -GE/$ - -#include "config.h" -#include "tile.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef _DCC -#include -#include -#include -#endif - -void panic(const char *); -void map_colors(void); -int BestMatch(int, int, int); - -extern pixval ColorMap[3][MAXCOLORMAPSIZE]; -extern int colorsinmap; - -/* - * WARNING: - * This program carries forth the assumption that the colormaps in all - * of the .txt files are the same. This is a bug. - */ - -struct { - int Height; - int Width; -} IFFScreen; - -/* - * We are using a hybrid form of our own design which we call a BMAP (for - * bitmap) form. It is an ILBM with the bitmaps already deinterleaved, - * completely uncompressed. - * This speeds the loading of the images from the games point of view because - * it - * does not have to deinterleave and uncompress them. - */ -#define ID_BMAP MAKE_ID('B', 'M', 'A', 'P') /* instead of ILBM */ -#define ID_BMHD MAKE_ID('B', 'M', 'H', 'D') /* Same as ILBM */ -#define ID_CAMG MAKE_ID('C', 'A', 'M', 'G') /* Same as ILBM */ -#define ID_CMAP MAKE_ID('C', 'M', 'A', 'P') /* Same as ILBM */ -#define ID_PDAT \ - MAKE_ID('P', 'D', 'A', 'T') /* Extra data describing plane \ - * size due to graphics.library \ - * rounding requirements. \ - */ -#define ID_PLNE MAKE_ID('P', 'L', 'N', 'E') /* The planes of the image */ - -#ifndef _DCC -extern -#endif - struct Library *IFFParseBase; - -int nplanes; - -/* BMHD from IFF documentation */ -typedef struct { - UWORD w, h; - WORD x, y; - UBYTE nPlanes; - UBYTE masking; - UBYTE compression; - UBYTE reserved1; - UWORD transparentColor; - UBYTE xAspect, yAspect; - WORD pageWidth, pageHeight; -} BitMapHeader; - -typedef struct { - UBYTE r, g, b; -} AmiColorMap; - -pixel pixels[TILE_Y][TILE_X]; -AmiColorMap *cmap; - -int findcolor(register pixel *pix); -void packwritebody(pixel (*tile)[TILE_X], char **planes, int tileno); - -void -error(char *str) -{ - fprintf(stderr, "ERROR: %s\n", str); -} - -/* - * This array maps the image colors to the amiga's first 16 colors. The - * colors - * are reordered to help with maintaining dripen settings. - */ -int colrmap[] = { 0, 6, 9, 15, 4, 10, 2, 3, 5, 11, 7, 13, 8, 1, 14, 12 }; - -/* How many tiles fit across and down. */ - -#define COLS 20 -#define ROWS ((tiles + COLS - 1) / COLS) - -main(int argc, char **argv) -{ - int colors; - struct { - long nplanes; - long pbytes; - long across; - long down; - long npics; - long xsize; - long ysize; - } pdat; - long pbytes; /* Bytes of data in a plane */ - int i, cnt; - BitMapHeader bmhd; - struct IFFHandle *iff; - long camg = HIRES | LACE; - int tiles = 0; - char **planes; - - if (argc != 3) { - fprintf(stderr, "Usage: %s source destination\n", argv[0]); - exit(1); - } - -#if defined(_DCC) || defined(__GNUC__) - IFFParseBase = OpenLibrary("iffparse.library", 0); - if (!IFFParseBase) { - error("unable to open iffparse.library"); - exit(1); - } -#endif - - /* First, count the files in the file */ - if (fopen_text_file(argv[1], "r") != TRUE) { - perror(argv[1]); - return (1); - } - - nplanes = 0; - i = colorsinmap - 1; /*IFFScreen.Colors - 1; */ - while (i != 0) { - nplanes++; - i >>= 1; - } - - planes = malloc(nplanes * sizeof(char *)); - if (planes == 0) { - error("can not allocate planes pointer"); - exit(1); - } - - while (read_text_tile(pixels) == TRUE) - ++tiles; - fclose_text_file(); - - IFFScreen.Width = COLS * TILE_X; - IFFScreen.Height = ROWS * TILE_Y; - - pbytes = (COLS * ROWS * TILE_X + 15) / 16 * 2 * TILE_Y; - - for (i = 0; i < nplanes; ++i) { - planes[i] = calloc(1, pbytes); - if (planes[i] == 0) { - error("can not allocate planes pointer"); - exit(1); - } - } - - /* Now, process it */ - if (fopen_text_file(argv[1], "r") != TRUE) { - perror(argv[1]); - return (1); - } - - iff = AllocIFF(); - if (!iff) { - error("Can not allocate IFFHandle"); - return (1); - } - - iff->iff_Stream = Open(argv[2], MODE_NEWFILE); - if (!iff->iff_Stream) { - error("Can not open output file"); - return (1); - } - - InitIFFasDOS(iff); - OpenIFF(iff, IFFF_WRITE); - - PushChunk(iff, ID_BMAP, ID_FORM, IFFSIZE_UNKNOWN); - - bmhd.w = IFFScreen.Width; - bmhd.h = IFFScreen.Height; - bmhd.x = 0; - bmhd.y = 0; - bmhd.nPlanes = nplanes; - bmhd.masking = 0; - bmhd.compression = 0; - bmhd.reserved1 = 0; - bmhd.transparentColor = 0; - bmhd.xAspect = 100; - bmhd.yAspect = 100; - bmhd.pageWidth = TILE_X; - bmhd.pageHeight = TILE_Y; - - PushChunk(iff, ID_BMAP, ID_BMHD, sizeof(bmhd)); - WriteChunkBytes(iff, &bmhd, sizeof(bmhd)); - PopChunk(iff); - - PushChunk(iff, ID_BMAP, ID_CAMG, sizeof(camg)); - WriteChunkBytes(iff, &camg, sizeof(camg)); - PopChunk(iff); - - /* We need to reorder the colors to get reasonable default pens but - * we also need to know where some of the colors are - so go find out. - */ - map_colors(); - - cmap = malloc((colors = (1L << nplanes)) * sizeof(AmiColorMap)); - for (i = 0; i < colors; ++i) { - cmap[colrmap[i]].r = ColorMap[CM_RED][i]; - cmap[colrmap[i]].g = ColorMap[CM_GREEN][i]; - cmap[colrmap[i]].b = ColorMap[CM_BLUE][i]; - } - - PushChunk(iff, ID_BMAP, ID_CMAP, IFFSIZE_UNKNOWN); - for (i = 0; i < colors; ++i) - WriteChunkBytes(iff, &cmap[i], 3); - PopChunk(iff); - - cnt = 0; - while (read_text_tile(pixels) == TRUE) { - packwritebody(pixels, planes, cnt); - if (cnt % 20 == 0) - printf("%d..", cnt); - ++cnt; - fflush(stdout); - } - - pdat.nplanes = nplanes; - pdat.pbytes = pbytes; - pdat.xsize = TILE_X; - pdat.ysize = TILE_Y; - pdat.across = COLS; - pdat.down = ROWS; - pdat.npics = cnt; - - PushChunk(iff, ID_BMAP, ID_PDAT, IFFSIZE_UNKNOWN); - WriteChunkBytes(iff, &pdat, sizeof(pdat)); - PopChunk(iff); - - PushChunk(iff, ID_BMAP, ID_PLNE, IFFSIZE_UNKNOWN); - for (i = 0; i < nplanes; ++i) - WriteChunkBytes(iff, planes[i], pbytes); - PopChunk(iff); - - CloseIFF(iff); - Close(iff->iff_Stream); - FreeIFF(iff); - - printf("\n%d tiles converted\n", cnt); - -#if defined(_DCC) || defined(__GNUC__) - CloseLibrary(IFFParseBase); -#endif - exit(0); -} - -findcolor(register pixel *pix) -{ - register int i; - - for (i = 0; i < MAXCOLORMAPSIZE; ++i) { - if ((pix->r == ColorMap[CM_RED][i]) - && (pix->g == ColorMap[CM_GREEN][i]) - && (pix->b == ColorMap[CM_BLUE][i])) { - return (i); - } - } - return (-1); -} - -void -packwritebody(pixel (*tile)[TILE_X], char **planes, int tileno) -{ - register int i, j, k, col; - register char *buf; - register int across, rowbytes, xoff, yoff; - - /* how many tiles fit across? */ - across = COLS; - - /* How many bytes per pixel row */ - rowbytes = ((IFFScreen.Width + 15) / 16) * 2; - - /* How many bytes to account for y distance in planes */ - yoff = ((tileno / across) * TILE_Y) * rowbytes; - - /* How many bytes to account for x distance in planes */ - xoff = (tileno % across) * (TILE_X / 8); - - /* For each row... */ - for (i = 0; i < TILE_Y; ++i) { - /* For each bitplane... */ - for (k = 0; k < nplanes; ++k) { - const int mask = 1l << k; - - /* Go across the row */ - for (j = 0; j < TILE_X; j++) { - col = findcolor(&tile[i][j]); - if (col == -1) { - error("can not convert pixel color to colormap index"); - return; - } - /* Shift the colors around to have good complements and to - * know the dripen values. - */ - col = colrmap[col]; - - /* To top left corner of tile */ - buf = planes[k] + yoff + xoff; - - /*To i'th row of tile and the correct byte for the j'th - * pixel*/ - buf += (i * rowbytes) + (j / 8); - - /* Or in the bit for this color */ - *buf |= (((col & mask) != 0) << (7 - (j % 8))); - } - } - } -} - -/* #define DBG */ - -/* map_colors - * The incoming colormap is in arbitrary order and has arbitrary colors in - * it, but we need (some) specific colors in specific places. Find the - * colors we need and fix the mapping table to match. - */ -/* What we are aiming for: */ -/* XXX was 0-7 */ -#define CX_BLACK 0 -#define CX_WHITE 1 -#define CX_BROWN 11 -#define CX_CYAN 2 -#define CX_GREEN 5 -#define CX_MAGENTA 10 -#define CX_BLUE 4 -#define CX_RED 7 -/* we don't care about the rest, at least now */ -/* should get: black white blue red grey greyblue ltgrey */ -void -map_colors() -{ - int x; -#if 1 - int tmpmap[] = { 0, 2, 3, 7, 4, 5, 8, 9, 10, 11, 13, 15, 12, 1, 14, 6 }; -/* still not right: gray green yellow lost somewhere? */ -#else - int tmpmap[16]; - int x, y; - for (x = 0; x < 16; x++) - tmpmap[x] = -1; /* set not assigned yet */ - - tmpmap[BestMatch(0, 0, 0)] = CX_BLACK; - tmpmap[BestMatch(255, 255, 255)] = CX_WHITE; - tmpmap[BestMatch(255, 0, 0)] = CX_RED; - tmpmap[BestMatch(0, 255, 0)] = CX_GREEN; - tmpmap[BestMatch(0, 0, 255)] = CX_BLUE; - - /* clean up the rest */ - for (x = 0; x < 16; x++) { - for (y = 0; y < 16; y++) - if (tmpmap[y] == x) - goto outer_cont; - for (y = 0; y < 16; y++) - if (tmpmap[y] == -1) { - tmpmap[y] = x; - break; - } - if (y == 16) - panic("too many colors?"); - outer_cont: - ; - } - for (x = 0; x < 16; x++) - if (tmpmap[y] == -1) - panic("lost color?"); -#endif - for (x = 0; x < 16; x++) { -#ifdef DBG - printf("final: c[%d]=%d (target: %d)\n", x, tmpmap[x], colrmap[x]); -#endif - colrmap[x] = tmpmap[x]; - } -} -BestMatch(r, g, b) int r, g, b; -{ - int x; - int bestslot; - int bestrate = 99999999L; - for (x = 0; x < 16; x++) { - int rr = r - ColorMap[CM_RED][x]; - int gg = g - ColorMap[CM_GREEN][x]; - int bb = b - ColorMap[CM_BLUE][x]; - int rate = rr * rr + gg * gg + bb * bb; - if (bestrate > rate) { - bestrate = rate; - bestslot = x; - } - } -#ifdef DBG - printf("map (%d,%d,%d) -> %d (error=%d)\n", r, g, b, bestslot, bestrate); -#endif - return bestslot; -} - -long * -alloc(unsigned int n) -{ - long *ret = malloc(n); - if (!ret) { - error("Can't allocate memory"); - exit(1); - } - return (ret); -} - -void -panic(const char *msg) -{ - fprintf(stderr, "PANIC: %s\n", msg); - exit(1); -} diff --git a/outdated/sys/amiga/xpm2iff.c b/outdated/sys/amiga/xpm2iff.c deleted file mode 100644 index 0ffbc8c47..000000000 --- a/outdated/sys/amiga/xpm2iff.c +++ /dev/null @@ -1,363 +0,0 @@ -/* NetHack 3.6 xpm2iff.c $NHDT-Date: 1432512795 2015/05/25 00:13:15 $ $NHDT-Branch: master $:$NHDT-Revision: 1.7 $ */ -/* Copyright (c) 1995 by Gregg Wonderly, Naperville, Illinois */ -/* NetHack may be freely redistributed. See license for details. */ - -#include - -#include "config.h" -#include "tile.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef _DCC -#include -#include -#include -#endif - -struct xpmscreen { - int Width; - int Height; - int Colors; - int ColorResolution; - int Background; - int AspectRatio; - int Interlace; - int BytesPerRow; -} XpmScreen; - -/* translation table from xpm characters to RGB and colormap slots */ -struct Ttable { - char flag; - char r, g, b; - int slot; /* output colortable index */ -} ttable[256]; - -pixval ColorMap[3][MAXCOLORMAPSIZE]; -int colorsinmap; - -/* - * We are using a hybrid form of our own design which we call a BMAP (for - * bitmap) form. It is an ILBM with the bitmaps already deinterleaved, - * completely uncompressed. - * This speeds the loading of the images from the games point of view because - * it - * does not have to deinterleave and uncompress them. - */ -#define ID_BMAP MAKE_ID('B', 'M', 'A', 'P') /* instead of ILBM */ -#define ID_BMHD MAKE_ID('B', 'M', 'H', 'D') /* Same as ILBM */ -#define ID_CAMG MAKE_ID('C', 'A', 'M', 'G') /* Same as ILBM */ -#define ID_CMAP MAKE_ID('C', 'M', 'A', 'P') /* Same as ILBM */ -#define ID_PDAT \ - MAKE_ID('P', 'D', 'A', 'T') /* Extra data describing plane \ - * size due to graphics.library \ - * rounding requirements. \ - */ -#define ID_PLNE MAKE_ID('P', 'L', 'N', 'E') /* The planes of the image */ - -int nplanes; - -/* BMHD from IFF documentation */ -typedef struct { - UWORD w, h; - WORD x, y; - UBYTE nPlanes; - UBYTE masking; - UBYTE compression; - UBYTE reserved1; - UWORD transparentColor; - UBYTE xAspect, yAspect; - WORD pageWidth, pageHeight; -} BitMapHeader; - -typedef struct { - UBYTE r, g, b; -} AmiColorMap; - -pixel pixels[TILE_Y][TILE_X]; -AmiColorMap *cmap; - -void -error(char *str) -{ - fprintf(stderr, "ERROR: %s\n", str); -} - -char **planes; - -main(int argc, char **argv) -{ - int colors; - struct { - long nplanes; - long pbytes; - long across; - long down; - long npics; - long xsize; - long ysize; - } pdat; - long pbytes; /* Bytes of data in a plane */ - int i, cnt; - BitMapHeader bmhd; - struct IFFHandle *iff; - long camg = HIRES | LACE; - int tiles = 0; - int index; - -#if defined(_DCC) || defined(__GNUC__) - IFFParseBase = OpenLibrary("iffparse.library", 0); - if (!IFFParseBase) { - error("unable to open iffparse.library"); - exit(1); - } -#endif - - if (fopen_xpm_file(argv[1], "r") != TRUE) { - perror(argv[1]); - return (1); - } - - nplanes = 0; - i = XpmScreen.Colors - 1; - while (i != 0) { - nplanes++; - i >>= 1; - } - - planes = malloc(nplanes * sizeof(char *)); - if (planes == 0) { - error("can not allocate planes pointer"); - exit(1); - } - - XpmScreen.BytesPerRow = ((XpmScreen.Width + 15) / 16) * 2; - pbytes = XpmScreen.BytesPerRow * XpmScreen.Height; - for (i = 0; i < nplanes; ++i) { - planes[i] = malloc(pbytes); - if (planes[i] == 0) { - error("can not allocate planes pointer"); - exit(1); - } - memset(planes[i], 0, pbytes); - } - - iff = AllocIFF(); - if (!iff) { - error("Can not allocate IFFHandle"); - return (1); - } - - iff->iff_Stream = Open(argv[2], MODE_NEWFILE); - if (!iff->iff_Stream) { - error("Can not open output file"); - return (1); - } - - InitIFFasDOS(iff); - OpenIFF(iff, IFFF_WRITE); - - PushChunk(iff, ID_BMAP, ID_FORM, IFFSIZE_UNKNOWN); - - bmhd.w = XpmScreen.Width; - bmhd.h = XpmScreen.Height; - bmhd.x = 0; - bmhd.y = 0; - bmhd.nPlanes = nplanes; - bmhd.masking = 0; - bmhd.compression = 0; - bmhd.reserved1 = 0; - bmhd.transparentColor = 0; - bmhd.xAspect = 100; - bmhd.yAspect = 100; - bmhd.pageWidth = 0; /* not needed for this program */ - bmhd.pageHeight = 0; /* not needed for this program */ - - PushChunk(iff, ID_BMAP, ID_BMHD, sizeof(bmhd)); - WriteChunkBytes(iff, &bmhd, sizeof(bmhd)); - PopChunk(iff); - - PushChunk(iff, ID_BMAP, ID_CAMG, sizeof(camg)); - WriteChunkBytes(iff, &camg, sizeof(camg)); - PopChunk(iff); - -#define SCALE(x) (x) - cmap = malloc((colors = (1L << nplanes)) * sizeof(AmiColorMap)); - if (cmap == 0) { - error("Can't allocate color map"); - exit(1); - } - for (index = 0; index < 256; index++) { - if (ttable[index].flag) { - cmap[ttable[index].slot].r = SCALE(ttable[index].r); - cmap[ttable[index].slot].g = SCALE(ttable[index].g); - cmap[ttable[index].slot].b = SCALE(ttable[index].b); - } - } -#undef SCALE - - PushChunk(iff, ID_BMAP, ID_CMAP, IFFSIZE_UNKNOWN); - WriteChunkBytes(iff, cmap, colors * sizeof(*cmap)); - PopChunk(iff); - - conv_image(); - - pdat.nplanes = nplanes; - pdat.pbytes = pbytes; - pdat.xsize = XpmScreen.Width; - pdat.ysize = XpmScreen.Height; - pdat.across = 0; - pdat.down = 0; - pdat.npics = 1; - - PushChunk(iff, ID_BMAP, ID_PDAT, IFFSIZE_UNKNOWN); - WriteChunkBytes(iff, &pdat, sizeof(pdat)); - PopChunk(iff); - - PushChunk(iff, ID_BMAP, ID_PLNE, IFFSIZE_UNKNOWN); - for (i = 0; i < nplanes; ++i) - WriteChunkBytes(iff, planes[i], pbytes); - PopChunk(iff); - - CloseIFF(iff); - Close(iff->iff_Stream); - FreeIFF(iff); - -#if defined(_DCC) || defined(__GNUC__) - CloseLibrary(IFFParseBase); -#endif - exit(0); -} - -#define SETBIT(Plane, Plane_offset, Col, Value) \ - if (Value) { \ - planes[Plane][Plane_offset + (Col / 8)] |= 1 << (7 - (Col & 7)); \ - } - -conv_image() -{ - int row, col, planeno; - - for (row = 0; row < XpmScreen.Height; row++) { - char *xb = xpmgetline(); - int plane_offset; - if (xb == 0) - return; - plane_offset = row * XpmScreen.BytesPerRow; - for (col = 0; col < XpmScreen.Width; col++) { - int slot; - int color = xb[col]; - if (!ttable[color].flag) { - fprintf(stderr, "Bad image data\n"); - } - slot = ttable[color].slot; - for (planeno = 0; planeno < nplanes; planeno++) { - SETBIT(planeno, plane_offset, col, slot & (1 << planeno)); - } - } - } -} - -long * -alloc(unsigned int n) -{ - long *ret = malloc(n); - if (!ret) { - error("Can't allocate memory"); - exit(1); - } - return (ret); -} - -FILE *xpmfh = 0; -char initbuf[200]; -char *xpmbuf = initbuf; - -/* version 1. Reads the raw xpm file, NOT the compiled version. This is - * not a particularly good idea but I don't have time to do the right thing - * at this point, even if I was absolutely sure what that was. */ -fopen_xpm_file(const char *fn, const char *mode) -{ - int temp; - char *xb; - if (strcmp(mode, "r")) - return FALSE; /* no choice now */ - if (xpmfh) - return FALSE; /* one file at a time */ - xpmfh = fopen(fn, mode); - if (!xpmfh) - return FALSE; /* I'm hard to please */ - - /* read the header */ - xb = xpmgetline(); - if (xb == 0) - return FALSE; - if (4 != sscanf(xb, "%d %d %d %d", &XpmScreen.Width, &XpmScreen.Height, - &XpmScreen.Colors, &temp)) - return FALSE; /* bad header */ - /* replace the original buffer with one big enough for - * the real data - */ - /* XXX */ - xpmbuf = malloc(XpmScreen.Width * 2); - if (!xpmbuf) { - error("Can't allocate line buffer"); - exit(1); - } - if (temp != 1) - return FALSE; /* limitation of this code */ - - { - /* read the colormap and translation table */ - int ccount = -1; - while (ccount++ < (XpmScreen.Colors - 1)) { - char index; - int r, g, b; - xb = xpmgetline(); - if (xb == 0) - return FALSE; - if (4 != sscanf(xb, "%c c #%2x%2x%2x", &index, &r, &g, &b)) { - fprintf(stderr, "Bad color entry: %s\n", xb); - return FALSE; - } - ttable[index].flag = 1; /* this color is valid */ - ttable[index].r = r; - ttable[index].g = g; - ttable[index].b = b; - ttable[index].slot = ccount; - } - } - return TRUE; -} - -/* This deserves better. Don't read it too closely - you'll get ill. */ -#define bufsz 2048 -char buf[bufsz]; -xpmgetline() -{ - char *bp; - do { - if (fgets(buf, bufsz, xpmfh) == 0) - return 0; - } while (buf[0] != '"'); - /* strip off the trailing <",> if any */ - for (bp = buf; *bp; bp++) - ; - bp--; - while (isspace(*bp)) - bp--; - if (*bp == ',') - bp--; - if (*bp == '"') - bp--; - bp++; - *bp = '\0'; - - return &buf[1]; -}