Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Patches for compiling with djgpp

23 views
Skip to first unread message

Luc Bussieres

unread,
Oct 29, 1992, 2:20:50 PM10/29/92
to
I finally build a copy of nethack patch release 10 using djgpp
on the pc. This as build a 386 version of nethack without any memory
restriction.

I have make some small test under my home pc and it seems to
work correctly, I have play couples of time, and everything worked
perfectly. I have then try the same patches on my office pc and there
is a segmentation fault as soon as it try to display the first dunjeon
level. The main difference between both PCs are the display card and
driver. My office PC also has an ethernet card.

I don't have the time right now to test it completly on my
office pc. I'm posting the patches anyway, because somebody ask for
them. It could be a good starting point for porting it completly to
djgpp.

Those patches could be use to patch the original patch release 10 or
the one that has been modified by David.

Good Luck.


*** netpatch/include/config.h Tue Oct 27 11:07:37 1992
--- /home/share/sources/games/nethack3p10/include/config.h Tue Oct 27 11:50:00 1992
***************
*** 14,28 ****
* provides it (no need to change sec#1, vmsconf.h handles it).
*/

! /* #define UNIX */ /* delete if no fork(), exec() available */

#ifdef __MSDOS__ /* Turbo C auto-defines __MSDOS__, MSC defines MSDOS */
! # ifndef MSDOS
! # define MSDOS /* define for MS-DOS (in case compiler doesn't) */
! # endif
! # ifdef __GNUC__
! # define NEARDATA
! # endif
#else
/* #define MSDOS /* define for MS-DOS and most other micros */
/* DO NOT define for AMIGA - MSDOS will be
--- 14,23 ----
* provides it (no need to change sec#1, vmsconf.h handles it).
*/

! #define UNIX /* delete if no fork(), exec() available */

#ifdef __MSDOS__ /* Turbo C auto-defines __MSDOS__, MSC defines MSDOS */
! #define MSDOS /* define for MS-DOS (in case compiler doesn't) */
#else
/* #define MSDOS /* define for MS-DOS and most other micros */
/* DO NOT define for AMIGA - MSDOS will be
***************
*** 161,169 ****
*/

#ifndef MACOS
! #ifndef __GNUC__
! #define COMPRESS "/usr/local/compress" /* path name for 'compress' */
! #endif
# ifndef COMPRESS
#define ZEROCOMP /* Use only if COMPRESS is not used -- Olaf Seibert */
# endif
--- 156,162 ----
*/

#ifndef MACOS
! #define COMPRESS "/usr/ucb/compress" /* path name for 'compress' */
# ifndef COMPRESS
#define ZEROCOMP /* Use only if COMPRESS is not used -- Olaf Seibert */
# endif
*** netpatch/include/pcconf.h Tue Oct 27 11:51:03 1992
--- /home/share/sources/games/nethack3p10/include/pcconf.h Wed Oct 21 09:01:51 1992
***************
*** 17,27 ****
* The following options are configurable:
*/

! #undef OVERLAY /* MS DOS overlay manager - PGM */

! #ifndef __GNUC__
! #undef DGK /* MS DOS specific enhancements by dgk */
! #endif

#define TERMLIB /* enable use of termcap file /etc/termcap */
/* or ./termcap for MSDOS (SAC) */
--- 17,25 ----
* The following options are configurable:
*/

! #define OVERLAY /* MS DOS overlay manager - PGM */

! #define DGK /* MS DOS specific enhancements by dgk */

#define TERMLIB /* enable use of termcap file /etc/termcap */
/* or ./termcap for MSDOS (SAC) */
***************
*** 29,42 ****
/* enclosed in TERMCAP.ARC, to use this */
#define ANSI_DEFAULT /* allows NetHack to run without a ./termcap */

- #ifdef __GNUC__
- #undef RANDOM
- #undef SHELL /* via exec of COMMAND.COM */
- #else
#define RANDOM /* have Berkeley random(3) */
- #define SHELL /* via exec of COMMAND.COM */
- #endif


#endif /* TOS */

--- 27,35 ----
/* enclosed in TERMCAP.ARC, to use this */
#define ANSI_DEFAULT /* allows NetHack to run without a ./termcap */

#define RANDOM /* have Berkeley random(3) */

+ #define SHELL /* via exec of COMMAND.COM */

#endif /* TOS */

***************
*** 71,77 ****
#include <time.h>
#endif

! #if defined(RANDOM) || defined(__GNUC__)
/* Use the high quality random number routines. */
#define Rand() random()
#define Srand(seed) srandom(seed)
--- 64,70 ----
#include <time.h>
#endif

! #ifdef RANDOM
/* Use the high quality random number routines. */
#define Rand() random()
#define Srand(seed) srandom(seed)
***************
*** 102,108 ****
#undef Getchar
#define Getchar tgetch
#endif
-

#if !defined(TOS) && !defined(AMIGA)
# define TEXTCOLOR /* */
--- 95,100 ----
*** netpatch/include/system.h Tue Oct 27 11:47:57 1992
--- /home/share/sources/games/nethack3p10/include/system.h Wed Feb 6 00:32:30 1991
***************
*** 22,31 ****
# define _SIZE_T
#endif

- #if defined(MSDOS) && defined(__GNUC__) && !defined(_SIZE_T)
- # define _SIZE_T
- #endif
-
#if defined(MSDOS) || ((defined(AMIGA) || defined(MACOS)) && !defined(THINKC4))
# ifndef _SIZE_T
# define _SIZE_T
--- 22,27 ----
***************
*** 63,79 ****
E long random();
E void FDECL(srandom, (unsigned int));
#else
- # if defined(MSDOS) && defined(__GNUC__)
- E long random();
- E void FDECL(srandom, (int));
- # else
E long lrand48();
E void srand48();
- # endif
#endif /* BSD || ULTRIX || RANDOM */

! #if !defined(BSD) || defined(ultrix)
! /* real BSD wants all these to return int */
# ifndef MSDOS
E void FDECL(exit, (int));
# endif /* MSDOS */
--- 59,70 ----
E long random();
E void FDECL(srandom, (unsigned int));
#else
E long lrand48();
E void srand48();
#endif /* BSD || ULTRIX || RANDOM */

! #if !defined(BSD) || defined(ultrix)
! /* real BSD wants all these to return int */
# ifndef MSDOS
E void FDECL(exit, (int));
# endif /* MSDOS */
***************
*** 90,100 ****
E int qsort();
#else
# ifndef LATTICE
- # ifdef __GNUC__
- E void FDECL(qsort, (void*, size_t, size_t, int (*ptf)(const void*,const void*)));
- # else
E void FDECL(qsort, (genericptr_t,size_t,size_t,int(*)(genericptr_t,genericptr_t)));
- # endif
# endif
#endif

--- 81,87 ----
***************
*** 105,115 ****
E int FDECL(write, (int,char *,int));
#else
E long FDECL(lseek, (int,long,int));
- # if defined(MSDOS) && defined(__GNUC__)
- E int FDECL(write, (int,const void *,unsigned));
- # else
E int FDECL(write, (int,genericptr_t,unsigned));
- # endif
#endif /* ULTRIX */
E int FDECL(unlink, (const char *));

--- 92,98 ----
***************
*** 120,130 ****
E int FDECL(dup2, (int, int));
E int FDECL(setmode, (int,int));
E int FDECL(kbhit, (void));
- # ifdef __GNUC__
- E int FDECL(chdir, (const char *));
- # else
E int FDECL(chdir, (char *));
- # endif
E char *FDECL(getcwd, (char *,int));
#endif
#endif /* AZTEC_50 */
--- 103,109 ----
***************
*** 156,171 ****
E void *FDECL(memset, (char*,int,int));
#endif
#ifdef MSDOS
! # if defined(__GNUC__)
! # if defined(TOS)
E int FDECL(memcmp, (const char *,const char *,size_t));
E char *FDECL(memcpy, (char *,const char *,size_t));
E char *FDECL(memset, (char*,int,size_t));
- # else
- E int FDECL(memcmp, (const void *,const void *,size_t));
- E void *FDECL(memcpy, (void *,const void *,size_t));
- E void *FDECL(memset, (void*,int,int));
- # endif /* TOS */
# else
# ifndef LATTICE
# ifdef MSC
--- 135,144 ----
E void *FDECL(memset, (char*,int,int));
#endif
#ifdef MSDOS
! # if defined(TOS) && defined(__GNUC__)
E int FDECL(memcmp, (const char *,const char *,size_t));
E char *FDECL(memcpy, (char *,const char *,size_t));
E char *FDECL(memset, (char*,int,size_t));
# else
# ifndef LATTICE
# ifdef MSC
***************
*** 177,183 ****
E char *FDECL(memset, (char*,int,int));
# endif
# endif
! # endif /* __GNUC__ */
#endif

#if defined(BSD) && defined(ultrix) /* i.e., old versions of Ultrix */
--- 150,156 ----
E char *FDECL(memset, (char*,int,int));
# endif
# endif
! # endif /* TOS */
#endif

#if defined(BSD) && defined(ultrix) /* i.e., old versions of Ultrix */
***************
*** 203,219 ****
/*# string(s).h #*/

E char *FDECL(strcpy, (char *,const char *));
- #if defined(MSDOS) && defined(__GNUC__)
- E char *FDECL(strncpy, (char *,const char *,int));
- #else
E char *FDECL(strncpy, (char *,const char *,size_t));
- #endif
E char *FDECL(strcat, (char *,const char *));
- #if defined(MSDOS) && defined(__GNUC__)
- E char *FDECL(strncat, (char *,const char *,int));
- #else
E char *FDECL(strncat, (char *,const char *,size_t));
- #endif

#if defined(SYSV) || defined(MSDOS) || defined(AMIGA) || defined(THINK_C) || defined(VMS) || defined(HPUX)
E char *FDECL(strchr, (const char *,int));
--- 176,184 ----
***************
*** 225,235 ****


E int FDECL(strcmp, (const char *,const char *));
- #if defined(MSDOS) && defined(__GNUC__)
- E int FDECL(strncmp, (const char *,const char *,int));
- #else
E int FDECL(strncmp, (const char *,const char *,size_t));
- #endif
#ifdef MSDOS
E size_t FDECL(strlen, (const char *));
#else
--- 190,196 ----
***************
*** 261,273 ****

#ifdef NEED_VARARGS
# if defined(USE_STDARG) || defined(USE_VARARGS)
- # if defined(MSDOS) && defined(__GNUC__)
- E int FDECL(vsprintf, (char *, const char *, ...));
- E int FDECL(vprintf, (const char *, ...));
- # else
E int FDECL(vsprintf, (char *, const char *, va_list));
E int FDECL(vprintf, (const char *, va_list));
- # endif
# else
# define vprintf printf
# define vsprintf sprintf
--- 222,229 ----
***************
*** 299,312 ****
#endif

#ifdef MSDOS
- # ifdef __GNUC__
- E int FDECL(tgetent, (char *,char *));
- E int FDECL(tgetnum, (char *));
- E int FDECL(tgetflag, (char *));
- E char *FDECL(tgetstr, (char *,char **));
- E char *FDECL(tgoto, (char *,int,int));
- E int FDECL(tputs, (char *,int,int (*)()));
- # else
E int FDECL(tgetent, (const char *,const char *));
E int FDECL(tgetnum, (const char *));
E int FDECL(tgetflag, (const char *));
--- 255,260 ----
***************
*** 313,319 ****
E char *FDECL(tgetstr, (const char *,char **));
E char *FDECL(tgoto, (const char *,int,int));
E void FDECL(tputs, (const char *,int,int (*)()));
- # endif
#else
E int FDECL(tgetent, (char *,const char *));
E int FDECL(tgetnum, (char *));
--- 261,266 ----
*** netpatch/others/NetHack.cnf Tue Oct 27 11:08:11 1992
--- /home/share/sources/games/nethack3p10/others/NetHack.cnf Tue Jun 26 21:20:10 1990
***************
*** 12,18 ****
# These two options should be used for most setups. If you're machine isn't
# very IBM-compatible, and NetHack doesn't work, try commenting out this line.
#
! #OPTIONS=rawio,IBM_BIOS,IBMgraphics
# DEC Rainbows will hang if rawio is set, so they should instead use:
#OPTIONS=IBM_BIOS,DECgraphics
#
--- 12,18 ----
# These two options should be used for most setups. If you're machine isn't
# very IBM-compatible, and NetHack doesn't work, try commenting out this line.
#
! OPTIONS=rawio,IBM_BIOS,IBMgraphics
# DEC Rainbows will hang if rawio is set, so they should instead use:
#OPTIONS=IBM_BIOS,DECgraphics
#
***************
*** 41,47 ****
#SAVE=c:\games\nethack\bones;n
#
# appending a ";n" to SAVE means don't prompt to insert a disk.
! #SAVE=;n
#
#RAMDISK=d:

--- 41,47 ----
#SAVE=c:\games\nethack\bones;n
#
# appending a ";n" to SAVE means don't prompt to insert a disk.
! SAVE=;n
#
#RAMDISK=d:

*** netpatch/others/msdos.c Tue Oct 27 11:08:55 1992
--- /home/share/sources/games/nethack3p10/others/msdos.c Wed Feb 6 00:03:54 1991
***************
*** 25,33 ****

#include <ctype.h>
#include <fcntl.h>
- # ifndef __GNUC__
#include <process.h>
- #endif

static char NDECL(DOSgetch);
# ifdef DGK
--- 25,31 ----
***************
*** 62,73 ****
tgetch() {
char ch;

! # ifdef DGK
/* BIOSgetch can use the numeric key pad on IBM compatibles. */
if (flags.IBMBIOS)
ch = BIOSgetch();
else
! # endif
ch = DOSgetch();
return ((ch == '\r') ? '\n' : ch);
}
--- 60,71 ----
tgetch() {
char ch;

! # ifdef DGK
/* BIOSgetch can use the numeric key pad on IBM compatibles. */
if (flags.IBMBIOS)
ch = BIOSgetch();
else
! # endif
ch = DOSgetch();
return ((ch == '\r') ? '\n' : ch);
}
***************
*** 276,282 ****
}
return ch;
}
- # endif /* DGK */

