diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/doc/Makefile NetHack3D-8/doc/Makefile --- jnethack/doc/Makefile 1970-01-01 09:00:00.000000000 +0900 +++ NetHack3D-8/doc/Makefile 2006-05-09 11:18:10.000000000 +0900 @@ -0,0 +1,95 @@ +# NetHack Makefile. +# SCCS Id: @(#)Makefile.doc 3.4 1996/03/23 + +# for Atari +# SHELL=E:/GEMINI2/MUPFEL.TTP + +GUIDEBOOK = Guidebook # regular ASCII file +#GUIDEBOOK = Guidebook.ps # PostScript file +#GUIDEBOOK = Guidebook.dvi # TeX device-independent file + +# Some versions of col need -x to keep them from converting spaces to tabs; +# some versions of col don't do the conversion by default and don't +# recognize the option. Sigh. +COLCMD = col -bx +#COLCMD = col -b + +# The command to use to generate a PostScript file +# PSCMD = ditroff | psdit +PSCMD = groff + +# Use the "cat" GUIDECMD if nroff and/or tbl and/or col are not installed +# Not appropriate for creating Guidebook.txt. +# GUIDECMD = cat Guidebook.txt +# The following works better with groff-1.18, eg on Linux +# GUIDECMD = tbl tmac.n Guidebook.mn | nroff -c -Tascii | $(COLCMD) +GUIDECMD = tbl tmac.n Guidebook.mn | nroff | $(COLCMD) + +# the basic guidebook +Guidebook: Guidebook.mn + $(GUIDECMD) > Guidebook + +# Fancier output for those with ditroff, psdit and a PostScript printer. +Guidebook.ps: Guidebook.mn + tbl tmac.n Guidebook.mn | $(PSCMD) > Guidebook.ps + +# Guidebook.tex is the same as Guidebook.mn but formatted with LaTeX. +# - The invocation command for LaTeX may vary in different installations. +# - To print Guidebook.dvi you need to use a suitable dvi-driver. +Guidebook.dvi: Guidebook.tex + latex Guidebook.tex + + +GAME = nethack +MANDIR = /usr/man/man6 +MANEXT = 6 + +# manual installation for most BSD-style systems +GAMEMANCREATE = cp nethack.6 +LEVMANCREATE = cp lev_comp.6 +DGNMANCREATE = cp dgn_comp.6 +RCVRMANCREATE = cp recover.6 +DLBMANCREATE = cp dlb.6 +# manual installation for most SYSV-style systems +# GAMEMANCREATE = nroff -man nethack.6 > +# LEVMANCREATE = nroff -man lev_comp.6 > +# DGNMANCREATE = nroff -man dgn_comp.6 > +# RCVRMANCREATE = nroff -man recover.6 > +# DLBMANCREATE = nroff -man dlb.6 > + +manpages: + -$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT) + -$(LEVMANCREATE) $(MANDIR)/lev_comp.$(MANEXT) + -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT) + -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT) + -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT) + +# manual creation for distribution +DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt dlb.txt + +distrib: $(DISTRIB) + @echo "Plain text documentation is up to date." + +Guidebook.txt : Guidebook.mn tmac.n + $(GUIDECMD) > Guidebook.txt +nethack.txt : nethack.6 + nroff -man nethack.6 | $(COLCMD) > nethack.txt +lev_comp.txt : lev_comp.6 + nroff -man lev_comp.6 | $(COLCMD) > lev_comp.txt +dgn_comp.txt : dgn_comp.6 + nroff -man dgn_comp.6 | $(COLCMD) > dgn_comp.txt +recover.txt : recover.6 + nroff -man recover.6 | $(COLCMD) > recover.txt +dlb.txt : dlb.6 + nroff -man dlb.6 | $(COLCMD) > dlb.txt + + +clean: + -rm -f Guidebook.aux Guidebook.log + +spotless: clean + -rm -f Guidebook Guidebook.ps Guidebook.dvi + +maintainer-clean: spotless + -rm -f $(DISTRIB) +# -rm -f Makefile diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/include/config.h NetHack3D-8/include/config.h --- jnethack/include/config.h 2006-05-03 09:42:28.000000000 +0900 +++ NetHack3D-8/include/config.h 2006-05-09 10:49:23.000000000 +0900 @@ -43,12 +43,12 @@ * Define all of those you want supported in your binary. * Some combinations make no sense. See the installation document. */ -#define TTY_GRAPHICS /* good old tty based graphics */ +/* #define TTY_GRAPHICS */ /* good old tty based graphics */ /* #define X11_GRAPHICS */ /* X11 interface */ /* #define QT_GRAPHICS */ /* Qt interface */ /* #define GNOME_GRAPHICS */ /* Gnome interface */ /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ - +#define NH3D_GRAPHICS /* MacOSXCocoa/GNUStep Graphics with OpenGL */ /* * Define the default window system. This should be one that is compiled * into your system (see defines above). Known window systems are: @@ -114,6 +114,17 @@ # define HACKDIR "\\nethack" #endif +/*NetHack3D*/ +#ifdef NH3D_GRAPHICS +/*# define GNUSTEP */ /* use GNUStep framework */ +# define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.png) */ +# define CHDIR +# define HACKDIR "Resources" +# ifndef DEFAULT_WINDOW_SYS +# define DEFAULT_WINDOW_SYS "nh3d" +# endif +#endif + #ifndef DEFAULT_WINDOW_SYS # ifdef X11_GRAPHICS # define DEFAULT_WINDOW_SYS "x11" @@ -165,7 +176,7 @@ #endif #define LOGFILE "logfile" /* larger file for debugging purposes */ -#define NEWS "news" /* the file containing the latest hack news */ +/*#define NEWS "news" */ /* the file containing the latest hack news */ #define PANICLOG "paniclog" /* log of panic and impossible events */ /* @@ -200,7 +211,7 @@ * a tar-like file, thus making a neater installation. See *conf.h * for detailed configuration. */ -/* #define DLB */ /* not supported on all platforms */ +/*#define DLB */ /* not supported on all platforms */ /* * Defining INSURANCE slows down level changes, but allows games that @@ -219,7 +230,7 @@ * otherwise it will be the current directory. */ # ifndef HACKDIR -# define HACKDIR "/usr/games/lib/jnethackdir" +# define HACKDIR "." # endif /* @@ -353,7 +364,7 @@ #endif #define EXP_ON_BOTL /* Show experience on bottom line */ -/* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson@ucivax) */ +#define SCORE_ON_BOTL /* added by Gary Erickson (erickson@ucivax) */ #ifdef JNETHACK /*# define USE_MAKESINGULAR */ /* Enable singularize */ diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/include/global.h NetHack3D-8/include/global.h --- jnethack/include/global.h 2006-05-03 09:42:28.000000000 +0900 +++ NetHack3D-8/include/global.h 2006-05-09 10:49:23.000000000 +0900 @@ -275,7 +275,8 @@ # define EXIT_FAILURE 1 #endif -#if defined(X11_GRAPHICS) || defined(QT_GRAPHICS) || defined(GNOME_GRAPHICS) || defined(MSWIN_GRAPHICS) +/*NetHack3D*/ +#if defined(X11_GRAPHICS) || defined(QT_GRAPHICS) || defined(GNOME_GRAPHICS) || defined(MSWIN_GRAPHICS) || defined(NH3D_GRAPHICS) # ifndef USE_TILES # define USE_TILES /* glyph2tile[] will be available */ # endif @@ -347,8 +348,7 @@ #define PL_NSIZ 32 /* name of player, ghost, shopkeeper */ #define PL_CSIZ 32 /* sizeof pl_character */ #define PL_FSIZ 32 /* fruit name */ -#define PL_PSIZ 63 /* player-given names for pets, other - * monsters, objects */ +#define PL_PSIZ 63 /* player-given names for pets, other monsters, objects */ #define MAXDUNGEON 16 /* current maximum number of dungeons */ #define MAXLEVEL 32 /* max number of levels in one dungeon */ diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/include/system.h NetHack3D-8/include/system.h --- jnethack/include/system.h 2006-05-03 09:42:28.000000000 +0900 +++ NetHack3D-8/include/system.h 2006-05-09 10:49:23.000000000 +0900 @@ -79,6 +79,7 @@ # if !defined(__SC__) && !defined(LINUX) E long NDECL(random); # endif +/* hal # if (!defined(SUNOS4) && !defined(bsdi) && !defined(__FreeBSD__)) || defined(RANDOM) E void FDECL(srandom, (unsigned int)); # else @@ -86,6 +87,7 @@ E int FDECL(srandom, (unsigned int)); # endif # endif +*/ #else E long lrand48(); E void srand48(); diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/include/unixconf.h NetHack3D-8/include/unixconf.h --- jnethack/include/unixconf.h 2006-05-03 09:42:28.000000000 +0900 +++ NetHack3D-8/include/unixconf.h 2006-05-09 10:49:23.000000000 +0900 @@ -34,7 +34,7 @@ /* define any of the following that are appropriate */ #define SVR4 /* use in addition to SYSV for System V Release 4 */ /* including Solaris 2+ */ -#define NETWORK /* if running on a networked system */ +/*#define NETWORK */ /* if running on a networked system */ /* e.g. Suns sharing a playground through NFS */ /* #define SUNOS4 */ /* SunOS 4.x */ /* #define LINUX */ /* Another Unix clone */ @@ -143,7 +143,7 @@ * A stat system call is done on the mailbox every MAILCKFREQ moves. */ -#define MAIL /* Deliver mail during the game */ +/*#define MAIL*/ /* Deliver mail during the game */ /* The Andrew Message System does mail a little differently from normal * UNIX. Mail is deposited in the user's own directory in ~/Mailbox diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/include/winnh3d.h NetHack3D-8/include/winnh3d.h --- jnethack/include/winnh3d.h 1970-01-01 09:00:00.000000000 +0900 +++ NetHack3D-8/include/winnh3d.h 2006-05-09 10:49:23.000000000 +0900 @@ -0,0 +1,23 @@ +/* + * winnh3d.h + * NetHack3D + * + * Created by Haruumi Yoshino on 05/09/07. + * Copyright 2005 Haruumi Yoshino. All rights reserved. + * + */ + +/* SCCS Id: @(#)winnh3d.h 3.4. 2005/09/07 */ +/* Copyright (C) 1998 by Erik Andersen */ +/* Copyright (C) 1998 by Anthony Taylor */ +/* NetHack may be freely redistributed. See license for details. */ + +#ifndef WINNH3D_H +#define WINNH3D_H + +#define E extern + +E struct window_procs nh3d_procs; + +#undef E +#endif /* WINNH3D_H */ diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/src/end.c NetHack3D-8/src/end.c --- jnethack/src/end.c 2006-05-03 09:42:28.000000000 +0900 +++ NetHack3D-8/src/end.c 2006-05-09 10:49:23.000000000 +0900 @@ -52,6 +52,10 @@ #if defined(__BEOS__) || defined(MICRO) || defined(WIN32) || defined(OS2) extern void FDECL(nethack_exit,(int)); +#endif +/* NetHack3D */ +# ifdef NH3D_GRAPHICS +# define nethack_exit nethack3d_exit #else #define nethack_exit exit #endif diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/src/files.c NetHack3D-8/src/files.c --- jnethack/src/files.c 2006-05-03 09:42:28.000000000 +0900 +++ NetHack3D-8/src/files.c 2006-05-09 10:49:23.000000000 +0900 @@ -22,6 +22,16 @@ #include #endif +/* hal nh3d 2005 10 02 */ +#ifdef NH3D_GRAPHICS +/*#include */ +/*#include */ +#include +#include +/*#include */ +#endif +/**/ + #include #ifdef _MSC_VER /* MSC 6.0 defines errno quite differently */ # if (_MSC_VER >= 600) @@ -504,7 +514,7 @@ lock, lev, errno); #else Sprintf(errbuf, - "地下%d階のファイル\"%s\"を開けない(errno %d).", + "テマイシ%dウャ、ホ・ユ・。・、・\"%s\"、ウォ、ア、ハ、、(errno %d)。・", lev, lock, errno); #endif @@ -796,6 +806,11 @@ void set_savefile_name() { +/* NetHack 3D */ +#if defined(NH3D_GRAPHICS) + nh3d_set_savefile_name(); + return; +#endif #if defined(WIN32) char fnamebuf[BUFSZ], encodedfnamebuf[BUFSZ]; #endif @@ -1271,6 +1286,7 @@ # pragma unused(filename,lockname) return (char*)0; #else + # if defined(UNIX) || defined(VMS) || defined(AMIGA) || defined(WIN32) || defined(MSDOS) # ifdef NO_FILE_LINKS Strcpy(lockname, LOCKDIR); diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/src/windows.c NetHack3D-8/src/windows.c --- jnethack/src/windows.c 2003-12-08 08:39:13.000000000 +0900 +++ NetHack3D-8/src/windows.c 2006-05-09 10:49:23.000000000 +0900 @@ -40,6 +40,10 @@ #ifdef MSWIN_GRAPHICS extern struct window_procs mswin_procs; #endif +/*NetHack3D*/ +#ifdef NH3D_GRAPHICS +extern struct window_procs nh3d_procs; +#endif STATIC_DCL void FDECL(def_raw_print, (const char *s)); @@ -81,6 +85,10 @@ #ifdef MSWIN_GRAPHICS { &mswin_procs, 0 }, #endif +/*Nethack3D*/ +#ifdef NH3D_GRAPHICS + { &nh3d_procs, 0 }, +#endif { 0, 0 } /* must be last */ }; diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/sys/Cocoa_GNUStep/Makefile.dat NetHack3D-8/sys/Cocoa_GNUStep/Makefile.dat --- jnethack/sys/Cocoa_GNUStep/Makefile.dat 1970-01-01 09:00:00.000000000 +0900 +++ NetHack3D-8/sys/Cocoa_GNUStep/Makefile.dat 2006-05-09 10:49:24.000000000 +0900 @@ -0,0 +1,148 @@ +# NetHack Makefile. +# SCCS Id: @(#)Makefile.dat 3.4 1992/09/18 + +# for Atari +# SHELL=E:/GEMINI2/MUPFEL.TTP +# UUDECODE=uudecode + +VARDAT = data jrumors quest.dat joracles options + +all: $(VARDAT) spec_levs quest_levs dungeon + +../util/makedefs: + (cd ../util ; make makedefs) + +../util/dgn_comp: + (cd ../util ; make dgn_comp) + +../util/lev_comp: + (cd ../util ; make lev_comp) + +../util/tile2x11: + (cd ../util ; make tile2x11) + +../util/tile2beos: + (cd ../util ; make tile2beos) + +../util/tile2bmp: + (cd ../util ; make tile2bmp) + +x11tiles: ../util/tile2x11 ../win/share/monsters.txt ../win/share/objects.txt \ + ../win/share/other.txt + ../util/tile2x11 ../win/share/monsters.txt ../win/share/objects.txt \ + ../win/share/other.txt + +beostiles: ../util/tile2beos ../win/share/monsters.txt ../win/share/objects.txt \ + ../win/share/other.txt + ../util/tile2beos ../win/share/monsters.txt ../win/share/objects.txt \ + ../win/share/other.txt + +nhtiles.bmp: ../util/tile2bmp ../win/share/monsters.txt ../win/share/objects.txt \ + ../win/share/other.txt + ../util/tile2bmp $@ + +NetHack.ad: ../win/X11/NetHack.ad + cp ../win/X11/NetHack.ad NetHack.ad + +pet_mark.xbm: ../win/X11/pet_mark.xbm + cp ../win/X11/pet_mark.xbm pet_mark.xbm + +rip.xpm: ../win/X11/rip.xpm + cp ../win/X11/rip.xpm rip.xpm + +mapbg.xpm: ../win/gnome/mapbg.xpm + cp ../win/gnome/mapbg.xpm mapbg.xpm + +nhsplash.xpm: ../win/Qt/nhsplash.xpm + cp ../win/Qt/nhsplash.xpm nhsplash.xpm + +nethack.icns: ../win/Qt/nhicns.uu + $(UUDECODE) ../win/Qt/nhicns.uu + +Info.plist: ../win/Qt/Info.pli + cp ../win/Qt/Info.pli Info.plist + +../util/tile2img.ttp: + (cd ../util ; make tile2img.ttp) + +../util/xpm2img.ttp: + (cd ../util ; make xpm2img.ttp) +nh16.img: ../util/tile2img.ttp ../win/share/monsters.txt \ + ../win/share/objects.txt ../win/share/other.txt + ../util/tile2img.ttp nh16.img + +rip.img: ../util/xpm2img.ttp + ../util/xpm2img.ttp ../win/X11/rip.xpm rip.img +title.img: + # cp ../win/gem/title.img title.img + $(UUDECODE) ../win/gem/title.uu + +GEM_RSC.RSC: + # cp ../win/gem/GEM_RSC.RSC GEM_RSC.RSC + $(UUDECODE) ../win/gem/gem_rsc.uu + + +data: data.base ../util/makedefs + ../util/makedefs -d + +#rumors: rumors.tru rumors.fal ../util/makedefs +jrumors: jrumors.tru jrumors.fal ../util/makedefs + ../util/makedefs -r + +quest.dat: quest.txt ../util/makedefs + ../util/makedefs -q + +# by issei 1994/2/5 +#oracles: oracles.txt ../util/makedefs +joracles: joracles.txt ../util/makedefs + ../util/makedefs -h + +# note: 'options' should have already been made when include/date.h was created +options: ../util/makedefs + ../util/makedefs -v + + +spec_levs: ../util/lev_comp \ + bigroom.des castle.des endgame.des gehennom.des knox.des medusa.des \ + mines.des oracle.des sokoban.des tower.des yendor.des + ../util/lev_comp bigroom.des + ../util/lev_comp castle.des + ../util/lev_comp endgame.des + ../util/lev_comp gehennom.des + ../util/lev_comp knox.des + ../util/lev_comp medusa.des + ../util/lev_comp mines.des + ../util/lev_comp oracle.des + ../util/lev_comp sokoban.des + ../util/lev_comp tower.des + ../util/lev_comp yendor.des + touch spec_levs + +quest_levs: ../util/lev_comp \ + Arch.des Barb.des Caveman.des Healer.des Knight.des Monk.des \ + Priest.des Ranger.des Rogue.des Samurai.des Tourist.des Valkyrie.des \ + Wizard.des + ../util/lev_comp Arch.des + ../util/lev_comp Barb.des + ../util/lev_comp Caveman.des + ../util/lev_comp Healer.des + ../util/lev_comp Knight.des + ../util/lev_comp Monk.des + ../util/lev_comp Priest.des + ../util/lev_comp Ranger.des + ../util/lev_comp Rogue.des + ../util/lev_comp Samurai.des + ../util/lev_comp Tourist.des + ../util/lev_comp Valkyrie.des + ../util/lev_comp Wizard.des + touch quest_levs + +dungeon: dungeon.def ../util/makedefs ../util/dgn_comp + ../util/makedefs -e + ../util/dgn_comp dungeon.pdf + +spotless: + -rm -f spec_levs quest_levs *.lev $(VARDAT) dungeon dungeon.pdf + -rm -f nhdat x11tiles beostiles pet_mark.xbm rip.xpm mapbg.xpm + -rm -f rip.img GEM_RSC.RSC title.img nh16.img NetHack.ad + -rm -f ../include/jdata.h diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/sys/Cocoa_GNUStep/Makefile.doc NetHack3D-8/sys/Cocoa_GNUStep/Makefile.doc --- jnethack/sys/Cocoa_GNUStep/Makefile.doc 1970-01-01 09:00:00.000000000 +0900 +++ NetHack3D-8/sys/Cocoa_GNUStep/Makefile.doc 2006-05-09 10:49:24.000000000 +0900 @@ -0,0 +1,95 @@ +# NetHack Makefile. +# SCCS Id: @(#)Makefile.doc 3.4 1996/03/23 + +# for Atari +# SHELL=E:/GEMINI2/MUPFEL.TTP + +GUIDEBOOK = Guidebook # regular ASCII file +#GUIDEBOOK = Guidebook.ps # PostScript file +#GUIDEBOOK = Guidebook.dvi # TeX device-independent file + +# Some versions of col need -x to keep them from converting spaces to tabs; +# some versions of col don't do the conversion by default and don't +# recognize the option. Sigh. +COLCMD = col -bx +#COLCMD = col -b + +# The command to use to generate a PostScript file +# PSCMD = ditroff | psdit +PSCMD = groff + +# Use the "cat" GUIDECMD if nroff and/or tbl and/or col are not installed +# Not appropriate for creating Guidebook.txt. +# GUIDECMD = cat Guidebook.txt +# The following works better with groff-1.18, eg on Linux +# GUIDECMD = tbl tmac.n Guidebook.mn | nroff -c -Tascii | $(COLCMD) +GUIDECMD = tbl tmac.n Guidebook.mn | nroff | $(COLCMD) + +# the basic guidebook +Guidebook: Guidebook.mn + $(GUIDECMD) > Guidebook + +# Fancier output for those with ditroff, psdit and a PostScript printer. +Guidebook.ps: Guidebook.mn + tbl tmac.n Guidebook.mn | $(PSCMD) > Guidebook.ps + +# Guidebook.tex is the same as Guidebook.mn but formatted with LaTeX. +# - The invocation command for LaTeX may vary in different installations. +# - To print Guidebook.dvi you need to use a suitable dvi-driver. +Guidebook.dvi: Guidebook.tex + latex Guidebook.tex + + +GAME = nethack +MANDIR = /usr/man/man6 +MANEXT = 6 + +# manual installation for most BSD-style systems +GAMEMANCREATE = cp nethack.6 +LEVMANCREATE = cp lev_comp.6 +DGNMANCREATE = cp dgn_comp.6 +RCVRMANCREATE = cp recover.6 +DLBMANCREATE = cp dlb.6 +# manual installation for most SYSV-style systems +# GAMEMANCREATE = nroff -man nethack.6 > +# LEVMANCREATE = nroff -man lev_comp.6 > +# DGNMANCREATE = nroff -man dgn_comp.6 > +# RCVRMANCREATE = nroff -man recover.6 > +# DLBMANCREATE = nroff -man dlb.6 > + +manpages: + -$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT) + -$(LEVMANCREATE) $(MANDIR)/lev_comp.$(MANEXT) + -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT) + -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT) + -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT) + +# manual creation for distribution +DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt dlb.txt + +distrib: $(DISTRIB) + @echo "Plain text documentation is up to date." + +Guidebook.txt : Guidebook.mn tmac.n + $(GUIDECMD) > Guidebook.txt +nethack.txt : nethack.6 + nroff -man nethack.6 | $(COLCMD) > nethack.txt +lev_comp.txt : lev_comp.6 + nroff -man lev_comp.6 | $(COLCMD) > lev_comp.txt +dgn_comp.txt : dgn_comp.6 + nroff -man dgn_comp.6 | $(COLCMD) > dgn_comp.txt +recover.txt : recover.6 + nroff -man recover.6 | $(COLCMD) > recover.txt +dlb.txt : dlb.6 + nroff -man dlb.6 | $(COLCMD) > dlb.txt + + +clean: + -rm -f Guidebook.aux Guidebook.log + +spotless: clean + -rm -f Guidebook Guidebook.ps Guidebook.dvi + +maintainer-clean: spotless + -rm -f $(DISTRIB) +# -rm -f Makefile diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/sys/Cocoa_GNUStep/Makefile.src NetHack3D-8/sys/Cocoa_GNUStep/Makefile.src --- jnethack/sys/Cocoa_GNUStep/Makefile.src 1970-01-01 09:00:00.000000000 +0900 +++ NetHack3D-8/sys/Cocoa_GNUStep/Makefile.src 2006-05-09 10:49:24.000000000 +0900 @@ -0,0 +1,940 @@ +# NetHack Makefile. +# SCCS Id: @(#)Makefile.src 3.4 2002/03/02 + +# newer makes predefine $(MAKE) to 'make' and do smarter processing of +# recursive make calls if $(MAKE) is used +# these makes allow $(MAKE) to be overridden by the environment if someone +# wants to (or has to) use something other than the standard make, so we do +# not want to unconditionally set $(MAKE) here +# +# unfortunately, some older makes do not predefine $(MAKE); if you have one of +# these, uncomment the following line +# (you will know that you have one if you get complaints about being unable +# to find 'makedefs') +# MAKE = make + +# This makefile replaces the previous Makefile.unix, Makefile.xenix, +# Makefile.3B2, Makefile.att, and Makefile.tos. +# Set SYSTEM to one of: +# 'Sysunix' -- generic UNIX +# 'Sys3B2' -- AT&T 3B2, 3B5, etc. +# 'Sysatt' -- AT&T UNIXPC, 7300, 3B1 +# 'SysV-AT' -- Microport 286 UNIX (put -DDUMB in CFLAGS) +# 'Systos' -- Atari +# 'SysBe' -- BeOS +SYSTEM = Sysunix + +# +# Make sure that your bourne shell is specified here, as you have to spawn +# some of the commands (eg. depend) in bourne shell for them to work. +# +# For Systos users compiling on the ST, you'll either need a bourne shell +# clone or you'll need to do make depend, etc. by hand. In either case, +# the line below probably needs changing +SHELL=/bin/sh +# for Atari +# SHELL=E:/GEMINI2/MUPFEL.TTP + +# Normally, the C compiler driver is used for linking: +LINK=$(CC) + +# Pick the SYSSRC and SYSOBJ lines corresponding to your desired operating +# system. +# +# for UNIX systems +#SYSSRC = ../sys/share/ioctl.c ../sys/share/unixtty.c ../sys/unix/unixmain.c \ + ../sys/unix/unixunix.c ../sys/unix/unixres.c +#SYSOBJ = ioctl.o unixmain.o unixtty.o unixunix.o unixres.o +# +# for Systos +# SYSSRC = ../sys/atari/tos.c ../sys/share/pcmain.c ../sys/share/pcsys.c \ +# ../sys/share/pctty.c ../sys/share/pcunix.c +# SYSOBJ = tos.o pcmain.o pcsys.o pctty.o pcunix.o +# +# for BeOS +#SYSSRC = ../sys/be/bemain.c ../sys/share/unixtty.c ../sys/share/ioctl.c +#SYSOBJ = bemain.o unixtty.o ioctl.o +# +# for MacOSX(Cocoa) +SYSSRC = ../sys/share/ioctl.c ../sys/share/unixtty.c ../sys/Cocoa_GNUStep/nh3dmain.m \ + ../sys/Cocoa_GNUStep/nh3dres.m ../sys/Cocoa_GNUStep/nh3dunix.m +SYSOBJ = nh3dmain.o nh3dres.o nh3dunix.o ioctl.o unixtty.o + +#JP by issei(93/11/10) +JSRC = ../japanese/jconj.c ../japanese/jtrns.c ../japanese/jlib.c +JOBJ = jconj.o jtrns.o jlib.o + +# if you are using gcc as your compiler: +# uncomment the CC definition below if it's not in your environment +# if you get setcgtty() warnings during execution, you are feeding gcc +# a non-ANSI -- either run fixincludes on it or use +# -traditional in CFLAGS +# CC = gcc +# +# For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following: +# +# CC = gcc -ansi -D_BULL_SOURCE -D_XOPEN_SOURCE -D_POSIX_SOURCE +# +# If you are using GCC 2.2.2 or higher on a DPX/2, just use: +# +CC = gcc +# +# For HP/UX 10.20 with GCC: +# CC = gcc -D_POSIX_SOURCE +# +# For cross-compiling, eg. with gcc on Linux (see also CXX further down): +# CC = arm-linux-gcc +# +# +# if you're debugging and want gcc to check as much as possible, use: +# CC = gcc -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -DGCC_WARN + +# flags may have to be changed as required +# flags for 286 Xenix: +# CFLAGS = -Ml2t16 -O -LARGE -I../include +# LFLAGS = -Ml -F 4000 -SEG 512 + +# flags for 286 Microport SysV-AT +# CFLAGS = -DDUMB -Ml -I../include +# LFLAGS = -Ml + +# flags for Atari gcc (3.2.1) +# CFLAGS = -O -I../include +# LFLAGS = -s +# flags for Atari gcc (3.3) +# CFLAGS = -mshort -O2 -fomit-frame-pointer -I../include +# LFLAGS = -mshort -s + +# flags for AIX 3.1 cc on IBM RS/6000 to define +# a suitable subset of standard libraries +# (note that there is more info regarding the "-qchars=signed" +# switch in file Install.unx note 8) +# CFLAGS = -D_NO_PROTO -D_XOPEN_SOURCE -O -I../include -qchars=signed +# +# Some of our subroutines are complex enough that this is required for full +# optimization under AIX 3.2 (I don't know about 3.1). +# +# CFLAGS = -D_NO_PROTO -D_XOPEN_SOURCE -D_ALL_SOURCE -O -I../include -qchars=signed -qmaxmem=5000 + +# flags for A/UX 2.01 using native cc or c89 +# gcc predefines AUX so that's not needed there +# Remember to use -lcurses for WINLIB below ! +# CFLAGS = -ZS -D_POSIX_SOURCE -O -I../include -DAUX + +# flags for IRIX 4.0.x using native cc +# The include files are __STDC__, but have bugs involving const +# CFLAGS = -O -I../include -D__STDC__ -Dconst= -woff 100,293 +# LFLAGS = -s + +# flags for BSD/OS 2.0 +# CFLAGS = -O -I../include -I/usr/X11/include +# LFLAGS = -L/usr/X11/lib + +# flags for Linux +# compile normally +# CFLAGS = -Wall -g -O2 -fomit-frame-pointer -I../include `gnome-config --cflags gnome` +# LFLAGS = -L/usr/X11R6/lib +# OR compile backwards compatible a.out format +# CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include +# LFLAGS = -b i486-linuxaout -L/usr/X11R6/lib + +# flags for BeOS +# on a Mac/BeBox: +#CC = mwcc +#CFLAGS = -r -I../include +#LINK = mwld +#LFLAGS = -map nethack.xMAP +# on Intel: +#CFLAGS = -O -I../include +#LINK = gcc +#LFLAGS = -Xlinker -soname=_APP_ + +# Only used for the Gnome interface. +# When including the Gnome interface, you need to include gnome specific +# directories. The ones given below is the usual spot for linux systems. +# The paths are for glibconfig.h and gnomesupport.h respectively. +# +GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome + +# Only used for the NH3D interface. +# When including the NH3D interface, you need to include NH3D specific +# directories. +# For Linux? +#GNUSTEPDIR = /usr/lib/GNUstep/System/Library +#NH3DINC=-I../win/nh3d -I$(GNUSTEPDIR)/Headers -fconstant-string-class=NSConstantString +# For MacOSX (Cocoa10.4) +MACOSXDIR = /System/Library +OSXARCH = -arch ppc +#OSXARCH = -arch i386 +#OSXVECTOR = -faltivec -mtune=G5 -ftree-vectorize +#OSXVECTOR = -msse3 -ftree-vectorize +CFLAGS = $(OSXARCH) $(OSXVECTOR) -I../include -Os +OBJCFLAG = $(OSXARCH) $(OSXVECTOR) -I../include -Os -x objective-c -Wno-trigraphs -fobjc-exceptions -mdynamic-no-pic -Wreturn-type -Wunused-variable -fmessage-length=0 -fobjc-direct-dispatch -fvisibility=hidden + + +NH3DINC = -I../win/nh3d -I$(MACOSXDIR)/Frameworks -I/usr/include + +# flags for debugging: +# CFLAGS = -g -I../include + +# CFLAGS = -W -g -O -I../include +# LFLAGS = + +# The Qt and Be window systems are written in C++, while the rest of +# NetHack is standard C. If using Qt, uncomment the LINK line here to get +# the C++ libraries linked in. +# CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include +# CXX=g++ +#LINK=g++ +# For cross-compiling, eg. with gcc on Linux (see also CC further up): +#CXX=arm-linux-g++ +#LINK=arm-linux-gcc + +# flags for IPv6 support +# for Linux + glibc-2.1.x / Solaris users +# CFLAGS += -DINET6 +# for KAME users +# CFLAGS += -DINET6 +# LFLAGS += -L/usr/local/v6/lib -linet6 +# for Linux libinet users +# CFLAGS = -DINET6 -I/usr/inet6/include $(CFLAGS) +# LFLAGS += -L/usr/inet6/lib -linet6 + +# Set the WINSRC, WINOBJ, and WINLIB lines to correspond to your desired +# combination of windowing systems. Also set windowing systems in config.h. +# Note that if you are including multiple tiled window systems, you don't +# want two copies of tile.o, so comment out all but the first. +# +# files for a straight tty port using no native windowing system +WINTTYSRC = ../win/tty/getline.c ../win/tty/termcap.c ../win/tty/topl.c \ + ../win/tty/wintty.c +WINTTYOBJ = getline.o termcap.o topl.o wintty.o +# +# files for an X11 port +# (tile.c is a generated source file) +WINX11SRC = ../win/X11/Window.c ../win/X11/dialogs.c ../win/X11/winX.c \ + ../win/X11/winmap.c ../win/X11/winmenu.c ../win/X11/winmesg.c \ + ../win/X11/winmisc.c ../win/X11/winstat.c ../win/X11/wintext.c \ + ../win/X11/winval.c tile.c +WINX11OBJ = Window.o dialogs.o winX.o winmap.o winmenu.o winmesg.o \ + winmisc.o winstat.o wintext.o winval.o tile.o +# +# Files for a Qt port +# +WINQTSRC = ../win/Qt/qt_win.cpp ../win/Qt/qt_clust.cpp ../win/Qt/qttableview.cpp +WINQTOBJ = qt_win.o qt_clust.o qttableview.o tile.o +# +# Files for a Gnome port +# +WINGNOMESRC = ../win/gnome/gnaskstr.c ../win/gnome/gnbind.c \ + ../win/gnome/gnglyph.c ../win/gnome/gnmain.c ../win/gnome/gnmap.c \ + ../win/gnome/gnmenu.c ../win/gnome/gnmesg.c ../win/gnome/gnopts.c \ + ../win/gnome/gnplayer.c ../win/gnome/gnsignal.c \ + ../win/gnome/gnstatus.c ../win/gnome/gntext.c ../win/gnome/gnyesno.c \ + ../win/gnome/gnworn.c +WINGNOMEOBJ = gnaskstr.o gnbind.o gnglyph.o gnmain.o gnmap.o gnmenu.o \ + gnmesg.o gnopts.o gnplayer.o gnsignal.o gnstatus.o gntext.o \ + gnyesno.o gnworn.o +# +# Files for a NH3D port +# +WINNH3DSRC = ../win/nh3d/NH3DMapItem.m ../win/nh3d/NH3DMapModel.m \ + ../win/nh3d/NH3DMapView.m ../win/nh3d/NH3DMenuItem.m ../win/nh3d/NH3DMenuWindow.m \ + ../win/nh3d/NH3DMessenger.m ../win/nh3d/NH3DModelObjects.m ../win/nh3d/NH3DOpenGLView.m \ + ../win/nh3d/NH3DPanel.m ../win/nh3d/NH3DPreferenceController.m ../win/nh3d/NH3DTileCache.m \ + ../win/nh3d/NH3DUserMakeSheetController.m ../win/nh3d/NH3DUserStatusModel.m \ + ../win/nh3d/winnh3d.m \ +# ../win/nh3d/compat/Cocoa-compat.m +WINNH3DOBJ = NH3DMapItem.o NH3DMapModel.o NH3DMapView.o NH3DMenuItem.o NH3DMenuWindow.o \ + NH3DMessenger.o NH3DModelObjects.o NH3DOpenGLView.o NH3DPanel.o NH3DPreferenceController.o \ + NH3DTileCache.o NH3DUserMakeSheetController.o NH3DUserStatusModel.o winnh3d.o tile.o \ +# Cocoa-compat.o +# +# Files for a Gem port +WINGEMSRC = ../win/gem/wingem.c ../win/gem/wingem1.c ../win/gem/load_img.c \ + ../win/gem/gr_rect.c tile.c +WINGEMOBJ = wingem.o wingem1.o load_img.o gr_rect.o tile.o +# +# Files for a BeOS InterfaceKit port -- not ready for prime time +WINBESRC = +WINBEOBJ = +#WINBESRC = ../win/BeOS/winbe.cpp ../win/BeOS/NHWindow.cpp \ +# ../win/BeOS/NHMenuWindow.cpp ../win/BeOS/NHMapWindow.cpp tile.c +#WINBEOBJ = winbe.o NHWindow.o NHMenuWindow.o NHMapWindow.o tile.o + +# +# +WINSRC = $(WINNH3DSRC) +WINOBJ = $(WINNH3DOBJ) + +# on some systems the termcap library is in -ltermcap or -lcurses +# on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead +# Sysatt uses shared library in lieu of this option +# Systos needs -lcurses16 if you use -mshort +# AIX 3.1 on RS/6000 likes -lcurses if TERMINFO defined in unixconf.h +# and -ltermcap otherwise +# Linux uses -lncurses (newer) or -ltermcap (older) +# Be uses -ltermcap +# +# libraries for tty ports +# WINTTYLIB = -ltermcap +# WINTTYLIB = -lcurses +# WINTTYLIB = -lcurses16 + WINTTYLIB = -lncurses +# WINTTYLIB = -ltermlib +# +# libraries for X11 +# If USE_XPM is defined in config.h, you will also need -lXpm here. +# WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11 +# WINX11LIB = -lXaw -lXmu -lXt -lX11 +WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm +# WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0 +# +# libraries for Qt +WINQTLIB = -L$(QTDIR)/lib -lqt +# +# libraries for KDE (with Qt) +WINKDELIB = -lkdecore -lkdeui -lXext +# +# libraries for Gnome +WINGNOMELIB = -lgnomeui -lgnome -lart_lgpl -lgtk -lgdk -lpopt +# +# libraries for NH3D +# For Linux? +#WINNH3DLIB = -L$(GNUSTEPDIR)/Libraries -lgnustep-gui -lgnustep-base -lobjc -lGL -lGLU +# For MacOSX_PPC +WINNH3DLIB = -L$(MACOSXDIR) -F$(MACOSXDIR)/Frameworks -framework AppKit -framework OpenGL -framework Cocoa -framework Foundation $(OSXARCH) +# +# libraries for Gem port +WINGEMLIB = -le_gem -lgem +# +# libraries for BeOS +WINBELIB = -lbe + +WINLIB = $(WINNH3DLIB) + +# any other strange libraries your system needs (for Sysunix only -- the more +# specialized targets should already be right) +# +# on HP-UX 8.x, the malloc(3x) routines in libmalloc.a seem to align things +# better than the malloc(3) ones in libc.a +# LIBS = -lmalloc +# +# DPX/2's also use the malloc(3x) routines. In addition, if you are building +# for X11, you must include libinet.a. +# LIBS = -lmalloc -linet +# +# Linux NetHack uses some bsd style ioctl functions, thus it is necessary to +# use the bsd libs. (Only if still compiling as BSD in unixconf.h; recent +# versions compile fine using SYSV without this.) +# LIBS = -lbsd +# +# for CYGWIN32 aka cygwin 1.1.1 +# LIBS = -lcygwin +# +# Solaris 2.x seems to work with the following +# LIBS = -lsocket -lnsl +# +# IRIX 4.0.x needs -lsun if NIS (YP) is being used for passwd file lookup +# LIBS = -lsun +# +# FreeBSD-2.2 needs -lxpg4 to use locale +# LIBS = -lxpg4 +# +# LIBS = + +# make NetHack +#JP by issei(96/5/27) +#GAME = jnethack +# GAME = nethack.prg +GAME = NetHack3D + +# if you defined RANDOM in unixconf.h/tosconf.h since your system did not come +# with a reasonable random number generator +# RANDOBJ = random.o +RANDOBJ = + + +# used by `make depend' to reconstruct this Makefile; you shouldn't need this +AWK = nawk + +# ---------------------------------------- +# +# Nothing below this line should have to be changed. +# +# Other things that have to be reconfigured are in config.h, +# {unixconf.h, pcconf.h, tosconf.h}, and possibly system.h + +MAKEDEFS = ../util/makedefs + +# timestamp files to reduce `make' overhead and shorten .o dependency lists +CONFIG_H = ../src/config.h-t +HACK_H = ../src/hack.h-t + +# all .c that are part of the main NetHack program and are not operating- or +# windowing-system specific +HACKCSRC = allmain.c alloc.c apply.c artifact.c attrib.c ball.c bones.c \ + botl.c cmd.c dbridge.c decl.c detect.c dig.c display.c dlb.c do.c \ + do_name.c do_wear.c dog.c dogmove.c dokick.c dothrow.c drawing.c \ + dungeon.c eat.c end.c engrave.c exper.c explode.c extralev.c \ + files.c fountain.c hack.c hacklib.c invent.c light.c lock.c \ + mail.c makemon.c mapglyph.c mcastu.c mhitm.c mhitu.c minion.c \ + mklev.c mkmap.c \ + mkmaze.c mkobj.c mkroom.c mon.c mondata.c monmove.c monst.c \ + mplayer.c mthrowu.c muse.c music.c o_init.c objects.c objnam.c \ + options.c pager.c pickup.c pline.c polyself.c potion.c pray.c \ + priest.c quest.c questpgr.c read.c rect.c region.c restore.c rip.c \ + rnd.c role.c rumors.c save.c shk.c shknam.c sit.c sounds.c sp_lev.c \ + spell.c steal.c steed.c teleport.c timeout.c topten.c track.c trap.c \ + u_init.c uhitm.c vault.c version.c vision.c weapon.c were.c wield.c \ + windows.c wizard.c worm.c worn.c write.c zap.c + +# all operating-system-dependent .c (for dependencies and such) +SYSCSRC = ../sys/atari/tos.c ../sys/share/pcmain.c ../sys/share/pcsys.c \ + ../sys/share/pctty.c ../sys/share/pcunix.c ../sys/share/random.c \ + ../sys/share/ioctl.c ../sys/share/unixtty.c ../sys/unix/unixmain.c \ + ../sys/unix/unixunix.c ../sys/unix/unixres.c ../sys/be/bemain.c + +# generated source files (tile.c is handled separately via WINxxxSRC) +GENCSRC = monstr.c vis_tab.c #tile.c + +# all windowing-system-dependent .c (for dependencies and such) +WINCSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC) $(WINNH3DSRC) +# all windowing-system-dependent .cpp (for dependencies and such) +WINCXXSRC = $(WINQTSRC) $(WINBESRC) + +# .c files for this version (for date.h) +VERSOURCES = $(HACKCSRC) $(JSRC) $(SYSSRC) $(WINSRC) $(GENCSRC) + +# .c files for all versions using this Makefile (for lint and tags) +CSOURCES = $(HACKCSRC) $(JSRC) $(SYSSRC) $(WINCSRC) $(GENCSRC) + + +# all .h files except date.h, onames.h, pm.h, and vis_tab.h which would +# cause dependency loops if run through "make depend" +# and dgn_comp.h, dgn_file.h, lev_comp.h, special level & dungeon files. +# +HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h color.h \ + config.h config1.h coord.h decl.h def_os2.h display.h dlb.h dungeon.h \ + edog.h emin.h engrave.h epri.h eshk.h extern.h flag.h func_tab.h \ + global.h hack.h lev.h macconf.h mfndpos.h micro.h mkroom.h \ + monattk.h mondata.h monflag.h monst.h monsym.h obj.h objclass.h \ + os2conf.h patchlevel.h pcconf.h permonst.h prop.h rect.h region.h rm.h \ + sp_lev.h spell.h system.h tcap.h timeout.h tosconf.h tradstdc.h \ + trampoli.h trap.h unixconf.h vault.h vision.h vmsconf.h wintty.h \ + winX.h winprocs.h wintype.h you.h youprop.h + +HSOURCES = $(HACKINCL) date.h onames.h pm.h vis_tab.h\ + lev_comp.h dgn_comp.h dgn_file.h + +# the following .o's _must_ be made before any others (for makedefs) +FIRSTOBJ = monst.o objects.o + +HOBJ = $(FIRSTOBJ) allmain.o alloc.o apply.o artifact.o attrib.o ball.o \ + bones.o botl.o cmd.o dbridge.o decl.o detect.o dig.o display.o dlb.o \ + do.o do_name.o do_wear.o dog.o dogmove.o dokick.o dothrow.o \ + drawing.o dungeon.o eat.o end.o engrave.o exper.o explode.o \ + extralev.o files.o fountain.o hack.o hacklib.o invent.o light.o \ + lock.o mail.o makemon.o mapglyph.o mcastu.o mhitm.o mhitu.o \ + minion.o mklev.o mkmap.o \ + mkmaze.o mkobj.o mkroom.o mon.o mondata.o monmove.o monstr.o \ + mplayer.o mthrowu.o muse.o music.o o_init.o objnam.o options.o \ + pager.o pickup.o pline.o polyself.o potion.o pray.o priest.o \ + quest.o questpgr.o read.o rect.o region.o restore.o rip.o rnd.o \ + role.o rumors.o save.o shk.o shknam.o sit.o sounds.o sp_lev.o spell.o \ + steal.o steed.o teleport.o timeout.o topten.o track.o trap.o u_init.o \ + uhitm.o vault.o vision.o vis_tab.o weapon.o were.o wield.o windows.o \ + wizard.o worm.o worn.o write.o zap.o \ + $(RANDOBJ) $(JOBJ) $(SYSOBJ) $(WINOBJ) version.o +# the .o files from the HACKCSRC, SYSSRC, and WINSRC lists + +$(GAME): $(SYSTEM) + @echo "$(GAME) is up to date." + +Sysunix: $(HOBJ) Makefile + @echo "Loading ..." + $(LINK) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) $(LIBS) + @touch Sysunix + +Sys3B2: $(HOBJ) Makefile + @echo "Loading ..." + @$(LINK) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) -lmalloc + @touch Sys3B2 + +Sysatt: $(HOBJ) Makefile + @echo "Loading ..." + @$(LD) $(LFLAGS) /lib/crt0s.o /lib/shlib.ifile -o $(GAME) $(HOBJ) + @touch Sysatt + +Systos: $(HOBJ) Makefile + @echo "Loading ..." + @$(LINK) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) + @touch Systos + +SysV-AT: DUMB.Setup $(HOBJ) Makefile + @echo "Loading ..." + @$(LINK) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) + @touch SysV-AT + +SysBe: $(HOBJ) Makefile + @echo "Loading ..." + @$(LINK) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) $(LIBS) + @xres -o $(GAME) ../win/BeOS/nethack.rsrc + @mimeset -f $(GAME) + @touch SysBe + +DUMB.Setup: ../include/extern.h + cp ../include/extern.h ../include/extern.h.BAK + cat ../include/extern.h | \ + sed -e '/^E\ int\ /!b' \ + -e '/[^;/ ]$$/N' \ + -e '/[(][*]occupation[)]/b' \ + -e '/[(][*]afternmv[)]/b' \ + -e '/float_down/b' \ + -e '/done1/b' \ + -e '/identify/b' \ + -e '/Hear_again/b' \ + -e '/hangup/b' \ + -e 's/^\(.*\)$$/\/\* \1 \/\*\*\//' | \ + sed -e '/^E\ void\ /!b' \ + -e '/[^;/ ]$$/N' \ + -e 's/^\(.*\)$$/\/\* \1 \/\*\*\//' \ + >../include/extern.DUMB + cp ../include/extern.DUMB ../include/extern.h + @touch DUMB.Setup + +all: $(GAME) + + +# dependencies for makedefs and its outputs, which the util +# Makefile is responsible for keeping up to date +# + +# special rules, to force update of makedefs, real dependencies should be +# below in the 'make depend' output. +monst.o: + $(CC) $(CFLAGS) -c monst.c + @rm -f $(MAKEDEFS) + +objects.o: + $(CC) $(CFLAGS) -c objects.c + @rm -f $(MAKEDEFS) + +# Qt windowport meta-object-compiler output +qt_kde0.moc: ../include/qt_kde0.h + $(QTDIR)/bin/moc -o qt_kde0.moc ../include/qt_kde0.h + +qt_win.moc: ../include/qt_win.h + $(QTDIR)/bin/moc -o qt_win.moc ../include/qt_win.h + +qttableview.moc: ../include/qttableview.h + $(QTDIR)/bin/moc -o qttableview.moc ../include/qttableview.h + +$(MAKEDEFS): ../util/makedefs.c $(CONFIG_H) ../include/permonst.h \ + ../include/objclass.h ../include/monsym.h \ + ../include/artilist.h ../include/dungeon.h ../include/obj.h \ + ../include/monst.h ../include/you.h ../include/flag.h \ + ../include/dlb.h ../include/patchlevel.h ../include/qtext.h + @( cd ../util ; $(MAKE) makedefs) + +../include/onames.h: $(MAKEDEFS) + @( cd ../util ; $(MAKE) ../include/onames.h ) +../include/pm.h: $(MAKEDEFS) + @( cd ../util ; $(MAKE) ../include/pm.h ) +monstr.c: $(MAKEDEFS) + @( cd ../util ; $(MAKE) ../src/monstr.c ) +../include/vis_tab.h: $(MAKEDEFS) + @( cd ../util ; $(MAKE) ../include/vis_tab.h ) +# makedefs -z makes both vis_tab.h and vis_tab.c, but writes the .h first +vis_tab.c: ../include/vis_tab.h +tile.c: ../win/share/tilemap.c $(HACK_H) + @( cd ../util ; $(MAKE) ../src/tile.c ) +#JP by issei(94/07/13) +../include/jdata.h: $(MAKEDEFS) ../dat/jtrnsobj.dat ../dat/jtrnsmon.dat + @( cd ../util ; $(MAKE) ../include/jdata.h ) + +../win/gnome/gn_rip.h: ../win/X11/rip.xpm + cp ../win/X11/rip.xpm ../win/gnome/gn_rip.h + +# 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. +# +# hack.h depends on makedefs' output, so we know makedefs will be +# up to date before being executed +../include/date.h: $(VERSOURCES) $(HACK_H) + ../util/makedefs -v + + +lint: +# lint cannot have -p here because (i) capitals are meaningful: +# [Ww]izard, (ii) identifiers may coincide in the first six places: +# doweararm() versus dowearring(). +# _flsbuf comes from , a bug in the system libraries. + @echo lint -axbh -DLINT ... + @lint -axbh -I../include -DLINT $(CSOURCES) | sed '/_flsbuf/d' + + +tags: $(CSOURCES) + @echo ctags -tw ... + @ctags -tw $(CSOURCES) + @( cd ../include ; ctags -tw $(HSOURCES) ) + @( cd ../util ; $(MAKE) tags ) + +clean: + -rm -f *.o $(HACK_H) $(CONFIG_H) + +spotless: clean + -rm -f a.out core $(GAME) Sys* + -rm -f ../include/date.h ../include/onames.h ../include/pm.h + -rm -f monstr.c ../include/vis_tab.h vis_tab.c tile.c *.moc + -rm -f ../win/gnome/gn_rip.h + + +depend: ../sys/unix/depend.awk \ + $(SYSCSRC) $(WINCSRC) $(WINCXXSRC) $(GENCSRC) $(HACKCSRC) + $(AWK) -f ../sys/unix/depend.awk ../include/*.h \ + $(SYSCSRC) $(WINCSRC) $(WINCXXSRC) $(GENCSRC) $(HACKCSRC) >makedep + @echo '/^# DO NOT DELETE THIS LINE OR CHANGE ANYTHING BEYOND IT/+2,$$d' >eddep + @echo '$$r makedep' >>eddep + @echo 'w' >>eddep + @cp Makefile Makefile.bak + ed - Makefile < eddep + @rm -f eddep makedep + @echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile + @echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile + @echo '# see make depend above' >> Makefile + - diff Makefile.bak Makefile + @rm -f Makefile.bak + +# DO NOT DELETE THIS LINE OR CHANGE ANYTHING BEYOND IT + +# config.h timestamp +$(CONFIG_H): ../include/config.h ../include/config1.h ../include/tradstdc.h \ + ../include/global.h ../include/coord.h ../include/vmsconf.h \ + ../include/system.h ../include/unixconf.h ../include/os2conf.h \ + ../include/micro.h ../include/pcconf.h ../include/tosconf.h \ + ../include/amiconf.h ../include/macconf.h ../include/beconf.h \ + ../include/wceconf.h ../include/ntconf.h ../include/nhlan.h + touch $(CONFIG_H) +# hack.h timestamp +$(HACK_H): ../include/hack.h $(CONFIG_H) ../include/align.h \ + ../include/dungeon.h ../include/monsym.h ../include/mkroom.h \ + ../include/objclass.h ../include/youprop.h ../include/prop.h \ + ../include/permonst.h ../include/monattk.h \ + ../include/monflag.h ../include/mondata.h ../include/pm.h \ + ../include/wintype.h ../include/decl.h ../include/quest.h \ + ../include/spell.h ../include/color.h ../include/obj.h \ + ../include/you.h ../include/attrib.h ../include/monst.h \ + ../include/skills.h ../include/onames.h ../include/timeout.h \ + ../include/trap.h ../include/flag.h ../include/rm.h \ + ../include/vision.h ../include/display.h ../include/engrave.h \ + ../include/rect.h ../include/region.h ../include/winprocs.h \ + ../include/wintty.h ../include/trampoli.h + touch $(HACK_H) +# +tos.o: ../sys/atari/tos.c $(HACK_H) ../include/tcap.h + $(CC) $(CFLAGS) -c ../sys/atari/tos.c +pcmain.o: ../sys/share/pcmain.c $(HACK_H) ../include/dlb.h \ + #../include/win32api.h + $(CC) $(CFLAGS) -c ../sys/share/pcmain.c +pcsys.o: ../sys/share/pcsys.c $(HACK_H) + $(CC) $(CFLAGS) -c ../sys/share/pcsys.c +pctty.o: ../sys/share/pctty.c $(HACK_H) + $(CC) $(CFLAGS) -c ../sys/share/pctty.c +pcunix.o: ../sys/share/pcunix.c $(HACK_H) + $(CC) $(CFLAGS) -c ../sys/share/pcunix.c +random.o: ../sys/share/random.c $(HACK_H) + $(CC) $(CFLAGS) -c ../sys/share/random.c +ioctl.o: ../sys/share/ioctl.c $(HACK_H) ../include/tcap.h + $(CC) $(CFLAGS) -c ../sys/share/ioctl.c +unixtty.o: ../sys/share/unixtty.c $(HACK_H) + $(CC) $(CFLAGS) -c ../sys/share/unixtty.c +unixmain.o: ../sys/unix/unixmain.c $(HACK_H) ../include/dlb.h + $(CC) $(CFLAGS) -c ../sys/unix/unixmain.c +unixunix.o: ../sys/unix/unixunix.c $(HACK_H) + $(CC) $(CFLAGS) -c ../sys/unix/unixunix.c +unixres.o: ../sys/unix/unixres.c $(CONFIG_H) + $(CC) $(CFLAGS) -c ../sys/unix/unixres.c +nh3dmain.o: ../sys/Cocoa_GNUStep/nh3dmain.m + $(CC) $(OBJCFLAG) -c ../sys/Cocoa_GNUStep/nh3dmain.m +nh3dres.o: ../sys/Cocoa_GNUStep/nh3dres.m $(CONFIG_H) + $(CC) $(OBJCFLAG) -c ../sys/Cocoa_GNUStep/nh3dres.m +nh3dunix.o: ../sys/Cocoa_GNUStep/nh3dunix.m $(HACK_H) + $(CC) $(OBJCFLAG) -c ../sys/Cocoa_GNUStep/nh3dunix.m +bemain.o: ../sys/be/bemain.c $(HACK_H) ../include/dlb.h + $(CC) $(CFLAGS) -c ../sys/be/bemain.c +getline.o: ../win/tty/getline.c $(HACK_H) ../include/func_tab.h + $(CC) $(CFLAGS) -c ../win/tty/getline.c +termcap.o: ../win/tty/termcap.c $(HACK_H) ../include/tcap.h + $(CC) $(CFLAGS) -c ../win/tty/termcap.c +topl.o: ../win/tty/topl.c $(HACK_H) ../include/tcap.h + $(CC) $(CFLAGS) -c ../win/tty/topl.c +wintty.o: ../win/tty/wintty.c $(HACK_H) ../include/dlb.h \ + ../include/patchlevel.h ../include/tcap.h + $(CC) $(CFLAGS) -c ../win/tty/wintty.c +Window.o: ../win/X11/Window.c ../include/xwindowp.h ../include/xwindow.h \ + $(CONFIG_H) + $(CC) $(CFLAGS) -c ../win/X11/Window.c +dialogs.o: ../win/X11/dialogs.c $(CONFIG_H) + $(CC) $(CFLAGS) -c ../win/X11/dialogs.c +winX.o: ../win/X11/winX.c $(HACK_H) ../include/winX.h ../include/dlb.h \ + ../include/patchlevel.h ../win/X11/nh72icon \ + ../win/X11/nh56icon ../win/X11/nh32icon + $(CC) $(CFLAGS) -c ../win/X11/winX.c +winmap.o: ../win/X11/winmap.c ../include/xwindow.h $(HACK_H) ../include/dlb.h \ + ../include/winX.h ../include/tile2x11.h + $(CC) $(CFLAGS) -c ../win/X11/winmap.c +winmenu.o: ../win/X11/winmenu.c $(HACK_H) ../include/winX.h + $(CC) $(CFLAGS) -c ../win/X11/winmenu.c +winmesg.o: ../win/X11/winmesg.c ../include/xwindow.h $(HACK_H) ../include/winX.h + $(CC) $(CFLAGS) -c ../win/X11/winmesg.c +winmisc.o: ../win/X11/winmisc.c $(HACK_H) ../include/func_tab.h \ + ../include/winX.h + $(CC) $(CFLAGS) -c ../win/X11/winmisc.c +winstat.o: ../win/X11/winstat.c $(HACK_H) ../include/winX.h + $(CC) $(CFLAGS) -c ../win/X11/winstat.c +wintext.o: ../win/X11/wintext.c $(HACK_H) ../include/winX.h ../include/xwindow.h + $(CC) $(CFLAGS) -c ../win/X11/wintext.c +winval.o: ../win/X11/winval.c $(HACK_H) ../include/winX.h + $(CC) $(CFLAGS) -c ../win/X11/winval.c +tile.o: tile.c $(HACK_H) +gnaskstr.o: ../win/gnome/gnaskstr.c ../win/gnome/gnaskstr.h \ + ../win/gnome/gnmain.h + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gnaskstr.c +gnbind.o: ../win/gnome/gnbind.c ../win/gnome/gnbind.h ../win/gnome/gnmain.h \ + ../win/gnome/gnmenu.h ../win/gnome/gnaskstr.h \ + ../win/gnome/gnyesno.h + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gnbind.c +gnglyph.o: ../win/gnome/gnglyph.c ../win/gnome/gnglyph.h ../include/tile2x11.h + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gnglyph.c +gnmain.o: ../win/gnome/gnmain.c ../win/gnome/gnmain.h ../win/gnome/gnsignal.h \ + ../win/gnome/gnbind.h ../win/gnome/gnopts.h $(HACK_H) \ + ../include/date.h + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gnmain.c +gnmap.o: ../win/gnome/gnmap.c ../win/gnome/gnmap.h ../win/gnome/gnglyph.h \ + ../win/gnome/gnsignal.h $(HACK_H) + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gnmap.c +gnmenu.o: ../win/gnome/gnmenu.c ../win/gnome/gnmenu.h ../win/gnome/gnmain.h \ + ../win/gnome/gnbind.h ../include/func_tab.h + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gnmenu.c +gnmesg.o: ../win/gnome/gnmesg.c ../win/gnome/gnmesg.h ../win/gnome/gnsignal.h + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gnmesg.c +gnopts.o: ../win/gnome/gnopts.c ../win/gnome/gnopts.h ../win/gnome/gnglyph.h \ + ../win/gnome/gnmain.h ../win/gnome/gnmap.h $(HACK_H) + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gnopts.c +gnplayer.o: ../win/gnome/gnplayer.c ../win/gnome/gnplayer.h \ + ../win/gnome/gnmain.h $(HACK_H) + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gnplayer.c +gnsignal.o: ../win/gnome/gnsignal.c ../win/gnome/gnsignal.h \ + ../win/gnome/gnmain.h + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gnsignal.c +gnstatus.o: ../win/gnome/gnstatus.c ../win/gnome/gnstatus.h \ + ../win/gnome/gnsignal.h ../win/gnome/gn_xpms.h \ + ../win/gnome/gnomeprv.h + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gnstatus.c +gntext.o: ../win/gnome/gntext.c ../win/gnome/gntext.h ../win/gnome/gnmain.h \ + ../win/gnome/gn_rip.h + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gntext.c +gnyesno.o: ../win/gnome/gnyesno.c ../win/gnome/gnbind.h ../win/gnome/gnyesno.h + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gnyesno.c +gnworn.o: ../win/gnome/gnworn.c ../win/gnome/gnworn.h ../win/gnome/gnglyph.h \ + ../win/gnome/gnsignal.h ../win/gnome/gnomeprv.h + $(CC) $(CFLAGS) $(GNOMEINC) -c ../win/gnome/gnworn.c +wingem.o: ../win/gem/wingem.c $(HACK_H) ../include/func_tab.h ../include/dlb.h \ + ../include/patchlevel.h ../include/wingem.h + $(CC) $(CFLAGS) -c ../win/gem/wingem.c +wingem1.o: ../win/gem/wingem1.c ../include/gem_rsc.h ../include/load_img.h \ + ../include/gr_rect.h ../include/wintype.h ../include/wingem.h + $(CC) $(CFLAGS) -c ../win/gem/wingem1.c +load_img.o: ../win/gem/load_img.c ../include/load_img.h + $(CC) $(CFLAGS) -c ../win/gem/load_img.c +gr_rect.o: ../win/gem/gr_rect.c ../include/gr_rect.h + $(CC) $(CFLAGS) -c ../win/gem/gr_rect.c +tile.o: tile.c $(HACK_H) +jconj.o: ../japanese/jconj.c ../include/hack.h + $(CC) $(CFLAGS) -c ../japanese/jconj.c +jtrns.o: ../japanese/jtrns.c ../include/hack.h ../include/jdata.h + $(CC) $(CFLAGS) -c ../japanese/jtrns.c +jlib.o: ../japanese/jlib.c ../include/hack.h + $(CC) $(CFLAGS) -c ../japanese/jlib.c +gtk.o: ../win/gtk/gtk.c ../include/hack.h ../include/winGTK.h + $(CC) $(CFLAGS) -c ../win/gtk/gtk.c +gtkgetlin.o: ../win/gtk/gtkgetlin.c ../include/hack.h ../include/winGTK.h + $(CC) $(CFLAGS) -c ../win/gtk/gtkgetlin.c +gtkstatus.o: ../win/gtk/gtkstatus.c ../include/hack.h ../include/winGTK.h + $(CC) $(CFLAGS) -c ../win/gtk/gtkstatus.c +gtkmenu.o: ../win/gtk/gtkmenu.c ../include/hack.h ../include/winGTK.h + $(CC) $(CFLAGS) -c ../win/gtk/gtkmenu.c +gtkyn.o: ../win/gtk/gtkyn.c ../include/hack.h ../include/winGTK.h + $(CC) $(CFLAGS) -c ../win/gtk/gtkyn.c +gtkmap.o: ../win/gtk/gtkmap.c ../include/hack.h ../include/winGTK.h + $(CC) $(CFLAGS) -c ../win/gtk/gtkmap.c +gtkmessage.o: ../win/gtk/gtkmessage.c ../include/hack.h ../include/winGTK.h + $(CC) $(CFLAGS) -c ../win/gtk/gtkmessage.c +gtkmisc.o: ../win/gtk/gtkmisc.c ../include/hack.h ../include/winGTK.h + $(CC) $(CFLAGS) -c ../win/gtk/gtkmisc.c +xshmmap.o: ../win/gtk/xshmmap.c ../include/hack.h ../include/winGTK.h + $(CC) $(CFLAGS) -c ../win/gtk/xshmmap.c +xshm.o: ../win/gtk/xshm.c ../include/hack.h ../include/xshm.h + $(CC) $(CFLAGS) -c ../win/gtk/xshm.c +NH3DMapItem.o: ../win/nh3d/NH3DMapItem.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DMapItem.m +NH3DMapModel.o: ../win/nh3d/NH3DMapModel.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DMapModel.m +NH3DMapView.o: ../win/nh3d/NH3DMapView.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DMapView.m +NH3DMenuItem.o: ../win/nh3d/NH3DMenuItem.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DMenuItem.m +NH3DMenuWindow.o: ../win/nh3d/NH3DMenuWindow.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DMenuWindow.m +NH3DMessenger.o: ../win/nh3d/NH3DMessenger.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DMessenger.m +NH3DModelObjects.o: ../win/nh3d/NH3DModelObjects.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DModelObjects.m +NH3DOpenGLView.o: ../win/nh3d/NH3DOpenGLView.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DOpenGLView.m +NH3DPanel.o: ../win/nh3d/NH3DPanel.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DPanel.m +NH3DPreferenceController.o: ../win/nh3d/NH3DPreferenceController.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DPreferenceController.m +NH3DTileCache.o: ../win/nh3d/NH3DTileCache.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DTileCache.m +NH3DUserMakeSheetController.o: ../win/nh3d/NH3DUserMakeSheetController.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DUserMakeSheetController.m +NH3DUserStatusModel.o: ../win/nh3d/NH3DUserStatusModel.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DUserStatusModel.m +winnh3d.o: ../win/nh3d/winnh3d.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/winnh3d.m +Cocoa-compat.o: ../win/nh3d/compat/Cocoa-compat.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/compat/Cocoa-compat.m +qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../include/func_tab.h \ + ../include/dlb.h ../include/patchlevel.h ../include/tile2x11.h \ + ../include/qt_win.h ../include/qt_clust.h ../include/qt_kde0.h \ + ../include/qt_xpms.h qt_win.moc qt_kde0.moc qttableview.moc + $(CXX) $(CXXFLAGS) -c ../win/Qt/qt_win.cpp +qt_clust.o: ../win/Qt/qt_clust.cpp ../include/qt_clust.h + $(CXX) $(CXXFLAGS) -c ../win/Qt/qt_clust.cpp +qttableview.o: ../win/Qt/qttableview.cpp ../include/qttableview.h + $(CXX) $(CXXFLAGS) -c ../win/Qt/qttableview.cpp +monstr.o: monstr.c $(CONFIG_H) +vis_tab.o: vis_tab.c $(CONFIG_H) ../include/vis_tab.h +allmain.o: allmain.c $(HACK_H) +alloc.o: alloc.c $(CONFIG_H) +apply.o: apply.c $(HACK_H) ../include/edog.h +artifact.o: artifact.c $(HACK_H) ../include/artifact.h ../include/artilist.h +attrib.o: attrib.c $(HACK_H) +ball.o: ball.c $(HACK_H) +bones.o: bones.c $(HACK_H) ../include/lev.h +botl.o: botl.c $(HACK_H) +cmd.o: cmd.c $(HACK_H) ../include/func_tab.h +dbridge.o: dbridge.c $(HACK_H) +decl.o: decl.c $(HACK_H) +detect.o: detect.c $(HACK_H) ../include/artifact.h +dig.o: dig.c $(HACK_H) ../include/edog.h +display.o: display.c $(HACK_H) +dlb.o: dlb.c $(CONFIG_H) ../include/dlb.h +do.o: do.c $(HACK_H) ../include/lev.h +do_name.o: do_name.c $(HACK_H) +do_wear.o: do_wear.c $(HACK_H) +dog.o: dog.c $(HACK_H) ../include/edog.h +dogmove.o: dogmove.c $(HACK_H) ../include/mfndpos.h ../include/edog.h +dokick.o: dokick.c $(HACK_H) ../include/eshk.h +dothrow.o: dothrow.c $(HACK_H) ../include/edog.h +drawing.o: drawing.c $(HACK_H) ../include/tcap.h +dungeon.o: dungeon.c $(HACK_H) ../include/dgn_file.h ../include/dlb.h +eat.o: eat.c $(HACK_H) +end.o: end.c $(HACK_H) ../include/eshk.h ../include/dlb.h +engrave.o: engrave.c $(HACK_H) ../include/lev.h +exper.o: exper.c $(HACK_H) +explode.o: explode.c $(HACK_H) +extralev.o: extralev.c $(HACK_H) +files.o: files.c $(HACK_H) ../include/dlb.h +fountain.o: fountain.c $(HACK_H) +hack.o: hack.c $(HACK_H) +hacklib.o: hacklib.c $(HACK_H) +invent.o: invent.c $(HACK_H) +light.o: light.c $(HACK_H) ../include/lev.h +lock.o: lock.c $(HACK_H) +mail.o: mail.c $(HACK_H) ../include/mail.h +makemon.o: makemon.c $(HACK_H) ../include/epri.h ../include/emin.h \ + ../include/edog.h +mapglyph.o: mapglyph.c $(HACK_H) +mcastu.o: mcastu.c $(HACK_H) +mhitm.o: mhitm.c $(HACK_H) ../include/artifact.h ../include/edog.h +mhitu.o: mhitu.c $(HACK_H) ../include/artifact.h ../include/edog.h +minion.o: minion.c $(HACK_H) ../include/emin.h ../include/epri.h +mklev.o: mklev.c $(HACK_H) +mkmap.o: mkmap.c $(HACK_H) ../include/sp_lev.h +mkmaze.o: mkmaze.c $(HACK_H) ../include/sp_lev.h ../include/lev.h +mkobj.o: mkobj.c $(HACK_H) +mkroom.o: mkroom.c $(HACK_H) +mon.o: mon.c $(HACK_H) ../include/mfndpos.h ../include/edog.h +mondata.o: mondata.c $(HACK_H) ../include/eshk.h ../include/epri.h +monmove.o: monmove.c $(HACK_H) ../include/mfndpos.h ../include/artifact.h \ + ../include/epri.h +monst.o: monst.c $(CONFIG_H) ../include/permonst.h ../include/align.h \ + ../include/monattk.h ../include/monflag.h ../include/monsym.h \ + ../include/dungeon.h ../include/eshk.h ../include/vault.h \ + ../include/epri.h ../include/color.h +mplayer.o: mplayer.c $(HACK_H) +mthrowu.o: mthrowu.c $(HACK_H) +muse.o: muse.c $(HACK_H) ../include/edog.h +music.o: music.c $(HACK_H) #interp.c +o_init.o: o_init.c $(HACK_H) ../include/lev.h +objects.o: objects.c $(CONFIG_H) ../include/obj.h ../include/objclass.h \ + ../include/prop.h ../include/skills.h ../include/color.h +objnam.o: objnam.c $(HACK_H) +options.o: options.c $(CONFIG_H) ../include/objclass.h ../include/flag.h \ + $(HACK_H) ../include/tcap.h +pager.o: pager.c $(HACK_H) ../include/dlb.h +pickup.o: pickup.c $(HACK_H) +pline.o: pline.c $(HACK_H) ../include/epri.h ../include/edog.h +polyself.o: polyself.c $(HACK_H) +potion.o: potion.c $(HACK_H) +pray.o: pray.c $(HACK_H) ../include/epri.h +priest.o: priest.c $(HACK_H) ../include/mfndpos.h ../include/eshk.h \ + ../include/epri.h ../include/emin.h +quest.o: quest.c $(HACK_H) ../include/qtext.h +questpgr.o: questpgr.c $(HACK_H) ../include/dlb.h ../include/qtext.h +read.o: read.c $(HACK_H) +rect.o: rect.c $(HACK_H) +region.o: region.c $(HACK_H) ../include/lev.h +restore.o: restore.c $(HACK_H) ../include/lev.h ../include/tcap.h +rip.o: rip.c $(HACK_H) +rnd.o: rnd.c $(HACK_H) +role.o: role.c $(HACK_H) +rumors.o: rumors.c $(HACK_H) ../include/lev.h ../include/dlb.h +save.o: save.c $(HACK_H) ../include/lev.h +shk.o: shk.c $(HACK_H) ../include/eshk.h +shknam.o: shknam.c $(HACK_H) ../include/eshk.h +sit.o: sit.c $(HACK_H) ../include/artifact.h +sounds.o: sounds.c $(HACK_H) ../include/edog.h +sp_lev.o: sp_lev.c $(HACK_H) ../include/dlb.h ../include/sp_lev.h +spell.o: spell.c $(HACK_H) +steal.o: steal.c $(HACK_H) +steed.o: steed.c $(HACK_H) +teleport.o: teleport.c $(HACK_H) +timeout.o: timeout.c $(HACK_H) ../include/lev.h +topten.o: topten.c $(HACK_H) ../include/dlb.h ../include/patchlevel.h +track.o: track.c $(HACK_H) +trap.o: trap.c $(HACK_H) +u_init.o: u_init.c $(HACK_H) +uhitm.o: uhitm.c $(HACK_H) +vault.o: vault.c $(HACK_H) ../include/vault.h +version.o: version.c $(HACK_H) ../include/date.h ../include/patchlevel.h +vision.o: vision.c $(HACK_H) ../include/vis_tab.h +weapon.o: weapon.c $(HACK_H) +were.o: were.c $(HACK_H) +wield.o: wield.c $(HACK_H) +windows.o: windows.c $(HACK_H) ../include/wingem.h ../include/winGnome.h +wizard.o: wizard.c $(HACK_H) ../include/qtext.h ../include/epri.h +worm.o: worm.c $(HACK_H) ../include/lev.h +worn.o: worn.c $(HACK_H) +write.o: write.c $(HACK_H) +zap.o: zap.c $(HACK_H) +# DEPENDENCIES MUST END AT END OF FILE +# IF YOU PUT STUFF HERE IT WILL GO AWAY +# see make depend above diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/sys/Cocoa_GNUStep/Makefile.top NetHack3D-8/sys/Cocoa_GNUStep/Makefile.top --- jnethack/sys/Cocoa_GNUStep/Makefile.top 1970-01-01 09:00:00.000000000 +0900 +++ NetHack3D-8/sys/Cocoa_GNUStep/Makefile.top 2006-05-09 10:49:24.000000000 +0900 @@ -0,0 +1,386 @@ +# NetHack Makefile. +# SCCS Id: @(#)Makefile.top 3.4 1995/01/05 + +# newer makes predefine $(MAKE) to 'make' and do smarter processing of +# recursive make calls if $(MAKE) is used +# these makes allow $(MAKE) to be overridden by the environment if someone +# wants to (or has to) use something other than the standard make, so we do +# not want to unconditionally set $(MAKE) here +# +# unfortunately, some older makes do not predefine $(MAKE); if you have one of +# these, uncomment the following line +# (you will know that you have one if you get complaints about unable to +# execute things like 'data' and 'rumors') +# MAKE = make + +# make NetHack +PREFIX = . +GAME = NetHack3D +# GAME = nethack.prg +GAMEUID = $(USER) +GAMEGRP = $(GROUP) + +# Permissions - some places use setgid instead of setuid, for instance +# See also the option "SECURE" in include/config.h +GAMEPERM = 02755 +FILEPERM = 0644 +EXEPERM = 0755 +DIRPERM = 0755 + +# GAMEDIR also appears in config.h as "HACKDIR". +# VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR +# +# note that 'make install' believes in creating a nice tidy GAMEDIR for +# installation, free of debris from previous NetHack versions -- +# therefore there should not be anything in GAMEDIR that you want to keep +# (if there is, you'll have to do the installation by hand or modify the +# instructions) +GAMEDIR = $(PREFIX)/NetHack3D_Folder/NetHack3D.app/Contents/Resources +BINDIR = $(PREFIX)/NetHack3D_Folder/NetHack3D.app/Contents/MacOS +VARDIR = $(GAMEDIR) +USOUNDDIR = $(PREFIX)/NetHack3D_Folder/nh3dSounds +DOCDIR = $(PREFIX)/NetHack3D_Folder/Documentation +#SHELLDIR = $(PREFIX)/games +SHELLDIR = + +# For MacOSX, specify Qt library to be copied from $(QTDIR)/lib/ +QTLIB= + +VARDAT_X11 = x11tiles NetHack.ad pet_mark.xbm +VARDAT_Qt = nhtiles.bmp rip.xpm nhsplash.xpm +VARDAT_NH3D = nh3dmodels nh3dresources nh3dtextures nh3dsounds +VARDAT_NH3D_MacOSX = $(VARDAT_NH3D) nh3dInfo.plist Englishlproj Japaneselproj nh3d.icns nh3dUserSound +#VARDAT_NH3D_GNUStep = $(VARDAT_NH3D) +VARDAT_Qt_MacOSX = $(VARDAT_Qt) Info.plist nethack.icns libqt macdoc maccnf +VARDAT_AtariGem = nh16.img title.img GEM_RSC.RSC rip.img +VARDAT_BeOS = beostiles +VARDAT_Gnome = x11tiles pet_mark.xbm rip.xpm mapbg.xpm +# +# Choose from the above for your platform. +# +VARDATND = $(VARDAT_NH3D_MacOSX) + +VARDATD = data joracles options quest.dat jrumors +VARDAT = $(VARDATD) $(VARDATND) + +# Some versions of make use the SHELL environment variable as the shell +# for running commands. We need this to be a Bourne shell. +# SHELL = /bin/sh +# for Atari +# SHELL=E:/GEMINI2/MUPFEL.TTP + +# Commands for setting the owner and group on files during installation. +# Some systems fail with one or the other when installing over NFS or for +# other permission-related reasons. If that happens, you may want to set the +# command to "true", which is a no-op. Note that disabling chown or chgrp +# will only work if setuid (or setgid) behavior is not desired or required. +CHOWN = chown +CHGRP = chgrp + +# +# end of configuration +# + +# by issei 1994/2/5, 1994/6/25 +#DATHELP = help hh cmdhelp history opthelp wizhelp +DATHELP = jhelp jhh jcmdhelp jhistory jopthelp jwizhelp + +SPEC_LEVS = asmodeus.lev baalz.lev bigrm-?.lev castle.lev fakewiz?.lev \ + juiblex.lev knox.lev medusa-?.lev minend-?.lev minefill.lev \ + minetn-?.lev oracle.lev orcus.lev sanctum.lev soko?-?.lev \ + tower?.lev valley.lev wizard?.lev \ + astral.lev air.lev earth.lev fire.lev water.lev +QUEST_LEVS = ???-goal.lev ???-fil?.lev ???-loca.lev ???-strt.lev + +DATNODLB = $(VARDATND) license +DATDLB = $(DATHELP) dungeon $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) +DAT = $(DATNODLB) $(DATDLB) + + +$(GAME): + ( cd src ; $(MAKE) ) + + +all: $(GAME) recover Guidebook $(VARDAT) dungeon spec_levs check-dlb + @echo "Done." + + + +# Note: many of the dependencies below are here to allow parallel make +# to generate valid output + +Guidebook: + ( cd doc ; $(MAKE) Guidebook ) + +manpages: + ( cd doc ; $(MAKE) manpages ) + +data: $(GAME) + ( cd dat ; $(MAKE) data ) + +rumors: $(GAME) + ( cd dat ; $(MAKE) rumors ) + +oracles: $(GAME) + ( cd dat ; $(MAKE) oracles ) + +jrumors: $(GAME) + ( cd dat ; $(MAKE) jrumors ) + +joracles: $(GAME) + ( cd dat ; $(MAKE) joracles ) + +# Note: options should have already been made with make, but... +options: $(GAME) + ( cd dat ; $(MAKE) options ) + +quest.dat: $(GAME) + ( cd dat ; $(MAKE) quest.dat ) + +spec_levs: dungeon + ( cd util ; $(MAKE) lev_comp ) + ( cd dat ; $(MAKE) spec_levs ) + ( cd dat ; $(MAKE) quest_levs ) + +dungeon: $(GAME) + ( cd util ; $(MAKE) dgn_comp ) + ( cd dat ; $(MAKE) dungeon ) + +nhtiles.bmp: $(GAME) + ( cd dat ; $(MAKE) nhtiles.bmp ) + +x11tiles: $(GAME) + ( cd util ; $(MAKE) tile2x11 ) + ( cd dat ; $(MAKE) x11tiles ) + +beostiles: $(GAME) + ( cd util ; $(MAKE) tile2beos ) + ( cd dat ; $(MAKE) beostiles ) + +NetHack.ad: $(GAME) + ( cd dat ; $(MAKE) NetHack.ad ) + +pet_mark.xbm: + ( cd dat ; $(MAKE) pet_mark.xbm ) + +rip.xpm: + ( cd dat ; $(MAKE) rip.xpm ) + +mapbg.xpm: + (cd dat ; $(MAKE) mapbg.xpm ) + +nhsplash.xpm: + ( cd dat ; $(MAKE) nhsplash.xpm ) + +nh16.img: $(GAME) + ( cd util ; $(MAKE) tile2img.ttp ) + ( cd dat ; $(MAKE) nh16.img ) + +rip.img: + ( cd util ; $(MAKE) xpm2img.ttp ) + ( cd dat ; $(MAKE) rip.img ) +GEM_RSC.RSC: + ( cd dat ; $(MAKE) GEM_RSC.RSC ) + +title.img: + ( cd dat ; $(MAKE) title.img ) + +check-dlb: options + @if egrep -s librarian dat/options ; then $(MAKE) dlb ; else true ; fi + +dlb: + ( cd util ; $(MAKE) dlb ) + ( cd dat ; ../util/dlb cf nhdat $(DATDLB) ) + +# recover can be used when INSURANCE is defined in include/config.h +# and the checkpoint option is true +recover: $(NH3D) + ( cd util ; $(MAKE) recover ) + +dofiles: + cp src/$(GAME) $(BINDIR) + cp util/recover $(GAMEDIR) + + target=`sed -n \ + -e '/librarian/{' \ + -e 's/.*/dlb/p' \ + -e 'q' \ + -e '}' \ + -e '$$s/.*/nodlb/p' < dat/options` ; \ + $(MAKE) dofiles-$${target-nodlb} + -rm -f $(SHELLDIR)/$(GAME) + test -z "$(SHELLDIR)" || sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \ + -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \ + < sys/unix/nethack.sh \ + > $(SHELLDIR)/$(GAME) +# set up their permissions + -( cd $(BINDIR) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \ + $(CHGRP) $(GAMEGRP) $(GAME) recover ) + chmod $(GAMEPERM) $(BINDIR)/$(GAME) + chmod $(EXEPERM) $(GAMEDIR)/recover + -test -z "$(SHELLDIR)" || $(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME) + -test -z "$(SHELLDIR)" || $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME) + test -z "$(SHELLDIR)" || chmod $(EXEPERM) $(SHELLDIR)/$(GAME) + + +dofiles-dlb: check-dlb + ( cd dat ; cp nhdat $(DATNODLB) $(GAMEDIR) ) +# ( cd win/X11 ; cp JNetHack.ad $(GAMEDIR)/JNetHack ) +# ( cd win/gtk ; cp GTKRC $(GAMEDIR)/gtkrc ) +# ( bdftopcf win/X11/nh10.bdf > $(GAMEDIR)/nh10.pcf ; mkfontdir $(GAMEDIR)) +# set up their permissions + -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \ + $(CHGRP) $(GAMEGRP) nhdat $(DATNODLB) ; \ + chmod $(FILEPERM) nhdat $(DATNODLB) ) + +dofiles-nodlb: +# copy over the game files + for i in $(DAT); do \ + $(MAKE) install.$$i 2>/dev/null || cp dat/$$i $(GAMEDIR); \ + done +# ( cd win/X11 ; cp JNetHack.ad $(GAMEDIR)/JNetHack ) +# ( cd win/gtk ; cp GTKRC $(GAMEDIR)/gtkrc ) +# ( bdftopcf win/X11/nh10.bdf > $(GAMEDIR)/nh10.pcf ; mkfontdir $(GAMEDIR)) +# set up their permissions + -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \ + $(CHGRP) $(GAMEGRP) $(DAT) ; \ + chmod $(FILEPERM) $(DAT) ) +nethack.icns: + $(MAKE) -C dat nethack.icns + +install.nethack.icns: + -mkdir -p $(BINDIR)/../Resources + cp dat/nethack.icns $(BINDIR)/../Resources + +Info.plist: + $(MAKE) -C dat Info.plist + +install.Info.plist: + cp dat/Info.plist $(BINDIR)/.. + +libqt: + +install.libqt: + mkdir -p $(BINDIR)/../Frameworks + cp $(QTDIR)/lib/$(QTLIB) $(BINDIR)/../Frameworks + install_name_tool -change $(QTLIB) @executable_path/../Frameworks/$(QTLIB) $(BINDIR)/$(GAME) + install_name_tool -id @executable_path/../Frameworks/$(QTLIB) $(BINDIR)/../Frameworks/$(QTLIB) + +macdoc: + +install.macdoc: + -mkdir -p $(DOCDIR) + $(MAKE) INSTALLDIR=../$(DOCDIR) -C doc install-distrib + +maccnf: + +install.maccnf: + echo "# Move this file to your 'Library/Preferences' folder" \ + >"$(DOCDIR)/NetHack Defaults.txt" + echo "OPTIONS=name:player,number_pad,menustyle:partial,!time,showexp" \ + >>"$(DOCDIR)/NetHack Defaults.txt" + echo "OPTIONS=hilite_pet,toptenwin,msghistory:200,windowtype:Qt" \ + >>"$(DOCDIR)/NetHack Defaults.txt" +# +#NetHack3D +# +nh3dmodels: + +install.nh3dmodels: + -mkdir -p $(GAMEDIR) + cp win/nh3d/models/*.* $(GAMEDIR) + +nh3dresources: + +install.nh3dresources: + -mkdir -p $(GAMEDIR) + cp win/nh3d/Resources/*.* $(GAMEDIR) + +nh3dtextures: + +install.nh3dtextures: + -mkdir -p $(GAMEDIR) + cp win/nh3d/texture/*.* $(GAMEDIR) + +nh3dInfo.plist: + +install.nh3dInfo.plist: + cp win/nh3d/Info.plist $(BINDIR)/.. + +Englishlproj: + +install.Englishlproj: + cp -r win/nh3d/English.lproj $(GAMEDIR)/English.lproj + chmod $(DIRPERM) $(GAMEDIR)/English.lproj + +Japaneselproj: + +install.Japaneselproj: + cp -r win/nh3d/Japanese.lproj $(GAMEDIR)/Japanese.lproj + chmod $(DIRPERM) $(GAMEDIR)/Japanese.lproj + +nh3d.icns: + +install.nh3d.icns: + cp win/nh3d/nh3d.icns $(GAMEDIR) + +nh3dsounds: + +install.nh3dsounds: + -mkdir -p $(GAMEDIR) + cp win/nh3d/Sound/*.* $(GAMEDIR) + +nh3dUserSound: + -mkdir -p $(USOUNDDIR) + cp win/nh3d/nh3dSounds/*.* $(USOUNDDIR) + +update: $(GAME) recover $(VARDAT) dungeon spec_levs +# (don't yank the old version out from under people who're playing it) + -mv $(BINDIR)/$(GAME) $(BINDIR)/$(GAME).old +# quest.dat is also kept open and has the same problems over NFS +# (quest.dat may be inside nhdat if dlb is in use) + -mv $(GAMEDIR)/quest.dat $(GAMEDIR)/quest.dat.old + -mv $(GAMEDIR)/nhdat $(GAMEDIR)/nhdat.old +# set up new versions of the game files + ( $(MAKE) dofiles ) +# touch time-sensitive files + -touch -c $(VARDIR)/bones* $(VARDIR)/?lock* $(VARDIR)/wizard* + -touch -c $(VARDIR)/save/* + touch $(VARDIR)/perm $(VARDIR)/record +# and a reminder + @echo You may also want to install the man pages via the doc Makefile. + +install: $(GAME) recover $(VARDAT) dungeon spec_levs +# set up the directories +# not all mkdirs have -p; those that don't will create a -p directory + -test -z "$(SHELLDIR)" || mkdir -p $(SHELLDIR) + -rm -rf $(GAMEDIR) $(VARDIR) $(BINDIR) + -mkdir -p $(GAMEDIR) $(VARDIR) $(BINDIR) $(VARDIR)/save + -rmdir ./-p + -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save + -$(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save + chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save +# set up the game files + ( $(MAKE) dofiles ) +# set up some additional files + touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile + -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ + $(CHGRP) $(GAMEGRP) perm record logfile ; \ + chmod $(FILEPERM) perm record logfile ) +# and a reminder + @echo You may also want to reinstall the man pages via the doc Makefile. + + +# 'make clean' removes all the .o files, but leaves around all the executables +# and compiled data files +clean: + ( cd src ; $(MAKE) clean ) + ( cd util ; $(MAKE) clean ) + +# 'make spotless' returns the source tree to near-distribution condition. +# it removes .o files, executables, and compiled data files +spotless: + ( cd src ; $(MAKE) spotless ) + ( cd util ; $(MAKE) spotless ) + ( cd dat ; $(MAKE) spotless ) + ( cd doc ; $(MAKE) spotless ) diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/sys/Cocoa_GNUStep/Makefile.utl NetHack3D-8/sys/Cocoa_GNUStep/Makefile.utl --- jnethack/sys/Cocoa_GNUStep/Makefile.utl 1970-01-01 09:00:00.000000000 +0900 +++ NetHack3D-8/sys/Cocoa_GNUStep/Makefile.utl 2006-05-09 10:49:24.000000000 +0900 @@ -0,0 +1,405 @@ +# Makefile for NetHack's utility programs. +# SCCS Id: @(#)Makefile.utl 3.4 1997/04/19 + +# newer makes predefine $(MAKE) to 'make' and do smarter processing of +# recursive make calls if $(MAKE) is used +# these makes allow $(MAKE) to be overridden by the environment if someone +# wants to (or has to) use something other than the standard make, so we do +# not want to unconditionally set $(MAKE) here +# +# unfortunately, some older makes do not predefine $(MAKE); if you have one of +# these, uncomment the following line +# (you will know that you have one if you get complaints about unable to +# execute things like 'foo.o') +# MAKE = make + +# if you are using gcc as your compiler, +# uncomment the CC definition below if it's not in your environment +CC = gcc +# +# For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following: +# +# CC = gcc -ansi -D_BULL_SOURCE -D_XOPEN_SOURCE -D_POSIX_SOURCE +# +# If you are using GCC 2.2.2 or higher on a DPX/2, just use: +# +# CC = gcc -ansi +# +# For HP/UX 10.20 with GCC: +# CC = gcc -D_POSIX_SOURCE +# +# if your make doesn't define a default SHELL properly, you may need +# the line below (Atari users will need a bourne work-alike) +# SHELL = /bin/sh +# for Atari +# SHELL=E:/GEMINI2/MUPFEL.TTP + +# flags may have to be changed as required +# flags for 286 Xenix: +# CFLAGS = -Ml2t16 -O -LARGE -I../include +# LFLAGS = -Ml -F 4000 -SEG 512 + +# flags for 286 Microport SysV-AT +# CFLAGS = -DDUMB -Ml -I../include +# LFLAGS = -Ml + +# flags for Atari GCC (3.2.1) +# CFLAGS = -O -I../include +# LFLAGS = -s +# flags for Atari GCC (3.3) +# CFLAGS = -mshort -O2 -I../include +# LFLAGS = -mshort -s + +# flags for Apollos using their native cc +# (as long as it claims to be __STDC__ but isn't) +# CFLAGS = -DAPOLLO -O -I../include + +# flags for AIX 3.1 cc on IBM RS/6000 to define +# a suitable subset of standard libraries +# (note that there is more info regarding the "-qchars=signed" +# switch in file Install.unx note 8) +# CFLAGS = -D_NO_PROTO -D_XOPEN_SOURCE -O -I../include -qchars=signed +# and for AIX 3.2: +# CFLAGS = -D_NO_PROTO -D_XOPEN_SOURCE -D_ALL_SOURCE -O -I../include -qchars=signed + +# flags for A/UX 2.01 using native cc or c89 +# gcc predefines AUX so that's not needed there +# CFLAGS = -ZS -D_POSIX_SOURCE -O -I../include -DAUX + +# flags for IRIX 4.0.x using native cc +# SGI cc 3.10 will fail to compile makedefs with -O +# CFLAGS = -I../include -D__STDC__ -woff 100,293 + +# flags for Linux +# compile normally +# CFLAGS = -O2 -fomit-frame-pointer -I../include +# LFLAGS = -L/usr/X11R6/lib +# OR compile backwards compatible a.out format +# CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include +# LFLAGS = -b i486-linuxaout -L/usr/X11R6/lib + +# flags for BeOS using the command line +# remember to uncomment flex and bison below +# BeOS on a Mac/BeBox: +#CC = mwcc +#CFLAGS = -I../include +# BeOS on Intel: +# the default values are fine + +# flags for debugging: +# CFLAGS = -g -I../include + +CFLAGS = -O2 -fomit-frame-pointer -I../include +LFLAGS = + +LIBS = + +# If you are cross-compiling, you must use this: +#OBJDIR = . +# otherwise, you can save a little bit of disk space with this: +OBJDIR = ../src + +# yacc/lex programs to use to generate *_comp.h, *_lex.c, and *_yacc.c. +# if, instead of yacc/lex you have bison/flex, comment/uncomment the following. +YACC = yacc +LEX = lex +#YACC = bison -y +# YACC = byacc +#LEX = flex -8 + +# these are the names of the output files from YACC/LEX. Under MS-DOS +# and similar systems, they may differ +YTABC = y.tab.c +YTABH = y.tab.h +LEXYYC = lex.yy.c +# YTABC = y_tab.c +# YTABH = y_tab.h +# LEXYYC = lexyy.c + + + +# ---------------------------------------- +# +# Nothing below this line should have to be changed. + +# timestamps for primary header files, matching src/Makefile +CONFIG_H = ../src/config.h-t +HACK_H = ../src/hack.h-t + +# utility .c files +MAKESRC = makedefs.c +SPLEVSRC = lev_yacc.c lev_lex.c lev_main.c +DGNCOMPSRC = dgn_yacc.c dgn_lex.c dgn_main.c +RECOVSRC = recover.c +DLBSRC = dlb_main.c +UTILSRCS = $(MAKESRC) panic.c $(SPLEVSRC) $(DGNCOMPSRC) $(RECOVSRC) $(DLBSRC) + +# files that define all monsters and objects +CMONOBJ = ../src/monst.c ../src/objects.c +OMONOBJ = $(OBJDIR)/monst.o $(OBJDIR)/objects.o +# files that provide access to NetHack's names +CNAMING = ../src/drawing.c ../src/decl.c $(CMONOBJ) +ONAMING = $(OBJDIR)/drawing.o $(OBJDIR)/decl.o $(OMONOBJ) +# dynamic memory allocation +CALLOC = ../src/alloc.c panic.c +OALLOC = $(OBJDIR)/alloc.o panic.o + +# object files for makedefs +MAKEOBJS = makedefs.o $(OMONOBJ) + +# object files for special levels compiler +SPLEVOBJS = lev_yacc.o lev_lex.o lev_main.o $(OALLOC) $(ONAMING) + +# object files for dungeon compiler +DGNCOMPOBJS = dgn_yacc.o dgn_lex.o dgn_main.o $(OALLOC) + +# object files for recovery utility +RECOVOBJS = recover.o + +# object files for the data librarian +DLBOBJS = dlb_main.o $(OBJDIR)/dlb.o $(OALLOC) + +# flags for creating distribution versions of sys/share/*_lex.c, using +# a more portable flex skeleton, which is not included in the distribution. +# hopefully keeping this out of the section to be edited will keep too +# many people from being confused by it... +# FLEXDIST = -L -S../sys/share/flexhack.skl +FLEXDIST = +# +# flags for creating distribution versions of sys/share/*_yacc.c, without +# line numbers so patches from version to version are practical +# YACCDIST = -l +YACCDIST = + + +# dependencies for makedefs +# +makedefs: $(MAKEOBJS) + $(CC) $(LFLAGS) -o makedefs $(MAKEOBJS) + +makedefs.o: makedefs.c $(CONFIG_H) ../include/permonst.h \ + ../include/objclass.h ../include/monsym.h \ + ../include/artilist.h ../include/dungeon.h ../include/obj.h \ + ../include/monst.h ../include/you.h ../include/flag.h \ + ../include/dlb.h ../include/patchlevel.h ../include/qtext.h + +../include/onames.h: makedefs + ./makedefs -o +../include/pm.h: makedefs + ./makedefs -p +../src/monstr.c: makedefs + ./makedefs -m +../include/vis_tab.h: makedefs + ./makedefs -z +../include/jdata.h: makedefs ../dat/jtrnsmon.dat ../dat/jtrnsobj.dat + ./makedefs -j +# makedefs -z makes both vis_tab.h and vis_tab.c, but writes the .h first +../src/vis_tab.c: ../include/vis_tab.h + +lintdefs: + @lint -axbh -I../include -DLINT $(MAKESRC) $(CMONOBJ) | sed '/_flsbuf/d' + + +# we defer this makedefs call to the src Makefile, since it knows all about +# the main src and include files date.h is a timestamp for +../include/date.h:: + @( cd ../src ; $(MAKE) ../include/date.h ) + +# support code used by several of the utility programs (but not makedefs) +panic.o: panic.c $(CONFIG_H) + + +# dependencies for lev_comp +# +lev_comp: $(SPLEVOBJS) + $(CC) $(LFLAGS) -o lev_comp $(SPLEVOBJS) $(LIBS) + +lev_yacc.o: lev_yacc.c $(HACK_H) ../include/sp_lev.h +lev_main.o: lev_main.c $(HACK_H) ../include/sp_lev.h ../include/tcap.h \ + ../include/date.h + +# see lev_comp.l for WEIRD_LEX discussion +# egrep will return failure if it doesn't find anything, but we know there +# is one "_cplusplus" inside a comment +lev_lex.o: lev_lex.c $(HACK_H) ../include/lev_comp.h ../include/sp_lev.h + @echo $(CC) -c $(CFLAGS) lev_lex.c + @$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus lev_lex.c` lev_lex.c + +../include/lev_comp.h: lev_yacc.c + +lev_yacc.c: lev_comp.y + $(YACC) $(YACCDIST) -d lev_comp.y + mv $(YTABC) lev_yacc.c + mv $(YTABH) ../include/lev_comp.h + +lev_lex.c: lev_comp.l + $(LEX) $(FLEXDIST) lev_comp.l + mv $(LEXYYC) lev_lex.c + +# with all of extern.h's functions to complain about, we drown in +# 'defined but not used' without -u +lintlev: + @lint -axhu -I../include -DLINT $(SPLEVSRC) $(CALLOC) $(CNAMING) | sed '/_flsbuf/d' + + +# dependencies for dgn_comp +# +dgn_comp: $(DGNCOMPOBJS) + $(CC) $(LFLAGS) -o dgn_comp $(DGNCOMPOBJS) $(LIBS) + +dgn_yacc.o: dgn_yacc.c $(CONFIG_H) ../include/dgn_file.h ../include/date.h +dgn_main.o: dgn_main.c $(CONFIG_H) ../include/dlb.h + +# see dgn_comp.l for WEIRD_LEX discussion +dgn_lex.o: dgn_lex.c $(CONFIG.H) ../include/dgn_comp.h ../include/dgn_file.h + @echo $(CC) -c $(CFLAGS) dgn_lex.c + @$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus dgn_lex.c` dgn_lex.c + + +../include/dgn_comp.h: dgn_yacc.c + +dgn_yacc.c: dgn_comp.y + $(YACC) $(YACCDIST) -d dgn_comp.y + mv $(YTABC) dgn_yacc.c + mv $(YTABH) ../include/dgn_comp.h + +dgn_lex.c: dgn_comp.l + $(LEX) $(FLEXDIST) dgn_comp.l + mv $(LEXYYC) dgn_lex.c + +# with all of extern.h's functions to complain about, we drown in +# 'defined but not used' without -u +lintdgn: + @lint -axhu -I../include -DLINT $(DGNCOMPSRC) $(CALLOC) | sed '/_flsbuf/d' + + +# dependencies for recover +# +recover: $(RECOVOBJS) + $(CC) $(LFLAGS) -o recover $(RECOVOBJS) $(LIBS) + +recover.o: recover.c $(CONFIG_H) ../include/date.h + + +# dependencies for dlb +# +dlb: $(DLBOBJS) + $(CC) $(LFLAGS) -o dlb $(DLBOBJS) $(LIBS) + +dlb_main.o: dlb_main.c $(CONFIG_H) ../include/dlb.h ../include/date.h + $(CC) $(CFLAGS) -c dlb_main.c + + + +# dependencies for tile utilities +# +TEXT_IO = tiletext.o tiletxt.o $(ONAMING) +GIFREADERS = gifread.o $(OALLOC) +PPMWRITERS = ppmwrite.o $(OALLOC) + +tileutils: tilemap gif2txt txt2ppm tile2x11 + +gif2txt: $(GIFREADERS) $(TEXT_IO) + $(CC) $(LFLAGS) -o gif2txt $(GIFREADERS) $(TEXT_IO) $(LIBS) +txt2ppm: $(PPMWRITERS) $(TEXT_IO) + $(CC) $(LFLAGS) -o txt2ppm $(PPMWRITERS) $(TEXT_IO) $(LIBS) + +tile2x11: tile2x11.o $(TEXT_IO) + $(CC) $(LFLAGS) -o tile2x11 tile2x11.o $(TEXT_IO) $(LIBS) + +tile2img.ttp: tile2img.o bitmfile.o $(TEXT_IO) + $(CC) $(LFLAGS) -o tile2img.ttp tile2img.o bitmfile.o $(TEXT_IO) $(LIBS) + +tile2bmp: tile2bmp.o $(TEXT_IO) + $(CC) $(LFLAGS) -o tile2bmp tile2bmp.o $(TEXT_IO) + +xpm2img.ttp: xpm2img.o bitmfile.o + $(CC) $(LFLAGS) -o xpm2img.ttp xpm2img.o bitmfile.o $(LIBS) + +tile2beos: tile2beos.o $(TEXT_IO) + $(CC) $(LFLAGS) -o tile2beos tile2beos.o $(TEXT_IO) -lbe + +tilemap: ../win/share/tilemap.c $(HACK_H) + $(CC) $(CFLAGS) $(LFLAGS) -o tilemap ../win/share/tilemap.c $(LIBS) +../src/tile.c: tilemap + ./tilemap + +../include/tile.h: ../win/share/tile.h + cp ../win/share/tile.h ../include/tile.h +tiletext.o: ../win/share/tiletext.c $(CONFIG_H) ../include/tile.h + $(CC) $(CFLAGS) -c ../win/share/tiletext.c +tiletxt.o: ../win/share/tilemap.c $(HACK_H) + $(CC) $(CFLAGS) -c -DTILETEXT ../win/share/tilemap.c + mv tilemap.o tiletxt.o + +gifread.o: ../win/share/gifread.c $(CONFIG_H) ../include/tile.h + $(CC) $(CFLAGS) -c ../win/share/gifread.c +ppmwrite.o: ../win/share/ppmwrite.c $(CONFIG_H) ../include/tile.h + $(CC) $(CFLAGS) -c ../win/share/ppmwrite.c + +tile2bmp.o: ../win/share/tile2bmp.c $(HACK_H) ../include/tile.h + $(CC) $(CFLAGS) -c ../win/share/tile2bmp.c + +tile2x11.o: ../win/X11/tile2x11.c $(HACK_H) ../include/tile.h \ + ../include/tile2x11.h + $(CC) $(CFLAGS) -c ../win/X11/tile2x11.c + +tile2img.o: ../win/gem/tile2img.c $(HACK_H) ../include/tile.h \ + ../include/bitmfile.h + $(CC) $(CFLAGS) -c ../win/gem/tile2img.c +xpm2img.o: ../win/gem/xpm2img.c $(HACK_H) ../include/bitmfile.h + $(CC) $(CFLAGS) -c ../win/gem/xpm2img.c +bitmfile.o: ../win/gem/bitmfile.c ../include/bitmfile.h + $(CC) $(CFLAGS) -c ../win/gem/bitmfile.c + +tile2beos.o: ../win/BeOS/tile2beos.cpp $(HACK_H) ../include/tile.h + $(CXX) $(CFLAGS) -c ../win/BeOS/tile2beos.cpp + +# using dependencies like +# ../src/foo:: +# @( cd ../src ; $(MAKE) foo ) +# would always force foo to be up-to-date according to the src Makefile +# when it's needed here. unfortunately, some makes believe this syntax +# means foo always changes, instead of foo should always be checked. +# therefore, approximate via config.h dependencies, and hope that anybody +# changing anything other than basic configuration also knows when not +# to improvise things not in the instructions, like 'make makedefs' here +# in util... + +# make sure object files from src are available when needed +# +$(OBJDIR)/alloc.o: ../src/alloc.c $(CONFIG_H) + $(CC) $(CFLAGS) -c ../src/alloc.c -o $@ +$(OBJDIR)/drawing.o: ../src/drawing.c $(CONFIG_H) + $(CC) $(CFLAGS) -c ../src/drawing.c -o $@ +$(OBJDIR)/decl.o: ../src/decl.c $(CONFIG_H) + $(CC) $(CFLAGS) -c ../src/decl.c -o $@ +$(OBJDIR)/monst.o: ../src/monst.c $(CONFIG_H) + $(CC) $(CFLAGS) -c ../src/monst.c -o $@ +$(OBJDIR)/objects.o: ../src/objects.c $(CONFIG_H) + $(CC) $(CFLAGS) -c ../src/objects.c -o $@ +$(OBJDIR)/dlb.o: ../src/dlb.c $(HACK_H) ../include/dlb.h + $(CC) $(CFLAGS) -c ../src/dlb.c -o $@ + +# make sure hack.h dependencies get transitive information +$(HACK_H): $(CONFIG_H) + @( cd ../src ; $(MAKE) $(HACK_H) ) +$(CONFIG_H): ../include/config.h + @( cd ../src ; $(MAKE) $(CONFIG_H) ) + +tags: $(UTILSRCS) + @ctags -tw $(UTILSRCS) + +clean: + -rm -f *.o + +spotless: clean + -rm -f lev_lex.c lev_yacc.c dgn_lex.c dgn_yacc.c + -rm -f ../include/lev_comp.h ../include/dgn_comp.h + -rm -f ../include/tile.h + -rm -f makedefs lev_comp dgn_comp recover dlb + -rm -f gif2txt txt2ppm tile2x11 tile2img.ttp xpm2img.ttp tilemap + +tileedit: tileedit.cpp $(TEXT_IO) + $(QTDIR)/bin/moc -o tileedit.moc tileedit.h + $(CC) -o tileedit -I../include -I$(QTDIR)/include -L$(QTDIR)/lib tileedit.cpp $(TEXT_IO) -lqt diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/sys/Cocoa_GNUStep/nh3dmain.m NetHack3D-8/sys/Cocoa_GNUStep/nh3dmain.m --- jnethack/sys/Cocoa_GNUStep/nh3dmain.m 1970-01-01 09:00:00.000000000 +0900 +++ NetHack3D-8/sys/Cocoa_GNUStep/nh3dmain.m 2006-05-09 10:49:24.000000000 +0900 @@ -0,0 +1,49 @@ +// +// main.m +// NetHack3D +// +// Created by Haruumi Yoshino on 05/07/20. +// Copyright Haruumi Yoshino. 2005. +// + +#import + + +int main(int argc, char *argv[]) +{ + +/* long uiVer; + + Gestalt( gestaltSystemVersion, &uiVer ); + + if (uiVer < 0x1040) { + + NSRunCriticalAlertPanel(@"Sorry", + NSLocalizedString(@"Grater than MacOS 10.4 are necessary so that NetHack3D start.",@"") + ,@"OK",nil,nil); + + exit(EXIT_SUCCESS); + } +*/ + return NSApplicationMain(argc, (const char **) argv); +} + +/* + * Add a slash to any name not ending in /. There must + * be room for the / + */ +void +append_slash(name) +char *name; +{ + char *ptr; + + if (!*name) + return; + ptr = name + (strlen(name) - 1); + if (*ptr != '/') { + *++ptr = '/'; + *++ptr = '\0'; + } + return; +} diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/sys/Cocoa_GNUStep/nh3dres.m NetHack3D-8/sys/Cocoa_GNUStep/nh3dres.m --- jnethack/sys/Cocoa_GNUStep/nh3dres.m 1970-01-01 09:00:00.000000000 +0900 +++ NetHack3D-8/sys/Cocoa_GNUStep/nh3dres.m 2006-05-09 10:49:24.000000000 +0900 @@ -0,0 +1,209 @@ +/* SCCS Id: @(#)nh3dres.m 3.4 2001/07/08 */ +/* Copyright (c) Slash'EM development team, 2001. */ +/* NetHack may be freely redistributed. See license for details. */ + +/* [ALI] This module defines nh_xxx functions to replace getuid etc which + * will hide privileges from the caller if so desired. + * + * Currently supported UNIX variants: + * Linux version 2.1.44 and above + * FreeBSD (versions unknown) + * + * Note: SunOS and Solaris have no mechanism for retrieving the saved id, + * so temporarily dropping privileges on these systems is sufficient to + * hide them. + */ + +#import "config.h" + +#ifdef GETRES_SUPPORT + +# if defined(LINUX) + +/* requires dynamic linking with libc */ +#import + +static int +real_getresuid(ruid, euid, suid) +uid_t *ruid, *euid, *suid; +{ + int (*f)(uid_t *, uid_t *, uid_t *); /* getresuid signature */ + + f = dlsym(RTLD_NEXT, "getresuid"); + if (!f) return -1; + + return f(ruid, euid, suid); +} + +static int +real_getresgid(rgid, egid, sgid) +gid_t *rgid, *egid, *sgid; +{ + int (*f)(gid_t *, gid_t *, gid_t *); /* getresgid signature */ + + f = dlsym(RTLD_NEXT, "getresgid"); + if (!f) return -1; + + return f(rgid, egid, sgid); +} + +# else +# if defined(BSD) || defined(SVR4) + +# ifdef SYS_getresuid + +static int +real_getresuid(ruid, euid, suid) +uid_t *ruid, *euid, *suid; +{ + return syscall(SYS_getresuid, ruid, euid, suid); +} + +# else /* SYS_getresuid */ + +#ifdef SVR4 +#import +#endif /* SVR4 */ + +static int +real_getresuid(ruid, euid, suid) +uid_t *ruid, *euid, *suid; +{ + int retval; + int pfd[2]; + struct stat st; + if (pipe(pfd)) + return -1; + retval = fstat(pfd[0], &st); + close(pfd[0]); + close(pfd[1]); + if (!retval) { + *euid = st.st_uid; + *ruid = syscall(SYS_getuid); + *suid = *ruid; /* Not supported under SVR4 */ + } + return retval; +} + +# endif /* SYS_getresuid */ + +# ifdef SYS_getresgid + +static int +real_getresgid(rgid, egid, sgid) +gid_t *rgid, *egid, *sgid; +{ + return syscall(SYS_getresgid, rgid, egid, sgid); +} + +# else /* SYS_getresgid */ + +static int +real_getresgid(rgid, egid, sgid) +gid_t *rgid, *egid, *sgid; +{ + int retval; + int pfd[2]; + struct stat st; + if (pipe(pfd)) + return -1; + retval = fstat(pfd[0], &st); + close(pfd[0]); + close(pfd[1]); + if (!retval) { + *egid = st.st_gid; + *rgid = syscall(SYS_getgid); + *sgid = *rgid; /* Not supported under SVR4 */ + } + return retval; +} + +# endif /* SYS_getresgid */ +# endif /* BSD || SVR4 */ +# endif /* LINUX */ + +static unsigned int hiding_privileges = 0; + +/* + * Note: returns the value _after_ action. + */ + +int +hide_privileges(flag) +boolean flag; +{ + if (flag) + hiding_privileges++; + else if (hiding_privileges) + hiding_privileges--; + return hiding_privileges; +} + +int +nh_getresuid(ruid, euid, suid) +uid_t *ruid, *euid, *suid; +{ + int retval = real_getresuid(ruid, euid, suid); + if (!retval && hiding_privileges) + *euid = *suid = *ruid; + return retval; +} + +uid_t +nh_getuid() +{ + uid_t ruid, euid, suid; + (void) real_getresuid(&ruid, &euid, &suid); + return ruid; +} + +uid_t +nh_geteuid() +{ + uid_t ruid, euid, suid; + (void) real_getresuid(&ruid, &euid, &suid); + if (hiding_privileges) + euid = ruid; + return euid; +} + +int +nh_getresgid(rgid, egid, sgid) +gid_t *rgid, *egid, *sgid; +{ + int retval = real_getresgid(rgid, egid, sgid); + if (!retval && hiding_privileges) + *egid = *sgid = *rgid; + return retval; +} + +gid_t +nh_getgid() +{ + gid_t rgid, egid, sgid; + (void) real_getresgid(&rgid, &egid, &sgid); + return rgid; +} + +gid_t +nh_getegid() +{ + gid_t rgid, egid, sgid; + (void) real_getresgid(&rgid, &egid, &sgid); + if (hiding_privileges) + egid = rgid; + return egid; +} + +#else /* GETRES_SUPPORT */ + +# ifdef GNOME_GRAPHICS +int +hide_privileges(flag) +boolean flag; +{ + return 0; +} +# endif + +#endif /* GETRES_SUPPORT */ diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/sys/Cocoa_GNUStep/nh3dunix.m NetHack3D-8/sys/Cocoa_GNUStep/nh3dunix.m --- jnethack/sys/Cocoa_GNUStep/nh3dunix.m 1970-01-01 09:00:00.000000000 +0900 +++ NetHack3D-8/sys/Cocoa_GNUStep/nh3dunix.m 2006-05-09 10:49:24.000000000 +0900 @@ -0,0 +1,388 @@ +/* SCCS Id: @(#)nh3dunix.m 3.4 1994/11/07 */ +/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ +/* NetHack may be freely redistributed. See license for details. */ + +/* + ** Japanese version Copyright + ** For 3.4, Copyright (c) Kentaro Shirakata, 2002-2003 + ** JNetHack may be freely redistributed. See license for details. + */ + +/* This file collects some Unix dependencies */ + +#import "hack.h" /* mainly for index() which depends on BSD */ + + +#import +#import +#if defined(NO_FILE_LINKS) || defined(SUNOS4) || defined(POSIX_TYPES) +#import +#endif +#import + +/*#ifdef NH3D_GRAPHICS +#import +#import +#endif +*/ + +#ifdef _M_UNIX +extern void NDECL(sco_mapon); +extern void NDECL(sco_mapoff); +#endif +#ifdef __linux__ +extern void NDECL(linux_mapon); +extern void NDECL(linux_mapoff); +#endif + +#ifndef NHSTDC +extern int errno; +#endif + +static struct stat buf; + +/* see whether we should throw away this xlock file */ +static int +veryold(fd) +int fd; +{ + time_t date; + + if(fstat(fd, &buf)) return(0); /* cannot get status */ +#ifndef INSURANCE + if(buf.st_size != sizeof(int)) return(0); /* not an xlock file */ +#endif +#if defined(BSD) && !defined(POSIX_TYPES) + (void) time((long *)(&date)); +#else + (void) time(&date); +#endif + if(date - buf.st_mtime < 3L*24L*60L*60L) { /* recent */ + int lockedpid; /* should be the same size as hackpid */ + + if(read(fd, (genericptr_t)&lockedpid, sizeof(lockedpid)) != + sizeof(lockedpid)) + /* strange ... */ + return(0); + + /* From: Rick Adams */ + /* This will work on 4.1cbsd, 4.2bsd and system 3? & 5. */ + /* It will do nothing on V7 or 4.1bsd. */ +#ifndef NETWORK + /* It will do a VERY BAD THING if the playground is shared + by more than one machine! -pem */ + if(!(kill(lockedpid, 0) == -1 && errno == ESRCH)) +#endif + return(0); + } +(void) close(fd); +return(1); +} + +static int +eraseoldlocks() +{ + register int i; + + /* cannot use maxledgerno() here, because we need to find a lock name + * before starting everything (including the dungeon initialization + * that sets astral_level, needed for maxledgerno()) up + */ + for(i = 1; i <= MAXDUNGEON*MAXLEVEL + 1; i++) { + /* try to remove all */ + set_levelfile_name(lock, i); + (void) unlink(fqname(lock, LEVELPREFIX, 0)); + } + set_levelfile_name(lock, 0); + if (unlink(fqname(lock, LEVELPREFIX, 0))) + return(0); /* cannot remove it */ + return(1); /* success! */ +} + +void +getlock() +{ + register int i = 0, fd, c; + const char *fq_lock; + +#ifdef TTY_GRAPHICS + /* idea from rpick%ucqais@uccba.uc.edu + * prevent automated rerolling of characters + * test input (fd0) so that tee'ing output to get a screen dump still + * works + * also incidentally prevents development of any hack-o-matic programs + */ + /* added check for window-system type -dlc */ + if (!strcmp(windowprocs.name, "tty")) + if (!isatty(0)) + error("You must play from a terminal."); +#endif + + /* we ignore QUIT and INT at this point */ + if (!lock_file(HLOCK, LOCKPREFIX, 10)) { + wait_synch(); + error("%s", ""); + } + + regularize(lock); + set_levelfile_name(lock, 0); + + if(locknum) { + if(locknum > 25) locknum = 25; + + do { + lock[0] = 'a' + i++; + fq_lock = fqname(lock, LEVELPREFIX, 0); + + if((fd = open(fq_lock, 0)) == -1) { + if(errno == ENOENT) goto gotlock; /* no such file */ + perror(fq_lock); + unlock_file(HLOCK); + error("Cannot open %s", fq_lock); + } + + if(veryold(fd) /* closes fd if true */ + && eraseoldlocks()) +goto gotlock; +(void) close(fd); + } while(i < locknum); + +unlock_file(HLOCK); +error("Too many hacks running now."); + } else { + fq_lock = fqname(lock, LEVELPREFIX, 0); + if((fd = open(fq_lock, 0)) == -1) { + if(errno == ENOENT) goto gotlock; /* no such file */ + perror(fq_lock); + unlock_file(HLOCK); + error("Cannot open %s", fq_lock); + } + + if(veryold(fd) /* closes fd if true */ && eraseoldlocks()) + goto gotlock; + (void) close(fd); + + if(iflags.window_inited) { + /*JP + c = yn("There is already a game in progress under your name. Destroy old game?"); + */ + c = yn("、「、ハ、ソ、ホフセチー、ヌノヤタオスェホサ、キ、ソ・イ。シ・爨ャサト、テ、ニ、、、゙、ケ。・ヌヒエ、キ、゙、ケ、ォ。ゥ"); + } else { +#if 0 /*JP*/ + (void) printf("\nThere is already a game in progress under your name."); + (void) printf(" Destroy old game? [yn] "); +#else + (void) printf("\n、「、ハ、ソ、ホフセチー、ヌノヤタオスェホサ、キ、ソ・イ。シ・爨ャサト、テ、ニ、、、゙、ケ。・"); + (void) printf("ヌヒエ、キ、゙、ケ、ォ。ゥ[yn] "); +#endif + (void) fflush(stdout); + c = getchar(); + (void) putchar(c); + (void) fflush(stdout); + while (getchar() != '\n') ; /* eat rest of line and newline */ + } +if(c == 'y' || c == 'Y') +if(eraseoldlocks()) +goto gotlock; +else { + unlock_file(HLOCK); + error("Couldn't destroy old game."); +} +else { + unlock_file(HLOCK); + error("%s", ""); +} + } + +gotlock: +fd = creat(fq_lock, FCMASK); +unlock_file(HLOCK); +if(fd == -1) { + error("cannot creat lock file (%s).", fq_lock); +} else { + if(write(fd, (genericptr_t) &hackpid, sizeof(hackpid)) + != sizeof(hackpid)){ + error("cannot write lock (%s)", fq_lock); + } + if(close(fd) == -1) { + error("cannot close lock (%s)", fq_lock); + } +} +} + +void +regularize(s) /* normalize file name - we don't like .'s, /'s, spaces */ +register char *s; +{ +#if 0 /*JP*/ + register char *lp; +#else + register unsigned char *lp; +#endif + +#ifdef SJIS_FILESYSTEM + lp = (unsigned char *)ic2str( s ); + strcpy(s, lp); + for (lp = s; *lp; lp++){ + if(is_kanji(*lp)){ + lp++; + continue; + } + if(*lp == '.' || *lp == '/' || *lp == ' '){ + *lp = '_'; + } + } +#else + while((lp=index(s, '.')) || (lp=index(s, '/')) || (lp=index(s,' '))) + *lp = '_'; +#endif +#if defined(SYSV) && !defined(AIX_31) && !defined(SVR4) && !defined(LINUX) && !defined(__APPLE__) + /* avoid problems with 14 character file name limit */ +# ifdef COMPRESS + /* leave room for .e from error and .Z from compress appended to + * save files */ + { +# ifdef COMPRESS_EXTENSION + int i = 12 - strlen(COMPRESS_EXTENSION); +# else + int i = 10; /* should never happen... */ +# endif + if(strlen(s) > i) + s[i] = '\0'; + } +# else + if(strlen(s) > 11) + /* leave room for .nn appended to level files */ + s[11] = '\0'; +# endif +#endif +} + +#if defined(TIMED_DELAY) && !defined(msleep) && defined(SYSV) +#import + +void +msleep(msec) +unsigned msec; /* milliseconds */ +{ + struct pollfd unused; + int msecs = msec; /* poll API is signed */ + + if (msecs < 0) msecs = 0; /* avoid infinite sleep */ + (void) poll(&unused, (unsigned long)0, msecs); +} +#endif /* TIMED_DELAY for SYSV */ + +#ifdef SHELL +int +dosh() +{ + register char *str; + if(child(0)) { + if((str = getenv("SHELL")) != (char*)0) + (void) execl(str, str, (char *)0); + else + (void) execl("/bin/sh", "sh", (char *)0); + raw_print("sh: cannot execute."); + exit(EXIT_FAILURE); + } + return 0; +} +#endif /* SHELL */ + +#if defined(SHELL) || defined(DEF_PAGER) || defined(DEF_MAILREADER) +int +child(wt) +int wt; +{ + register int f; + suspend_nhwindows((char *)0); /* also calls end_screen() */ +#ifdef _M_UNIX + sco_mapon(); +#endif +#ifdef __linux__ + linux_mapon(); +#endif + if((f = fork()) == 0){ /* child */ + (void) setgid(getgid()); + (void) setuid(getuid()); +#ifdef CHDIR + (void) chdir(getenv("HOME")); +#endif + return(1); + } +if(f == -1) { /* cannot fork */ +pline("Fork failed. Try again."); +return(0); +} +/* fork succeeded; wait for child to exit */ +(void) signal(SIGINT,SIG_IGN); +(void) signal(SIGQUIT,SIG_IGN); +(void) wait( (int *) 0); +#ifdef _M_UNIX +sco_mapoff(); +#endif +#ifdef __linux__ +linux_mapoff(); +#endif +(void) signal(SIGINT, (SIG_RET_TYPE) done1); +#ifdef WIZARD +if(wizard) (void) signal(SIGQUIT,SIG_DFL); +#endif +if(wt) { + raw_print(""); + wait_synch(); +} +resume_nhwindows(); +return(0); +} +#endif + +#ifdef GETRES_SUPPORT + +extern int FDECL(nh_getresuid, (uid_t *, uid_t *, uid_t *)); +extern uid_t NDECL(nh_getuid); +extern uid_t NDECL(nh_geteuid); +extern int FDECL(nh_getresgid, (gid_t *, gid_t *, gid_t *)); +extern gid_t NDECL(nh_getgid); +extern gid_t NDECL(nh_getegid); + +int +(getresuid)(ruid, euid, suid) +uid_t *ruid, *euid, *suid; +{ + return nh_getresuid(ruid, euid, suid); +} + +uid_t +(getuid)() +{ + return nh_getuid(); +} + +uid_t +(geteuid)() +{ + return nh_geteuid(); +} + +int +(getresgid)(rgid, egid, sgid) +gid_t *rgid, *egid, *sgid; +{ + return nh_getresgid(rgid, egid, sgid); +} + +gid_t +(getgid)() +{ + return nh_getgid(); +} + +gid_t +(getegid)() +{ + return nh_getegid(); +} + +#endif /* GETRES_SUPPORT */ diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/sys/Cocoa_GNUStep/setup.sh NetHack3D-8/sys/Cocoa_GNUStep/setup.sh --- jnethack/sys/Cocoa_GNUStep/setup.sh 1970-01-01 09:00:00.000000000 +0900 +++ NetHack3D-8/sys/Cocoa_GNUStep/setup.sh 2006-05-09 11:20:59.000000000 +0900 @@ -0,0 +1,41 @@ +#!/bin/sh +# Copy files to their correct locations. +# +# If arguments are given, try symbolic link first. This is not the default +# so that most people will have the distribution versions stay around so +# subsequent patches can be applied. People who pay enough attention to +# know there's a non-default behavior are assumed to pay enough attention +# to keep distribution versions if they modify things. + +# Were we started from the top level? Cope. +if [ -f sys/Cocoa_GNUStep/Makefile.top ]; then cd sys/Cocoa_GNUStep; fi + +if [ $# -gt 0 ] ; then +# First, try to make a symbolic link. +# + ln -s Makefile.top Makefile >/dev/null 2>&1 + if [ $? -eq 0 ] ; then + + echo "Lucky you! Symbolic links." + rm -f Makefile + + umask 0 + ln -s sys/Cocoa_GNUStep/Makefile.top ../../Makefile + ln -s ../sys/Cocoa_GNUStep/Makefile.dat ../../dat/Makefile + ln -s ../sys/Cocoa_GNUStep/Makefile.doc ../../doc/Makefile + ln -s ../sys/Cocoa_GNUStep/Makefile.src ../../src/Makefile + ln -s ../sys/Cocoa_GNUStep/Makefile.utl ../../util/Makefile + exit 0 + fi +fi + +# +# Otherwise... + +echo "Copying Makefiles." + +cp Makefile.top ../../Makefile +cp Makefile.dat ../../dat/Makefile +cp Makefile.doc ../../doc/Makefile +cp Makefile.src ../../src/Makefile +cp Makefile.utl ../../util/Makefile diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/sys/unix/Makefile.src NetHack3D-8/sys/unix/Makefile.src --- jnethack/sys/unix/Makefile.src 2006-05-03 09:42:28.000000000 +0900 +++ NetHack3D-8/sys/unix/Makefile.src 2006-05-09 10:49:24.000000000 +0900 @@ -54,6 +54,11 @@ # for BeOS #SYSSRC = ../sys/be/bemain.c ../sys/share/unixtty.c ../sys/share/ioctl.c #SYSOBJ = bemain.o unixtty.o ioctl.o +# +# for MacOSX(Cocoa) +# SYSSRC = ../sys/Cocoa_GNUStep/nh3dmain.m ../sys/Cocoa_GNUStep/nh3dres.m ../sys/Cocoa_GNUStep/nh3dunix.m \ +# ../sys/share/ioctl.c ../sys/share/unixtty.c +# SYSOBJ = nh3dmain.o nh3dres.o nh3dunix.o ioctl.o unixtty.o #JP by issei(93/11/10) JSRC = ../japanese/jconj.c ../japanese/jtrns.c ../japanese/jlib.c @@ -151,6 +156,27 @@ # GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome +# Only used for the NH3D interface. +# When including the NH3D interface, you need to include NH3D specific +# directories. +# For Linux? +GNUSTEPDIR = /usr/lib/GNUstep/System/Library + +OBJCFLAG = $(CFLAGS) -fconstant-string-class=NSConstantString + +NH3DINC=-I../win/nh3d -I$(GNUSTEPDIR)/Headers + +# For MacOSX (Cocoa 10.4) +MACOSXDIR = /System/Library +OSXARCH = -arch ppc +# OSXARCH = -arch i386 +# OSXVECTOR = -faltivec -mtune=G5 -ftree-vectorize +# OSXVECTOR = -msse3 -ftree-vectorize +# CFLAGS = $(OSXARCH) $(OSXVECTOR) -I../include -Os +# OBJCFLAG = $(OSXARCH) $(OSXVECTOR) -I../include -Os -x objective-c -Wno-trigraphs -fobjc-exceptions -fasm-blocks -Wreturn-type -Wunused-variable -fmessage-length=0 -fobjc-direct-dispatch -fvisibility=hidden + +# NH3DINC=-I../win/nh3d -I$(MACOSXDIR)/Frameworks -I/usr/include + # flags for debugging: # CFLAGS = -g -I../include @@ -213,6 +239,19 @@ gnmesg.o gnopts.o gnplayer.o gnsignal.o gnstatus.o gntext.o \ gnyesno.o gnworn.o tile.o # +# Files for a NH3D port +# +WINNH3DSRC = ../win/nh3d/NH3DMapItem.m ../win/nh3d/NH3DMapModel.m \ + ../win/nh3d/NH3DMapView.m ../win/nh3d/NH3DMenuItem.m ../win/nh3d/NH3DMenuWindow.m \ + ../win/nh3d/NH3DMessenger.m ../win/nh3d/NH3DModelObjects.m ../win/nh3d/NH3DOpenGLView.m \ + ../win/nh3d/NH3DPanel.m ../win/nh3d/NH3DPreferenceController.m ../win/nh3d/NH3DTileCache.m \ + ../win/nh3d/NH3DUserMakeSheetController.m ../win/nh3d/NH3DUserStatusModel.m \ + ../win/nh3d/winnh3d.m ../win/nh3d/compat/Cocoa-compat.m +WINNH3DOBJ = NH3DMapItem.o NH3DMapModel.o NH3DMapView.o NH3DMenuItem.o NH3DMenuWindow.o \ + NH3DMessenger.o NH3DModelObjects.o NH3DOpenGLView.o NH3DPanel.o NH3DPreferenceController.o \ + NH3DTileCache.o NH3DUserMakeSheetController.o NH3DUserStatusModel.o winnh3d.o Cocoa-compat.o \ + tile.o +# # Files for a Gem port WINGEMSRC = ../win/gem/wingem.c ../win/gem/wingem1.c ../win/gem/load_img.c \ ../win/gem/gr_rect.c tile.c @@ -262,6 +301,12 @@ # libraries for Gnome WINGNOMELIB = -lgnomeui -lgnome -lart_lgpl -lgtk -lgdk -lpopt # +# libraries for NH3D +# For Linux? +WINNH3DLIB = -L$(GNUSTEPDIR)/Libraries -lgnustep-gui -lgnustep-base -lobjc -lGL -lGLU +# For MacOSX_PPC +# WINNH3DLIB = -L$(MACOSXDIR) -F$(MACOSXDIR)/Frameworks -framework AppKit -framework OpenGL -framework Cocoa -framework Foundation $(OSXARCH) +# # libraries for Gem port WINGEMLIB = -le_gem -lgem # @@ -355,7 +400,7 @@ GENCSRC = monstr.c vis_tab.c #tile.c # all windowing-system-dependent .c (for dependencies and such) -WINCSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC) +WINCSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC) $(WINNH3DSRC) # all windowing-system-dependent .cpp (for dependencies and such) WINCXXSRC = $(WINQTSRC) $(WINBESRC) @@ -614,6 +659,12 @@ $(CC) $(CFLAGS) -c ../sys/unix/unixunix.c unixres.o: ../sys/unix/unixres.c $(CONFIG_H) $(CC) $(CFLAGS) -c ../sys/unix/unixres.c +nh3dmain.o: ../sys/Cocoa_GNUStep/nh3dmain.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../sys/Cocoa_GNUStep/nh3dmain.m +nh3dres.o: ../sys/Cocoa_GNUStep/nh3dres.m $(CONFIG_H) + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../sys/Cocoa_GNUStep/nh3dres.m +nh3dunix.o: ../sys/Cocoa_GNUStep/nh3dres.m $(HACK_H) + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../sys/Cocoa_GNUStep/nh3dres.m bemain.o: ../sys/be/bemain.c $(HACK_H) ../include/dlb.h $(CC) $(CFLAGS) -c ../sys/be/bemain.c getline.o: ../win/tty/getline.c $(HACK_H) ../include/func_tab.h @@ -730,6 +781,36 @@ $(CC) $(CFLAGS) -c ../win/gtk/xshmmap.c xshm.o: ../win/gtk/xshm.c ../include/hack.h ../include/xshm.h $(CC) $(CFLAGS) -c ../win/gtk/xshm.c +NH3DMapItem.o: ../win/nh3d/NH3DMapItem.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DMapItem.m +NH3DMapModel.o: ../win/nh3d/NH3DMapModel.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DMapModel.m +NH3DMapView.o: ../win/nh3d/NH3DMapView.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DMapView.m +NH3DMenuItem.o: ../win/nh3d/NH3DMenuItem.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DMenuItem.m +NH3DMenuWindow.o: ../win/nh3d/NH3DMenuWindow.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DMenuWindow.m +NH3DMessenger.o: ../win/nh3d/NH3DMessenger.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DMessenger.m +NH3DModelObjects.o: ../win/nh3d/NH3DModelObjects.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DModelObjects.m +NH3DOpenGLView.o: ../win/nh3d/NH3DOpenGLView.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DOpenGLView.m +NH3DPanel.o: ../win/nh3d/NH3DPanel.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DPanel.m +NH3DPreferenceController.o: ../win/nh3d/NH3DPreferenceController.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DPreferenceController.m +NH3DTileCache.o: ../win/nh3d/NH3DTileCache.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DTileCache.m +NH3DUserMakeSheetController.o: ../win/nh3d/NH3DUserMakeSheetController.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DUserMakeSheetController.m +NH3DUserStatusModel.o: ../win/nh3d/NH3DUserStatusModel.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/NH3DUserStatusModel.m +winnh3d.o: ../win/nh3d/winnh3d.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/winnh3d.m +Cocoa-compat.o: ../win/nh3d/compat/Cocoa-compat.m + $(CC) $(OBJCFLAG) $(NH3DINC) -c ../win/nh3d/compat/Cocoa-compat.m qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../include/func_tab.h \ ../include/dlb.h ../include/patchlevel.h ../include/tile2x11.h \ ../include/qt_win.h ../include/qt_clust.h ../include/qt_kde0.h \ diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/sys/unix/depend.awk NetHack3D-8/sys/unix/depend.awk --- jnethack/sys/unix/depend.awk 2003-12-08 08:39:13.000000000 +0900 +++ NetHack3D-8/sys/unix/depend.awk 2006-05-09 10:49:24.000000000 +0900 @@ -2,7 +2,7 @@ # for nethack's source files (`make depend' support for Makefile.src). # # usage: -# cd src ; nawk -f depend.awk ../include/*.h list-of-.c/.cpp-files +# cd src ; nawk -f depend.awk ../include/*.h list-of-.c/.cpp-files/.m # # This awk program scans each file in sequence, looking for lines beginning # with `#include "' and recording the name inside the quotes. For .h files, @@ -54,12 +54,12 @@ # function output_dep( targ) { - if (file ~ /\.cp*$/) { - #prior to very first .c|.cpp file, handle some special header file cases + if (file ~ /\.cp*|\.m$/) { + #prior to very first .c|.cpp|.m file, handle some special header file cases if (!c_count++) output_specials() #construct object filename from source filename - targ = file; sub("^.+/", "", targ); sub("\\.cp*$", ".o", targ) + targ = file; sub("^.+/", "", targ); sub("\\.cp*$|\\.m", ".o", targ) #format and write the collected dependencies format_dep(targ, file) } @@ -113,6 +113,8 @@ print "\t$(CXX) $(CXXFLAGS) -c " source else if (source ~ /\/gnome\//) # "../win/gnome/foo.c" print "\t$(CC) $(CFLAGS) $(GNOMEINC) -c " source + else if (source ~ /\.m$/) # "../win/nh3d/foo.m" + print "\t$(CC) $(OBJCFLAG) $(NH3DINC) -c " source else print "\t$(CC) $(CFLAGS) -c " source } diff -aurbN -xCVS -xXTAGS -x.DS_Store jnethack/sys/unix/unixunix.c NetHack3D-8/sys/unix/unixunix.c --- jnethack/sys/unix/unixunix.c 2006-05-03 09:42:28.000000000 +0900 +++ NetHack3D-8/sys/unix/unixunix.c 2006-05-09 10:49:24.000000000 +0900 @@ -2,12 +2,6 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ -/* -** Japanese version Copyright -** For 3.4, Copyright (c) Kentaro Shirakata, 2002-2003 -** JNetHack may be freely redistributed. See license for details. -*/ - /* This file collects some Unix dependencies */ #include "hack.h" /* mainly for index() which depends on BSD */ @@ -156,18 +150,10 @@ (void) close(fd); if(iflags.window_inited) { -/*JP c = yn("There is already a game in progress under your name. Destroy old game?"); -*/ - c = yn("、「、ハ、ソ、ホフセチー、ヌノヤタオスェホサ、キ、ソ・イ。シ・爨ャサト、テ、ニ、、、゙、ケ。・ヌヒエ、キ、゙、ケ、ォ。ゥ"); } else { -#if 0 /*JP*/ (void) printf("\nThere is already a game in progress under your name."); (void) printf(" Destroy old game? [yn] "); -#else - (void) printf("\n、「、ハ、ソ、ホフセチー、ヌノヤタオスェホサ、キ、ソ・イ。シ・爨ャサト、テ、ニ、、、゙、ケ。・"); - (void) printf("ヌヒエ、キ、゙、ケ、ォ。ゥ[yn] "); -#endif (void) fflush(stdout); c = getchar(); (void) putchar(c); @@ -207,28 +193,10 @@ regularize(s) /* normalize file name - we don't like .'s, /'s, spaces */ register char *s; { -#if 0 /*JP*/ register char *lp; -#else - register unsigned char *lp; -#endif -#ifdef SJIS_FILESYSTEM - lp = (unsigned char *)ic2str( s ); - strcpy(s, lp); - for (lp = s; *lp; lp++){ - if(is_kanji(*lp)){ - lp++; - continue; - } - if(*lp == '.' || *lp == '/' || *lp == ' '){ - *lp = '_'; - } - } -#else while((lp=index(s, '.')) || (lp=index(s, '/')) || (lp=index(s,' '))) *lp = '_'; -#endif #if defined(SYSV) && !defined(AIX_31) && !defined(SVR4) && !defined(LINUX) && !defined(__APPLE__) /* avoid problems with 14 character file name limit */ # ifdef COMPRESS