static char
DOSgetch() {
--- 274,279 ----
***************
*** 326,332 ****
# endif /* TOS */
}

! #ifdef DGK
# ifndef TOS

# ifdef __TURBOC__
--- 323,329 ----
# endif /* TOS */
}

!
# ifndef TOS

# ifdef __TURBOC__
***************
*** 344,350 ****
}
# endif /* OS2 */
# endif /* __TURBOC__ */
! # endif /* TOS */

static const char *COMSPEC =
# ifdef TOS
--- 341,347 ----
}
# endif /* OS2 */
# endif /* __TURBOC__ */
! # endif /* TOS */

static const char *COMSPEC =
# ifdef TOS
***************
*** 842,849 ****
getreturn("to continue");
return;
}
- #endif /* DGK */

/* Read configuration */
void
read_config_file() {
--- 839,847 ----
getreturn("to continue");
return;
}

+ # endif /* DGK */
+
/* Read configuration */
void
read_config_file() {
***************
*** 1258,1264 ****
# ifdef CHDIR
chdir(orgdir); /* chdir, not chdirx */
chdrive(orgdir);
! # endif /* chdir */
# ifdef TOS
if (run_from_desktop)
getreturn("to continue"); /* so the user can read the score list */
--- 1256,1262 ----
# ifdef CHDIR
chdir(orgdir); /* chdir, not chdirx */
chdrive(orgdir);
! # endif
# ifdef TOS
if (run_from_desktop)
getreturn("to continue"); /* so the user can read the score list */
***************
*** 1265,1272 ****
# ifdef TEXTCOLOR
if (flags.IBMBIOS && flags.use_color)
restore_colors();
! # endif /* TEXTCOLOR */
! # endif /* TOS */
exit(code);
return;
}
--- 1263,1270 ----
# ifdef TEXTCOLOR
if (flags.IBMBIOS && flags.use_color)
restore_colors();
! # endif
! # endif
exit(code);
return;
}
*** netpatch/others/pcmain.c Tue Oct 27 11:09:02 1992
--- /home/share/sources/games/nethack3p10/others/pcmain.c Wed Feb 6 00:03:55 1991
***************
*** 835,843 ****
/* Change the default drive as well.
*/
#ifndef AMIGA
- # ifndef __GNUC__
chdrive(dir);
- # endif
#endif

/* warn the player if we can't write the record file */
--- 835,841 ----
*** netpatch/src/bones.c Wed Oct 28 09:13:25 1992
--- /home/share/sources/games/nethack3p10/src/bones.c Tue Feb 5 23:58:52 1991
***************
*** 150,158 ****
if(discover) return;
#endif

- #ifdef __GNUC__
- strcpy(bones,"bones.xx");
- #endif
name_file(bones, dlevel);
#ifdef COMPRESS
Strcpy(proxy, bones);
--- 150,155 ----
*** netpatch/src/cmd.c Tue Oct 27 12:06:09 1992
--- /home/share/sources/games/nethack3p10/src/cmd.c Thu May 31 00:31:25 1990
***************
*** 42,50 ****
extern int NDECL(doforce); /**/
extern int NDECL(doopen); /**/
extern int NDECL(doclose); /**/
- #ifdef SHELL
extern int NDECL(dosh); /**/
- #endif
extern int NDECL(dodiscovered); /**/
extern int NDECL(doset); /**/
extern int NDECL(dotogglepickup); /**/
--- 42,48 ----
***************
*** 77,85 ****
extern int NDECL(doextversion); /**/
extern int NDECL(dowield); /**/
extern int NDECL(dozap); /**/
- #ifdef __GNUC__
- extern int NDECL(tgetch); /**/
- #endif
#endif /* DUMB */

#ifdef OVL1
--- 75,80 ----
*** netpatch/termcap/tgetent.c Tue Oct 27 11:09:37 1992
--- /home/share/sources/games/nethack3p10/termcap/tgetent.c Tue Oct 27 11:59:23 1992
***************
*** 81,87 ****
* search the path for TERMCAP under Turbo C. -3.
*/

-
#include <stdio.h>
#include <string.h>

--- 81,86 ----
***************
*** 96,104 ****

#ifdef MSDOS
# define DEFAULT_ROOT "termcap" /* name without path component */
- # ifndef __GNUC__
FILE *fopenp();
- # endif
#endif
# define DEFAULT_FILE "/etc/termcap" /* default termcap filename */

--- 95,101 ----
***************
*** 254,260 ****
return fp;
else if (fp = fopen(DEFAULT_FILE, "r"))
return fp;
! # if !defined(__TURBOC__) && !defined(__GNUC__)
else
return fopenp(DEFAULT_ROOT, "r", NULL);
# endif
--- 251,257 ----
return fp;
else if (fp = fopen(DEFAULT_FILE, "r"))
return fp;
! # ifndef __TURBOC__
else
return fopenp(DEFAULT_ROOT, "r", NULL);
# endif



--
Luc Bussieres ---- System Analyst - Dept. of Mathematics and Computer Sciences
University of Sherbrooke
Internet : luc.bu...@dmi.usherb.ca
Tel: (819) 821-7981

Luc Bussieres

unread,
Oct 30, 1992, 8:57:46 AM10/30/92
to
I forget to describe how to compile it.
- Be sure that djgpp is installed and configure correctly.

- extract the termcap.arc in a directory name termcap, in the
same level as src auxil and others directory.

- apply the patches.

- After that you need to copy the files msdos.c, pc*.c from
the others directory to the src directory.

- Go into the termcap directory and execute the following
lines:
- gcc -O -c *.c
- ar rcv libtermc.a *.o
- ranlib libtermc.a

- Go into the src directory and type make using the makefile
that is at the end of this message. (sorry I forgot to include
it with the patches.

- You should now have a nethack executable.


- To install it

- Go into the src directory if you're not already in it and
execute those lines:
- make lev_comp
- makedefs -r
- makedefs -d

- Go into the auxil directory and execute those lines:
- ..\src\lev_comp castle.des
- ..\src\lev_comp endgame.des
- ..\src\lev_comp tower.des

- Copy the files
castle
cmdhelp
data
endgame
help
hh
history
license
opthelp
oracles
rumors
tower1
tower2
tower3
from the auxil directory to the directory where you want to
install it.

termcap
nethack.cnf
from the others directory to the directory where you want to
install it.

nethack.exe
from the src directory to the directory where you want to
install it.

- Create an empty file name record in the directory where you
want to install it.


- Have fun

Makefile:
------------------------------------------------------ Cut here
# Hack Makefile for djgpp

SYSTEM = Sysdjgpp
TARG = pc
CC = gcc

# flags for debugging:
# CFLAGS = -g -I../include

CFLAGS = -O -I../include
LFLAGS = -L../termcap -L.
TERMLIB = -ltermc
# LIBS = -lmalloc
LIBS =
YACC = bison -y
LEX = flex
GAME = nethack
# RANDOBJ = random.o
RANDOBJ =

# 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

HACKCSRC = allmain.c alloc.c apply.c artifact.c attrib.c bones.c cmd.c\
dbridge.c decl.c demon.c do.c do_name.c do_wear.c dog.c dogmove.c\
dokick.c dothrow.c eat.c end.c engrave.c exper.c extralev.c\
fountain.c getline.c hack.c invent.c lock.c mail.c makemon.c\
mcastu.c mhitm.c mhitu.c mklev.c mkmaze.c mkobj.c mkroom.c mon.c\
mondata.c monmove.c monst.c mthrowu.c music.c o_init.c objects.c\
objnam.c options.c pager.c pickup.c polyself.c potion.c pray.c pri.c\
priest.c prisym.c read.c restore.c rip.c rnd.c rumors.c save.c\
search.c shk.c shknam.c sit.c sounds.c sp_lev.c spell.c steal.c\
termcap.c timeout.c topl.c topten.c track.c trap.c u_init.c uhitm.c\
vault.c version.c weapon.c were.c wield.c wizard.c worm.c worn.c\
write.c zap.c

# all .c that are part of the main NetHack program and are not system specific

# now the other .c files, with duplicates commented out
MAKESRC = makedefs.c # monst.c objects.c
SPLEVSRC = lev_comp.c lev_lex.c lev_main.c panic.c # alloc.c monst.c objects.c
TARGSRC = $(TARG)main.c $(TARG)tty.c $(TARG)unix.c

CSOURCES = $(HACKCSRC) $(TARGSRC) $(MAKESRC) $(SPLEVSRC)

HACKINCL = amiconf.h artifact.h attrib.h color.h config.h coord.h decl.h\
def_os2.h edog.h epri.h eshk.h extern.h flag.h func_tab.h global.h\
gold.h hack.h lev.h macconf.h mfndpos.h mkroom.h monattk.h mondata.h\
monflag.h monst.h monsym.h msdos.h obj.h objclass.h patchlevel.h\
pcconf.h permonst.h prop.h rm.h sp_lev.h spell.h system.h termcap.h\
tosconf.h tradstdc.h unixconf.h vault.h vmsconf.h wseg.h you.h\
youprop.h

# all .h files except date.h, onames.h, pm.h & trap.h which would cause
# dependency loops if run through "make depend"
# and lev_comp.h, a special level file.

HSOURCES = $(HACKINCL) date.h onames.h pm.h trap.h lev_comp.h

SOURCES = $(CSOURCES) $(HSOURCES)

# object files for makedefs
MAKEOBJS = makedefs.o monst.o objects.o

# object files for special levels compiler
SPLEVOBJS = lev_comp.o lev_lex.o lev_main.o alloc.o monst.o objects.o panic.o

HOBJ = allmain.o alloc.o apply.o artifact.o attrib.o bones.o cmd.o dbridge.o\
decl.o demon.o do.o do_name.o do_wear.o dog.o dogmove.o dokick.o\
dothrow.o eat.o end.o engrave.o exper.o extralev.o fountain.o getline.o\
hack.o invent.o lock.o mail.o main.o makemon.o mcastu.o mhitm.o\
mhitu.o mklev.o mkmaze.o mkobj.o mkroom.o mon.o mondata.o monmove.o\
monst.o mthrowu.o music.o o_init.o objects.o objnam.o options.o pager.o\
pickup.o polyself.o potion.o pray.o pri.o priest.o prisym.o read.o\
restore.o rip.o rnd.o rumors.o save.o search.o shk.o shknam.o sit.o\
sounds.o sp_lev.o spell.o steal.o termcap.o timeout.o topl.o topten.o\
track.o trap.o tty.o u_init.o uhitm.o unix.o vault.o version.o\
weapon.o were.o wield.o wizard.o worm.o worn.o write.o zap.o $(RANDOBJ)

# the .o files from the HACKCSRC list, plus main.o tty.o unix.o

$(GAME): $(SYSTEM)
@echo "$(GAME) is up to date."

Sysdjgpp: $(HOBJ) Makefile msdos.o
@echo "Loading ..."
ranlib libhack.a
$(CC) $(LFLAGS) -o $(GAME) main.o -lhack $(TERMLIB)
strip nethack
aout2exe nethack
touch Sysdjgpp

all: $(GAME)

#
# dependencies for auxiliary programs
#
makedefs: $(MAKEOBJS)
$(CC) $(LFLAGS) -o makedefs $(MAKEOBJS)
strip makedefs
aout2exe makedefs

makedefs.o: ../include/config.h ../include/permonst.h ../include/objclass.h ../include/patchlevel.h
$(CC) $(CFLAGS) -c makedefs.c

lev_comp: $(SPLEVOBJS)
$(CC) $(LFLAGS) -o lev_comp $(SPLEVOBJS)
strip lev_comp
aout2exe lev_comp

lev_comp.o: ../include/hack.h ../include/sp_lev.h lev_comp.c
$(CC) $(CFLAGS) -c lev_comp.c

lev_lex.o: ../include/hack.h ../include/lev_comp.h ../include/sp_lev.h
$(CC) $(CFLAGS) -c lev_lex.c

lev_main.o: ../include/hack.h
$(CC) $(CFLAGS) -c lev_main.c

../include/lev_comp.h: lev_comp.c

lev_comp.c: lev_comp.y
$(YACC) -d lev_comp.y
cp y.tab.c lev_comp.c
cp y.tab.h ../include/lev_comp.h

lev_lex.c: lev_comp.l
$(LEX) lev_comp.l
cp lex.yy.c lev_lex.c

#
# The following include files depend on makedefs to be created.
# As a result, they are not defined in HACKINCL; instead, their
# dependencies are explicitly outlined here.
#

#
# date.h should be remade any time any of the source or include code
# is modified. Unfortunately, this would make the contents of this
# file far more complex. Since "hack.h" depends on most of the include
# files, we kludge around this by making date.h dependent on hack.h,
# even though it doesn't include this file.
#
../include/date.h: $(HACKCSRC) $(TARGSRC) ../include/hack.h makedefs
makedefs -v

../include/trap.h: makedefs
makedefs -t

../include/onames.h: makedefs
makedefs -o

../include/pm.h: makedefs
makedefs -p

#
# The following programs vary depending on what OS you are using.
# As a result, they are not defined in HACKSRC, and their dependencies
# are explicitly outlined here.
#
main.o: ../include/hack.h $(TARG)main.c
$(CC) $(CFLAGS) -o main.o -c $(TARG)main.c

tty.o: ../include/hack.h $(TARG)tty.c
$(CC) $(CFLAGS) -o tty.o -c $(TARG)tty.c
ar rcv libhack.a tty.o

unix.o: ../include/hack.h $(TARG)unix.c
$(CC) $(CFLAGS) -o unix.o -c $(TARG)unix.c
ar rcv libhack.a unix.o

clean:
rm -f *.o

spotless: clean
rm -f a.out core $(GAME) lev_comp makedefs
rm -f ../include/onames.h ../include/pm.h


# DO NOT DELETE THIS LINE

allmain.o: ../include/hack.h
$(CC) $(CFLAGS) -c allmain.c
ar rcv libhack.a allmain.o
alloc.o: ../include/config.h
$(CC) $(CFLAGS) -c alloc.c
ar rcv libhack.a alloc.o
apply.o: ../include/hack.h ../include/edog.h
$(CC) $(CFLAGS) -c apply.c
ar rcv libhack.a apply.o
artifact.o: ../include/hack.h ../include/artifact.h
$(CC) $(CFLAGS) -c artifact.c
ar rcv libhack.a artifact.o
attrib.o: ../include/hack.h
$(CC) $(CFLAGS) -c attrib.c
ar rcv libhack.a attrib.o
bones.o: ../include/hack.h
$(CC) $(CFLAGS) -c bones.c
ar rcv libhack.a bones.o
cmd.o: ../include/hack.h ../include/func_tab.h
$(CC) $(CFLAGS) -c cmd.c
ar rcv libhack.a cmd.o
dbridge.o: ../include/hack.h
$(CC) $(CFLAGS) -c dbridge.c
ar rcv libhack.a dbridge.o
decl.o: ../include/hack.h
$(CC) $(CFLAGS) -c decl.c
ar rcv libhack.a decl.o
demon.o: ../include/hack.h
$(CC) $(CFLAGS) -c demon.c
ar rcv libhack.a demon.o
do.o: ../include/hack.h
$(CC) $(CFLAGS) -c do.c
ar rcv libhack.a do.o
do_name.o: ../include/hack.h
$(CC) $(CFLAGS) -c do_name.c
ar rcv libhack.a do_name.o
do_wear.o: ../include/hack.h
$(CC) $(CFLAGS) -c do_wear.c
ar rcv libhack.a do_wear.o
dog.o: ../include/hack.h ../include/edog.h
$(CC) $(CFLAGS) -c dog.c
ar rcv libhack.a dog.o
dogmove.o: ../include/hack.h ../include/mfndpos.h ../include/edog.h
$(CC) $(CFLAGS) -c dogmove.c
ar rcv libhack.a dogmove.o
dokick.o: ../include/hack.h ../include/eshk.h
$(CC) $(CFLAGS) -c dokick.c
ar rcv libhack.a dokick.o
dothrow.o: ../include/hack.h
$(CC) $(CFLAGS) -c dothrow.c
ar rcv libhack.a dothrow.o
eat.o: ../include/hack.h
$(CC) $(CFLAGS) -c eat.c
ar rcv libhack.a eat.o
end.o: ../include/hack.h ../include/eshk.h
$(CC) $(CFLAGS) -c end.c
ar rcv libhack.a end.o
engrave.o: ../include/hack.h
$(CC) $(CFLAGS) -c engrave.c
ar rcv libhack.a engrave.o
exper.o: ../include/hack.h
$(CC) $(CFLAGS) -c exper.c
ar rcv libhack.a exper.o
extralev.o: ../include/hack.h
$(CC) $(CFLAGS) -c extralev.c
ar rcv libhack.a extralev.o
fountain.o: ../include/hack.h
$(CC) $(CFLAGS) -c fountain.c
ar rcv libhack.a fountain.o
getline.o: ../include/hack.h ../include/func_tab.h
$(CC) $(CFLAGS) -c getline.c
ar rcv libhack.a getline.o
hack.o: ../include/hack.h
$(CC) $(CFLAGS) -c hack.c
ar rcv libhack.a hack.o
invent.o: ../include/hack.h ../include/lev.h ../include/wseg.h
$(CC) $(CFLAGS) -c invent.c
ar rcv libhack.a invent.o
ioctl.o: ../include/hack.h
$(CC) $(CFLAGS) -c ioctl.c
ar rcv libhack.a ioctl.o
lock.o: ../include/hack.h
$(CC) $(CFLAGS) -c lock.c
ar rcv libhack.a lock.o
mail.o: ../include/hack.h
$(CC) $(CFLAGS) -c mail.c
ar rcv libhack.a mail.o
makemon.o: ../include/hack.h
$(CC) $(CFLAGS) -c makemon.c
ar rcv libhack.a makemon.o
mcastu.o: ../include/hack.h
$(CC) $(CFLAGS) -c mcastu.c
ar rcv libhack.a mcastu.o
mhitm.o: ../include/hack.h ../include/artifact.h
$(CC) $(CFLAGS) -c mhitm.c
ar rcv libhack.a mhitm.o
mhitu.o: ../include/hack.h ../include/artifact.h ../include/edog.h
$(CC) $(CFLAGS) -c mhitu.c
ar rcv libhack.a mhitu.o
mklev.o: ../include/hack.h
$(CC) $(CFLAGS) -c mklev.c
ar rcv libhack.a mklev.o
mkmaze.o: ../include/hack.h
$(CC) $(CFLAGS) -c mkmaze.c
ar rcv libhack.a mkmaze.o
mkobj.o: ../include/hack.h
$(CC) $(CFLAGS) -c mkobj.c
ar rcv libhack.a mkobj.o
mkroom.o: ../include/hack.h
$(CC) $(CFLAGS) -c mkroom.c
ar rcv libhack.a mkroom.o
mon.o: ../include/hack.h ../include/mfndpos.h ../include/wseg.h
$(CC) $(CFLAGS) -c mon.c
ar rcv libhack.a mon.o
mondata.o: ../include/hack.h ../include/eshk.h ../include/epri.h
$(CC) $(CFLAGS) -c mondata.c
ar rcv libhack.a mondata.o
monmove.o: ../include/hack.h ../include/mfndpos.h ../include/artifact.h
$(CC) $(CFLAGS) -c monmove.c
ar rcv libhack.a monmove.o
monst.o: ../include/config.h ../include/permonst.h ../include/monsym.h ../include/eshk.h ../include/vault.h ../include/epri.h ../include/color.h
$(CC) $(CFLAGS) -c monst.c
ar rcv libhack.a monst.o
msdos.o: ../include/hack.h
$(CC) $(CFLAGS) -c msdos.c
ar rcv libhack.a msdos.o
mthrowu.o: ../include/hack.h
$(CC) $(CFLAGS) -c mthrowu.c
ar rcv libhack.a mthrowu.o
music.o: ../include/hack.h
$(CC) $(CFLAGS) -c music.c
ar rcv libhack.a music.o
o_init.o: ../include/hack.h
$(CC) $(CFLAGS) -c o_init.c
ar rcv libhack.a o_init.o
objects.o: ../include/config.h ../include/obj.h ../include/objclass.h ../include/prop.h ../include/color.h
$(CC) $(CFLAGS) -c objects.c
ar rcv libhack.a objects.o
objnam.o: ../include/hack.h
$(CC) $(CFLAGS) -c objnam.c
ar rcv libhack.a objnam.o
options.o: ../include/hack.h
$(CC) $(CFLAGS) -c options.c
ar rcv libhack.a options.o
pager.o: ../include/hack.h
$(CC) $(CFLAGS) -c pager.c
ar rcv libhack.a pager.o
panic.o: ../include/hack.h
$(CC) $(CFLAGS) -c panic.c
ar rcv libhack.a panic.o
pickup.o: ../include/hack.h
$(CC) $(CFLAGS) -c pickup.c
ar rcv libhack.a pickup.o
polyself.o: ../include/hack.h
$(CC) $(CFLAGS) -c polyself.c
ar rcv libhack.a polyself.o
potion.o: ../include/hack.h
$(CC) $(CFLAGS) -c potion.c
ar rcv libhack.a potion.o
pray.o: ../include/hack.h
$(CC) $(CFLAGS) -c pray.c
ar rcv libhack.a pray.o
pri.o: ../include/hack.h ../include/epri.h ../include/termcap.h
$(CC) $(CFLAGS) -c pri.c
ar rcv libhack.a pri.o
priest.o: ../include/hack.h ../include/mfndpos.h ../include/eshk.h ../include/epri.h
$(CC) $(CFLAGS) -c priest.c
ar rcv libhack.a priest.o
prisym.o: ../include/hack.h ../include/wseg.h ../include/lev.h
$(CC) $(CFLAGS) -c prisym.c
ar rcv libhack.a prisym.o
read.o: ../include/hack.h
$(CC) $(CFLAGS) -c read.c
ar rcv libhack.a read.o
restore.o: ../include/hack.h ../include/lev.h ../include/wseg.h
$(CC) $(CFLAGS) -c restore.c
ar rcv libhack.a restore.o
rip.o: ../include/hack.h
$(CC) $(CFLAGS) -c rip.c
ar rcv libhack.a rip.o
rnd.o: ../include/hack.h
$(CC) $(CFLAGS) -c rnd.c
ar rcv libhack.a rnd.o
rumors.o: ../include/hack.h
$(CC) $(CFLAGS) -c rumors.c
ar rcv libhack.a rumors.o
save.o: ../include/hack.h ../include/lev.h ../include/wseg.h
$(CC) $(CFLAGS) -c save.c
ar rcv libhack.a save.o
search.o: ../include/hack.h ../include/artifact.h
$(CC) $(CFLAGS) -c search.c
ar rcv libhack.a search.o
shk.o: ../include/hack.h ../include/eshk.h
$(CC) $(CFLAGS) -c shk.c
ar rcv libhack.a shk.o
shknam.o: ../include/hack.h ../include/eshk.h
$(CC) $(CFLAGS) -c shknam.c
ar rcv libhack.a shknam.o
sit.o: ../include/hack.h
$(CC) $(CFLAGS) -c sit.c
ar rcv libhack.a sit.o
sounds.o: ../include/hack.h ../include/edog.h ../include/eshk.h
$(CC) $(CFLAGS) -c sounds.c
ar rcv libhack.a sounds.o
sp_lev.o: ../include/hack.h ../include/sp_lev.h
$(CC) $(CFLAGS) -c sp_lev.c
ar rcv libhack.a sp_lev.o
spell.o: ../include/hack.h
$(CC) $(CFLAGS) -c spell.c
ar rcv libhack.a spell.o
steal.o: ../include/hack.h
$(CC) $(CFLAGS) -c steal.c
ar rcv libhack.a steal.o
termcap.o: ../include/hack.h ../include/termcap.h
$(CC) $(CFLAGS) -c termcap.c
ar rcv libhack.a termcap.o
timeout.o: ../include/hack.h
$(CC) $(CFLAGS) -c timeout.c
ar rcv libhack.a timeout.o
topl.o: ../include/hack.h
$(CC) $(CFLAGS) -c topl.c
ar rcv libhack.a topl.o
topten.o: ../include/hack.h
$(CC) $(CFLAGS) -c topten.c
ar rcv libhack.a topten.o
track.o: ../include/hack.h
$(CC) $(CFLAGS) -c track.c
ar rcv libhack.a track.o
trap.o: ../include/hack.h ../include/edog.h
$(CC) $(CFLAGS) -c trap.c
ar rcv libhack.a trap.o
u_init.o: ../include/hack.h
$(CC) $(CFLAGS) -c u_init.c
ar rcv libhack.a u_init.o
uhitm.o: ../include/hack.h ../include/artifact.h
$(CC) $(CFLAGS) -c uhitm.c
ar rcv libhack.a uhitm.o
vault.o: ../include/hack.h ../include/vault.h
$(CC) $(CFLAGS) -c vault.c
ar rcv libhack.a vault.o
version.o: ../include/hack.h ../include/date.h ../include/patchlevel.h
$(CC) $(CFLAGS) -c version.c
ar rcv libhack.a version.o
weapon.o: ../include/hack.h
$(CC) $(CFLAGS) -c weapon.c
ar rcv libhack.a weapon.o
were.o: ../include/hack.h
$(CC) $(CFLAGS) -c were.c
ar rcv libhack.a were.o
wield.o: ../include/hack.h
$(CC) $(CFLAGS) -c wield.c
ar rcv libhack.a wield.o
wizard.o: ../include/hack.h
$(CC) $(CFLAGS) -c wizard.c
ar rcv libhack.a wizard.o
worm.o: ../include/hack.h ../include/wseg.h
$(CC) $(CFLAGS) -c worm.c
ar rcv libhack.a worm.o
worn.o: ../include/hack.h
$(CC) $(CFLAGS) -c worn.c
ar rcv libhack.a worn.o
write.o: ../include/hack.h
$(CC) $(CFLAGS) -c write.c
ar rcv libhack.a write.o
zap.o: ../include/hack.h
$(CC) $(CFLAGS) -c zap.c
ar rcv libhack.a zap.o
../include/config.h: ../include/tradstdc.h ../include/global.h
touch ../include/config.h
../include/decl.h: ../include/spell.h ../include/color.h ../include/obj.h ../include/you.h ../include/onames.h ../include/pm.h
touch ../include/decl.h
../include/global.h: ../include/coord.h ../include/vmsconf.h ../include/unixconf.h ../include/pcconf.h ../include/tosconf.h ../include/amiconf.h ../include/macconf.h
touch ../include/global.h
../include/hack.h: ../include/config.h ../include/decl.h ../include/monsym.h ../include/mkroom.h ../include/objclass.h ../include/gold.h ../include/trap.h ../include/flag.h ../include/rm.h ../include/trampoli.h
touch ../include/hack.h
../include/macconf.h: ../include/msdos.h ../include/system.h ../include/MacAlert.h
touch ../include/macconf.h
../include/pcconf.h: ../include/msdos.h ../include/system.h
touch ../include/pcconf.h
../include/permonst.h: ../include/monattk.h ../include/monflag.h
touch ../include/permonst.h
../include/tosconf.h: ../include/msdos.h ../include/pcconf.h
touch ../include/tosconf.h
../include/unixconf.h: ../include/system.h
touch ../include/unixconf.h
../include/you.h: ../include/attrib.h ../include/monst.h ../include/youprop.h
touch ../include/you.h
../include/youprop.h: ../include/prop.h ../include/permonst.h ../include/mondata.h ../include/pm.h
touch ../include/youprop.h
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above
----------------------------------------------------- cut here


--
Luc Bussieres ---- Analyste - Dept. de Mathematiques et d'Informatique
Universite de Sherbrooke

Paul Lynch

unread,
Nov 2, 1992, 11:55:43 AM11/2/92
to
This is great if you have an IBM but what about MACS!! How do you work patches
for macintosh and is there an fpt site we could make to store patches to date?
0 new messages