diff -Naurd ../nethack-3.4.0/sys/msdos/compwarn.lst ./sys/msdos/compwarn.lst --- ../nethack-3.4.0/sys/msdos/compwarn.lst Wed Mar 20 23:43:37 2002 +++ ./sys/msdos/compwarn.lst Thu Jan 1 01:00:00 1970 @@ -1,16 +0,0 @@ -/* SCSS Id: @(#)compwarn.lst 3.4 1992/10/08 */ -/* Copyright (c) Paul Winner, 1992 */ -/* NetHack may be freely redistributed. See license for details. */ - -This file contains a list of compiler warnings generated by Microsoft -C version 7.0, compiled with the /W4 switch, and any known reasons for -the warning. You can safely ignore any warning your compile gives if -it appears on this list. - -C4127 (4): Conditional expression is constant - The While(1) statements used in the code cause this warning. - For the sake of making more easily readable code, this is the - preferred construct for NetHack. -C4131 (4): function: uses old-style declarator - In order to make the code as portable as possible, all func- - tions in NetHack use the old-style declarator. diff -Naurd ../nethack-3.4.0/sys/msdos/def2mak.c ./sys/msdos/def2mak.c --- ../nethack-3.4.0/sys/msdos/def2mak.c Wed Mar 20 23:43:38 2002 +++ ./sys/msdos/def2mak.c Thu Jan 1 01:00:00 1970 @@ -1,383 +0,0 @@ -/* SCCS Id: @(#)def2mak.c 3.4 1995/03/19 */ -/* Copyright (c) NetHack PC Development Team, 1994. */ -/* NetHack may be freely redistributed. See license for details. */ - -#include "config.h" -#include -#include -#ifndef _MSC_VER -#include -#else -int __cdecl _strcmpi(const char *, const char *); -int __cdecl _stricmp(const char *, const char *); -int __cdecl _strnicmp(const char *, const char *,size_t); -#endif - -#define MALLOC(type) (type *)malloc(sizeof(type)) - -#define MACROID_SIZ 50 -#define MACROVAL_SIZ 300 - -typedef unsigned char bool; - -struct MacroNode * FDECL(AddMacro, (struct MacroNode *, char *, char *)); -char * FDECL(ApplyMacros, (char *, struct MacroNode *)); -struct MacroNode * FDECL(DelMacro, (struct MacroNode *)); -struct MacroNode * FDECL(DelMacroList, (struct MacroNode *)); -void FDECL(COMPILER, (bool, char *, char *, FILE *)); -void FDECL(SaveNewLine, (char *, char *)); -struct ListItem * FDECL(AddItem, (struct ListItem *, char *)); -struct ListItem * FDECL(ReadList, (FILE *, int)); -void FDECL(LINKLIST, (bool, struct ListItem *, char *, char *)); -struct ListTable * FDECL(AddList, (struct ListTable *, struct ListItem *, - char *)); -struct ListItem * FDECL(DelTableList, (struct ListItem *)); -struct ListTable * FDECL(DelTable, (struct ListTable *)); -struct ListItem * FDECL(FindList, (struct ListTable *, char *)); - -#ifdef strcmpi -# undef strcmpi /* don't want to drag in hacklib.c */ -#endif - -#ifdef _MSC_VER -#define stricmp _strcmpi -#define strnicmp _strnicmp -#endif - -int -strcmpi(s1, s2) -char *s1, *s2; -{ - char t1, t2; - - while (*s1 || *s2) { - if (!*s2) return 1; /* s1 > s2 */ - else if (!*s1) return -1; /* s1 < s2 */ - if (isupper(*s1)) t1 = tolower(*s1); else t1 = *s1; - if (isupper(*s2)) t2 = tolower(*s2); else t2 = *s2; - if (t1 != t2) return (t1 > t2) ? 1 : -1; - s1++; s2++; - } - return 0; /* s1 == s2 */ -} - -struct MacroNode { - char Name[MACROID_SIZ]; - char Val[MACROVAL_SIZ]; - struct MacroNode *Next; -}; - -struct MacroNode * -AddMacro (List, MID, MVal) -struct MacroNode *List; -char *MID; -char *MVal; -{ - struct MacroNode *Tmp; - Tmp = MALLOC (struct MacroNode); - strncpy (Tmp->Name, MID, MACROID_SIZ); - strncpy (Tmp->Val, MVal, MACROVAL_SIZ); - Tmp->Next = List; - return Tmp; -} - -char * -ApplyMacros (Line, List) -char *Line; -struct MacroNode *List; -{ - static char TotalLine[MACROVAL_SIZ + 100]; - char TmpLine[MACROVAL_SIZ + 100]; - int AfterLine; - char MacroName[MACROID_SIZ]; - struct MacroNode *TmpList; - - strcpy (TotalLine, ""); - strcpy (TmpLine, Line); - if (sscanf (TmpLine, "%[^?]?[%[^]]]%n", TotalLine, MacroName, - &AfterLine) <= 1) return Line; - for (TmpList = List; TmpList; TmpList = TmpList->Next) - if (!strcmp(TmpList->Name, MacroName)) { - strcat (TotalLine, TmpList->Val); - break; - } - strcat (TotalLine, TmpLine + AfterLine); - return TotalLine; -} - -struct MacroNode * -DelMacro (List) -struct MacroNode *List; -{ - struct MacroNode *tmp; - - tmp = List->Next; - free (List); - return tmp; -} - -struct MacroNode * -DelMacroList (List) -struct MacroNode *List; -{ - while (List != NULL) - List = DelMacro (List); - return List; -} - -void -COMPILER (display, SavedNewLine, EndString, input) -bool display; -char *SavedNewLine; -char *EndString; -FILE *input; -{ - char buffer[100]; - - fgets (buffer, 100, input); - while (strnicmp(buffer, EndString, strlen(EndString))) { - if (display) - SaveNewLine(buffer, SavedNewLine); - fgets (buffer, 100, input); - }; -} - -void -SaveNewLine (Line, NewLine) -char *Line; -char *NewLine; -{ - char tempNewLine[2]; - - strcpy (tempNewLine, ""); - if (Line[strlen(Line)-1] == '\n') { - Line[strlen(Line)-1] = '\0'; - strcpy (tempNewLine, "\n"); - }; - printf ("%s%s", NewLine, Line); - strcpy (NewLine, tempNewLine); -} - -struct ListItem { - char Item[40]; - struct ListItem *next; -}; - -struct ListTable { - char name[40]; - struct ListItem *List; - struct ListTable *next; -}; - -struct ListItem * -AddItem (List, Item) -struct ListItem *List; -char Item[40]; -{ - struct ListItem *temp; - - temp = MALLOC(struct ListItem); - temp->next = List; - strncpy (temp->Item, Item, 39); - return temp; -} - -struct ListItem * -ReadList (input, LinePos) -FILE *input; -int LinePos; -{ - char Item[40]; - char buffer[100]; - struct ListItem *List; - - List = NULL; - fscanf (input, "%39s", Item); - while (strncmp(Item, "?ENDLIST?", 9)) { - if (LinePos > 60) { - LinePos = 18; - printf ("\\\n\t\t"); - } - List = AddItem(List, Item); - printf ("%s ", Item); - LinePos += 1 + strlen(Item); - fscanf (input, "%39s", Item); - } - printf ("\n"); - fgets (buffer, 100, input); - return List; -} - -void -LINKLIST (BC, List, Listname, SavedNewLine) -bool BC; -struct ListItem *List; -char *Listname; -char *SavedNewLine; -{ - int LinePos; - - printf ("%s\t\t", SavedNewLine); - strcpy (SavedNewLine, ""); - - if (!BC) { - printf ("$(%s:^\t=+^\n\t\t)\n", Listname); - return; - }; - - if (List == NULL) return; - - LinePos = 18; - while (List != NULL) { - if (LinePos > 60) { - LinePos = 18; - printf ("+\n\t\t"); - } - printf ("%s ", List->Item); - LinePos += 1 + strlen(List->Item); - List = List->next; - } - printf ("\n"); -} - -struct ListTable * -AddList (Table, List, Name) -struct ListTable *Table; -struct ListItem *List; -char *Name; -{ - struct ListTable *temp; - temp = MALLOC (struct ListTable); - temp->next = Table; - temp->List = List; - strncpy (temp->name, Name, 39); - return temp; -} - -struct ListItem * -DelTableList (List) -struct ListItem *List; -{ - struct ListItem *temp; - - while (List != NULL) { - temp = List->next; - free (List); - List = temp; - }; - return List; -} - -struct ListTable * -DelTable (Table) -struct ListTable *Table; -{ - struct ListTable *temp; - - while (Table != NULL) { - temp = Table->next; - Table->List = DelTableList(Table->List); - free(Table); - Table=temp; - }; - return Table; -} - -struct ListItem * -FindList (Table, Item) -struct ListTable *Table; -char *Item; -{ - while (Table != NULL) { - if (!stricmp(Table->name, Item)) return Table->List; - Table = Table->next; - } - return NULL; -} - -int -main (argc, argv) -int argc; -char *argv[]; -{ - FILE *makfile; - char buffer[100]; - char SavedNewLine[2]; - char Listname[40]; - struct ListTable *Table; - time_t timer; - bool MSC, BC; - struct MacroNode *MacroList = NULL; - char MacroName[MACROID_SIZ]; - char MacroVal[MACROVAL_SIZ]; - - if (argc < 3) { - printf ("Too few arguments. Correct usage is:\n"); - printf ("\t%s {/MSC || /BC} template\n\n", "def2mak"); - printf ("\t{/MSC || /BC} indicate the compiler to use.\n"); - printf ("\ttemplate is the template file to process.\n\n"); - printf ("The output makefile goes to standard output.\n"); - return 1; - }; - Table = NULL; - if (!strcmpi(argv[1], "/MSC") || !strcmpi(argv[1], "-MSC")) { - MSC = TRUE; - BC = FALSE; - } else if (!strcmpi(argv[1], "/BC") || !strcmpi(argv[1], "-BC")) { - MSC = FALSE; - BC = TRUE; - } else { - fprintf (stderr, "Unknown compiler format: %s\n", argv[1]); - return 1; - }; - - strcpy (SavedNewLine, ""); - if ((makfile = fopen (argv[2], "r")) == NULL) - return 2; - COMPILER (0, SavedNewLine, "?BEGIN?", makfile); - while (!feof(makfile)) { - if (fgets(buffer, 100, makfile) == NULL) - break; - if (!strnicmp(buffer, "?SCCS?", 6)) { - time (&timer); - printf ("%s#\tSCCS Id: @(#)Makefile.%s\t3.4\t%02d/%02d/%02d\n", - SavedNewLine, - MSC ? "MSC" : BC ? "BC" : "???", - localtime(&timer)->tm_year, - localtime(&timer)->tm_mon + 1, - localtime(&timer)->tm_mday); - printf ("# Copyright (c) %s, %d.\n", - BC ? "Yitzhak Sapir" : "NetHack PC Development Team", - localtime(&timer)->tm_year + 1900); - printf ("# NetHack may be freely distributed. "); - printf ("See license for details.\n#\n\n"); - strcpy (SavedNewLine, ""); - } else if (MSC ? sscanf (buffer, "?MSCMACRO:%[^=]=%[^?]?", - MacroName, MacroVal) : - BC ? sscanf (buffer, "?BCMACRO:%[^=]=%[^?]?", - MacroName, MacroVal) : 0) - MacroList = AddMacro(MacroList, MacroName, MacroVal); - else if (!strnicmp(buffer, "?BC?", 4)) - COMPILER(BC, SavedNewLine, "?ENDBC?", makfile); - else if (!strnicmp(buffer, "?MSC?", 5)) - COMPILER(MSC, SavedNewLine, "?ENDMSC?", makfile); - else if (!strnicmp(buffer, "?COMMENT?", 9)) - COMPILER(FALSE, SavedNewLine, "?ENDCOMMENT?", makfile); - else if (sscanf(buffer, "?LIST:%[^?]?", Listname) - == 1) { - printf ("%s%s\t=", SavedNewLine, Listname); - Table = AddList (Table, ReadList (makfile, 18), Listname); - strcpy (SavedNewLine, ""); - } else if (sscanf(buffer, "?LINKLIST:%[^?]?", Listname) - == 1) - LINKLIST (BC, FindList(Table, Listname), Listname, - SavedNewLine); - else if (buffer[0] != '?') - SaveNewLine(ApplyMacros(buffer, MacroList), SavedNewLine); - }; - printf ("%s", SavedNewLine); - fclose (makfile); - Table = DelTable(Table); - MacroList = DelMacroList (MacroList); - return 0; -} diff -Naurd ../nethack-3.4.0/sys/msdos/genschem.l ./sys/msdos/genschem.l --- ../nethack-3.4.0/sys/msdos/genschem.l Wed Mar 20 23:43:38 2002 +++ ./sys/msdos/genschem.l Thu Jan 1 01:00:00 1970 @@ -1,326 +0,0 @@ -%{ - -#include "config.h" -#include -#include - -#define MALLOC(type) (type *)malloc(sizeof(type)) - -typedef unsigned char bool; - -struct OvlNode { - char FileName[13]; - char Comment[80]; - int OvlNumber; - struct OvlNode *Next; -}; - -int linenumber = 1; -int OvlNum = -1; -FILE *outf = NULL; -char *ovldesc = NULL; -struct OvlNode *List = NULL; -char *CommentTemplate; - -struct OvlNode * FDECL(AddNode, (struct OvlNode *, struct OvlNode *)); -struct OvlNode * FDECL(DelNode, (struct OvlNode *)); -struct OvlNode * FDECL(ReverseList, (struct OvlNode *)); -struct OvlNode * FDECL(SortList, (struct OvlNode *)); -int NDECL (yylex); - -#ifndef yywrap -int NDECL (yywrap); -#endif - -#ifdef exit -#undef exit -#endif - -%} - -FILECH [A-Za-z0-9_] -FILE {FILECH}{1,8}("."{FILECH}{0,3})? -SCCS [Ss][Cc][Cc][Ss].*\n -COPYR [Cc][Oo][Pp][Yy][Rr][Ii][Gg][Hh][Tt].*\n - -%% - -{SCCS} { linenumber ++; } -{COPYR} { linenumber ++; } -^#.*\n { - if (OvlNum < 0) { - yytext[yyleng - 1] = 0; - fprintf (outf, CommentTemplate, yytext+1); - } - linenumber ++; - } -\n { linenumber ++; } -[ \t]+ ; /* skip trailing tabs & spaces */ -\[.*\] { - yytext[yyleng-1] = 0; /* Discard the trailing \] */ - if (ovldesc) free (ovldesc); - ovldesc = (char *) malloc(strlen(yytext+1)+1); - strcpy(ovldesc, yytext+1); /* Discard the first \[ */ - OvlNum++; - } -{FILE} { - struct OvlNode *Tmp; - - Tmp = MALLOC (struct OvlNode); - strcpy (Tmp->FileName, yytext); - Tmp->OvlNumber = OvlNum; - strncpy (Tmp->Comment, ovldesc, 80); - List = AddNode (List, Tmp); - } -. { - printf ("Line %d: Received character '%c' (%02x)\n", - linenumber, *yytext, *yytext); - } - - -%% - -#ifndef yywrap -int -yywrap() -{ - return 1; -} -#endif - -#if defined(UNIX) || defined(_MSC_VER) -char * -strlwr(s) -char *s; -{ - char *p; - for (p = s; *p; p++) - if (isupper(*p)) *p = tolower(*p); - return s; -} - -char * -strupr(s) -char *s; -{ - char *p; - for (p = s; *p; p++) - if (islower(*p)) *p = toupper(*p); - return s; -} -#endif - -struct OvlNode * -SortList (List) -struct OvlNode *List; -{ - struct OvlNode *List1 = NULL; - struct OvlNode *List2 = NULL; - struct OvlNode *Tmp; - - if (List == NULL) return NULL; - if (List->Next == NULL) return List; - - while (List != NULL) { - if (List != NULL) { - Tmp = List->Next; - List1 = AddNode (List1, List); - List = Tmp; - } - if (List != NULL) { - Tmp = List->Next; - List2 = AddNode (List2, List); - List = Tmp; - } - } - - List1 = SortList (List1); - List2 = SortList (List2); - - while (List1 != NULL || List2 != NULL) { - while (List1 != NULL && List2 == NULL) { - Tmp = List1->Next; - List = AddNode (List, List1); - List1 = Tmp; - } - while (List1 != NULL && - strcmp(List1->FileName, List2->FileName) <= 0) { - Tmp = List1->Next; - List = AddNode (List, List1); - List1 = Tmp; - } - while (List2 != NULL && List1 == NULL) { - Tmp = List2->Next; - List = AddNode (List, List2); - List2 = Tmp; - } - while (List2 != NULL && - strcmp(List1->FileName, List2->FileName) >= 0) { - Tmp = List2->Next; - List = AddNode (List, List2); - List2 = Tmp; - } - } - - return ReverseList (List); -} - -struct OvlNode * -AddNode (List, ToAdd) -struct OvlNode *List; -struct OvlNode *ToAdd; -{ - ToAdd->Next = List; - return ToAdd; -} - -struct OvlNode * -DelNode (List) -struct OvlNode *List; -{ - struct OvlNode *tmp; - - tmp = List->Next; - free (List); - return tmp; -} - -struct OvlNode * -DelOvlList (List) -struct OvlNode *List; -{ - while (List != NULL) - List = DelNode (List); - return List; -} - -struct OvlNode * -ReverseList (List) -struct OvlNode *List; -{ - struct OvlNode *Temp, *Last; - - Last = NULL; Temp = List; - while (Temp) { - Temp = List->Next; - List->Next = Last; - Last = List; - List = Temp; - } - return Last; -} - -/* - * Deletes all nodes with filename equal to that of the first node, except - * for the first node, itself, which it keeps. - */ - -void -DelFile (List) -struct OvlNode *List; -{ - struct OvlNode *tmp; - - tmp = List; - while (tmp->Next != NULL) { - if (!stricmp(List->FileName, tmp->Next->FileName)) - tmp->Next = DelNode (tmp->Next); - else - tmp = tmp->Next; - }; -} - -int -InList (List, ToFind) -struct OvlNode *List; -struct OvlNode *ToFind; -{ - while (List != NULL) { - if (!stricmp(List->FileName, ToFind->FileName)) - return 1; - List = List->Next; - }; - return 0; -} - -int -main (argc, argv) -int argc; -char *argv[]; -{ - bool MSC, BC; - char *Header, *Header2, *Header3, *RootLine, *OvlLine; - char *c; - char FileName[9]; - time_t timer; - struct tm *curtim; - - if (argc < 3) { - - printf ("Too few arguments. Correct usage is:\n"); - printf ("\t%s {/MSC || /BC} schemafile deffile\n\n", "genschem"); - printf ("\t{/MSC || /BC} indicate the compiler to use.\n"); - printf ("\tschemafile is the schema file to process.\n"); - printf ("\tdeffile is the definition file to produce.\n"); - printf ("\t\tif deffile is missing, stdout is assumed.\n\n"); - return 1; - }; - if (!stricmp(argv[1], "/MSC") || !stricmp(argv[1], "-MSC")) { - MSC = TRUE; - BC = FALSE; - } else if (!stricmp(argv[1], "/BC") || !stricmp(argv[1], "-BC")) { - MSC = FALSE; - BC = TRUE; - } else { - fprintf (stderr, "Unknown compiler format: %s\n", argv[1]); - return 1; - }; - - Header = BC ? "/* SCCS Id: @(#)%s\t3.4\t %02d/%02d/%02d */\n" : - "; SCCS Id: @(#)%s\t3.4\t %02d/%02d/%02d\n"; - Header2 = BC ? "/* Copyright (c) Yitzhak Sapir, %d */\n" : - "; Copyright (c) NetHack PC Development Team, %d\n"; - Header3 = BC ? "\n\n" : ";\n\nSEGMENTS\n\n"; - RootLine = BC ? "-zC%s\n" : - "\"%s\" OVL:0\n"; - OvlLine = BC ? - "-zC%s -zAOVLY -zCOVL%d\n" : - "\"%s\" OVL:%d\n"; - CommentTemplate = BC ? "/* %s */\n" : ";%s\n"; - - yyin = fopen (argv[2], "r"); - - if (yyin == NULL) { - fprintf (stderr, "Error: Input file incorrect\n"); - exit (1); - } - - outf = fopen (argv[3], "w"); - - if (outf == NULL) - if (argc == 4) { - fprintf (stderr, "Error: Output file incorrect\n"); - exit (1); - } else outf = stdout; - - time (&timer); - curtim = localtime(&timer); - fprintf (outf, Header, argv[3], curtim->tm_year, curtim->tm_mon + 1, - curtim->tm_mday); - fprintf (outf, Header2, curtim->tm_year +1900); - yylex(); - - fprintf (outf, Header3); - - for (List = SortList (List); List != NULL; List = DelNode (List)) { - if (BC) { - for (c = strlwr(List->FileName); *c; c++) - if (*c == '.') *c = '_'; - } else strupr(List->FileName); - if (List->OvlNumber) - fprintf (outf, OvlLine, List->FileName, List->OvlNumber); - else fprintf (outf, RootLine, List->FileName, List->FileName); - } - fclose (outf); - -} diff -Naurd ../nethack-3.4.0/sys/msdos/Install.dos ./sys/msdos/Install.dos --- ../nethack-3.4.0/sys/msdos/Install.dos Wed Mar 20 23:43:38 2002 +++ ./sys/msdos/Install.dos Mon Feb 24 15:25:05 2003 @@ -1,13 +1,13 @@ - SCCS Id: @(#)Install.dos 3.4 2000/08/02 + SCCS Id: @(#)Install.dos 3.4 - Copyright (c) NetHack PC Development Team 1990-2000. + Copyright (c) NetHack PC Development Team 1990-2002. NetHack may be freely redistributed. See license for details. ============================================================== Instructions for compiling and installing NetHack 3.4 on a DOS system ====================================================== (or, How to make PC NetHack 3.4) - Last revision: August 2, 2000 + Last revision: $Date: 2003/02/22 01:20:02 $ Credit for a runnable full PC NetHack 3.4 goes to the PC Development team of Paul Winner, Kevin Smolkowski, Michael Allison, Yitzhak Sapir, Bill Dyer, @@ -16,18 +16,17 @@ on the previous effort of Pierre Martineau, Stephen Spackman, Steve Creps, Mike Threepoint, Mike Stephenson, Norm Meluch and Don Kneller. +There has been very little port-specific maintenance for NetHack on DOS since +NetHack 3.3.0. + CONTENTS: I. Dispelling the Myths II. Compiling on a DOS machine - Appendix A - Building the "official binaries" - Appendix B - Building other binaries - Appendix C - Microsoft C Compiler notes - Appendix D - DJGPP Compiler (gcc ported to msdos) notes - Appendix E - Borland C++ Compiler notes - Appendix F - Microsoft C Compiler Warnings - Appendix G - Additional Notes - Appendix H - Contacting Us + Appendix A - Building the "official binary" + Appendix B - DJGPP Compiler (gcc ported to msdos) notes + Appendix C - Additional Notes + Appendix D - Contacting Us I. Dispelling the Myths: @@ -35,28 +34,22 @@ however it will behoove you to read this entire file through before beginning the task. - We have provided the proper makefiles for building NetHack using the + We have provided a proper Makefile for building NetHack using the following compilers: - Microsoft C 7.0 and Microsoft Visual C++ Professional (MSVC) 1.52c - djgpp V2.0 or later - Borland C V3.1 - - For specific details concerning each compiler, please see the - corresponding appendix. + djgpp V2.03 or later - The makefile named Makefile.MSC is for use with Microsoft's NMAKE, - the make utility that ships with the Microsoft C Compiler version 7.0 - and above, including the 16-bit Microsoft Visual C++ Professional. + For specific details concerning the djgpp compiler, please see the + appendix B. The makefile named Makefile.GCC is for use with GNU Make that accompanies djgpp. - The makefile named Makefile.BC is for use with Borland's make that - accompanies Borland C 3.1. Other versions of Borland's make may or - may not work, but version 3.7 (of MAKE) is known to not work. - If you want to build a copy of NetHack that is identical to the - "official binaries", please see appendix A. + "official binary", please see appendix A. + + The unsupported sys/msdos/Makefile.MSC was for the old 16 bit + Microsoft Visual C 1.52c compiler and has not been made compliant + with 3.4.x. You may find it useful to obtain copies of lex (flex) and yacc (bison or byacc). While not strictly necessary to compile nethack, they are @@ -75,8 +68,7 @@ dat, doc, include, src, sys\share, sys\msdos, util, win\tty and win\share. Other subdirectories may also be included in your distribution, but they are not necessary for use with DOS. You can - delete them to save space. If you are using MSC7 or MSVC, the makefile - will create an additional working directory src\o. + delete them to save space. Required Source Directories for DOS NetHack: @@ -101,52 +93,7 @@ with them, so you may need to convert them (with a utility like Rahul Dhesi's "flip"). -3. A few files in the NetHack distribution are uuencoded because - they contain non-ascii characters, or binary information. To use - them they must first be decoded using a uudecode utility (available - from your local archive site). After reading the descriptions - of these files below, uudecode the ones that you will need in order - to build NetHack with the options that you have decided you want. - - The uuencoded files that are relevant to NetHack on a DOS machine - include: - - nhico.uu Optional. This uudecodes into a MS-Windows compatible - ICON. You only need to uudecode this if you plan on - launching NetHack from MS-Windows, and want a unique - Nethack ICON to use. - - nhpif.uu Optional. This uudecodes into a MS-Windows compatible - PIF file which may be used to launch NetHack from the - MS-Windows program manager. You only need to uudecode - this if you plan on launching NetHack from within - MS-Windows. - - termcap.uu Optional. Termcap support is no longer required for - building NetHack, though you can if you want to. - The file termcap.uu is the fixed version - of the Fred Fish termcap library. If you have modified - pcconf.h to define TERMLIB as well as commented out - the default #define NO_TERMS, then you will need to - run a uudecode utility on termcap.uu to generate the - file termcap.zip. termcap.zip contains several files - of termcap routines. Using them with NetHack involves - very little knowledge of the UNIX concept of a termcap - database; mostly you need to know enough to set a TERM - environment variable. You can unzip termcap.zip in the - sys/share directory, but if you are going to use it, it - is probably better to unzip a copy in a special directory - and copy the library files to where your linker can find - them. NetHack versions since 3.1.2 no longer enable - the use of termcap in the default configuration, or - with the official binaries. - - Makefiles are included should you want to build your own - termcap library file. Makemsc.lib works with Microsoft - C (MSC and MSVC) and generates termcap.lib, Makegcc.lib - works with DJGPP and generates libtermc.a. - -4. Go to the sys/msdos directory and ensure that the file setup.bat +3. Go to the sys/msdos directory and ensure that the file setup.bat has MSDOS style end-of-line characters rather than UNIX style end-of-line characters. You can do that using a utility like Rahul Dhesi's "flip", or by invoking the MSDOS edit utility on @@ -154,19 +101,15 @@ do this will prevent the bat file from executing completely, yet no warning message will be given. - Run the setup.bat batch file with one of the following as the argument: - - MSC For Microsoft C and its NMAKE. + Run the setup.bat batch file with the following as the argument: GCC For djgpp and GNU MAKE. - BC For Borland C++ 3.1, and Borland's MAKE. - - The appropriate and necessary Makefile movements will be accomplished + The appropriate and necessary Makefile movement will be accomplished for you, as well as verifying a few files and fixing a few file names on FAT systems with long file name support. -5. Now go to the include subdirectory to check a couple of the header +4. Now go to the include subdirectory to check a couple of the header files there. Things *should* work as they are, but since you have probably set up your system in some sort of custom configuration it doesn't hurt to check out the following: @@ -187,95 +130,23 @@ management). If you are not including random.c you will need to comment out RANDOM. - There are several options available for screen management with this - release of PC NetHack. The features #define TERMLIB, #define - ANSI_DEFAULT, and #define NO_TERMS in pcconf.h control the various - options. - - The NO_TERMS feature (the default) has the advantage of not needing a - DEVICE=ANSI.SYS statement in config.sys. The supplied sources and - header files are distributed with support for NO_TERMS enabled. - NO_TERMS will not work with TERMLIB, nor with ANSI_DEFAULT defined. - The NO_TERMS feature uses internal routines for screen management, and - may be an ideal choice if your play machine is industry standard (has - an IBM compatible BIOS). - - Should you choose to leave NO_TERMS defined, define only one of the two - screen access methods. If compiling for Microsoft compilers, use - SCREEN_BIOS; if using DJGPP, you can choose between SCREEN_BIOS + If using DJGPP, you can choose between SCREEN_BIOS and SCREEN_DJGPPFAST. Never, never, ever choose both. Bad things will happen. We are not kidding. - If you leave the #define TERMLIB commented in pcconf.h to disable use - of termcap routines, then your screen management must rely on either - the NO_TERMS feature described above, or the ANSI_DEFAULT feature. - Either of these will make your job a bit easier than if you choose to - use TERMLIB. If you elect to include TERMLIB support, you may compile - with both TERMLIB and ANSI_DEFAULT, and simply not set your TERM variable - if you do not wish to use the termcap file settings. You will need - to uudecode the termcap library in sys\share if you are using the TERMLIB - feature. - -6. If you want to change the high score list behavior, examine the top of +5. If you want to change the high score list behavior, examine the top of topten.c, in the src directory. You may want to change the definitions of PERSMAX, POINTSMIN, and ENTRYMAX. We set POINTSMIN to 51 and ENTRYMAX to 50 to keep the size of the score list down. -7. Go to the src directory and edit the top of your Makefile. Be sure the +6. Go to the src directory and edit the top of your Makefile. Be sure the directory you want the game installed in (GAMEDIR) actually exists. - If you elected to use termcap (TERMLIB defined), then uncomment the - TERMLIB macro in your Makefile that points to the location of the - library. - - That is, TERMLIB = - should be TERMLIB = (SSYS)\termlib.lib - - If you are recompiling after patching your sources, or if you got your - files from somewhere other than the official distribution, "touch - makedefs.c" to ensure that certain files (onames.h and pm.h) are remade, - lest potentially troublesome timestamps fool your make utility. - - a) For Borland C++ 3.1, - - Choose an overlay schema by setting SCHEMA to 1 or 2. If you change - the overlay schema, you will need to recompile all the object modules - from scratch since the overlay schema is information is used during - compile time for Borland C++, unlike Microsoft C which does it during - link time. - - b) For Microsoft C 7.0 or greater, and Microsoft Visual C++ - - The only overlay schema available is Schema3 so you don't have to - choose one. The Makefile is set up for it already. The overlay - description file src\Schema3.def is created from sys\msdos\Schema3.MSC - by setup.bat. - - If you elected to add graphical tile support, set TILESUPPORT to Y. - - Set USE_DLB to Y if you wish to place NetHack's many runtime files into - a special archive that NetHack can utilize. This is highly recommended! - In fact, we haven't tested NetHack without it for several releases now. - -8. Now that everything is set up, what you do next depends on which - compiler and version you are using. You will need to execute either - step 8a, or step 8b, or step 8c, but only one of them. - - a) For Microsoft C 7.0 or greater, and Microsoft Visual C++ - - Go to the src directory, and "nmake install". - - b) For djgpp +7. Now that everything is set up, Go to the src directory, and using the GNU Make utility, "make install". - c) For Borland C V3.1 - - Go to the src directory, and using the Borland Make utility, - "make -N install". - - Depending on your particular machine and compiler, you can either grab a cup of coffee or go home for the day. Your computer will be occupied for quite some time. If all goes well, you will get an @@ -309,229 +180,83 @@ yourself. 10. In your game directory, review the settings in defaults.nh and adjust - them according to your style of play. Some new options that you might - be interested in are "menustyle" (for tailoring new object selection - interface), and "video" (for turning on graphical tiles). - - On Borland C++, the soundcard:autodetect option enables pc speaker - sound in NetHack if you compiled with PCMUSIC set in pcconf.h. It - is rumored that this also works with djgpp, but the PCMUSIC setting - in pcconf.h must be uncommented manually. + them according to your style of play. 11. Play NetHack. If it works, you're done! -Appendix A - Building the "official binaries" +Appendix A - Building the "official binary" - If you wish to build a copy of NetHack identical to the ones that + If you wish to build a copy of NetHack identical to the one that the pc team distributes, simply do the following: -1. 16-bit Real Mode Overlaid version - Use the 16-bit Microsoft Visual C++ V1.52c compiler - - Paths below are relative to the top of your unpacked - NetHack source distribution: - - md \games\nethack - cd sys\msdos - setup MSC - cd ..\..\src - nmake install - -2. 32-bit Protected Mode DPMI version - Use the 32-bit djgpp compiler V2.03 or greater + The 32-bit Protected Mode DPMI version built with 32-bit djgpp + compiler V2.03 or greater, make no changes to any of the defines and use + the Makefile.GCC as distributed, and as moved in step 3. Paths below are relative to the top of your unpacked NetHack source distribution: - md \games\nethackd + md \nethack\binary (must match Makefile) cd sys\msdos setup GCC cd ..\..\src make install -Appendix B - Building other binaries - - Make sure that USE_DLB and TILESUPPORT (if using Microsoft C or Borland - C) are both set to be turned on in the appropriate makefile. - - For an overlaid binary built with Microsoft C 7.00, make no changes to - any of the defines and use the Makefile.MSC as distributed. - - For an overlaid binary built with Borland C++ 3.1, make no changes to - any of the defines and use the makefile Makefile.BC as distributed. - - For the 32-bit binary built with DJGPP (playable on a 386 or - better machine only), make no changes to any of the defines and use - the Makefile.GCC as distributed. - Make sure the following files have been converted from the unix style "^J" end of line, to the msdos style "^M^J": - license, help, hh, termcap, history, cmdhelp wizhelp and - defaults.nh. - - Uudecode nhico.uu nhpif.uu. + license, defaults.nh. Place all the files in a clean directory and test. -Appendix C - Microsoft C Compilers - - Officially, support is no longer provided for MSC versions prior to - 7.0. For versions of MSC 7.0 and greater (including Visual C++ ), - a single Makefile is used, and it is MS NMAKE specific. It is executed - from the src directory. It makes several passes over the files in order - to produce overlays. - - MSC Version 7.0 works with or without the August 1992 patch. - - MSVC Professional 1.52c works as distributed. In some rare cases - you may encounter a problem with the compiler where it stops - part way through the build with a memory error. Things proceed - normally after starting 'nmake install' once again. The problem, - although annoying if it happens, does not affect the code generation - or the final executable. - - MSC Version 7.0 and MSVC take advantage of the CL environment variables - to set the compiler flags, as they exceed the MSDOS limitation of 128 - characters on the command line. Please read the Makefile carefully - and select those options that go with the compiler. The Makefile - will set the CL environment variable within the context of the build, - so you do not have to do it elsewhere. - - - Microsoft C version 7.0 and - Microsoft Visual C++ Professional versions up to 1.52c. - - Microsoft's MOVE overlay facility is suitable for building overlaid - versions of NetHack. - - A single Makefile is used, and it is NMAKE specific. It is executed - from the src directory. It is stored in the distribution as - sys/msdos/Makefile.MSC. It is moved to the src directory (with the - new name 'Makefile') by setup.bat when invoked like so: "setup MSC". - - The Microsoft Visual C++ Professional compiler utilizes the same - Makefiles and instructions for compiling as Microsoft C version 7.0. - -Appendix D - DJGPP Compiler (gcc ported to msdos) +Appendix B - DJGPP Compiler (gcc ported to msdos) If you have a 386 or better machine, you are in luck. You can compile NetHack without spending money on a compiler. DJGPP is available free from many archive sites. - At the time of this release in August 2000, the URL + At the time of this release in April 2002, the URL http://www.delorie.com/djgpp/zip-picker.html/ had information on how to obtain djgpp and what pieces to get. + Special note for Windows 2000 / Windows XP users: You must have a + recent djgpp distribution for the build process, and the generated + executables to work properly on those platforms. + Setting up DJGPP is more than adequately explained in the documentation that comes with it. Be sure to pick up the yacc and flex built with DJGPP if you intend to do any modification of the special levels or dungeon compilers. They should be available at the same place you got djgpp. - The latest version of djgpp, V2.03 will produce a binary that will run - under Microsoft Windows, or any other DPMI provider. djgpp also comes - with a DPMI provider called CWSDPMI. Place CWSDPMI.EXE in your path - and it will be used in the absence of any other DPMI provider. + The latest version of djgpp, V2.03 with the most recent refresh + will produce a binary that will run under Microsoft Windows, or any + other DPMI provider. djgpp also comes with a DPMI provider called CWSDPMI. + Place CWSDPMI.EXE in your path and it will be used in the absence of any + other DPMI provider. If you want to use the built-in DJGPP screen routines, uncomment SCREEN_DJGPPFAST in pcconf.h (the default for djgpp). - Note that some of these routines are broken under early versions - of the compiler, so we pick and choose the ones that work. - See video.c for details. -Appendix E - Borland C++ Compiler - - Officially, support is not provided for any version of Borland C++ or - Turbo C++ other than Borland C++ 3.1. It does not work with Borland - C++ 4.5 yet, and versions 4.0 and 5.0 have not been tested. We believe - that compiling with the version of Turbo C++ equivalent to Borland C++ - 3.1 should work. For Borland C++ 3.1, a single Makefile is used, and it - is specific to Borland's MAKE version 3.6. It is executed from the src - directory and makes several passes over the files in order to produce - overlays. - - Borland C++ 3.1 - - Borland's VROOMM overlay facility is suitable for building overlaid - versions of NetHack. - - A single Makefile is used, and it is MAKE 3.6 specific. It is executed - from the src directory. It is stored in the distribution as - sys/msdos/Makefile.BC. It is moved to the src directory (with the - new name 'Makefile') by setup.bat. - - Remember to type 'make -N install' rather than just 'make install'. The - -N option is required. - - Make sure to set the directories BCTOP and related directories in - Makefile. to the correct directory. There are problems in running the - newest versions of flex and bison from the all-purpose Makefile so you - should leave DO_YACC and DO_LEX as is. - - Turbo C++ - - As explained, this has not been tested. However, if you want to test if - Turbo C++ works, provided that the copy of Borland's MAKE you have is - version 3.6 (you can check this by running MAKE in an empty directory), - you are welcome to try. If Turbo C++ does not define __BORLANDC__, - just put the line: - #define __BORLANDC__ __TURBOC__ - at the very very top of hack.h. If it works, be sure to tell us. - -Appendix F - Microsoft C Compiler Warnings - - If you are using MSC for your compile with any of the /W levels set, - you can expect warnings. The list below are those warnings that we - are aware of and our recommendation for dealing with them. You can - use the warning disable pragma to ignore them if you wish. (NOTE: - this is not a complete list of all warnings you might receive, only - those for which we feel we can safely provide guidance on.) - -C4131 (function:uses old-style declarator) - You should ignore this warning. In order to make the source code as - portable as possible, only old-style declarators are used so that as - many compilers as possible can use the same code. -C4706 (Assignment within conditional expression) - This is a perfectly valid construction. These warnings have not - produced any problems. -C4761 (Integral size mismatch in argument; conversion supplied) - These should be no problem. Prototyping compilers will do the con- - version, and non-prototyping compilers will go through int anyway. - -Appendix G - Additional Notes +Appendix C - Additional Notes -1) Save files and bones files from previous versions of NetHack will not - work with this NetHack. Don't bother trying to keep them. Record - (score) files from before 3.0 patchlevel 7 will almost work, but you need - to make one change manually to them: At the end of each line is a word or - phrase specifying what killed the player. Change the string to start with - the words "killed by", "killed by a", or "killed by an" (whichever is - appropriate). If the death was petrification, it should read "petrified - by" instead of "killed by". Don't change "starvation", "quit", "escaped", - or "ascended". +1) Save files and bones files from versions of NetHack prior to 3.4.0 will not + work with this NetHack. Don't bother trying to keep them. -2) To install an update of NetHack after changing something, type 'nmake' - for Microsoft C, 'make -N' for Borland C++, and 'make' for DJGPP - from the src directory. If you add, delete, or reorder monsters or +2) To install an update of NetHack after changing something, type 'make' + for DJGPP from the src directory. If you add, delete, or reorder monsters or objects, or you change the format of saved level files, delete any save and bones files. (Trying to use such files sometimes produces amusing confusions on the game's part, but usually crashes.) - If you made changes to any of the level compiler software, you may have - to delete dgn_flex.c, dgn_yacc.c, lev_flex.c, and lev_yacc.c from the - util directory to ensure that they are remade. This is not officially - supported for Borland C++. - -3) During linking the Microsoft Overlay Linker will need temporary storage - space. Make sure you have about a meg of free disk wherever you have - defined your temporary storage. - -Appendix H - Contacting the Development Team - If you discover a bug and wish to report it please send mail to: - nethack-bugs@nethack.org +Appendix D - Contacting the Development Team - If you have comments or suggestions, feel free to drop us a line c/o - DevTeam@nethack.org + If you discover a bug and wish to report it, or if you have comments + or suggestions we recommend using + our "Contact Us" web page at: + http://www.nethack.org/common/contact.html + If you don't have access to the web, or you want to send us a patch + to the NetHack source code feel free to drop us a line c/o: + DevTeam (at) nethack.org diff -Naurd ../nethack-3.4.0/sys/msdos/Makefile.GCC ./sys/msdos/Makefile.GCC --- ../nethack-3.4.0/sys/msdos/Makefile.GCC Wed Mar 20 23:43:38 2002 +++ ./sys/msdos/Makefile.GCC Mon Feb 24 15:25:05 2003 @@ -1,9 +1,9 @@ -# SCCS Id: @(#)Makefile.GCC 3.4 2002/03/17 -# Copyright (c) NetHack PC Development Team 1996-2002. +# SCCS Id: @(#)Makefile.GCC 3.4 $Date: 2003/02/17 23:56:35 $ +# Copyright (c) NetHack PC Development Team 1996-2003. # PC NetHack 3.4 Makefile for djgpp V2 # # Gnu gcc compiler for msdos (djgpp) -# Requires Gnu Make utility (V3.79 or greater) supplied with djgpp +# Requires Gnu Make utility (V3.79.1 or greater) supplied with djgpp # # For questions or comments: devteam@nethack.org # @@ -23,28 +23,22 @@ GAME = nethack # The GNU Make has a problem if you include a drive spec below (unfortunately). -GAMEDIR =..\binary +GAMEDIR =../binary # # Directories, gcc likes unix style directory specs # -DDAT = ../dat -DUTIL = ../util -DSRC = ../src -DINCL = ../include - -# But we must use dos directory specs to find src files, so.... - -DAT = ..\dat -DOC = ..\doc -INCL = ..\include -MSYS = ..\sys\msdos -SRC = ..\src -SSHR = ..\sys\share -UTIL = ..\util -WIN = ..\win\tty -WSHR = ..\win\share +OBJ = o +DAT = ../dat +DOC = ../doc +INCL = ../include +MSYS = ../sys/msdos +SRC = ../src +SSHR = ../sys/share +UTIL = ../util +WIN = ../win/tty +WSHR = ../win/share # # Executables. @@ -53,10 +47,6 @@ LINK = gcc MAKEBIN = make -# if you have a uudecode program, add its name here -# otherwise leave blank -UUDECODE = - # # Special libraries and how to link them in. @@ -76,7 +66,7 @@ # # If you have yacc/lex or a work-alike set YACC_LEX to Y # -YACC_LEX = N +YACC_LEX = Y # If YACC_LEX is Y above, set the following to values appropriate for # your tools. @@ -106,12 +96,16 @@ # SUPPRESS_GRAPHICS = Y SUPPRESS_GRAPHICS = -############################################################################# -# -# nothing below this line should have to be changed -# +#=============================================== +#======= End of Modification Section =========== +#=============================================== +################################################ +# # +# Nothing below here should have to be changed.# +# # +################################################ -GAMEFILE = $(GAMEDIR)\$(GAME).exe +GAMEFILE = $(GAMEDIR)/$(GAME).exe # Changing this conditional block is not recommended ifeq ($(USE_DLB),Y) @@ -128,28 +122,96 @@ # Build NetHack suitable for blind players # Debugging -#CFLAGS = -pg -c -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS +#cflags = -pg -c -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS #LFLAGS = -pg -CFLAGS = -c -O -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS +cflags = -c -O -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS LFLAGS = else # Debugging -#CFLAGS = -pg -c -I../include $(DLBFLG) -DUSE_TILES +#cflags = -pg -c -I../include $(DLBFLG) -DUSE_TILES #LFLAGS = -pg # Normal -CFLAGS = -c -O -I../include $(DLBFLG) -DUSE_TILES +cflags = -c -O -I../include $(DLBFLG) -DUSE_TILES LFLAGS = endif +#========================================== +#================ RULES ================== +#========================================== + +.SUFFIXES: .exe .o .tib .til .uu .c .y .l + +#========================================== +# Rules for files in src +#========================================== + +$(OBJ)/%.o : /%.c + $(CC) $(cflags) -o$@ $< + +$(OBJ)/%.o : $(SRC)/%.c + $(CC) $(cflags) -o$@ $< + +#========================================== +# Rules for files in sys/share +#========================================== + +$(OBJ)/%.o : $(SSHR)/%.c + $(CC) $(cflags) -o$@ $< + +#========================================== +# Rules for files in sys/msdos +#========================================== + +$(OBJ)/%.o : $(MSYS)/%.c + $(CC) $(cflags) -I../sys/msdos -o$@ $< + +#========================================== +# Rules for files in util +#========================================== + +$(OBJ)/%.o : $(UTIL)/%.c + $(CC) $(cflags) -o$@ $< + +#========================================== +# Rules for files in win/share +#========================================== + +$(OBJ)/%.o : $(WSHR)/%.c + $(CC) $(cflags) -I../win/share -o$@ $< + +#{$(WSHR)}.txt{$(DAT)}.txt: +# copy $< $@ + +#========================================== +# Rules for files in win/tty +#========================================== + +$(OBJ)/%.o : $(TTY)/%.c + $(CC) $(cflags) -o$@ $< + +#========================================== +#================ MACROS ================== +#========================================== +# This section creates shorthand macros for many objects +# referenced later on in the Makefile. # -# Utility Objects. +# +# Shorten up the location for some files # -VGAOBJ = vidvga.o +O = $(OBJ)/ + +U = $(UTIL)/ + +#========================================== +# Utility Objects. +#========================================== + +VGAOBJ = $(O)vidvga.o MAKESRC = makedefs.c @@ -157,19 +219,21 @@ DGNCOMPSRC = dgn_yacc.c dgn_$(LEX).c dgn_main.c -MAKEOBJS = makedefs.o monst.o objects.o +MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o -SPLEVOBJS = lev_yacc.o lev_$(LEX).o lev_main.o alloc.o \ - monst.o objects.o panic.o \ - drawing.o decl.o stubvid.o +SPLEVOBJS = $(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o $(O)alloc.o \ + $(O)monst.o $(O)objects.o $(O)panic.o \ + $(O)drawing.o $(O)decl.o $(O)stubvid.o -DGNCOMPOBJS = dgn_yacc.o dgn_$(LEX).o dgn_main.o alloc.o \ - panic.o +DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o $(O)alloc.o \ + $(O)panic.o -RECOVOBJS = recover.o +RECOVOBJS = $(O)recover.o +#========================================== # Tile related object files. +#========================================== ifeq ($(SUPPRESS_GRAPHICS),Y) TILOBJ = @@ -187,67 +251,69 @@ else -TILOBJ = tile.o pctiles.o $(VGAOBJ) - -TEXTIO = tiletext.o tiletxt.o drawing.o decl.o monst.o objects.o stubvid.o +TILOBJ = $(O)tile.o $(O)pctiles.o $(VGAOBJ) -TEXTIO2 = tiletex2.o tiletxt2.o drawing.o decl.o monst.o objects.o stubvid.o +TEXTIO = $(O)tiletext.o $(O)tiletxt.o $(O)drawing.o $(O)decl.o $(O)monst.o \ + $(O)objects.o $(O)stubvid.o +TEXTIO2 = $(O)tiletex2.o $(O)tiletxt2.o $(O)drawing.o $(O)decl.o $(O)monst.o \ + $(O)objects.o $(O)stubvid.o -PLANAR_TIB = NetHack1.tib +PLANAR_TIB = $(DAT)/NetHack1.tib -OVERVIEW_TIB = NetHacko.tib +OVERVIEW_TIB = $(DAT)/NetHacko.tib -TILEUTIL = $(TILOBJ) tile2bin.exe til2bin2.exe $(PLANAR_TIB) $(OVERVIEW_TIB) +TILEUTIL = $(TILOBJ) $(U)tile2bin.exe $(U)til2bin2.exe $(PLANAR_TIB) $(OVERVIEW_TIB) -TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt +TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt -TILEFILES2 = $(WSHR)\monthin.txt $(WSHR)\objthin.txt $(WSHR)\oththin.txt +TILEFILES2 = $(WSHR)/monthin.txt $(WSHR)/objthin.txt $(WSHR)/oththin.txt -GIFREADERS = gifread.o alloc.o panic.o +GIFREADERS = $(O)gifread.o $(O)alloc.o $(O)panic.o -GIFREAD2 = gifread2.o alloc.o panic.o +GIFREAD2 = $(O)gifread2.o $(O)alloc.o $(O)panic.o -PPMWRITERS = ppmwrite.o alloc.o panic.o +PPMWRITERS = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o -PPMWRIT2 = ppmwrit2.o alloc.o panic.o +PPMWRIT2 = $(O)ppmwrit2.o $(O)alloc.o $(O)panic.o endif -DLBOBJ = dlb.o +DLBOBJ = $(O)dlb.o # Object files for the game itself. -VOBJ01 = allmain.o alloc.o apply.o artifact.o attrib.o -VOBJ02 = ball.o bones.o botl.o cmd.o dbridge.o -VOBJ03 = decl.o detect.o display.o do.o do_name.o -VOBJ04 = do_wear.o dog.o dogmove.o dokick.o dothrow.o -VOBJ05 = drawing.o dungeon.o eat.o end.o engrave.o -VOBJ06 = exper.o explode.o extralev.o files.o fountain.o -VOBJ07 = getline.o hack.o hacklib.o invent.o lock.o -VOBJ08 = mail.o main.o makemon.o mapglyph.o mcastu.o mhitm.o -VOBJ09 = mhitu.o minion.o mkmap.o mklev.o mkmaze.o -VOBJ10 = mkobj.o mkroom.o mon.o mondata.o monmove.o -VOBJ11 = monst.o monstr.o mplayer.o mthrowu.o muse.o -VOBJ12 = music.o o_init.o objects.o objnam.o options.o -VOBJ13 = pickup.o pline.o polyself.o potion.o quest.o -VOBJ14 = questpgr.o pager.o pray.o priest.o read.o -VOBJ15 = rect.o restore.o rip.o rnd.o role.o -VOBJ16 = rumors.o save.o shk.o shknam.o sit.o -VOBJ17 = sounds.o sp_lev.o spell.o steal.o steed.o -VOBJ18 = termcap.o timeout.o topl.o topten.o track.o -VOBJ19 = trap.o u_init.o uhitm.o vault.o vision.o -VOBJ20 = vis_tab.o weapon.o were.o wield.o windows.o -VOBJ21 = wintty.o wizard.o worm.o worn.o write.o -VOBJ22 = zap.o light.o dlb.o dig.o teleport.o -VOBJ23 = region.o -SOBJ = msdos.o sound.o sys.o tty.o unix.o video.o \ - vidtxt.o pckeys.o +VOBJ01 = $(O)allmain.o $(O)alloc.o $(O)apply.o $(O)artifact.o $(O)attrib.o +VOBJ02 = $(O)ball.o $(O)bones.o $(O)botl.o $(O)cmd.o $(O)dbridge.o +VOBJ03 = $(O)decl.o $(O)detect.o $(O)display.o $(O)do.o $(O)do_name.o +VOBJ04 = $(O)do_wear.o $(O)dog.o $(O)dogmove.o $(O)dokick.o $(O)dothrow.o +VOBJ05 = $(O)drawing.o $(O)dungeon.o $(O)eat.o $(O)end.o $(O)engrave.o +VOBJ06 = $(O)exper.o $(O)explode.o $(O)extralev.o $(O)files.o $(O)fountain.o +VOBJ07 = $(O)getline.o $(O)hack.o $(O)hacklib.o $(O)invent.o $(O)lock.o +VOBJ08 = $(O)mail.o $(O)main.o $(O)makemon.o $(O)mapglyph.o $(O)mcastu.o $(O)mhitm.o +VOBJ09 = $(O)mhitu.o $(O)minion.o $(O)mkmap.o $(O)mklev.o $(O)mkmaze.o +VOBJ10 = $(O)mkobj.o $(O)mkroom.o $(O)mon.o $(O)mondata.o $(O)monmove.o +VOBJ11 = $(O)monst.o $(O)monstr.o $(O)mplayer.o $(O)mthrowu.o $(O)muse.o +VOBJ12 = $(O)music.o $(O)o_init.o $(O)objects.o $(O)objnam.o $(O)options.o +VOBJ13 = $(O)pickup.o $(O)pline.o $(O)polyself.o $(O)potion.o $(O)quest.o +VOBJ14 = $(O)questpgr.o $(O)pager.o $(O)pray.o $(O)priest.o $(O)read.o +VOBJ15 = $(O)rect.o $(O)restore.o $(O)rip.o $(O)rnd.o $(O)role.o +VOBJ16 = $(O)rumors.o $(O)save.o $(O)shk.o $(O)shknam.o $(O)sit.o +VOBJ17 = $(O)sounds.o $(O)sp_lev.o $(O)spell.o $(O)steal.o $(O)steed.o +VOBJ18 = $(O)termcap.o $(O)timeout.o $(O)topl.o $(O)topten.o $(O)track.o +VOBJ19 = $(O)trap.o $(O)u_init.o $(O)uhitm.o $(O)vault.o $(O)vision.o +VOBJ20 = $(O)vis_tab.o $(O)weapon.o $(O)were.o $(O)wield.o $(O)windows.o +VOBJ21 = $(O)wintty.o $(O)wizard.o $(O)worm.o $(O)worn.o $(O)write.o +VOBJ22 = $(O)zap.o $(O)light.o $(O)dlb.o $(O)dig.o $(O)teleport.o +VOBJ23 = $(O)region.o -VVOBJ = version.o +SOBJ = $(O)msdos.o $(O)sound.o $(O)sys.o $(O)tty.o $(O)unix.o \ + $(O)video.o $(O)vidtxt.o $(O)pckeys.o -VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ +VVOBJ = $(O)version.o + +VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \ $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ @@ -255,54 +321,55 @@ ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(VVOBJ) -# -# Header Objects. -# +#========================================== +# Header file macros +#========================================== -DGN_FILE_H = $(INCL)\align.h $(INCL)\dgn_file.h -DUNGEON_H = $(INCL)\align.h $(INCL)\dungeon.h -EMIN_H = $(DUNGEON_H) $(INCL)\emin.h -EPRI_H = $(DUNGEON_H) $(INCL)\align.h $(INCL)\epri.h -ESHK_H = $(DUNGEON_H) $(INCL)\eshk.h -MONDATA_H = $(INCL)\align.h $(INCL)\mondata.h -MONST_H = $(INCL)\align.h $(INCL)\monst.h -PERMONST_H = $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\align.h \ - $(INCL)\permonst.h -REGION_H = $(INCL)\region.h -RM_H = $(INCL)\align.h $(INCL)\rm.h -SKILLS_H = $(INCL)\skills.h -SP_LEV_H = $(INCL)\align.h $(INCL)\sp_lev.h -VAULT_H = $(DUNGEON_H) $(INCL)\vault.h -YOUPROP_H = $(PERMONST_H) $(MONDATA_H) $(INCL)\prop.h \ - $(INCL)\pm.h $(INCL)\youprop.h -YOU_H = $(MONST_H) $(YOUPROP_H) $(INCL)\align.h \ - $(INCL)\attrib.h $(INCL)\you.h -DISPLAY_H = $(MONDATA_H) $(INCL)\vision.h $(INCL)\display.h -PCCONF_H = $(INCL)\micro.h $(INCL)\system.h $(INCL)\pcconf.h \ - $(INCL)\pcvideo.h -CONFIG_H = $(GLOBAL_H) $(INCL)\tradstdc.h $(INCL)\config1.h \ - $(INCL)\config.h -DECL_H = $(YOU_H) $(INCL)\spell.h $(INCL)\color.h \ - $(INCL)\obj.h $(INCL)\onames.h $(INCL)\pm.h \ - $(INCL)\decl.h -GLOBAL_H = $(PCCONF_H) $(INCL)\coord.h $(INCL)\global.h +PATCHLEV_H = $(INCL)/patchlev.h +DGN_FILE_H = $(INCL)/align.h $(INCL)/dgn_file.h +DUNGEON_H = $(INCL)/align.h $(INCL)/dungeon.h +EMIN_H = $(DUNGEON_H) $(INCL)/emin.h +EPRI_H = $(DUNGEON_H) $(INCL)/align.h $(INCL)/epri.h +ESHK_H = $(DUNGEON_H) $(INCL)/eshk.h +MONDATA_H = $(INCL)/align.h $(INCL)/mondata.h +MONST_H = $(INCL)/align.h $(INCL)/monst.h +PERMONST_H = $(INCL)/monattk.h $(INCL)/monflag.h $(INCL)/align.h \ + $(INCL)/permonst.h +REGION_H = $(INCL)/region.h +RM_H = $(INCL)/align.h $(INCL)/rm.h +SKILLS_H = $(INCL)/skills.h +SP_LEV_H = $(INCL)/align.h $(INCL)/sp_lev.h +VAULT_H = $(DUNGEON_H) $(INCL)/vault.h +YOUPROP_H = $(PERMONST_H) $(MONDATA_H) $(INCL)/prop.h \ + $(INCL)/pm.h $(INCL)/youprop.h +YOU_H = $(MONST_H) $(YOUPROP_H) $(INCL)/align.h \ + $(INCL)/attrib.h $(INCL)/you.h +DISPLAY_H = $(MONDATA_H) $(INCL)/vision.h $(INCL)/display.h +PCCONF_H = $(INCL)/micro.h $(INCL)/system.h $(INCL)/pcconf.h \ + $(MSYS)/pcvideo.h +CONFIG_H = $(GLOBAL_H) $(INCL)/tradstdc.h $(INCL)/config1.h \ + $(INCL)/config.h +DECL_H = $(YOU_H) $(INCL)/spell.h $(INCL)/color.h \ + $(INCL)/obj.h $(INCL)/onames.h $(INCL)/pm.h \ + $(INCL)/decl.h +GLOBAL_H = $(PCCONF_H) $(INCL)/coord.h $(INCL)/global.h HACK_H = $(CONFIG_H) $(DUNGEON_H) $(DECL_H) \ - $(DISPLAY_H) $(INCL)\monsym.h $(INCL)\mkroom.h \ - $(INCL)\objclass.h $(INCL)\trap.h $(INCL)\flag.h \ - $(RM_H) $(INCL)\vision.h $(INCL)\wintype.h \ - $(INCL)\engrave.h $(INCL)\rect.h \ - $(INCL)\trampoli.h $(INCL)\hack.h $(REGION_H) -DLB_H = $(INCL)\dlb.h + $(DISPLAY_H) $(INCL)/monsym.h $(INCL)/mkroom.h \ + $(INCL)/objclass.h $(INCL)/trap.h $(INCL)/flag.h \ + $(RM_H) $(INCL)/vision.h $(INCL)/wintype.h \ + $(INCL)/engrave.h $(INCL)/rect.h \ + $(INCL)/trampoli.h $(INCL)/hack.h $(REGION_H) +DLB_H = $(INCL)/dlb.h ifeq ($(SUPPRESS_GRAPHICS),Y) TILE_H = else -TILE_H = $(INCL)\tile.h $(INCL)\pctiles.h +TILE_H = $(WSHR)/tile.h $(MSYS)/pctiles.h endif ifeq ($(USE_DLB),Y) DLB = dlb -DLBOBJS = dlb_main.o dlb.o alloc.o panic.o +DLBOBJS = $(O)dlb_main.o $(O)dlb.o $(O)alloc.o $(O)panic.o else DLB = DLBOBJS = @@ -313,208 +380,172 @@ CWSDPMI = $(subst /,\,$(DJ1))bin\CWSDPMI.* endif -# -# Make Rules. -# - -.SUFFIXES: .exe .o .c .y .l - -.c.o: - $(CC) $(CFLAGS) -o$@ $< - -#.phony: dlb - -# +#========================================== # Primary Targets. -# +#========================================== # The default target. -default: $(GAMEFILE) +all : install -all: install.tag +install: $(GAMEFILE) $(O)install.tag + @echo Done. -util: utility.tag +default: $(GAMEFILE) -install: install.tag +util: $(O)utility.tag -utility.tag: $(INCL)\date.h $(INCL)\trap.h $(INCL)\onames.h \ - $(INCL)\pm.h monstr.c vis_tab.c \ - lev_comp.exe dgn_comp.exe recover.exe $(TILEUTIL) - echo utilities made > utility.tag +$(O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \ + $(INCL)/pm.h monstr.c vis_tab.c \ + $(U)lev_comp.exe $(U)dgn_comp.exe $(TILEUTIL) + $(subst /,\,echo utilities made > $@) -tileutil: gif2txt.exe txt2ppm.exe +tileutil: $(U)gif2txt.exe $(U)txt2ppm.exe @echo Optional tile development utilities are up to date. -install.tag: dat.tag $(GAMEFILE) +recover: $(U)recover.exe + @$(subst /,\,if exist $(U)recover.exe copy $(U)recover.exe $(GAMEDIR)) + @$(subst /,\,if exist $(DOC)/recover.txt copy $(DOC)/recover.txt $(GAMEDIR)) + +$(O)install.tag: $(O)dat.tag $(GAMEFILE) ifeq ($(USE_DLB),Y) - copy $(DAT)\nhdat $(GAMEDIR) - copy $(DAT)\license $(GAMEDIR) + @$(subst /,\,copy $(DAT)/nhdat $(GAMEDIR)) + @$(subst /,\,copy $(DAT)/license $(GAMEDIR)) else - copy $(DAT)\*. $(GAMEDIR) - copy $(DAT)\*.dat $(GAMEDIR) - copy $(DAT)\*.lev $(GAMEDIR) - copy $(MSYS)\msdoshlp.txt $(GAMEDIR) - if exist $(GAMEDIR)\makefile. del $(GAMEDIR)\makefile. + @$(subst /,\,copy $(DAT)/*. $(GAMEDIR)) + @$(subst /,\,copy $(DAT)/*.dat $(GAMEDIR)) + @$(subst /,\,copy $(DAT)/*.lev $(GAMEDIR)) + @$(subst /,\,copy $(MSYS)/msdoshlp.txt $(GAMEDIR)) + @$(subst /,\,if exist $(GAMEDIR)/makefile. del $(GAMEDIR)/makefile.) endif ifdef TERMLIB - copy $(SSHR)\termcap $(GAMEDIR) + @$(subst /,\,copy $(SSHR)/termcap $(GAMEDIR)) endif - if exist *.tib copy *.tib $(GAMEDIR) - copy $(SSHR)\NetHack.cnf $(GAMEDIR)\defaults.nh - copy $(MSYS)\NHAccess.nh $(GAMEDIR) - copy recover.exe $(GAMEDIR) - copy $(DOC)\guidebo*.txt $(GAMEDIR) - if exist $(DOC)\recover.txt copy $(DOC)\recover.txt $(GAMEDIR) - if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR) + @$(subst /,\,if exist $(DAT)/*.tib copy $(DAT)/*.tib $(GAMEDIR)) + @$(subst /,\,copy $(SSHR)/NetHack.cnf $(GAMEDIR)/defaults.nh) + @$(subst /,\,copy $(MSYS)/NHAccess.nh $(GAMEDIR)) + @$(subst /,\,copy $(DOC)/guidebo*.txt $(GAMEDIR)) + @$(subst /,\,if exist $(DOC)/nethack.txt copy $(DOC)/nethack.txt $(GAMEDIR)) ifdef CWSDPMI - if exist $(CWSDPMI) copy $(CWSDPMI) $(GAMEDIR) + @$(subst /,\,if exist $(CWSDPMI) copy $(CWSDPMI) $(GAMEDIR)) else - echo Could not find a copy of CWSDPMI.EXE to put into $(GAMEDIR) + @$(subst /,\,echo Could not find a copy of CWSDPMI.EXE to put into $(GAMEDIR)) endif - echo install done > install.tag + @$(subst /,\,echo install done > $@) +#========================================== # The main target. +#========================================== +$(GAMEFILE): $(O)obj.tag $(PATCHLEV_H) $(O)utility.tag $(ALLOBJ) $(O)$(GAME).lnk + $(LINK) $(LFLAGS) -o$(GAME).exe @$(O)$(GAME).lnk $(LIBRARIES) + @$(subst /,\,stubedit $(GAME).exe minstack=2048K) + @$(subst /,\,copy $(GAME).exe $(GAMEFILE)) + @$(subst /,\,del $(GAME).exe) -$(GAMEFILE): utility.tag $(GAME).lnk - $(LINK) $(LFLAGS) -o$(GAME).exe @$(GAME).lnk $(LIBRARIES) - stubedit $(GAME).exe minstack=2048K - copy $(GAME).exe $(GAMEFILE) - del $(GAME).exe - -$(GAME).lnk: $(ALLOBJ) - @echo $(VOBJ01) > $@ - @echo $(VOBJ02) >> $@ - @echo $(VOBJ03) >> $@ - @echo $(VOBJ04) >> $@ - @echo $(VOBJ05) >> $@ - @echo $(VOBJ06) >> $@ - @echo $(VOBJ07) >> $@ - @echo $(VOBJ08) >> $@ - @echo $(VOBJ09) >> $@ - @echo $(VOBJ10) >> $@ - @echo $(VOBJ11) >> $@ - @echo $(VOBJ12) >> $@ - @echo $(VOBJ13) >> $@ - @echo $(VOBJ14) >> $@ - @echo $(VOBJ15) >> $@ - @echo $(VOBJ16) >> $@ - @echo $(VOBJ17) >> $@ - @echo $(VOBJ18) >> $@ - @echo $(VOBJ19) >> $@ - @echo $(VOBJ20) >> $@ - @echo $(VOBJ21) >> $@ - @echo $(VOBJ22) >> $@ - @echo $(VOBJ23) >> $@ - @echo $(SOBJ) >> $@ - @echo $(TILOBJ) >> $@ - @echo $(VVOBJ) >> $@ +$(O)$(GAME).lnk: $(ALLOBJ) + echo $(VOBJ01) > $(subst /,\,$@) + echo $(VOBJ02) >> $(subst /,\,$@) + echo $(VOBJ03) >> $(subst /,\,$@) + echo $(VOBJ04) >> $(subst /,\,$@) + echo $(VOBJ05) >> $(subst /,\,$@) + echo $(VOBJ06) >> $(subst /,\,$@) + echo $(VOBJ07) >> $(subst /,\,$@) + echo $(VOBJ08) >> $(subst /,\,$@) + echo $(VOBJ09) >> $(subst /,\,$@) + echo $(VOBJ10) >> $(subst /,\,$@) + echo $(VOBJ11) >> $(subst /,\,$@) + echo $(VOBJ12) >> $(subst /,\,$@) + echo $(VOBJ13) >> $(subst /,\,$@) + echo $(VOBJ14) >> $(subst /,\,$@) + echo $(VOBJ15) >> $(subst /,\,$@) + echo $(VOBJ16) >> $(subst /,\,$@) + echo $(VOBJ17) >> $(subst /,\,$@) + echo $(VOBJ18) >> $(subst /,\,$@) + echo $(VOBJ19) >> $(subst /,\,$@) + echo $(VOBJ20) >> $(subst /,\,$@) + echo $(VOBJ21) >> $(subst /,\,$@) + echo $(VOBJ22) >> $(subst /,\,$@) + echo $(VOBJ23) >> $(subst /,\,$@) + echo $(SOBJ) >> $(subst /,\,$@) + echo $(TILOBJ) >> $(subst /,\,$@) + echo $(VVOBJ) >> $(subst /,\,$@) -# +#========================================== # Housekeeping. -# +#========================================== clean: - del *.o - del *.map - del dlb_main.exe + $(subst /,\,if exist $(O)*.o del $(O)*.o) + $(subst /,\,if exist $(O)dat.tag del $(O)dat.tag) + $(subst /,\,if exist $(O)install.tag del $(O)install.tag) + $(subst /,\,if exist $(O)$(GAME).lnk del $(O)$(GAME).lnk) + $(subst /,\,if exist $(O)obj.tag del $(O)obj.tag) + $(subst /,\,if exist $(O)sp_lev.tag del $(O)sp_lev.tag) + $(subst /,\,if exist $(O)thintile.tag del $(O)thintile.tag) + $(subst /,\,if exist $(O)utility.tag del $(O)utility.tag) spotless: clean - if exist utility.tag del utility.tag - if exist install.tag del install.tag - if exist dat.tag del dat.tag - if exist $(GAME).lnk del $(GAME).lnk - if exist makedefs.exe del makedefs.exe - if exist lev_comp.exe del lev_comp.exe - if exist dgn_comp.exe del dgn_comp.exe - if exist $(SRC)\lev_lex.c del $(SRC)\lev_lex.c - if exist $(SRC)\lev_flex.c del $(SRC)\lev_flex.c - if exist $(SRC)\lev_yacc.c del $(SRC)\lev_yacc.c - if exist $(SRC)\dgn_lex.c del $(SRC)\dgn_lex.c - if exist $(SRC)\dgn_flex.c del $(SRC)\dgn_flex.c - if exist $(SRC)\dgn_yacc.c del $(SRC)\dgn_yacc.c - if exist recover.exe del recover.exe - if exist $(INCL)\onames.h del $(INCL)\onames.h - if exist $(INCL)\pm.h del $(INCL)\pm.h - if exist $(INCL)\vis_tab.h del $(INCL)\vis_tab.h - if exist $(INCL)\pcvideo.h del $(INCL)\pcvideo.h - if exist $(INCL)\pctiles.h del $(INCL)\pctiles.h - if exist $(INCL)\portio.h del $(INCL)\portio.h - if exist $(INCL)\tile.h del $(INCL)\tile.h - if exist monstr.c del monstr.c - if exist vis_tab.c del vis_tab.c - if exist $(SRC)\panic.c del $(SRC)\panic.c - if exist $(SRC)\makedefs.c del $(SRC)\makedefs.c - if exist $(SRC)\recover.c del $(SRC)\recover.c - if exist $(SRC)\lev_main.c del $(SRC)\lev_main.c - if exist $(SRC)\dlb_main.c del $(SRC)\dlb_main.c - if exist $(SRC)\dgn_main.c del $(SRC)\dgn_main.c - if exist $(SRC)\wintty.c del $(SRC)\wintty.c - if exist $(SRC)\topl.c del $(SRC)\topl.c - if exist $(SRC)\getline.c del $(SRC)\getline.c - if exist $(SRC)\termcap.c del $(SRC)\termcap.c - if exist $(SRC)\tile2bin.c del $(SRC)\tile2bin.c - if exist $(SRC)\msdos.c del $(SRC)\msdos.c - if exist $(SRC)\pckeys.c del $(SRC)\pckeys.c - if exist $(SRC)\video.c del $(SRC)\video.c - if exist $(SRC)\vidtxt.c del $(SRC)\vidtxt.c - if exist $(SRC)\vidvga.c del $(SRC)\vidvga.c - if exist $(SRC)\sound.c del $(SRC)\sound.c - if exist $(SRC)\tilemap.c del $(SRC)\tilemap.c - if exist $(SRC)\gifread.c del $(SRC)\gifread.c - if exist $(SRC)\ppmwrite.c del $(SRC)\ppmwrite.c - if exist $(SRC)\pcmain.c del $(SRC)\pcmain.c - if exist $(SRC)\pcunix.c del $(SRC)\pcunix.c - if exist $(SRC)\pcsys.c del $(SRC)\pcsys.c - if exist $(SRC)\pctty.c del $(SRC)\pctty.c - if exist $(SRC)\tile.c del $(SRC)\tile.c - if exist $(SRC)\tiletext.c del $(SRC)\tiletext.c - if exist $(SRC)\pctiles.c del $(SRC)\pctiles.c - if exist $(SRC)\thintile.c del $(SRC)\thintile.c - if exist $(SRC)\thintile.exe del $(SRC)\thintile.exe - if exist $(SRC)\thintile.tag del $(SRC)\thintile.tag - if exist $(SRC)\til2bin2.exe del $(SRC)\til2bin2.exe - if exist $(INCL)\date.h del $(INCL)\date.h - if exist $(INCL)\onames.h del $(INCL)\onames.h - if exist $(INCL)\pm.h del $(INCL)\pm.h - if exist $(INCL)\vis_tab.h del $(INCL)\vis_tab.h - if exist vis_tab.c del vis_tab.c - if exist *.lnk del *.lnk - if exist *.def del *.def - if exist *.map del *.map - if exist a.out del a.out - if exist tilemap.exe del tilemap.exe - if exist tile2bin.exe del tile2bin.exe - if exist $(DAT)\data del $(DAT)\data - if exist $(DAT)\*.lev del $(DAT)\*.lev - if exist $(DAT)\dungeon del $(DAT)\dungeon - if exist $(DAT)\options del $(DAT)\options - if exist $(DAT)\oracles del $(DAT)\oracles - if exist $(DAT)\rumors del $(DAT)\rumors - if exist $(DAT)\quest.dat del $(DAT)\quest.dat - if exist $(DAT)\nhdat del $(DAT)\nhdat - if exist $(DAT)\dlb.lst del $(DAT)\dlb.lst - if exist $(DAT)\msdoshlp.txt del $(DAT)\msdoshlp.txt - if exist $(DAT)\dlb_main.exe del $(DAT)\dlb_main.exe - if exist $(DAT)\lev_comp.exe del $(DAT)\lev_comp.exe - if exist $(DAT)\dgn_comp.exe del $(DAT)\dgn_comp.exe - if exist sp_lev.tag del sp_lev.tag - if exist $(PLANAR_TIB) del $(PLANAR_TIB) - if exist $(OVERVIEW_TIB) del $(OVERVIEW_TIB) - if exist thintile.tag del thintile.tag - if exist thintile.exe del thintile.exe - if exist til2bin2.exe del til2bin2.exe - if exist $(INCL)\dgn_comp.h del $(INCL)\dgn_comp.h - if exist $(INCL)\lev_comp.h del $(INCL)\lev_comp.h - if exist $(DAT)\dungeon.pdf del $(DAT)\dungeon.pdf - if exist $(WSHR)\monthin.txt del $(WSHR)\monthin.txt - if exist $(WSHR)\objthin.txt del $(WSHR)\objthin.txt - if exist $(WSHR)\oththin.txt del $(WSHR)\oththin.txt -# -# Secondary Targets. + $(subst /,\,if exist $(U)lev_flex.c del $(U)lev_flex.c) + $(subst /,\,if exist $(U)lev_lex.c del $(U)lev_lex.c) + $(subst /,\,if exist $(U)lev_yacc.c del $(U)lev_yacc.c) + $(subst /,\,if exist $(U)dgn_flex.c del $(U)dgn_flex.c) + $(subst /,\,if exist $(U)dgn_lex.c del $(U)dgn_lex.c) + $(subst /,\,if exist $(U)dgn_yacc.c del $(U)lev_yacc.c) + $(subst /,\,if exist $(U)makedefs.exe del $(U)makedefs.exe) + $(subst /,\,if exist $(U)lev_comp.exe del $(U)lev_comp.exe) + $(subst /,\,if exist $(U)dgn_comp.exe del $(U)dgn_comp.exe) + $(subst /,\,if exist $(U)recover.exe del $(U)recover.exe) + $(subst /,\,if exist $(U)tilemap.exe del $(U)tilemap.exe) + $(subst /,\,if exist $(U)tile2bin.exe del $(U)tile2bin.exe) + $(subst /,\,if exist $(U)til2bin2.exe del $(U)til2bin2.exe) + $(subst /,\,if exist $(U)thintile.exe del $(U)thintile.exe) + $(subst /,\,if exist $(U)dlb_main.exe del $(U)dlb_main.exe) + $(subst /,\,if exist $(INCL)/vis_tab.h del $(INCL)/vis_tab.h) + $(subst /,\,if exist $(INCL)/onames.h del $(INCL)/onames.h) + $(subst /,\,if exist $(INCL)/pm.h del $(INCL)/pm.h) + $(subst /,\,if exist $(INCL)/date.h del $(INCL)/date.h) + $(subst /,\,if exist $(INCL)/dgn_comp.h del $(INCL)/dgn_comp.h) + $(subst /,\,if exist $(INCL)/lev_comp.h del $(INCL)/lev_comp.h) + $(subst /,\,if exist $(SRC)/monstr.c del $(SRC)/monstr.c) + $(subst /,\,if exist $(SRC)/vis_tab.c del $(SRC)/vis_tab.c) + $(subst /,\,if exist $(SRC)/tile.c del $(SRC)/tile.c) + $(subst /,\,if exist $(DAT)/options del $(DAT)/options) + $(subst /,\,if exist $(DAT)/data del $(DAT)/data) + $(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors) + $(subst /,\,if exist $(DAT)/dungeon.pdf del $(DAT)/dungeon.pdf) + $(subst /,\,if exist $(DAT)/dungeon del $(DAT)/dungeon) + $(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles) + $(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat) + $(subst /,\,if exist $(DAT)/dlb.lst del $(DAT)/dlb.lst) + $(subst /,\,if exist $(DAT)/nhdat del $(DAT)/nhdat) + $(subst /,\,if exist $(DAT)/*.lev del $(DAT)/*.lev) + $(subst /,\,if exist $(PLANAR_TIB) del $(PLANAR_TIB)) + $(subst /,\,if exist $(OVERVIEW_TIB) del $(OVERVIEW_TIB)) + $(subst /,\,if exist $(WSHR)/monthin.txt del $(WSHR)/monthin.txt) + $(subst /,\,if exist $(WSHR)/objthin.txt del $(WSHR)/objthin.txt) + $(subst /,\,if exist $(WSHR)/oththin.txt del $(WSHR)/oththin.txt) + +#========================================== +# Create directory for holding object files +#========================================== + +$(O)obj.tag: + -$(subst /,\,@if not exist $(OBJ)/*.* mkdir $(OBJ)) + @$(subst /,\,@echo directory created > $@) + +#=========================================== +# Work around some djgpp long file name woes +#=========================================== + +$(PATCHLEV_H): + @$(subst /,\,if not exist $@ copy $(INCL)/patchlevel.h $(INCL)/patchlev.h) + +#========================================== +#=========== SECONDARY TARGETS ============ +#========================================== # # The following include files depend on makedefs to be created. # @@ -522,622 +553,697 @@ # files is modified. -$(INCL)\date.h : makedefs.exe - -makedefs -v +$(INCL)/date.h : $(U)makedefs.exe + -$(subst /,\,$(U)makedefs -v) -$(INCL)\onames.h: makedefs.exe - -makedefs -o +$(INCL)/onames.h: $(U)makedefs.exe + -$(subst /,\,$(U)makedefs -o) -$(INCL)\pm.h: makedefs.exe - -makedefs -p +$(INCL)/pm.h: $(U)makedefs.exe + -$(subst /,\,$(U)makedefs -p) -monstr.c: makedefs.exe - -makedefs -m +monstr.c: $(U)makedefs.exe + -$(subst /,\,$(U)makedefs -m) -$(INCL)\vis_tab.h: makedefs.exe - -makedefs -z +$(INCL)/vis_tab.h: $(U)makedefs.exe + -$(subst /,\,$(U)makedefs -z) -vis_tab.c: makedefs.exe - -makedefs -z +vis_tab.c: $(U)makedefs.exe + -$(subst /,\,$(U)makedefs -z) -# +#========================================== # Makedefs Stuff -# - -makedefs.exe: $(MAKEOBJS) - $(LINK) $(LFLAGS) -omakedefs.exe $(MAKEOBJS) +#========================================== -makedefs.c: $(UTIL)\makedefs.c - copy $(UTIL)\makedefs.c . +$(U)makedefs.exe: $(MAKEOBJS) + $(LINK) $(LFLAGS) -o$@ $(MAKEOBJS) -makedefs.o: $(CONFIG_H) $(PERMONST_H) $(INCL)\objclass.h \ - $(INCL)\monsym.h $(INCL)\qtext.h makedefs.c +$(O)makedefs.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/objclass.h \ + $(INCL)/monsym.h $(INCL)/qtext.h $(U)makedefs.c -# +#========================================== # Level Compiler Dependencies -# +#========================================== -lev_comp.exe: $(SPLEVOBJS) - $(LINK) $(LFLAGS) -olev_comp.exe $(SPLEVOBJS) +$(U)lev_comp.exe: $(SPLEVOBJS) + $(LINK) $(LFLAGS) -o$@ $(SPLEVOBJS) ifeq ($(YACC_LEX),Y) -lev_yacc.o: $(HACK_H) $(SP_LEV_H) lev_yacc.c - $(CC) $(CFLAGS) -o$@ lev_yacc.c +$(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(U)lev_yacc.c + $(CC) $(cflags) -o$@ $(U)lev_yacc.c else -lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h lev_yacc.c - $(CC) $(CFLAGS) -o$@ lev_yacc.c +$(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h $(U)lev_yacc.c + $(CC) $(cflags) -o$@ $(U)lev_yacc.c endif -lev_$(LEX).o: $(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h \ - lev_$(LEX).c - $(CC) $(CFLAGS) -o$@ lev_$(LEX).c - -lev_main.c: $(UTIL)\lev_main.c - copy $(UTIL)\lev_main.c . - -lev_main.o: $(HACK_H) $(INCL)\sp_lev.h $(INCL)\date.h lev_main.c +$(O)lev_$(LEX).o: $(HACK_H) $(SP_LEV_H) $(INCL)/lev_comp.h \ + $(U)lev_$(LEX).c + $(CC) $(cflags) -o$@ $(U)lev_$(LEX).c -$(INCL)\lev_comp.h: lev_yacc.c +$(O)lev_main.o: $(HACK_H) $(INCL)/sp_lev.h $(INCL)/date.h $(U)lev_main.c -ifeq ($(YACC_LEX),Y) +ifeq "$(DO_YACC)" "YACC_ACT" -lev_yacc.c: $(UTIL)\lev_comp.y - $(YACC) -d $(DUTIL)/lev_comp.y - copy $(YTABC) $@ - copy $(YTABH) $(INCL)\lev_comp.h - del $(YTABC) - del $(YTABH) +$(INCL)/lev_comp.h: lev_yacc.c -lev_$(LEX).c: $(UTIL)\lev_comp.l - $(LEX) $(DUTIL)/lev_comp.l - copy $(LEXYYC) $@ - del $(LEXYYC) +$(U)lev_yacc.c $(INCL)/lev_comp.h : $(U)lev_comp.y + @$(subst /,\,chdir $(U)) & \ + @$(subst /,\,$(YACC) -d lev_comp.y) & \ + @$(subst /,\,copy $(YTABC) lev_yacc.c) & \ + @$(subst /,\,copy $(YTABH) $(INCL)/lev_comp.h) & \ + @$(subst /,\,@del $(YTABC)) & \ + @$(subst /,\,@del $(YTABH)) & \ + @$(subst /,\,chdir $(SRC)) else -lev_yacc.c: $(SSHR)\lev_yacc.c - copy $(SSHR)\lev_yacc.c $@ - -$(INCL)\lev_comp.h: $(SSHR)\lev_comp.h - copy $(SSHR)\lev_comp.h $@ - touch $(DINCL)/lev_comp.h +$(U)lev_yacc.c: $(SSHR)/lev_yacc.c + @echo --- + @echo For now, we will copy the prebuilt + @echo lev_comp.c from $(SSHR) into $(U) and use that. + @$(subst /,\,copy $(SSHR)/lev_yacc.c $(U)lev_yacc.c) + @$(subst /,\,echo.>>$(U)lev_yacc.c) -lev_$(LEX).c: $(SSHR)\lev_lex.c - copy $(SSHR)\lev_lex.c $@ +$(INCL)/lev_comp.h : $(SSHR)/lev_comp.h + @echo --- + @echo For now, we will copy the prebuilt lev_comp.h + @echo from $(SSHR) into $(INCL) and use that. + @$(subst /,\,copy $(SSHR)/lev_comp.h $(INCL)/lev_comp.h) + @$(subst /,\,echo.>>$(INCL)/lev_comp.h) endif +$(U)lev_$(LEX).c: $(U)lev_comp.l +ifeq "$(DO_LEX)" "LEX_ACT" + @$(subst /,\,chdir $(U)) & \ + @$(subst /,\,$(LEX) $(FLEXSKEL) lev_comp.l) & \ + @$(subst /,\,copy $(LEXYYC) $@) & \ + @$(subst /,\,@del $(LEXYYC)) & \ + @$(subst /,\,chdir $(SRC)) +else + @echo --- + @echo For now, we will copy the prebuilt lev_lex.c + @echo from $(SSHR) into $(U) and use it. + @$(subst /,\,copy $(SSHR)/lev_lex.c $@) + @$(subst /,\,echo.>>$@) +endif - -# +#========================================== # Dungeon Dependencies -# - -dgn_comp.exe: $(DGNCOMPOBJS) - $(LINK) $(LFLAGS) -odgn_comp.exe $(DGNCOMPOBJS) - -ifeq ($(YACC_LEX),Y) +#========================================== -dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) dgn_yacc.c - $(CC) $(CFLAGS) -o$@ dgn_yacc.c +$(U)dgn_comp.exe: $(DGNCOMPOBJS) + $(LINK) $(LFLAGS) -o$@ $(DGNCOMPOBJS) +ifeq "$(DO_YACC)" "YACC_ACT" +$(U)dgn_yacc.c $(INCL)/dgn_comp.h : $(U)dgn_comp.y + @$(subst /,\,chdir $(U)) & \ + @$(subst /,\,$(YACC) -d dgn_comp.y) & \ + @$(subst /,\,copy $(YTABC) dgn_yacc.c) & \ + @$(subst /,\,copy $(YTABH) $(INCL)/dgn_comp.h) & \ + @$(subst /,\,@del $(YTABC)) & \ + @$(subst /,\,@del $(YTABH)) & \ + @$(subst /,\,chdir $(SRC)) else +$(U)dgn_yacc.c: $(SSHR)/dgn_yacc.c + @echo --- + @echo For now, we will copy the prebuilt $(U)dgn_yacc.c and + @echo dgn_comp.h from $(SSHR) into $(U) and use that. + @$(subst /,\,copy $(SSHR)/dgn_yacc.c $(U)dgn_yacc.c) + @$(subst /,\,echo.>>$(U)dgn_yacc.c) -dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h dgn_yacc.c - $(CC) $(CFLAGS) -o$@ dgn_yacc.c +$(INCL)/dgn_comp.h: $(SSHR)/dgn_comp.h + @echo --- + @echo For now, we will copy the prebuilt dgn_comp.h + @echo from $(SSHR) into $(INCL) and use that. + @$(subst /,\,copy $(SSHR)/dgn_comp.h $(INCL)/dgn_comp.h) + @$(subst /,\,echo.>>$(INCL)/dgn_comp.h) endif -dgn_$(LEX).o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h \ - dgn_$(LEX).c - $(CC) $(CFLAGS) -o$@ dgn_$(LEX).c - -dgn_main.c: $(UTIL)\dgn_main.c - copy $(UTIL)\dgn_main.c . - -dgn_main.o: $(HACK_H) - -$(INCL)\dgn_comp.h: dgn_yacc.c - -ifeq ($(YACC_LEX),Y) - -dgn_yacc.c: $(UTIL)\dgn_comp.y - $(YACC) -d $(DUTIL)/dgn_comp.y - copy $(YTABC) $@ - copy $(YTABH) $(INCL)\dgn_comp.h - del $(YTABC) - del $(YTABH) - -dgn_$(LEX).c: $(UTIL)\dgn_comp.l - $(LEX) $(DUTIL)/dgn_comp.l - copy $(LEXYYC) $@ - del $(LEXYYC) +ifeq "$(DO_LEX)" "LEX_ACT" +$(U)dgn_$(LEX).c: $(U)dgn_comp.l $(INCL)/dgn_comp.h + @$(subst /,\,chdir $(U)) & \ + @$(subst /,\,$(LEX) $(FLEXSKEL) dgn_comp.l) & \ + @$(subst /,\,copy $(LEXYYC) $@) & \ + @$(subst /,\,@del $(LEXYYC)) & \ + @$(subst /,\,chdir $(SRC)) else -dgn_yacc.c: $(SSHR)\dgn_yacc.c - copy $(SSHR)\dgn_yacc.c $@ - -$(INCL)\dgn_comp.h: $(SSHR)\dgn_comp.h - copy $(SSHR)\dgn_comp.h $@ - touch $(DINCL)/dgn_comp.h +$(U)dgn_$(LEX).c: $(SSHR)/dgn_lex.c $(INCL)/dgn_comp.h + @echo --- + @echo For now, we will copy the prebuilt dgn_lex.c + @echo from $(SSHR) into $(U) and use it. + @$(subst /,\,copy $(SSHR)/dgn_lex.c $@) + @$(subst /,\,echo.>>$@) -dgn_$(LEX).c: $(SSHR)\dgn_lex.c - copy $(SSHR)\dgn_lex.c $@ - endif -# +#========================================== # Recover Utility -# - -recover.exe: $(RECOVOBJS) - $(LINK) $(LFLAGS) -orecover.exe recover.o - -recover.c: $(UTIL)\recover.c - copy $(UTIL)\recover.c . +#========================================== -recover.o: $(CONFIG_H) recover.c - $(CC) $(CFLAGS) -o$@ recover.c +$(U)recover.exe: $(RECOVOBJS) + $(LINK) $(LFLAGS) -o$@ $(O)recover.o +$(O)recover.o: $(CONFIG_H) $(U)recover.c + $(CC) $(cflags) -o$@ $(U)recover.c -# +#========================================== # Header file moves required for tile support -# +#========================================== + ifeq ($(SUPPRESS_GRAPHICS),Y) else - -$(INCL)\tile.h: $(WSHR)\tile.h - copy $(WSHR)\tile.h $@ - -$(INCL)\pctiles.h: $(MSYS)\pctiles.h - copy $(MSYS)\pctiles.h $@ - -$(INCL)\pcvideo.h: $(MSYS)\pcvideo.h - copy $(MSYS)\pcvideo.h $@ - -$(INCL)\portio.h: $(MSYS)\portio.h - copy $(MSYS)\portio.h $@ - # # Tile Mapping # -tile.c: tilemap.exe - @tilemap +$(SRC)/tile.c: $(U)tilemap.exe + @$(subst /,\,$(U)tilemap.exe) @echo A new $@ has been created -tilemap.exe: tilemap.o - $(LINK) $(LFLAGS) -otilemap.exe tilemap.o +$(U)tilemap.exe: $(O)tilemap.o + $(LINK) $(LFLAGS) -o$@ $(O)tilemap.o -tilemap.c: $(WSHR)\tilemap.c - copy $(WSHR)\tilemap.c . +$(O)tilemap.o: $(WSHR)/tilemap.c $(HACK_H) $(TILE_H) + $(CC) $(cflags) -I$(WSHR) -I$(MSYS) -o$@ $(WSHR)/tilemap.c -tilemap.o: tilemap.c $(HACK_H) $(TILE_H) -# +#========================================== # Tile Utilities -# -# # Required for tile support -# +#========================================== -NetHack1.tib: $(TILEFILES) tile2bin.exe +$(DAT)/NetHack1.tib: $(TILEFILES) $(U)tile2bin.exe @echo Creating binary tile files (this may take some time) - @tile2bin + @$(subst /,\,chdir $(DAT)) + @$(subst /,\,$(U)tile2bin.exe) + @$(subst /,\,chdir $(SRC)) -NetHacko.tib: thintile.tag $(TILEFILES2) til2bin2.exe +$(DAT)/NetHacko.tib: $(O)thintile.tag $(TILEFILES2) $(U)til2bin2.exe @echo Creating overview binary tile files (this may take some time) - @til2bin2 - -tile2bin.exe: tile2bin.o $(TEXTIO) - $(LINK) $(LFLAGS) -otile2bin.exe tile2bin.o $(TEXTIO) - -til2bin2.exe: til2bin2.o $(TEXTIO2) - $(LINK) $(LFLAGS) -otil2bin2.exe til2bin2.o $(TEXTIO2) + @$(subst /,\,chdir $(DAT)) + @$(subst /,\,$(U)til2bin2.exe) + @$(subst /,\,chdir $(SRC)) -thintile.exe: thintile.o - $(LINK) $(LFLAGS) -othintile.exe thintile.o +$(U)tile2bin.exe: $(O)tile2bin.o $(TEXTIO) + $(LINK) $(LFLAGS) -o$@ $(O)tile2bin.o $(TEXTIO) -thintile.c: $(WSHR)\thintile.c - copy $(WSHR)\thintile.c . +$(U)til2bin2.exe: $(O)til2bin2.o $(TEXTIO2) + $(LINK) $(LFLAGS) -o$@ $(O)til2bin2.o $(TEXTIO2) -thintile.o: $(HACK_H) $(INCL)\tile.h thintile.c - $(CC) $(CFLAGS) -o$@ thintile.c +$(U)thintile.exe: $(O)thintile.o + $(LINK) $(LFLAGS) -o$@ $(O)thintile.o -thintile.tag: thintile.exe $(TILEFILES) - thintile - @echo thintiles created >thintile.tag +$(O)thintile.o: $(HACK_H) $(WSHR)/tile.h $(WSHR)/thintile.c + $(CC) $(cflags) -o$@ $(WSHR)/thintile.c -tile2bin.c: $(MSYS)\tile2bin.c - copy $(MSYS)\tile2bin.c . +$(O)thintile.tag: $(U)thintile.exe $(TILEFILES) + @$(subst /,\,$(U)thintile.exe) + @$(subst /,\,echo thintiles created >$@) -tile2bin.o: $(HACK_H) $(INCL)\tile.h $(INCL)\pctiles.h $(INCL)\pcvideo.h \ - tile2bin.c +$(O)tile2bin.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/tile2bin.c -til2bin2.o: $(HACK_H) $(INCL)\tile.h $(INCL)\pctiles.h $(INCL)\pcvideo.h \ - tile2bin.c - $(CC) $(CFLAGS) -DTILE_X=8 -DOVERVIEW_FILE -o$@ tile2bin.c +$(O)til2bin2.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE_X=8 -DOVERVIEW_FILE -o$@ $(MSYS)/tile2bin.c -tiletext.o: $(CONFIG_H) $(INCL)\tile.h $(WSHR)\tiletext.c - copy $(WSHR)\tiletext.c . - $(CC) $(CFLAGS) -o$@ tiletext.c +$(O)tiletext.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tiletext.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(WSHR)/tiletext.c -tiletex2.o: $(CONFIG_H) $(INCL)\tile.h $(WSHR)\tiletext.c - copy $(WSHR)\tiletext.c . - $(CC) $(CFLAGS) -DTILE_X=8 -o$@ tiletext.c +$(O)tiletex2.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tiletext.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE_X=8 -o$@ $(WSHR)/tiletext.c -tiletxt.o: $(CONFIG_H) $(INCL)\tile.h tilemap.c - $(CC) $(CFLAGS) -DTILETEXT -o$@ tilemap.c +$(O)tiletxt.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tilemap.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILETEXT -o$@ $(WSHR)/tilemap.c -tiletxt2.o: $(CONFIG_H) $(INCL)\tile.h tilemap.c - $(CC) $(CFLAGS) -DTILETEXT -DTILE_X=8 -o$@ tilemap.c +$(O)tiletxt2.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tilemap.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILETEXT -DTILE_X=8 -o$@ $(WSHR)/tilemap.c # # Optional GIF Utilities (for development) # -gif2txt.exe: $(GIFREADERS) $(TEXTIO) - $(LINK) $(LFLAGS) -ogif2txt.exe $(GIFREADERS) $(TEXTIO) - -gif2txt2.exe: $(GIFREAD2) $(TEXTIO2) - $(LINK) $(LFLAGS) -ogif2txt2.exe $(GIFREAD2) $(TEXTIO2) +$(U)gif2txt.exe: $(GIFREADERS) $(TEXTIO) + $(LINK) $(LFLAGS) -o$@ $(GIFREADERS) $(TEXTIO) -txt2ppm.exe: $(PPMWRITERS) $(TEXTIO) - $(LINK) $(LFLAGS) -otxt2ppm.exe $(PPMWRITERS) $(TEXTIO) +$(U)gif2txt2.exe: $(GIFREAD2) $(TEXTIO2) + $(LINK) $(LFLAGS) -o$@ $(GIFREAD2) $(TEXTIO2) -txt2ppm2.exe: $(PPMWRIT2) $(TEXTIO2) - $(LINK) $(LFLAGS) -otxt2ppm2.exe $(PPMWRIT2) $(TEXTIO2) +$(U)txt2ppm.exe: $(PPMWRITERS) $(TEXTIO) + $(LINK) $(LFLAGS) -o$@ $(PPMWRITERS) $(TEXTIO) -gifread.c: $(WSHR)\gifread.c - copy $(WSHR)\gifread.c . +$(U)txt2ppm2.exe: $(PPMWRIT2) $(TEXTIO2) + $(LINK) $(LFLAGS) -o$@ $(PPMWRIT2) $(TEXTIO2) -gifread.o: $(CONFIG_H) $(INCL)\tile.h +$(O)gifread.o: $(CONFIG_H) $(WSHR)/tile.h $(WSHR)/gifread.c -gifread2.o: $(CONFIG_H) $(INCL)\tile.h gifread.c - $(CC) $(CFLAGS) -DTILE_X=8 -o$@ gifread.c +$(O)gifread2.o: $(CONFIG_H) $(WSHR)/tile.h $(WSHR)/gifread.c + $(CC) $(cflags) -DTILE_X=8 -o$@ $(WSHR)/gifread.c -ppmwrite.c: $(WSHR)\ppmwrite.c - copy $(WSHR)\ppmwrite.c . +ppmwrite.c: $(WSHR)/ppmwrite.c + @$(subst /,\,copy $(WSHR)/ppmwrite.c .) -ppmwrite.o: $(CONFIG_H) $(INCL)\tile.h +$(O)ppmwrite.o: $(CONFIG_H) $(WSHR)/tile.h -ppmwrit2.o: $(CONFIG_H) $(INCL)\tile.h ppmwrite.c - $(CC) $(CFLAGS) -DTILE_X=8 -o$@ ppmwrite.c +$(O)ppmwrit2.o: $(CONFIG_H) $(WSHR)/tile.h ppmwrite.c + $(CC) $(cflags) -DTILE_X=8 -o$@ ppmwrite.c # # Optional tile viewer (development sources only) # -viewtib.exe: viewtib.o - $(LINK) $(LFLAGS) -oviewtib.exe viewtib.o $(LIBRARIES) - -viewtib.c: $(MSYS)\viewtib.c - copy $(MSYS)\viewtib.c . +$(U)viewtib.exe: $(O)viewtib.o + $(LINK) $(LFLAGS) -o$@ $(O)viewtib.o $(LIBRARIES) -viewtib.o: viewtib.c +$(O)viewtib.o: $(MSYS)/viewtib.c endif -# +#========================================== # Other Util Dependencies. -# - -alloc.o: $(CONFIG_H) alloc.c - $(CC) $(CFLAGS) -oalloc.o alloc.c +#========================================== -drawing.o: $(CONFIG_H) drawing.c $(INCL)\pcvideo.h - $(CC) $(CFLAGS) -odrawing.o drawing.c +$(O)alloc.o: $(CONFIG_H) alloc.c + $(CC) $(cflags) -o$@ alloc.c -decl.o: $(CONFIG_H) decl.c - $(CC) $(CFLAGS) -odecl.o decl.c +$(O)drawing.o: $(CONFIG_H) drawing.c $(MSYS)/pcvideo.h + $(CC) $(cflags) -I$(MSYS) -o$@ drawing.c -monst.o: $(CONFIG_H) $(PERMONST_H) $(ESHK_H) \ - $(EPRI_H) $(VAULT_H) $(INCL)\monsym.h \ - $(INCL)\color.h monst.c - $(CC) $(CFLAGS) -omonst.o monst.c +$(O)decl.o: $(CONFIG_H) decl.c + $(CC) $(cflags) -o$@ decl.c -objects.o: $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ - $(INCL)\prop.h $(INCL)\color.h objects.c - $(CC) $(CFLAGS) -oobjects.o objects.c +$(O)monst.o: $(CONFIG_H) $(PERMONST_H) $(ESHK_H) \ + $(EPRI_H) $(VAULT_H) $(INCL)/monsym.h \ + $(INCL)/color.h monst.c + $(CC) $(cflags) -o$@ monst.c -panic.c: $(UTIL)\panic.c - copy $(UTIL)\panic.c . +$(O)objects.o: $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ + $(INCL)/prop.h $(INCL)/color.h objects.c + $(CC) $(cflags) -o$@ objects.c -panic.o: $(CONFIG_H) panic.c +$(O)panic.o: $(CONFIG_H) $(U)panic.c +#============================================================ +# make data.base an 8.3 filename to prevent an make warning +#============================================================ +DATABASE = $(DAT)/data.bas -# -# make data.base an 8.3 filename to prevent an nmake warning -# -DATABASE = $(DAT)\data.bas +$(O)dat.tag: $(DAT)/nhdat + @$(subst /,\,echo dat done >$@) +$(DAT)/data: $(O)utility.tag $(DATABASE) + @$(subst /,\,$(U)makedefs.exe -d) -dat.tag: $(DAT)\nhdat - @echo dat done >dat.tag +$(DAT)/rumors: $(O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal + @$(subst /,\,$(U)makedefs.exe -r) -$(DAT)\data: utility.tag $(DATABASE) - makedefs -d +$(DAT)/quest.dat: $(O)utility.tag $(DAT)/quest.txt + @$(subst /,\,$(U)makedefs.exe -q) -$(DAT)\rumors: utility.tag $(DAT)\rumors.tru $(DAT)\rumors.fal - makedefs -r +$(DAT)/oracles: $(O)utility.tag $(DAT)/oracles.txt + @$(subst /,\,$(U)makedefs.exe -h) -$(DAT)\quest.dat: utility.tag $(DAT)\quest.txt - makedefs -q +$(O)sp_lev.tag: $(O)utility.tag $(DAT)/bigroom.des $(DAT)/castle.des \ + $(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \ + $(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \ + $(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \ + $(DAT)/caveman.des $(DAT)/healer.des $(DAT)/knight.des \ + $(DAT)/monk.des $(DAT)/priest.des $(DAT)/ranger.des \ + $(DAT)/rogue.des $(DAT)/samurai.des $(DAT)/tourist.des \ + $(DAT)/valkyrie.des $(DAT)/wizard.des + @$(subst /,\,cd $(DAT)) + @$(subst /,\,$(U)lev_comp bigroom.des) + @$(subst /,\,$(U)lev_comp castle.des) + @$(subst /,\,$(U)lev_comp endgame.des) + @$(subst /,\,$(U)lev_comp gehennom.des) + @$(subst /,\,$(U)lev_comp knox.des) + @$(subst /,\,$(U)lev_comp mines.des) + @$(subst /,\,$(U)lev_comp medusa.des) + @$(subst /,\,$(U)lev_comp oracle.des) + @$(subst /,\,$(U)lev_comp sokoban.des) + @$(subst /,\,$(U)lev_comp tower.des) + @$(subst /,\,$(U)lev_comp yendor.des) + @$(subst /,\,$(U)lev_comp arch.des) + @$(subst /,\,$(U)lev_comp barb.des) + @$(subst /,\,$(U)lev_comp caveman.des) + @$(subst /,\,$(U)lev_comp healer.des) + @$(subst /,\,$(U)lev_comp knight.des) + @$(subst /,\,$(U)lev_comp monk.des) + @$(subst /,\,$(U)lev_comp priest.des) + @$(subst /,\,$(U)lev_comp ranger.des) + @$(subst /,\,$(U)lev_comp rogue.des) + @$(subst /,\,$(U)lev_comp samurai.des) + @$(subst /,\,$(U)lev_comp tourist.des) + @$(subst /,\,$(U)lev_comp valkyrie.des) + @$(subst /,\,$(U)lev_comp wizard.des) + @$(subst /,\,cd $(SRC)) + @$(subst /,\,echo sp_levs done > $@) -$(DAT)\oracles: utility.tag $(DAT)\oracles.txt - makedefs -h +$(DAT)/dungeon: $(O)utility.tag $(DAT)/dungeon.def + @$(subst /,\,$(U)makedefs.exe -e) + @$(subst /,\,cd $(DAT)) + @$(subst /,\,$(U)dgn_comp.exe dungeon.pdf) + @$(subst /,\,cd $(SRC)) -sp_lev.tag: utility.tag $(DAT)\bigroom.des $(DAT)\castle.des \ - $(DAT)\endgame.des $(DAT)\gehennom.des $(DAT)\knox.des \ - $(DAT)\medusa.des $(DAT)\oracle.des $(DAT)\tower.des \ - $(DAT)\yendor.des $(DAT)\arch.des $(DAT)\barb.des \ - $(DAT)\caveman.des $(DAT)\healer.des $(DAT)\knight.des \ - $(DAT)\monk.des $(DAT)\priest.des $(DAT)\ranger.des \ - $(DAT)\rogue.des $(DAT)\samurai.des $(DAT)\tourist.des \ - $(DAT)\valkyrie.des $(DAT)\wizard.des - copy $(SRC)\lev_comp.exe $(DAT)\lev_comp.exe - cd $(DAT) - lev_comp bigroom.des - lev_comp castle.des - lev_comp endgame.des - lev_comp gehennom.des - lev_comp knox.des - lev_comp mines.des - lev_comp medusa.des - lev_comp oracle.des - lev_comp sokoban.des - lev_comp tower.des - lev_comp yendor.des - lev_comp arch.des - lev_comp barb.des - lev_comp caveman.des - lev_comp healer.des - lev_comp knight.des - lev_comp monk.des - lev_comp priest.des - lev_comp ranger.des - lev_comp rogue.des - lev_comp samurai.des - lev_comp tourist.des - lev_comp valkyrie.des - lev_comp wizard.des - cd $(SRC) - echo sp_levs done > sp_lev.tag - -$(DAT)\dungeon: utility.tag $(DAT)\dungeon.def - @copy $(SRC)\dgn_comp.exe $(DAT)\dgn_comp.exe - makedefs -e - cd $(DAT) - dgn_comp dungeon.pdf - cd $(SRC) -# +#========================================== # DLB stuff -# +#========================================== + #note that dir below assumes bin/dir.exe from djgpp distribution # -$(DAT)\nhdat: dlb_main.exe $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ - $(DAT)\oracles $(DAT)\quest.dat sp_lev.tag - @echo dat done >dat.tag - @cd $(DAT) - @copy $(MSYS)\msdoshlp.txt . - @echo data >dlb.lst - @echo dungeon >>dlb.lst - @echo oracles >>dlb.lst - @echo options >>dlb.lst - @echo quest.dat >>dlb.lst - @echo rumors >>dlb.lst - @echo help >>dlb.lst - @echo hh >>dlb.lst - @echo cmdhelp >>dlb.lst - @echo history >>dlb.lst - @echo opthelp >>dlb.lst - @echo wizhelp >>dlb.lst - @echo license >>dlb.lst - @echo msdoshlp.txt >>dlb.lst - $(LS) *.lev >>dlb.lst - dlb_main cvIf dlb.lst nhdat - @cd $(SRC) - -dlb_main.exe: $(DLBOBJS) - $(LINK) $(LFLAGS) -odlb_main.exe $(DLBOBJS) - @copy $@ $(DAT)\dlb_main.exe +$(DAT)/nhdat: $(U)dlb_main.exe $(DAT)/data $(DAT)/rumors $(DAT)/dungeon \ + $(DAT)/oracles $(DAT)/quest.dat $(O)sp_lev.tag + @$(subst /,\,echo dat done >$(O)dat.tag) + @$(subst /,\,cd $(DAT)) + @$(subst /,\,copy $(MSYS)/msdoshlp.txt .) + @$(subst /,\,echo data >dlb.lst) + @$(subst /,\,echo dungeon >>dlb.lst) + @$(subst /,\,echo oracles >>dlb.lst) + @$(subst /,\,echo options >>dlb.lst) + @$(subst /,\,echo quest.dat >>dlb.lst) + @$(subst /,\,echo rumors >>dlb.lst) + @$(subst /,\,echo help >>dlb.lst) + @$(subst /,\,echo hh >>dlb.lst) + @$(subst /,\,echo cmdhelp >>dlb.lst) + @$(subst /,\,echo history >>dlb.lst) + @$(subst /,\,echo opthelp >>dlb.lst) + @$(subst /,\,echo wizhelp >>dlb.lst) + @$(subst /,\,echo license >>dlb.lst) + @$(subst /,\,echo msdoshlp.txt >>dlb.lst) + @$(subst /,\,$(LS) *.lev >>dlb.lst) + @$(subst /,\,$(U)dlb_main cvIf dlb.lst nhdat) + @$(subst /,\,cd $(SRC)) +$(U)dlb_main.exe: $(DLBOBJS) + $(LINK) $(LFLAGS) -o$@ $(DLBOBJS) -dlb_main.o: $(UTIL)\dlb_main.c $(INCL)\config.h $(DLB_H) - copy $(UTIL)\dlb_main.c . - $(CC) $(CFLAGS) -odlb_main.o dlb_main.c +$(O)dlb_main.o: $(U)dlb_main.c $(INCL)/config.h $(DLB_H) + $(CC) $(cflags) -o$@ $(U)dlb_main.c +#========================================== # Game Dependencies -# Some files require movement as Gnu make doesn't like unix style '/' -# directory specs and djgcc doesn't like dos style directory specs. -# So we get to copy stuff where we might need it. Fun eh? +#========================================== # sys/share -main.o: $(HACK_H) $(DLB_H) $(SSHR)\pcmain.c - copy $(SSHR)\pcmain.c . - $(CC) $(CFLAGS) -o$@ pcmain.c +$(O)main.o: $(HACK_H) $(DLB_H) $(SSHR)/pcmain.c + $(CC) $(cflags) -o$@ $(SSHR)/pcmain.c -tty.o: $(HACK_H) $(INCL)\wintty.h $(SSHR)\pctty.c - copy $(SSHR)\pctty.c . - $(CC) $(CFLAGS) -o$@ pctty.c +$(O)tty.o: $(HACK_H) $(INCL)/wintty.h $(SSHR)/pctty.c + $(CC) $(cflags) -o$@ $(SSHR)/pctty.c -unix.o: $(HACK_H) $(SSHR)\pcunix.c - copy $(SSHR)\pcunix.c . - $(CC) $(CFLAGS) -o$@ pcunix.c +$(O)unix.o: $(HACK_H) $(SSHR)/pcunix.c + $(CC) $(cflags) -o$@ $(SSHR)/pcunix.c -sys.o : $(HACK_H) $(SSHR)\pcsys.c - copy $(SSHR)\pcsys.c . - $(CC) $(CFLAGS) -o$@ pcsys.c +$(O)sys.o : $(HACK_H) $(SSHR)/pcsys.c + $(CC) $(cflags) -o$@ $(SSHR)/pcsys.c # sys/msdos -msdos.o : $(HACK_H) $(MSYS)\msdos.c - copy $(MSYS)\msdos.c . - $(CC) $(CFLAGS) -o$@ msdos.c - -pckeys.o : $(HACK_H) $(MSYS)\pckeys.c - copy $(MSYS)\pckeys.c . - $(CC) $(CFLAGS) -o$@ pckeys.c - -pctiles.o : $(HACK_H) $(MSYS)\pctiles.c $(INCL)\portio.h - copy $(MSYS)\pctiles.c . - $(CC) $(CFLAGS) -o$@ pctiles.c - -sound.o : $(HACK_H) $(MSYS)\sound.c $(INCL)\portio.h - copy $(MSYS)\sound.c . - $(CC) $(CFLAGS) -o$@ sound.c - -video.o : $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h $(MSYS)\video.c - copy $(MSYS)\video.c . - $(CC) $(CFLAGS) -o$@ video.c +$(O)msdos.o : $(HACK_H) $(MSYS)/msdos.c +# $(CC) $(cflags) -o$@ $(MSYS)/msdos.c -vidvga.o : $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h $(TILE_H) \ - $(MSYS)\vidvga.c - copy $(MSYS)\vidvga.c . - $(CC) $(CFLAGS) -o$@ vidvga.c +$(O)pckeys.o : $(HACK_H) $(MSYS)/pckeys.c +# $(CC) $(cflags) -o$@ $(MSYS)/pckeys.c -vidtxt.o : $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h $(TILE_H) \ - $(MSYS)\vidtxt.c - copy $(MSYS)\vidtxt.c . - $(CC) $(CFLAGS) -o$@ vidtxt.c +$(O)pctiles.o : $(HACK_H) $(MSYS)/pctiles.c $(MSYS)/portio.h + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/pctiles.c -stubvid.o : $(HACK_H) $(MSYS)\video.c - copy $(MSYS)\video.c . - $(CC) $(CFLAGS) -DSTUBVIDEO -o$@ video.c +$(O)sound.o : $(HACK_H) $(MSYS)/sound.c $(MSYS)/portio.h +# $(CC) $(cflags) -o$@ $(MSYS)/sound.c +$(O)video.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(MSYS)/video.c +# $(CC) $(cflags) -o$@ -I$(MSYS) $(MSYS)/video.c -# win/tty -getline.o : $(HACK_H) $(INCL)\wintty.h $(WIN)\getline.c - copy $(WIN)\getline.c . - $(CC) $(CFLAGS) -o$@ getline.c +$(O)vidvga.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(TILE_H) $(MSYS)/vidvga.c + $(CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/vidvga.c -termcap.o : $(CONFIG_H) $(WIN)\termcap.c - copy $(WIN)\termcap.c . - $(CC) $(CFLAGS) -o$@ termcap.c +$(O)vidtxt.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(TILE_H) $(MSYS)/vidtxt.c +# $(CC) $(cflags) -o$@ -I$(MSYS) $(MSYS)/vidtxt.c -topl.o : $(CONFIG_H) $(WIN)\topl.c - copy $(WIN)\topl.c . - $(CC) $(CFLAGS) -o$@ topl.c +$(O)stubvid.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/video.c + $(CC) $(cflags) -I$(MSYS) -DSTUBVIDEO -o$@ $(MSYS)/video.c -wintty.o : $(HACK_H) $(WIN)\wintty.c - copy $(WIN)\wintty.c . - $(CC) $(CFLAGS) -o$@ wintty.c # src dependencies -allmain.o: $(HACK_H) -alloc.o: $(CONFIG_H) -apply.o: $(HACK_H) $(INCL)\edog.h -artifact.o: $(HACK_H) $(INCL)\artifact.h $(INCL)\artilist.h -attrib.o: $(HACK_H) $(INCL)\artifact.h -ball.o: $(HACK_H) -bones.o: $(HACK_H) $(INCL)\lev.h -botl.o: $(HACK_H) -cmd.o: $(HACK_H) $(INCL)\func_tab.h -dbridge.o: $(HACK_H) -decl.o: $(HACK_H) $(INCL)\quest.h -detect.o: $(HACK_H) $(INCL)\artifact.h -dig.o: $(HACK_H) -display.o: $(HACK_H) -dlb.o: $(HACK_H) $(DLB_H) -do.o: $(HACK_H) $(INCL)\lev.h -do_name.o: $(HACK_H) -do_wear.o: $(HACK_H) -dog.o: $(HACK_H) $(INCL)\edog.h -dogmove.o: $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h -dokick.o: $(HACK_H) $(ESHK_H) -dothrow.o: $(HACK_H) -drawing.o: $(HACK_H) $(INCL)\tcap.h -dungeon.o: $(HACK_H) $(INCL)\dgn_file.h -eat.o: $(HACK_H) -end.o: $(HACK_H) $(ESHK_H) -engrave.o: $(HACK_H) $(INCL)\lev.h -exper.o: $(HACK_H) -explode.o: $(HACK_H) -extralev.o: $(HACK_H) -files.o: $(HACK_H) -fountain.o: $(HACK_H) -hack.o: $(HACK_H) -hacklib.o: $(HACK_H) -invent.o: $(HACK_H) $(INCL)\artifact.h -light.o: $(HACK_H) $(INCL)\lev.h -lock.o: $(HACK_H) -mail.o: $(HACK_H) $(INCL)\mail.h -makemon.o: $(HACK_H) $(EPRI_H) $(EMIN_H) $(INCL)\edog.h -mcastu.o: $(HACK_H) -mapglyph.o: $(HACK_H) -mhitm.o: $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h -mhitu.o: $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h -minion.o: $(HACK_H) $(EMIN_H) $(EPRI_H) -mklev.o: $(HACK_H) -mkmap.o: $(HACK_H) $(INCL)\sp_lev.h -mkmaze.o: $(HACK_H) $(INCL)\sp_lev.h -mkobj.o: $(HACK_H) $(INCL)\artifact.h $(INCL)\prop.h -mkroom.o: $(HACK_H) -mon.o: $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h -mondata.o: $(HACK_H) $(ESHK_H) $(EPRI_H) -monmove.o: $(HACK_H) $(INCL)\mfndpos.h $(INCL)\artifact.h -monst.o: $(CONFIG_H) $(PERM_H) $(ESHK_H) $(EPRI_H) \ - $(INCL)\color.h $(INCL)\monsym.h $(INCL)\vault.h -mplayer.o: $(HACK_H) -mthrowu.o: $(HACK_H) -muse.o: $(HACK_H) -music.o: $(HACK_H) -o_init.o: $(HACK_H) -objects.o: $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ - $(INCL)\prop.h $(SKILLS_H) $(INCL)\color.h -objnam.o: $(HACK_H) -options.o: $(CONFIG_H) $(HACK_H) $(INCL)\objclass.h $(INCL)\flag.h \ - $(INCL)\tcap.h -pager.o: $(HACK_H) -pickup.o: $(HACK_H) -pline.o: $(HACK_H) $(EPRI_H) -polyself.o: $(HACK_H) -potion.o: $(HACK_H) -pray.o: $(HACK_H) $(EPRI_H) -priest.o: $(HACK_H) $(INCL)\mfndpos.h $(ESHK_H) $(EPRI_H) $(EMIN_H) -quest.o: $(HACK_H) $(INCL)\quest.h $(INCL)\qtext.h -questpgr.o: $(HACK_H) $(INCL)\qtext.h -read.o: $(HACK_H) -rect.o: $(HACK_H) -region.o: $(HACK_H) -restore.o: $(HACK_H) $(INCL)\lev.h $(INCL)\tcap.h $(INCL)\quest.h -rip.o: $(HACK_H) -rnd.o: $(HACK_H) -role.o: $(HACK_H) -rumors.o: $(HACK_H) -save.o: $(HACK_H) $(INCL)\lev.h $(INCL)\quest.h -shk.o: $(HACK_H) $(ESHK_H) -shknam.o: $(HACK_H) $(ESHK_H) -sit.o: $(HACK_H) $(INCL)\artifact.h -sounds.o: $(HACK_H) $(INCL)\edog.h -sp_lev.o: $(HACK_H) $(INCL)\sp_lev.h $(INCL)\align.h $(INCL)\rect.h -spell.o: $(HACK_H) -steal.o: $(HACK_H) -steed.o: $(HACK_H) -teleport.o: $(HACK_H) -tile.o: $(HACK_H) $(TILE_H) -timeout.o: $(HACK_H) -topten.o: $(HACK_H) -track.o: $(HACK_H) -trap.o: $(HACK_H) -u_init.o: $(HACK_H) -uhitm.o: $(HACK_H) -vault.o: $(HACK_H) $(INCL)\vault.h -version.o: $(HACK_H) $(INCL)\patchlev.h -vision.o: $(HACK_H) $(INCL)\vis_tab.h -weapon.o: $(HACK_H) -were.o: $(HACK_H) -wield.o: $(HACK_H) -windows.o: $(HACK_H) $(INCL)\wintty.h -wizard.o: $(HACK_H) $(INCL)\qtext.h -worm.o: $(HACK_H) $(INCL)\lev.h -worn.o: $(HACK_H) -write.o: $(HACK_H) -zap.o: $(HACK_H) + +# +# The rest are stolen from sys/unix/Makefile.src, +# with the following changes: +# o -c (which is included in cflags) substituted with -o$@ , +# o an explicit build instruction for dlb.o because it requires +# a .h file in ../sys/msdos. +# o the PATCHLEV_H macro is substitued for $(INCL)/patchlevel.h +# to work around a long filename issue. +# o $(CFLAGS) changed to $(cflags) +# Other than that, these dependencies are untouched. +# That means that there is some irrelevant stuff +# in here, but maintenance should be easier. +# +$(O)tos.o: ../sys/atari/tos.c $(HACK_H) $(INCL)/tcap.h + $(CC) $(cflags) -o$@ ../sys/atari/tos.c +$(O)pcmain.o: ../sys/share/pcmain.c $(HACK_H) $(INCL)/dlb.h \ + #$(INCL)/win32api.h + $(CC) $(cflags) -o$@ ../sys/share/pcmain.c +$(O)pcsys.o: ../sys/share/pcsys.c $(HACK_H) + $(CC) $(cflags) -o$@ ../sys/share/pcsys.c +$(O)pctty.o: ../sys/share/pctty.c $(HACK_H) + $(CC) $(cflags) -o$@ ../sys/share/pctty.c +$(O)pcunix.o: ../sys/share/pcunix.c $(HACK_H) + $(CC) $(cflags) -o$@ ../sys/share/pcunix.c +$(O)random.o: ../sys/share/random.c $(HACK_H) + $(CC) $(cflags) -o$@ ../sys/share/random.c +$(O)ioctl.o: ../sys/share/ioctl.c $(HACK_H) $(INCL)/tcap.h + $(CC) $(cflags) -o$@ ../sys/share/ioctl.c +$(O)unixtty.o: ../sys/share/unixtty.c $(HACK_H) + $(CC) $(cflags) -o$@ ../sys/share/unixtty.c +$(O)unixmain.o: ../sys/unix/unixmain.c $(HACK_H) $(INCL)/dlb.h + $(CC) $(cflags) -o$@ ../sys/unix/unixmain.c +$(O)unixunix.o: ../sys/unix/unixunix.c $(HACK_H) + $(CC) $(cflags) -o$@ ../sys/unix/unixunix.c +$(O)unixres.o: ../sys/unix/unixres.c $(CONFIG_H) + $(CC) $(cflags) -o$@ ../sys/unix/unixres.c +$(O)bemain.o: ../sys/be/bemain.c $(HACK_H) $(INCL)/dlb.h + $(CC) $(cflags) -o$@ ../sys/be/bemain.c +$(O)getline.o: ../win/tty/getline.c $(HACK_H) $(INCL)/func_tab.h + $(CC) $(cflags) -o$@ ../win/tty/getline.c +$(O)termcap.o: ../win/tty/termcap.c $(HACK_H) $(INCL)/tcap.h + $(CC) $(cflags) -o$@ ../win/tty/termcap.c +$(O)topl.o: ../win/tty/topl.c $(HACK_H) $(INCL)/tcap.h + $(CC) $(cflags) -o$@ ../win/tty/topl.c +$(O)wintty.o: ../win/tty/wintty.c $(HACK_H) $(INCL)/dlb.h \ + $(PATCHLEV_H) $(INCL)/tcap.h + $(CC) $(cflags) -o$@ ../win/tty/wintty.c +$(O)Window.o: ../win/X11/Window.c $(INCL)/xwindowp.h $(INCL)/xwindow.h \ + $(CONFIG_H) + $(CC) $(cflags) -o$@ ../win/X11/Window.c +$(O)dialogs.o: ../win/X11/dialogs.c $(CONFIG_H) + $(CC) $(cflags) -o$@ ../win/X11/dialogs.c +$(O)winX.o: ../win/X11/winX.c $(HACK_H) $(INCL)/winX.h $(INCL)/dlb.h \ + $(PATCHLEV_H) ../win/X11/nh72icon \ + ../win/X11/nh56icon ../win/X11/nh32icon + $(CC) $(cflags) -o$@ ../win/X11/winX.c +$(O)winmap.o: ../win/X11/winmap.c $(INCL)/xwindow.h $(HACK_H) $(INCL)/dlb.h \ + $(INCL)/winX.h $(INCL)/tile2x11.h + $(CC) $(cflags) -o$@ ../win/X11/winmap.c +$(O)winmenu.o: ../win/X11/winmenu.c $(HACK_H) $(INCL)/winX.h + $(CC) $(cflags) -o$@ ../win/X11/winmenu.c +$(O)winmesg.o: ../win/X11/winmesg.c $(INCL)/xwindow.h $(HACK_H) $(INCL)/winX.h + $(CC) $(cflags) -o$@ ../win/X11/winmesg.c +$(O)winmisc.o: ../win/X11/winmisc.c $(HACK_H) $(INCL)/func_tab.h \ + $(INCL)/winX.h + $(CC) $(cflags) -o$@ ../win/X11/winmisc.c +$(O)winstat.o: ../win/X11/winstat.c $(HACK_H) $(INCL)/winX.h + $(CC) $(cflags) -o$@ ../win/X11/winstat.c +$(O)wintext.o: ../win/X11/wintext.c $(HACK_H) $(INCL)/winX.h $(INCL)/xwindow.h + $(CC) $(cflags) -o$@ ../win/X11/wintext.c +$(O)winval.o: ../win/X11/winval.c $(HACK_H) $(INCL)/winX.h + $(CC) $(cflags) -o$@ ../win/X11/winval.c +$(O)tile.o: tile.c $(HACK_H) +$(O)gnaskstr.o: ../win/gnome/gnaskstr.c ../win/gnome/gnaskstr.h \ + ../win/gnome/gnmain.h + $(CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnaskstr.c +$(O)gnbind.o: ../win/gnome/gnbind.c ../win/gnome/gnbind.h ../win/gnome/gnmain.h \ + ../win/gnome/gnaskstr.h ../win/gnome/gnyesno.h + $(CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnbind.c +$(O)gnglyph.o: ../win/gnome/gnglyph.c ../win/gnome/gnglyph.h $(INCL)/tile2x11.h + $(CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnglyph.c +$(O)gnmain.o: ../win/gnome/gnmain.c ../win/gnome/gnmain.h ../win/gnome/gnsignal.h \ + ../win/gnome/gnbind.h ../win/gnome/gnopts.h $(HACK_H) \ + $(INCL)/date.h + $(CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnmain.c +$(O)gnmap.o: ../win/gnome/gnmap.c ../win/gnome/gnmap.h ../win/gnome/gnglyph.h \ + ../win/gnome/gnsignal.h $(HACK_H) + $(CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnmap.c +$(O)gnmenu.o: ../win/gnome/gnmenu.c ../win/gnome/gnmenu.h ../win/gnome/gnmain.h \ + ../win/gnome/gnbind.h + $(CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnmenu.c +$(O)gnmesg.o: ../win/gnome/gnmesg.c ../win/gnome/gnmesg.h ../win/gnome/gnsignal.h + $(CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnmesg.c +$(O)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) -o$@ ../win/gnome/gnopts.c +$(O)gnplayer.o: ../win/gnome/gnplayer.c ../win/gnome/gnplayer.h \ + ../win/gnome/gnmain.h $(HACK_H) + $(CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnplayer.c +$(O)gnsignal.o: ../win/gnome/gnsignal.c ../win/gnome/gnsignal.h \ + ../win/gnome/gnmain.h + $(CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnsignal.c +$(O)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) -o$@ ../win/gnome/gnstatus.c +$(O)gntext.o: ../win/gnome/gntext.c ../win/gnome/gntext.h ../win/gnome/gnmain.h \ + ../win/gnome/gn_rip.h + $(CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gntext.c +$(O)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) -o$@ ../win/gnome/gnworn.c +$(O)gnyesno.o: ../win/gnome/gnyesno.c ../win/gnome/gnbind.h ../win/gnome/gnyesno.h + $(CC) $(cflags) $(GNOMEINC) -o$@ ../win/gnome/gnyesno.c +$(O)wingem.o: ../win/gem/wingem.c $(HACK_H) $(INCL)/func_tab.h $(INCL)/dlb.h \ + $(PATCHLEV_H) $(INCL)/wingem.h + $(CC) $(cflags) -o$@ ../win/gem/wingem.c +$(O)wingem1.o: ../win/gem/wingem1.c $(INCL)/gem_rsc.h $(INCL)/load_img.h \ + $(INCL)/gr_rect.h $(INCL)/wintype.h $(INCL)/wingem.h + $(CC) $(cflags) -o$@ ../win/gem/wingem1.c +$(O)load_img.o: ../win/gem/load_img.c $(INCL)/load_img.h + $(CC) $(cflags) -o$@ ../win/gem/load_img.c +$(O)gr_rect.o: ../win/gem/gr_rect.c $(INCL)/gr_rect.h + $(CC) $(cflags) -o$@ ../win/gem/gr_rect.c +$(O)tile.o: tile.c $(HACK_H) +$(O)qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) $(INCL)/func_tab.h \ + $(INCL)/dlb.h $(PATCHLEV_H) $(INCL)/tile2x11.h \ + $(INCL)/qt_win.h $(INCL)/qt_clust.h $(INCL)/qt_kde0.h \ + $(INCL)/qt_xpms.h qt_win.moc qt_kde0.moc qttableview.moc + $(CXX) $(CXXFLAGS) -o$@ ../win/Qt/qt_win.cpp +$(O)qt_clust.o: ../win/Qt/qt_clust.cpp $(INCL)/qt_clust.h + $(CXX) $(CXXFLAGS) -o$@ ../win/Qt/qt_clust.cpp +$(O)qttableview.o: ../win/Qt/qttableview.cpp $(INCL)/qttableview.h + $(CXX) $(CXXFLAGS) -o$@ ../win/Qt/qttableview.cpp +$(O)monstr.o: monstr.c $(CONFIG_H) +$(O)vis_tab.o: vis_tab.c $(CONFIG_H) $(INCL)/vis_tab.h +$(O)allmain.o: allmain.c $(HACK_H) +$(O)alloc.o: alloc.c $(CONFIG_H) +$(O)apply.o: apply.c $(HACK_H) $(INCL)/edog.h +$(O)artifact.o: artifact.c $(HACK_H) $(INCL)/artifact.h $(INCL)/artilist.h +$(O)attrib.o: attrib.c $(HACK_H) +$(O)ball.o: ball.c $(HACK_H) +$(O)bones.o: bones.c $(HACK_H) $(INCL)/lev.h +$(O)botl.o: botl.c $(HACK_H) +$(O)cmd.o: cmd.c $(HACK_H) $(INCL)/func_tab.h +$(O)dbridge.o: dbridge.c $(HACK_H) +$(O)decl.o: decl.c $(HACK_H) +$(O)detect.o: detect.c $(HACK_H) $(INCL)/artifact.h +$(O)dig.o: dig.c $(HACK_H) $(INCL)/edog.h +$(O)display.o: display.c $(HACK_H) +$(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)/dlb.h + $(CC) $(cflags) -I../sys/msdos -o$@ dlb.c +$(O)do.o: do.c $(HACK_H) $(INCL)/lev.h +$(O)do_name.o: do_name.c $(HACK_H) +$(O)do_wear.o: do_wear.c $(HACK_H) +$(O)dog.o: dog.c $(HACK_H) $(INCL)/edog.h +$(O)dogmove.o: dogmove.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/edog.h +$(O)dokick.o: dokick.c $(HACK_H) $(INCL)/eshk.h +$(O)dothrow.o: dothrow.c $(HACK_H) +$(O)drawing.o: drawing.c $(HACK_H) $(INCL)/tcap.h +$(O)dungeon.o: dungeon.c $(HACK_H) $(INCL)/dgn_file.h $(INCL)/dlb.h +$(O)eat.o: eat.c $(HACK_H) +$(O)end.o: end.c $(HACK_H) $(INCL)/eshk.h $(INCL)/dlb.h +$(O)engrave.o: engrave.c $(HACK_H) $(INCL)/lev.h +$(O)exper.o: exper.c $(HACK_H) +$(O)explode.o: explode.c $(HACK_H) +$(O)extralev.o: extralev.c $(HACK_H) +$(O)files.o: files.c $(HACK_H) $(INCL)/dlb.h +$(O)fountain.o: fountain.c $(HACK_H) +$(O)hack.o: hack.c $(HACK_H) +$(O)hacklib.o: hacklib.c $(HACK_H) +$(O)invent.o: invent.c $(HACK_H) +$(O)light.o: light.c $(HACK_H) $(INCL)/lev.h +$(O)lock.o: lock.c $(HACK_H) +$(O)mail.o: mail.c $(HACK_H) $(INCL)/mail.h +$(O)makemon.o: makemon.c $(HACK_H) $(INCL)/epri.h $(INCL)/emin.h \ + $(INCL)/edog.h +$(O)mapglyph.o: mapglyph.c $(HACK_H) +$(O)mcastu.o: mcastu.c $(HACK_H) +$(O)mhitm.o: mhitm.c $(HACK_H) $(INCL)/artifact.h $(INCL)/edog.h +$(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)/artifact.h $(INCL)/edog.h +$(O)minion.o: minion.c $(HACK_H) $(INCL)/emin.h $(INCL)/epri.h +$(O)mklev.o: mklev.c $(HACK_H) +$(O)mkmap.o: mkmap.c $(HACK_H) $(INCL)/sp_lev.h +$(O)mkmaze.o: mkmaze.c $(HACK_H) $(INCL)/sp_lev.h $(INCL)/lev.h +$(O)mkobj.o: mkobj.c $(HACK_H) +$(O)mkroom.o: mkroom.c $(HACK_H) +$(O)mon.o: mon.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/edog.h +$(O)mondata.o: mondata.c $(HACK_H) $(INCL)/eshk.h $(INCL)/epri.h +$(O)monmove.o: monmove.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/artifact.h \ + $(INCL)/epri.h +$(O)monst.o: monst.c $(CONFIG_H) $(INCL)/permonst.h $(INCL)/align.h \ + $(INCL)/monattk.h $(INCL)/monflag.h $(INCL)/monsym.h \ + $(INCL)/dungeon.h $(INCL)/eshk.h $(INCL)/vault.h \ + $(INCL)/epri.h $(INCL)/color.h +$(O)mplayer.o: mplayer.c $(HACK_H) +$(O)mthrowu.o: mthrowu.c $(HACK_H) +$(O)muse.o: muse.c $(HACK_H) $(INCL)/edog.h +$(O)music.o: music.c $(HACK_H) #interp.c +$(O)o_init.o: o_init.c $(HACK_H) $(INCL)/lev.h +$(O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \ + $(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h +$(O)objnam.o: objnam.c $(HACK_H) +$(O)options.o: options.c $(CONFIG_H) $(INCL)/objclass.h $(INCL)/flag.h \ + $(HACK_H) $(INCL)/tcap.h +$(O)pager.o: pager.c $(HACK_H) $(INCL)/dlb.h +$(O)pickup.o: pickup.c $(HACK_H) +$(O)pline.o: pline.c $(HACK_H) $(INCL)/epri.h $(INCL)/edog.h +$(O)polyself.o: polyself.c $(HACK_H) +$(O)potion.o: potion.c $(HACK_H) +$(O)pray.o: pray.c $(HACK_H) $(INCL)/epri.h +$(O)priest.o: priest.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/eshk.h \ + $(INCL)/epri.h $(INCL)/emin.h +$(O)quest.o: quest.c $(HACK_H) $(INCL)/qtext.h +$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h $(INCL)/qtext.h +$(O)read.o: read.c $(HACK_H) +$(O)rect.o: rect.c $(HACK_H) +$(O)region.o: region.c $(HACK_H) $(INCL)/lev.h +$(O)restore.o: restore.c $(HACK_H) $(INCL)/lev.h $(INCL)/tcap.h +$(O)rip.o: rip.c $(HACK_H) +$(O)rnd.o: rnd.c $(HACK_H) +$(O)role.o: role.c $(HACK_H) +$(O)rumors.o: rumors.c $(HACK_H) $(INCL)/lev.h $(INCL)/dlb.h +$(O)save.o: save.c $(HACK_H) $(INCL)/lev.h +$(O)shk.o: shk.c $(HACK_H) $(INCL)/eshk.h +$(O)shknam.o: shknam.c $(HACK_H) $(INCL)/eshk.h +$(O)sit.o: sit.c $(HACK_H) $(INCL)/artifact.h +$(O)sounds.o: sounds.c $(HACK_H) $(INCL)/edog.h +$(O)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)/dlb.h $(INCL)/sp_lev.h +$(O)spell.o: spell.c $(HACK_H) +$(O)steal.o: steal.c $(HACK_H) +$(O)steed.o: steed.c $(HACK_H) +$(O)teleport.o: teleport.c $(HACK_H) +$(O)timeout.o: timeout.c $(HACK_H) $(INCL)/lev.h +$(O)topten.o: topten.c $(HACK_H) $(INCL)/dlb.h $(PATCHLEV_H) +$(O)track.o: track.c $(HACK_H) +$(O)trap.o: trap.c $(HACK_H) +$(O)u_init.o: u_init.c $(HACK_H) +$(O)uhitm.o: uhitm.c $(HACK_H) +$(O)vault.o: vault.c $(HACK_H) $(INCL)/vault.h +$(O)version.o: version.c $(HACK_H) $(INCL)/date.h $(PATCHLEV_H) +$(O)vision.o: vision.c $(HACK_H) $(INCL)/vis_tab.h +$(O)weapon.o: weapon.c $(HACK_H) +$(O)were.o: were.c $(HACK_H) +$(O)wield.o: wield.c $(HACK_H) +$(O)windows.o: windows.c $(HACK_H) $(INCL)/wingem.h $(INCL)/winGnome.h +$(O)wizard.o: wizard.c $(HACK_H) $(INCL)/qtext.h $(INCL)/epri.h +$(O)worm.o: worm.c $(HACK_H) $(INCL)/lev.h +$(O)worn.o: worn.c $(HACK_H) +$(O)write.o: write.c $(HACK_H) +$(O)zap.o: zap.c $(HACK_H) # end of file + diff -Naurd ../nethack-3.4.0/sys/msdos/Makefile.MSC ./sys/msdos/Makefile.MSC --- ../nethack-3.4.0/sys/msdos/Makefile.MSC Wed Mar 20 23:43:39 2002 +++ ./sys/msdos/Makefile.MSC Mon Feb 24 15:25:05 2003 @@ -1,6 +1,6 @@ -# SCCS Id: @(#)Makefile.MSC 3.4 2002/03/17 +# SCCS Id: @(#)Makefile.MSC 3.4 2002/09/10 # Copyright (c) NetHack PC Development Team 1997 - 2002. -# PC NetHack 3.4 Makefile for MSC +# PC NetHack 3.3x Makefile for MSC V1.52c (16 bit compiler) # # For questions or comments: nethack-bugs@nethack.org # @@ -64,7 +64,7 @@ # # Uncomment this line if you want to include support for ALT-numeric # sequences, such as ALT-2 for toggling #twoweapon mode. -# Note that this code did not get a thorough testing prior to 3.4.0 +# Note that this code did not get a thorough testing prior to 3.4.x #NEWALT=/DNEW_ALT ############################################################################# diff -Naurd ../nethack-3.4.0/sys/msdos/Makefile.SC ./sys/msdos/Makefile.SC --- ../nethack-3.4.0/sys/msdos/Makefile.SC Wed Mar 20 23:43:39 2002 +++ ./sys/msdos/Makefile.SC Thu Jan 1 01:00:00 1970 @@ -1,931 +0,0 @@ -# SCCS Id : @(#)Makefile.SC 3.4 1996/10/14 -# Copyright (c) NetHack Development Team 1996. -# -# Symantec C compiler V7.2 -# Written for Symantec SMAKE utility -# -# NOTE: This Makefile has not been tested for NetHack 3.4.0 -# -# For questions or comments : nethack-bugs@linc.cis.upenn.edu -# -# In addition to your C compiler, -# -# if you want to change you will need a -# files with suffix workalike for -# .y yacc -# .l lex -# - -# Game Installation Variables -# NOTE : Make sure GAMEDIR exists before make is started. - -GAME = nethack -GAMEDIR = c:\games\nethacks - -# -# Directories, gnu utilities like unix style directory specs -# - -DUTIL = ../util - -# But we must use dos directory specs to find src files, so.... - -DAT = ..\dat -DOC = ..\doc -INCL = ..\include -MSYS = ..\sys\msdos -SRC = ..\src -SSHR = ..\sys\share -UTIL = ..\util -WIN = ..\win\tty -WSHR = ..\win\share - -# -# Executables. - -CC = sc -LINK = link -MAKEBIN = smake - -# if you have a uudecode program, add its name here -# otherwise leave blank -UUDECODE = - - -# -# Special libraries and how to link them in. - -LIBS = - -# To build a DOS-extended executable uncomment the top line. -# To build a WIN32 console executable uncomment the second line. - -TARGENV=DOS_EXTENDED -#TARGENV=WIN32_CONSOLE - -# -# Yacc/Lex ... if you got 'em. -# -# If you have yacc/lex or a work-alike set YACC_LEX to Y -# -YACC_LEX = N - -# If YACC_LEX is Y above, set the following to values appropriate for -# your tools. -# -YACC = bison -y -LEX = flex -YTABC = y_tab.c -YTABH = y_tab.h -LEXYYC = lexyy.c - -# -# Uncomment the line below if you want to store all the level files, -# help files, etc. in a single library file. - -USE_DLB = N - -############################################################################# -# -# nothing below this line should have to be changed -# - -GAMEFILE = $(GAMEDIR)\$(GAME).exe - -LIBRARIES = $(LIBS) $(TERMLIB) - -# Changing this conditional block is not recommended -!IF "$(USE_DLB)"=="Y" -DLBFLG = -DDLB -!ELSE -DLBFLG = -!ENDIF - -####################################### -!IF "$(TARGENV)"=="DOS_EXTENDED" - -# DOS Extended Executable -# Flags. -# -# Debugging -CFLAGS = -c -Nc -w- -w2 -w3 -mx -g -I../include $(DLBFLG) -LFLAGS = /NOI /XREF /DETAILED /DEBUG cx -# Normal -#CFLAGS = -c -Nc -w- -w2 -w3 -mx -I../include $(DLBFLG) -#LFLAGS = /NOI /MAP cx - -!ELSE - -# WIN32 Console Executable -# Flags. -# -# Debugging -#CFLAGS = -c -o -Nc -w- -w2 -w3 -mx -g -gt -I../include $(DLBFLG) -#LFLAGS = /NOI /XREF /DETAILED /DEBUG cx - -# Normal -CFLAGS = -c -o -Nc -w- -w2 -w3 -mx -gt -I../include $(DLBFLG) -LFLAGS = /NOI /MAP cx -!ENDIF - -# -# Utility Objects. -# - -MAKEOBJS = makedefs.o monst.o objects.o - -SPLEVOBJS = lev_yacc.o lev_$(LEX).o lev_main.o alloc.o \ - monst.o objects.o panic.o \ - drawing.o decl.o - -DGNCOMPOBJS = dgn_yacc.o dgn_$(LEX).o dgn_main.o alloc.o \ - panic.o - -RECOVOBJS = recover.o - -# Tile related object files. - -TILOBJ = tile.o pctiles.o vidvga.o - -TEXTIO = tiletext.o tiletxt.o drawing.o decl.o monst.o objects.o - -TEXTIO2 = tiletex2.o tiletxt2.o drawing.o decl.o monst.o objects.o - -PLANAR_TIB = NetHack1.tib - -OVERVIEW_TIB = NetHacko.tib - -#TILEUTIL = $(TILOBJ) $(UTIL)\tile2bin.exe $(UTIL)\til2bin2.exe \ -# $(PLANAR_TIB) $(OVERVIEW_TIB) - -TILEUTIL = - -TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt - -TILEFILES2 = $(WSHR)\monthin.txt $(WSHR)\objthin.txt $(WSHR)\oththin.txt - -GIFREADERS = gifread.o alloc.o panic.o - -GIFREAD2 = gifread2.o alloc.o panic.o - -GIFWRITERS = gifwrite.o alloc.o panic.o - -GIFWRIT2 = gifwrit2.o alloc.o panic.o - -DLBOBJ = dlb.o - -# Object files for the game itself. - -VOBJ01 = allmain.o alloc.o apply.o artifact.o attrib.o -VOBJ02 = ball.o bones.o botl.o cmd.o dbridge.o -VOBJ03 = decl.o detect.o display.o do.o do_name.o -VOBJ04 = do_wear.o dog.o dogmove.o dokick.o dothrow.o -VOBJ05 = drawing.o dungeon.o eat.o end.o engrave.o -VOBJ06 = exper.o explode.o extralev.o files.o fountain.o -VOBJ07 = getline.o hack.o hacklib.o invent.o lock.o -VOBJ08 = mail.o main.o makemon.o mcastu.o mhitm.o -VOBJ09 = mhitu.o minion.o mkmap.o mklev.o mkmaze.o -VOBJ10 = mkobj.o mkroom.o mon.o mondata.o monmove.o -VOBJ11 = monst.o monstr.o mplayer.o mthrowu.o muse.o -VOBJ12 = music.o o_init.o objects.o objnam.o options.o -VOBJ13 = pickup.o pline.o polyself.o potion.o quest.o -VOBJ14 = questpgr.o pager.o pray.o priest.o read.o -VOBJ15 = rect.o restore.o rip.o rnd.o role.o -VOBJ16 = rumors.o save.o shk.o shknam.o sit.o -VOBJ17 = sounds.o sp_lev.o spell.o steal.o steed.o -VOBJ18 = termcap.o timeout.o topl.o topten.o track.o -VOBJ19 = trap.o u_init.o uhitm.o vault.o vision.o -VOBJ20 = vis_tab.o weapon.o were.o wield.o windows.o -VOBJ21 = wintty.o wizard.o worm.o worn.o write.o -VOBJ22 = zap.o light.o dlb.o dig.o teleport.o -VOBJ23 = random.o - -SOBJ = msdos.o sound.o sys.o tty.o unix.o video.o \ - vidtxt.o pckeys.o - -VVOBJ = version.o - -VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ - $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \ - $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ - $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ - $(VOBJ21) $(VOBJ22) $(VOBJ23) - -#ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(VVOBJ) -ALLOBJ = $(VOBJ) $(SOBJ) $(VVOBJ) - -# -# Header Objects. -# - -DGN_FILE_H = $(INCL)\align.h $(INCL)\dgn_file.h -DUNGEON_H = $(INCL)\align.h $(INCL)\dungeon.h -EMIN_H = $(DUNGEON_H) $(INCL)\emin.h -EPRI_H = $(DUNGEON_H) $(INCL)\align.h $(INCL)\epri.h -ESHK_H = $(DUNGEON_H) $(INCL)\eshk.h -MONDATA_H = $(INCL)\align.h $(INCL)\mondata.h -MONST_H = $(INCL)\align.h $(INCL)\monst.h -PERMONST_H = $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\align.h \ - $(INCL)\permonst.h -RM_H = $(INCL)\align.h $(INCL)\rm.h -SP_LEV_H = $(INCL)\align.h $(INCL)\sp_lev.h -VAULT_H = $(DUNGEON_H) $(INCL)\vault.h -YOUPROP_H = $(PERMONST_H) $(MONDATA_H) $(INCL)\prop.h \ - $(INCL)\pm.h $(INCL)\youprop.h -YOU_H = $(MONST_H) $(YOUPROP_H) $(INCL)\align.h \ - $(INCL)\attrib.h $(INCL)\you.h -DISPLAY_H = $(MONDATA_H) $(INCL)\vision.h $(INCL)\display.h -PCCONF_H = $(INCL)\micro.h $(INCL)\system.h $(INCL)\pcconf.h -CONFIG_H = $(GLOBAL_H) $(INCL)\tradstdc.h $(INCL)\config1.h \ - $(INCL)\config.h -DECL_H = $(YOU_H) $(INCL)\spell.h $(INCL)\color.h \ - $(INCL)\obj.h $(INCL)\onames.h $(INCL)\pm.h \ - $(INCL)\decl.h -GLOBAL_H = $(PCCONF_H) $(INCL)\coord.h $(INCL)\global.h -HACK_H = $(CONFIG_H) $(DUNGEON_H) $(DECL_H) \ - $(DISPLAY_H) $(INCL)\monsym.h $(INCL)\mkroom.h \ - $(INCL)\objclass.h $(INCL)\trap.h $(INCL)\flag.h \ - $(RM_H) $(INCL)\vision.h $(INCL)\wintype.h \ - $(INCL)\engrave.h $(INCL)\rect.h \ - $(INCL)\trampoli.h $(INCL)\hack.h -DLB_H = $(INCL)\dlb.h -TILE_H = $(INCL)\tile.h $(INCL)\pctiles.h - -!IF "$(USE_DLB)"=="Y" -DLB = dlb -DLBOBJS = dlb_main.o dlb.o alloc.o panic.o -!ELSE -DLB = -DLBOBJS = -!ENDIF - -# -# Make Rules. -# - -.SUFFIXES : .exe .o .c .y .l - -.c.o : - $(CC) $(CFLAGS) -o$@ $< - -# -# Primary Targets. -# - -# The default target. - -default : $(GAMEFILE) - -all : install.tag - -util : utility.tag - -install : install.tag - -utility.tag : $(INCL)\date.h $(INCL)\trap.h $(INCL)\onames.h \ - $(INCL)\pm.h monstr.c vis_tab.c \ - $(UTIL)\lev_comp.exe $(UTIL)\dgn_comp.exe \ - $(UTIL)\recover.exe $(TILEUTIL) - echo utilities made > utility.tag - -gifutil : $(UTIL)\gif2txt.exe $(UTIL)\txt2gif.exe - echo Optional GIF development utilities are up to date. - -install.tag : dat.tag $(GAMEFILE) -!IF "$(USE_DLB)"=="Y" - copy $(DAT)\nhdat $(GAMEDIR) - copy $(DAT)\license $(GAMEDIR) -!ELSE - copy $(DAT)\*. $(GAMEDIR) - copy $(DAT)\*.dat $(GAMEDIR) - copy $(DAT)\*.lev $(GAMEDIR) - copy $(MSYS)\msdoshlp.txt $(GAMEDIR) - if exist $(GAMEDIR)\makefile. del $(GAMEDIR)\makefile. -!ENDIF - copy $(SSHR)\termcap $(GAMEDIR) - copy *.tib $(GAMEDIR) - copy $(SSHR)\NetHack.cnf $(GAMEDIR)\defaults.nh - copy $(UTIL)\recover.exe $(GAMEDIR) - copy $(DOC)\guideb*.txt $(GAMEDIR) - echo install done > install.tag - -# The main target. - -$(GAMEFILE) : utility.tag $(ALLOBJ) - $(LINK) /STACK:100000 $(LFLAGS) @<<$(GAME).lnk - $(ALLOBJ:^ =+^ - ) - $(GAMEFILE) - $(GAME); -<thintile.tag - -tile2bin.o : $(HACK_H) $(INCL)\tile.h $(INCL)\pctiles.h $(INCL)\pcvideo.h \ - $(MSYS)\tile2bin.c - $(CC) $(CFLAGS) -o$@ $(MSYS)\tile2bin.c - -til2bin2.o : $(HACK_H) $(INCL)\tile.h $(INCL)\pctiles.h $(INCL)\pcvideo.h \ - $(MSYS)\tile2bin.c - $(CC) $(CFLAGS) -DTILE_X=8 -DOVERVIEW_FILE -o$@ $(MSYS)\tile2bin.c - -tiletext.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\tiletext.c - $(CC) $(CFLAGS) -o$@ $(WSHR)\tiletext.c - -tiletex2.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\tiletext.c - $(CC) $(CFLAGS) -DTILE_X=8 -o$@ $(WSHR)\tiletext.c - -tiletxt.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\tilemap.c - $(CC) $(CFLAGS) -DTILETEXT -o$@ $(WSHR)\tilemap.c - -tiletxt2.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\tilemap.c - $(CC) $(CFLAGS) -DTILETEXT -DTILE_X=8 -o$@ $(WSHR)\tilemap.c -# -# Optional GIF Utilities (for development) -# - -$(UTIL)\gif2txt.exe : $(GIFREADERS) $(TEXTIO) - $(LINK) $(LFLAGS) $(GIFREADERS) $(TEXTIO) - -$(UTIL)\gif2txt2.exe : $(GIFREAD2) $(TEXTIO2) - $(LINK) $(LFLAGS) $(GIFREAD2) $(TEXTIO2) - -$(UTIL)\txt2gif.exe : $(GIFWRITERS) $(TEXTIO) - $(LINK) $(LFLAGS) $(GIFWRITERS) $(TEXTIO) - -$(UTIL)\txt2gif2.exe : $(GIFWRIT2) $(TEXTIO2) - $(LINK) $(LFLAGS) $(GIFWRIT2) $(TEXTIO2) - -gifread.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\gifread.c - $(CC) $(CFLAGS) -o$@ $(WSHR)\gifread.c - -gifread2.o : $(CONFIG_H) $(INCL)\tile.h gifread.c - $(CC) $(CFLAGS) -DTILE_X=8 -o$@ $(WSHR)\gifread.c - -gifwrite.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\gifwrite.c - $(CC) $(CFLAGS) -o$@ $(WSHR)\gifwrite.c - -gifwrit2.o : $(CONFIG_H) $(INCL)\tile.h $(WSHR)\gifwrite.c - $(CC) $(CFLAGS) -DTILE_X=8 -o$@ $(WSHR)\gifwrite.c - -# -# Optional tile viewer (development sources only) -# - -$(UTIL)\viewtib.exe : viewtib.o - $(LINK) $(LFLAGS) viewtib.o,$@ - -viewtib.o : $(MSYS)\viewtib.c - $(CC) $(CFLAGS) -o$@ $(MSYS)\viewtib.c - -# -# Other Util Dependencies. -# - -alloc.o : $(CONFIG_H) alloc.c - $(CC) $(CFLAGS) -o$@ alloc.c - -drawing.o : $(CONFIG_H) drawing.c - $(CC) $(CFLAGS) -o$@ drawing.c - -decl.o : $(CONFIG_H) decl.c - $(CC) $(CFLAGS) -o$@ decl.c - -monst.o : $(CONFIG_H) $(PERMONST_H) $(ESHK_H) \ - $(EPRI_H) $(VAULT_H) $(INCL)\monsym.h \ - $(INCL)\color.h monst.c - $(CC) $(CFLAGS) -o$@ monst.c - -objects.o : $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ - $(INCL)\prop.h $(INCL)\color.h objects.c - $(CC) $(CFLAGS) -o$@ objects.c - -panic.o : $(CONFIG_H) $(UTIL)\panic.c - $(CC) $(CFLAGS) -o$@ $(UTIL)\panic.c - - - - -# -# make data.base an 8.3 filename to prevent an nmake warning -# - -DATABASE = $(DAT)\data.bas - - -dat.tag : $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ - $(DAT)\oracles $(DAT)\quest.dat sp_lev.tag $(DLB) - @echo dat done >dat.tag - -$(DAT)\data : utility.tag $(DATABASE) - $(UTIL)\makedefs -d - -$(DAT)\rumors : utility.tag $(DAT)\rumors.tru $(DAT)\rumors.fal - $(UTIL)\makedefs -r - -$(DAT)\quest.dat : utility.tag $(DAT)\quest.txt - $(UTIL)\makedefs -q - -$(DAT)\oracles : utility.tag $(DAT)\oracles.txt - $(UTIL)\makedefs -h - -sp_lev.tag : utility.tag $(DAT)\bigroom.des $(DAT)\castle.des \ - $(DAT)\endgame.des $(DAT)\gehennom.des $(DAT)\knox.des \ - $(DAT)\medusa.des $(DAT)\oracle.des $(DAT)\tower.des \ - $(DAT)\yendor.des $(DAT)\arch.des $(DAT)\barb.des \ - $(DAT)\caveman.des $(DAT)\healer.des $(DAT)\knight.des \ - $(DAT)\monk.des $(DAT)\priest.des $(DAT)\ranger.des \ - $(DAT)\rogue.des $(DAT)\samurai.des $(DAT)\tourist.des \ - $(DAT)\valkyrie.des $(DAT)\wizard.des - cd $(DAT) - $(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 mines.des - $(UTIL)\lev_comp medusa.des - $(UTIL)\lev_comp oracle.des - $(UTIL)\lev_comp sokoban.des - $(UTIL)\lev_comp tower.des - $(UTIL)\lev_comp yendor.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 - cd $(SRC) - echo sp_levs done > sp_lev.tag - -$(DAT)\dungeon : utility.tag $(DAT)\dungeon.def - $(UTIL)\makedefs -e - cd $(DAT) - $(UTIL)\dgn_comp dungeon.pdf - cd $(SRC) -# -# DLB stuff -# -dlb : $(UTIL)\dlb_main.exe - cd $(DAT) - copy $(MSYS)\msdoshlp.txt . - @echo data >dlb.lst - @echo dungeon >>dlb.lst - @echo oracles >>dlb.lst - @echo options >>dlb.lst - @echo quest.dat >>dlb.lst - @echo rumors >>dlb.lst - @echo help >>dlb.lst - @echo hh >>dlb.lst - @echo cmdhelp >>dlb.lst - @echo history >>dlb.lst - @echo opthelp >>dlb.lst - @echo wizhelp >>dlb.lst - @echo license >>dlb.lst - @echo msdoshlp.txt >>dlb.lst - for %%N in (*.lev) do echo %%N >>dlb.lst - $(UTIL)\dlb_main cvIf dlb.lst nhdat - cd $(SRC) - -$(UTIL)\dlb_main.exe : $(DLBOBJS) - $(LINK) /STACK:65000 $(LFLAGS) $(DLBOBJS),$@ - -dlb_main.o : $(UTIL)\dlb_main.c $(INCL)\config.h $(DLB_H) - $(CC) $(CFLAGS) -odlb_main.o $(UTIL)\dlb_main.c - -# Game Dependencies -# Some files require movement as Gnu make doesn't like unix style '/' -# directory specs and djgcc doesn't like dos style directory specs. -# So we get to copy stuff where we might need it. Fun eh? - -# sys/share -main.o : $(HACK_H) $(DLB_H) $(SSHR)\pcmain.c - $(CC) $(CFLAGS) -o$@ $(SSHR)\pcmain.c - -tty.o : $(HACK_H) $(INCL)\wintty.h $(SSHR)\pctty.c - $(CC) $(CFLAGS) -o$@ $(SSHR)\pctty.c - -unix.o : $(HACK_H) $(SSHR)\pcunix.c - $(CC) $(CFLAGS) -o$@ $(SSHR)\pcunix.c - -sys.o : $(HACK_H) $(SSHR)\pcsys.c - $(CC) $(CFLAGS) -o$@ $(SSHR)\pcsys.c - -random.o : $(HACK_H) $(SSHR)\random.c - $(CC) $(CFLAGS) -o$@ $(SSHR)\random.c - -# sys/msdos -msdos.o : $(HACK_H) $(MSYS)\msdos.c - $(CC) $(CFLAGS) -o$@ $(MSYS)\msdos.c - -pckeys.o : $(HACK_H) $(MSYS)\pckeys.c - $(CC) $(CFLAGS) -o$@ $(MSYS)\pckeys.c - -pctiles.o : $(HACK_H) $(MSYS)\pctiles.c $(INCL)\portio.h - $(CC) $(CFLAGS) -o$@ $(MSYS)\pctiles.c - -sound.o : $(HACK_H) $(MSYS)\sound.c $(INCL)\portio.h - $(CC) $(CFLAGS) -o$@ $(MSYS)\sound.c - -video.o : $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h $(MSYS)\video.c - $(CC) $(CFLAGS) -o$@ $(MSYS)\video.c - -vidvga.o : $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h $(TILE_H) \ - $(MSYS)\vidvga.c - $(CC) $(CFLAGS) -e -o$@ $(MSYS)\vidvga.c - -vidtxt.o : $(HACK_H) $(INCL)\pcvideo.h $(INCL)\portio.h $(TILE_H) \ - $(MSYS)\vidtxt.c - $(CC) $(CFLAGS) -o$@ $(MSYS)\vidtxt.c - - - -# win/tty -getline.o : $(HACK_H) $(INCL)\wintty.h $(WIN)\getline.c - $(CC) $(CFLAGS) -o$@ $(WIN)\getline.c - -termcap.o : $(CONFIG_H) $(WIN)\termcap.c - $(CC) $(CFLAGS) -o$@ $(WIN)\termcap.c - -topl.o : $(CONFIG_H) $(WIN)\topl.c - $(CC) $(CFLAGS) -o$@ $(WIN)\topl.c - -wintty.o : $(CONFIG_H) $(WIN)\wintty.c - $(CC) $(CFLAGS) -o$@ $(WIN)\wintty.c - -# src dependencies -allmain.o : $(HACK_H) -alloc.o : $(CONFIG_H) -apply.o : $(HACK_H) $(INCL)\edog.h -artifact.o : $(HACK_H) $(INCL)\artifact.h $(INCL)\artilist.h -attrib.o : $(HACK_H) $(INCL)\artifact.h -ball.o : $(HACK_H) -bones.o : $(HACK_H) $(INCL)\lev.h -botl.o : $(HACK_H) -cmd.o : $(HACK_H) $(INCL)\func_tab.h -dbridge.o : $(HACK_H) -decl.o : $(HACK_H) $(INCL)\quest.h -detect.o : $(HACK_H) $(INCL)\artifact.h -dig.o : $(HACK_H) -display.o : $(HACK_H) -dlb.o : $(HACK_H) $(DLB_H) -do.o : $(HACK_H) $(INCL)\lev.h -do_name.o : $(HACK_H) -do_wear.o : $(HACK_H) -dog.o : $(HACK_H) $(INCL)\edog.h -dogmove.o : $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h -dokick.o : $(HACK_H) $(ESHK_H) -dothrow.o : $(HACK_H) -drawing.o : $(HACK_H) $(INCL)\tcap.h -dungeon.o : $(HACK_H) $(INCL)\dgn_file.h -eat.o : $(HACK_H) -end.o : $(HACK_H) $(ESHK_H) -engrave.o : $(HACK_H) $(INCL)\lev.h -exper.o : $(HACK_H) -explode.o : $(HACK_H) -extralev.o : $(HACK_H) -files.o : $(HACK_H) -fountain.o : $(HACK_H) -hack.o : $(HACK_H) -hacklib.o : $(HACK_H) -invent.o : $(HACK_H) $(INCL)\artifact.h -light.o : $(HACK_H) $(INCL)\lev.h -lock.o : $(HACK_H) -mail.o : $(HACK_H) $(INCL)\mail.h -makemon.o : $(HACK_H) $(EPRI_H) $(EMIN_H) -mcastu.o : $(HACK_H) -mhitm.o : $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h -mhitu.o : $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h -minion.o : $(HACK_H) $(EMIN_H) $(EPRI_H) -mklev.o : $(HACK_H) -mkmap.o : $(HACK_H) $(INCL)\sp_lev.h -mkmaze.o : $(HACK_H) $(INCL)\sp_lev.h -mkobj.o : $(HACK_H) $(INCL)\artifact.h $(INCL)\prop.h -mkroom.o : $(HACK_H) -mon.o : $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h -mondata.o : $(HACK_H) $(ESHK_H) $(EPRI_H) -monmove.o : $(HACK_H) $(INCL)\mfndpos.h $(INCL)\artifact.h -monst.o : $(CONFIG_H) $(PERM_H) $(ESHK_H) $(EPRI_H) \ - $(INCL)\color.h $(INCL)\monsym.h $(INCL)\vault.h -mplayer.o : $(HACK_H) -mthrowu.o : $(HACK_H) -muse.o : $(HACK_H) -music.o : $(HACK_H) -o_init.o : $(HACK_H) -objects.o : $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ - $(INCL)\prop.h $(INCL)\color.h -objnam.o : $(HACK_H) -options.o : $(CONFIG_H) $(HACK_H) $(INCL)\objclass.h $(INCL)\flag.h \ - $(INCL)\tcap.h -pager.o : $(HACK_H) -pickup.o : $(HACK_H) -pline.o : $(HACK_H) $(EPRI_H) -polyself.o : $(HACK_H) -potion.o : $(HACK_H) -pray.o : $(HACK_H) $(EPRI_H) -priest.o : $(HACK_H) $(INCL)\mfndpos.h $(ESHK_H) $(EPRI_H) $(EMIN_H) -quest.o : $(HACK_H) $(INCL)\quest.h $(INCL)\qtext.h -questpgr.o : $(HACK_H) $(INCL)\qtext.h -read.o : $(HACK_H) -region.o : $(HACK_H) -rect.o : $(HACK_H) -restore.o : $(HACK_H) $(INCL)\lev.h $(INCL)\tcap.h $(INCL)\quest.h -rip.o : $(HACK_H) -rnd.o : $(HACK_H) -role.o : $(HACK_H) -rumors.o : $(HACK_H) -save.o : $(HACK_H) $(INCL)\lev.h $(INCL)\quest.h -shk.o : $(HACK_H) $(ESHK_H) -shknam.o : $(HACK_H) $(ESHK_H) -sit.o : $(HACK_H) $(INCL)\artifact.h -sounds.o : $(HACK_H) $(INCL)\edog.h -sp_lev.o : $(HACK_H) $(INCL)\sp_lev.h $(INCL)\align.h $(INCL)\rect.h -spell.o : $(HACK_H) -steal.o : $(HACK_H) -steed.o : $(HACK_H) -teleport.o : $(HACK_H) -timeout.o : $(HACK_H) -topten.o : $(HACK_H) -track.o : $(HACK_H) -trap.o : $(HACK_H) -u_init.o : $(HACK_H) -uhitm.o : $(HACK_H) -vault.o : $(HACK_H) $(INCL)\vault.h -version.o : $(HACK_H) $(INCL)\patchlev.h -vision.o : $(HACK_H) $(INCL)\vis_tab.h -weapon.o : $(HACK_H) -were.o : $(HACK_H) -wield.o : $(HACK_H) -windows.o : $(HACK_H) $(INCL)\wintty.h -wizard.o : $(HACK_H) $(INCL)\qtext.h -worm.o : $(HACK_H) $(INCL)\lev.h -worn.o : $(HACK_H) -write.o : $(HACK_H) -zap.o : $(HACK_H) - -# end of file diff -Naurd ../nethack-3.4.0/sys/msdos/prebuild.mak ./sys/msdos/prebuild.mak --- ../nethack-3.4.0/sys/msdos/prebuild.mak Wed Mar 20 23:43:41 2002 +++ ./sys/msdos/prebuild.mak Thu Jan 1 01:00:00 1970 @@ -1,67 +0,0 @@ -# SCCS Id: @(#)prebuild.mak 3.4 1997/09/28 -# -# Makefile for building the genschem utility, the .def files and -# the Makefiles for distribution. -# - -NHINCL =..\..\include - -! IF "$(MAKE)"=="NMAKE" -CC =cl -MODEL =L -CEXENAM =/Fe # name the .EXE file -CFLAGS =/A$(MODEL) /Zp1 /nologo /F 1400 /D__STDC__ /I$(NHINCL) -! ELSE # Assume Borland -CC =bcc # TARGSTRING -MODEL =h -BCTOP =c:\borlandc # main Borland C directory -BCINCL =$(BCTOP)\include # include directory for main BC headers -CEXENAM =-e # name the .EXE file -CFLAGS =-I$(BCINCL) -I$(NHINCL) -m$(MODEL) -DSTRNCMPI -! ENDIF - -LEX = flex -#LEX = flex -Sc:\tools16\flex.ske -# LEX = lex - -# these are the names of the output files from LEX. Under MS-DOS -# and similar systems, they may differ -LEXYYC = lex.yy.c -#LEXYYC = lexyy.c - - -SCHEMAS = schema1.BC schema2.BC -MAKES = Makefile.BC - -all: $(SCHEMAS) - -genschem.exe: genschem.c - $(CC) $(CFLAGS) $(CEXENAM)$@ genschem.c - -genschem.c: genschem.l - $(LEX) $(FLEXSKEL) genschem.l - copy $(LEXYYC) $@ - @del $(LEXYYC) - -schema1.BC: genschem.exe schema1 - genschem /BC schema1 schema1.BC -schema2.BC: genschem.exe schema2 - genschem /BC schema2 schema2.BC -# -# NOTE: MSC no longer uses these overlay definitions -# since switching to the use of packaged functions -# -#schema1.MSC: genschem.exe schema1 -# genschem /MSC schema1 schema1.MSC -#schema2.MSC: genschem.exe schema2 -# genschem /MSC schema2 schema2.MSC -#schema3.MSC: genschem.exe schema3 -# genschem /MSC schema3 schema3.MSC - -def2mak.exe: def2mak.c - $(CC) $(CFLAGS) $(CEXENAM)$@ def2mak.c - -#Makefile.BC: def2mak.exe template.mak -# def2mak /BC template.mak >Makefile.BC -#Makefile.MSC: def2mak.exe template.mak -# def2mak /MSC template.mak >Makefile.MSC diff -Naurd ../nethack-3.4.0/sys/msdos/schema1 ./sys/msdos/schema1 --- ../nethack-3.4.0/sys/msdos/schema1 Wed Mar 20 23:43:42 2002 +++ ./sys/msdos/schema1 Thu Jan 1 01:00:00 1970 @@ -1,606 +0,0 @@ -SCCS Id: @(#)schema1 3.3 95/10/25 -Copyright (c) NetHack PC Development Team 1993, 1994, 1995 -# -# NetHack Overlay Schema -# Minimal extended memory available, lots of 640K base RAM free -# Overlay buffer size will be (20 + 20 + 19) = 59K (sum of 3 largest overlays). -# Requires about 490K (for exe load plus overlay buffer), but -# an additional 70K free (minimum) will be needed for malloc calls, -# bringing the total requirement to about 560K. -# Optimized for minimal overlay turns. -# - -[ root ] -pcmain.0 sound.o tile.o pctiles.0 pctiles.b -vidvga.1 vidvga.0 vidvga.b video.0 video.1 video.b -hack.3 vidtxt.0 vidtxt.b botl.0 monmove.0 display.o -dungeon.0 hacklib.0 wintty.o trap.0 attrib.0 detect.o -mon.0 cmd.0 vision.o hack.1 msdos.0 pckeys.o -random.o rnd.0 alloc.o ovlinit.o -dbridge.0 monmove.1 engrave.0 invent.0 -monmove.2 mondata.0 -hacklib.1 hacklib.2 -dogmove.b - -[ ] -allmain.0 - -[ ] -allmain.1 - -[ ] -allmain.b - -[ ] -apply.0 - -[ ] -apply.1 - -[ ] -apply.b - -[ ] -artifact.0 - -[ ] -artifact.1 - -[ ] -artifact.b - -[ ] -attrib.1 - -[ ] -attrib.2 - -[ ] -attrib.b - -[ ] -ball.o - -[ ] -bones.o - -[ ] -botl.1 - -[ ] -botl.b - -[ ] -cmd.1 - -[ ] -cmd.b - -[ ] -dbridge.1 - -[ ] -dbridge.b - -[ ] -decl.o - -[ ] -dig.o - -[ ] -dlb.o - -[ ] -do.0 - -[ ] -do.1 - -[ ] -do.2 - -[ ] -do.3 - -[ ] -do.b - -[ ] -do_name.0 - -[ ] -do_name.2 - -[ ] -do_name.b - -[ ] -do_wear.0 - -[ ] -do_wear.1 - -[ ] -do_wear.2 - -[ ] -do_wear.b - -[ ] -dog.1 - -[ ] -dog.2 - -[ ] -dog.b - -[ ] -dogmove.0 - -[ ] -dokick.o - -[ ] -dothrow.o - -[ ] -drawing.o - -[ ] -dungeon.1 - -[ ] -eat.0 - -[ ] -eat.1 - -[ ] -eat.b - -[ ] -end.o - -[ ] -engrave.1 - -[ ] -engrave.2 - -[ ] -engrave.b - -[ ] -exper.o - -[ ] -explode.0 - -[ ] -explode.1 - -[ ] -extralev.o - -[ ] -files.o - -[ ] -fountain.o - -[ ] -getline.1 - -[ ] -getline.2 - -[ ] -hack.2 - -[ ] -hack.b - -[ ] -hacklib.b - -[ ] -invent.1 - -[ ] -invent.2 - -[ ] -invent.3 - -[ ] -invent.b - -[ ] -light.3 - -[ ] -lock.0 - -[ ] -lock.b mail.0 - -[ ] -mail.b - -[ ] -makemon.0 - -[ ] -makemon.1 - -[ ] -makemon.2 - -[ ] -makemon.b - -[ ] -mcastu.0 - -[ ] -mcastu.b - -[ ] -mhitm.0 - -[ ] -mhitm.b - -[ ] -mhitu.0 - -[ ] -mhitu.1 - -[ ] -mhitu.b - -[ ] -minion.o - -[ ] -mklev.o - -[ ] -mkmap.o - -[ ] -mkmaze.o - -[ ] -mkobj.0 - -[ ] -mkobj.1 - -[ ] -mkobj.b - -[ ] -mkroom.0 - -[ ] -mkroom.b - -[ ] -mon.1 - -[ ] -mon.2 - -[ ] -mon.b - -[ ] -mondata.1 - -[ ] -mondata.2 - -[ ] -mondata.b - -[ ] -monmove.b - -[ ] -monst.o - -[ ] -monstr.o - -[ ] -mplayer.o - -[ ] -msdos.b - -[ ] -mthrowu.0 - -[ ] -mthrowu.1 - -[ ] -mthrowu.b - -[ ] -muse.o - -[ ] -music.o - -[ ] -o_init.o - -[ ] -objects.o - -[ ] -objnam.0 - -[ ] -objnam.1 - -[ ] -objnam.b - -[ ] -options.o - -[ ] -pager.o - -[ ] -pcmain.1 role.o - -[ ] -pcmain.b - -[ ] -pcunix.b - -[ ] -pickup.o - -[ ] -pline.b - -[ ] -polyself.0 - -[ ] -polyself.1 - -[ ] -polyself.b - -[ ] -potion.b - -[ ] -pray.o - -[ ] -priest.0 - -[ ] -priest.b - -[ ] -quest.o - -[ ] -questpgr.o - -[ ] -read.b - -[ ] -rect.o - -[ ] -region.o - -[ ] -restore.o - -[ ] -rip.o - -[ ] -rnd.1 - -[ ] -rnd.b - -[ ] -rumors.o - -[ ] -save.o - -[ ] -shk.0 - -[ ] -shk.1 - -[ ] -shk.2 - -[ ] -shk.3 - -[ ] -shk.b - -[ ] -shknam.0 - -[ ] -shknam.b - -[ ] -sit.o - -[ ] -sounds.0 - -[ ] -sounds.b - -[ ] -sp_lev.o - -[ ] -spell.o - -[ ] -steal.0 - -[ ] -steal.1 - -[ ] -steal.b - -[ ] -sys.o - -[ ] -teleport.o - -[ ] -termcap.0 - -[ ] -termcap.1 - -[ ] -termcap.b - -[ ] -timeout.0 - -[ ] -timeout.1 - -[ ] -timeout.b - -[ ] -topl.1 - -[ ] -topl.2 - -[ ] -topl.b - -[ ] -topten.o - -[ ] -track.0 - -[ ] -track.1 - -[ ] -track.b - -[ ] -trap.1 - -[ ] -trap.2 - -[ ] -trap.3 - -[ ] -trap.b - -[ ] -tty.o - -[ ] -u_init.o - -[ ] -uhitm.o - -[ ] -vault.0 - -[ ] -vault.b - -[ ] -version.o - -[ ] -vidvga.2 - -[ ] -vis_tab.o - -[ ] -weapon.0 - -[ ] -weapon.1 - -[ ] -weapon.b - -[ ] -were.0 - -[ ] -were.b - -[ ] -wield.o - -[ ] -windows.o - -[ ] -wizard.0 - -[ ] -wizard.b - -[ ] -worm.o - -[ ] -steed.o worn.o - -[ ] -write.o - -[ ] -zap.0 - -[ ] -zap.1 - -[ ] -zap.2 - -[ ] -zap.3 - -[ ] -zap.b - diff -Naurd ../nethack-3.4.0/sys/msdos/schema2 ./sys/msdos/schema2 --- ../nethack-3.4.0/sys/msdos/schema2 Wed Mar 20 23:43:42 2002 +++ ./sys/msdos/schema2 Thu Jan 1 01:00:00 1970 @@ -1,669 +0,0 @@ -SCCS Id: @(#)schema2 3.3 95/10/25 -Copyright (c) NetHack PC Development Team 1993, 1994, 1995 -# -# NetHack Overlay Schema -# Small Root footprint, with extended memory available for caching. -# Almost everything is overlaid. -# - -[ root ] -pcmain.0 sound.o tile.o pctiles.0 pctiles.b -vidvga.1 vidvga.0 vidvga.b video.0 video.1 video.b -hack.3 vidtxt.0 vidtxt.b alloc.o ovlinit.o - -[ ] -allmain.0 - -[ ] -allmain.1 - -[ ] -allmain.b - -[ ] -apply.0 - -[ ] -apply.1 - -[ ] -apply.b - -[ ] -artifact.0 - -[ ] -artifact.1 - -[ ] -artifact.b - -[ ] -attrib.0 - -[ ] -attrib.1 - -[ ] -attrib.2 - -[ ] -attrib.b - -[ ] -ball.o - -[ ] -bones.o - -[ ] -botl.0 - -[ ] -botl.1 - -[ ] -botl.b - -[ ] -cmd.0 - -[ ] -cmd.1 - -[ ] -cmd.b - -[ ] -dbridge.0 - -[ ] -dbridge.1 - -[ ] -dbridge.b - -[ ] -decl.o - -[ ] -detect.o - -[ ] -dig.o - -[ ] -display.o - -[ ] -dlb.o - -[ ] -do.0 - -[ ] -do.1 - -[ ] -do.2 - -[ ] -do.3 - -[ ] -do.b - -[ ] -do_name.0 - -[ ] -do_name.2 - -[ ] -do_name.b - -[ ] -do_wear.0 - -[ ] -do_wear.1 - -[ ] -do_wear.2 - -[ ] -do_wear.b - -[ ] -dog.1 - -[ ] -dog.2 - -[ ] -dog.b - -[ ] -dogmove.0 - -[ ] -dogmove.b - -[ ] -dokick.o - -[ ] -dothrow.o - -[ ] -drawing.o - -[ ] -dungeon.0 - -[ ] -dungeon.1 - -[ ] -eat.0 - -[ ] -eat.1 - -[ ] -eat.b - -[ ] -end.o - -[ ] -engrave.0 - -[ ] -engrave.1 - -[ ] -engrave.2 - -[ ] -engrave.b - -[ ] -exper.o - -[ ] -explode.0 - -[ ] -explode.1 - -[ ] -extralev.o - -[ ] -files.o - -[ ] -fountain.o - -[ ] -getline.1 - -[ ] -getline.2 - -[ ] -hack.1 - -[ ] -hack.2 - -[ ] -hack.b - -[ ] -hacklib.0 - -[ ] -hacklib.1 - -[ ] -hacklib.2 - -[ ] -hacklib.b - -[ ] -invent.0 - -[ ] -invent.1 - -[ ] -invent.2 - -[ ] -invent.3 - -[ ] -invent.b - -[ ] -light.3 - -[ ] -lock.0 - -[ ] -lock.b mail.0 - -[ ] -mail.b - -[ ] -makemon.0 - -[ ] -makemon.1 - -[ ] -makemon.2 - -[ ] -makemon.b - -[ ] -mcastu.0 - -[ ] -mcastu.b - -[ ] -mhitm.0 - -[ ] -mhitm.b - -[ ] -mhitu.0 - -[ ] -mhitu.1 - -[ ] -mhitu.b - -[ ] -minion.o - -[ ] -mklev.o - -[ ] -mkmap.o - -[ ] -mkmaze.o - -[ ] -mkobj.0 - -[ ] -mkobj.1 - -[ ] -mkobj.b - -[ ] -mkroom.0 - -[ ] -mkroom.b - -[ ] -mon.0 - -[ ] -mon.1 - -[ ] -mon.2 - -[ ] -mon.b - -[ ] -mondata.0 - -[ ] -mondata.1 - -[ ] -mondata.2 - -[ ] -mondata.b - -[ ] -monmove.0 - -[ ] -monmove.1 - -[ ] -monmove.2 - -[ ] -monmove.b - -[ ] -monst.o - -[ ] -monstr.o - -[ ] -mplayer.o - -[ ] -msdos.0 pckeys.o - -[ ] -msdos.b - -[ ] -mthrowu.0 - -[ ] -mthrowu.1 - -[ ] -mthrowu.b - -[ ] -muse.o - -[ ] -music.o - -[ ] -o_init.o - -[ ] -objects.o - -[ ] -objnam.0 - -[ ] -objnam.1 - -[ ] -objnam.b - -[ ] -options.o - -[ ] -pager.o - -[ ] -pcmain.1 role.o - -[ ] -pcmain.b - -[ ] -pcunix.b - -[ ] -pickup.o - -[ ] -pline.b - -[ ] -polyself.0 - -[ ] -polyself.1 - -[ ] -polyself.b - -[ ] -potion.b - -[ ] -pray.o - -[ ] -priest.0 - -[ ] -priest.b - -[ ] -quest.o - -[ ] -questpgr.o - -[ ] -random.o - -[ ] -read.b - -[ ] -rect.o - -[ ] -region.o - -[ ] -restore.o - -[ ] -rip.o - -[ ] -rnd.0 - -[ ] -rnd.1 - -[ ] -rnd.b - -[ ] -rumors.o - -[ ] -save.o - -[ ] -shk.0 - -[ ] -shk.1 - -[ ] -shk.2 - -[ ] -shk.3 - -[ ] -shk.b - -[ ] -shknam.0 - -[ ] -shknam.b - -[ ] -sit.o - -[ ] -sounds.0 - -[ ] -sounds.b - -[ ] -sp_lev.o - -[ ] -spell.o - -[ ] -steal.0 - -[ ] -steal.1 - -[ ] -steal.b - -[ ] -steed.o worn.o - -[ ] -sys.o - -[ ] -teleport.o - -[ ] -termcap.0 - -[ ] -termcap.1 - -[ ] -termcap.b - -[ ] -timeout.0 - -[ ] -timeout.1 - -[ ] -timeout.b - -[ ] -topl.1 - -[ ] -topl.2 - -[ ] -topl.b - -[ ] -topten.o - -[ ] -track.0 - -[ ] -track.1 - -[ ] -track.b - -[ ] -trap.0 - -[ ] -trap.1 - -[ ] -trap.2 - -[ ] -trap.3 - -[ ] -trap.b - -[ ] -tty.o - -[ ] -u_init.o - -[ ] -uhitm.o - -[ ] -vault.0 - -[ ] -vault.b - -[ ] -version.o - -[ ] -vidvga.2 - -[ ] -vis_tab.o - -[ ] -vision.o - -[ ] -weapon.0 - -[ ] -weapon.1 - -[ ] -weapon.b - -[ ] -were.0 - -[ ] -were.b - -[ ] -wield.o - -[ ] -windows.o - -[ ] -wintty.o - -[ ] -wizard.0 - -[ ] -wizard.b - -[ ] -worm.o - -[ ] -write.o - -[ ] -zap.0 - -[ ] -zap.1 - -[ ] -zap.2 - -[ ] -zap.3 - -[ ] -zap.b diff -Naurd ../nethack-3.4.0/sys/msdos/schema3 ./sys/msdos/schema3 --- ../nethack-3.4.0/sys/msdos/schema3 Wed Mar 20 23:43:43 2002 +++ ./sys/msdos/schema3 Thu Jan 1 01:00:00 1970 @@ -1,600 +0,0 @@ -SCCS Id: @(#)schema3 3.3 95/10/25 -Copyright (c) NetHack PC Development Team 1993, 1994, 1995 -# -# NetHack Overlay Schema -# Minimal extended memory available, lots of 640K base RAM free -# This schema is for use with a patched moveinit.c (see Makefile -# or Install.dos for information. -# - -[ root ] -pcmain.0 sound.o tile.o pctiles.0 pctiles.b -vidvga.1 vidvga.0 vidvga.b video.0 video.1 video.b -hack.3 vidtxt.0 vidtxt.b botl.0 monmove.0 display.o -dungeon.0 hacklib.0 wintty.o trap.0 attrib.0 detect.o -mon.0 cmd.0 vision.o hack.1 msdos.0 -random.o rnd.0 alloc.o -dbridge.0 monmove.1 engrave.0 invent.0 -monmove.2 mondata.0 -hacklib.1 hacklib.2 -dogmove.b - -[ ] -allmain.0 - -[ ] -allmain.1 - -[ ] -allmain.b - -[ ] -apply.0 - -[ ] -apply.1 - -[ ] -apply.b - -[ ] -artifact.0 - -[ ] -artifact.1 - -[ ] -artifact.b - -[ ] -attrib.1 - -[ ] -attrib.2 - -[ ] -attrib.b - -[ ] -ball.o - -[ ] -bones.o - -[ ] -botl.1 - -[ ] -botl.b - -[ ] -cmd.1 - -[ ] -cmd.b - -[ ] -dbridge.1 - -[ ] -dbridge.b - -[ ] -decl.o - -[ ] -dig.o - -[ ] -dlb.o - -[ ] -do.0 - -[ ] -do.1 - -[ ] -do.2 - -[ ] -do.3 - -[ ] -do.b - -[ ] -do_name.0 - -[ ] -do_name.2 - -[ ] -do_name.b - -[ ] -do_wear.0 - -[ ] -do_wear.1 - -[ ] -do_wear.2 - -[ ] -do_wear.b - -[ ] -dog.1 - -[ ] -dog.2 - -[ ] -dog.b - -[ ] -dogmove.0 - -[ ] -dokick.o - -[ ] -dothrow.o - -[ ] -drawing.o - -[ ] -dungeon.1 - -[ ] -eat.0 - -[ ] -eat.1 - -[ ] -eat.b - -[ ] -end.o - -[ ] -engrave.1 - -[ ] -engrave.2 - -[ ] -engrave.b - -[ ] -exper.o - -[ ] -explode.0 - -[ ] -explode.1 - -[ ] -extralev.o - -[ ] -files.o - -[ ] -fountain.o - -[ ] -getline.1 - -[ ] -getline.2 - -[ ] -hack.2 - -[ ] -hack.b - -[ ] -hacklib.b - -[ ] -invent.1 - -[ ] -invent.2 - -[ ] -invent.3 - -[ ] -invent.b - -[ ] -light.3 - -[ ] -lock.0 - -[ ] -lock.b mail.0 - -[ ] -mail.b - -[ ] -makemon.0 - -[ ] -makemon.1 - -[ ] -makemon.2 - -[ ] -makemon.b - -[ ] -mcastu.0 - -[ ] -mcastu.b - -[ ] -mhitm.0 - -[ ] -mhitm.b - -[ ] -mhitu.0 - -[ ] -mhitu.1 - -[ ] -mhitu.b - -[ ] -minion.o - -[ ] -mklev.o - -[ ] -mkmap.o - -[ ] -mkmaze.o - -[ ] -mkobj.0 - -[ ] -mkobj.1 - -[ ] -mkobj.b - -[ ] -mkroom.0 - -[ ] -mkroom.b - -[ ] -mon.1 - -[ ] -mon.2 - -[ ] -mon.b - -[ ] -mondata.1 - -[ ] -mondata.2 - -[ ] -mondata.b - -[ ] -monmove.b - -[ ] -monst.o - -[ ] -monstr.o - -[ ] -mplayer.o - -[ ] -msdos.b - -[ ] -mthrowu.0 - -[ ] -mthrowu.1 - -[ ] -mthrowu.b - -[ ] -muse.o - -[ ] -music.o - -[ ] -o_init.o - -[ ] -objects.o - -[ ] -objnam.0 - -[ ] -objnam.1 - -[ ] -objnam.b - -[ ] -options.o - -[ ] -pager.o - -[ ] -pcmain.1 - -[ ] -pcmain.b - -[ ] -pcunix.b - -[ ] -pickup.o - -[ ] -pline.b - -[ ] -polyself.0 - -[ ] -polyself.1 - -[ ] -polyself.b - -[ ] -potion.b - -[ ] -pray.o - -[ ] -priest.0 - -[ ] -priest.b - -[ ] -quest.o - -[ ] -questpgr.o - -[ ] -read.b - -[ ] -rect.o - -[ ] -restore.o - -[ ] -rip.o - -[ ] -rnd.1 - -[ ] -rnd.b - -[ ] -rumors.o - -[ ] -save.o - -[ ] -shk.0 - -[ ] -shk.1 - -[ ] -shk.2 - -[ ] -shk.3 - -[ ] -shk.b - -[ ] -shknam.0 - -[ ] -shknam.b - -[ ] -sit.o - -[ ] -sounds.0 - -[ ] -sounds.b - -[ ] -sp_lev.o - -[ ] -spell.o - -[ ] -steal.0 - -[ ] -steal.1 - -[ ] -steal.b - -[ ] -sys.o - -[ ] -teleport.o - -[ ] -termcap.0 - -[ ] -termcap.1 - -[ ] -termcap.b - -[ ] -timeout.0 - -[ ] -timeout.1 - -[ ] -timeout.b - -[ ] -topl.1 - -[ ] -topl.2 - -[ ] -topl.b - -[ ] -topten.o - -[ ] -track.0 - -[ ] -track.1 - -[ ] -track.b - -[ ] -trap.1 - -[ ] -trap.2 - -[ ] -trap.3 - -[ ] -trap.b - -[ ] -tty.o - -[ ] -u_init.o - -[ ] -uhitm.o - -[ ] -vault.0 - -[ ] -vault.b - -[ ] -version.o - -[ ] -vidvga.2 - -[ ] -vis_tab.o - -[ ] -weapon.0 - -[ ] -weapon.1 - -[ ] -weapon.b - -[ ] -were.0 - -[ ] -were.b - -[ ] -wield.o - -[ ] -windows.o - -[ ] -wizard.0 - -[ ] -wizard.b - -[ ] -worm.o - -[ ] -worn.o - -[ ] -write.o - -[ ] -zap.0 - -[ ] -zap.1 - -[ ] -zap.2 - -[ ] -zap.3 - -[ ] -zap.b - diff -Naurd ../nethack-3.4.0/sys/msdos/setup.bat ./sys/msdos/setup.bat --- ../nethack-3.4.0/sys/msdos/setup.bat Wed Mar 20 23:43:43 2002 +++ ./sys/msdos/setup.bat Mon Feb 24 15:25:05 2003 @@ -1,167 +1,167 @@ -@echo off -REM SCCS Id: @(#)setup.bat 2002/03/17 -REM Copyright (c) NetHack PC Development Team 1990 - 2002 -REM NetHack may be freely redistributed. See license for details. - -echo. -echo Copyright (c) NetHack PC Development Team 1990 - 2002 -echo NetHack may be freely redistributed. See license for details. -echo. -REM setup batch file for msdos, see Install.dos for details. - -if not %1.==. goto ok_parm -goto err_set - -:ok_parm -echo Checking to see if directories are set up properly ... -if not exist ..\..\include\hack.h goto err_dir -if not exist ..\..\src\hack.c goto err_dir -if not exist ..\..\dat\wizard.des goto err_dir -if not exist ..\..\util\makedefs.c goto err_dir -if not exist ..\..\win\tty\wintty.c goto err_dir -if not exist ..\share\lev_yacc.c goto err_dir -echo Directories OK. - -if not exist ..\..\binary\* mkdir ..\..\binary -if NOT exist ..\..\binary\license copy ..\..\dat\license ..\..\binary\license >nul - -if exist ..\..\dat\data.bas goto long1ok -if exist ..\..\dat\data.base goto long1a -if exist ..\..\dat\data~1.bas goto long1b -goto err_long -:long1a -echo Changing some long-named distribution file names: -echo "Copying ..\..\dat\data.base -> ..\..\dat\data.bas" -copy ..\..\dat\data.base ..\..\dat\data.bas -if exist ..\..\dat\data.old del /Q ..\..\dat\data.old -ren ..\..\dat\data.base data.old -goto long1ok -:long1b -echo Changing some long-named distribution file names: -echo "Copying ..\..\dat\data~1.bas -> ..\..\dat\data.bas" -copy ..\..\dat\data~1.bas ..\..\dat\data.bas -if exist ..\..\dat\data.old del /Q ..\..\dat\data.old -ren ..\..\dat\data~1.bas data.old -:long1ok - -if exist ..\..\include\patchlev.h goto long2ok -if exist ..\..\include\patchlevel.h goto long2a -if exist ..\..\include\patchl~1.h goto long2b -goto err_long -:long2a -echo "Copying ..\..\include\patchlevel.h -> ..\..\include\patchlev.h" -copy ..\..\include\patchlevel.h ..\..\include\patchlev.h -if exist ..\..\include\patchlev.old del /Q ..\..\include\patchlev.old -ren ..\..\include\patchlevel.h patchlev.old -goto long2ok -:long2b -echo "Copying ..\..\include\patchl~1.h -> ..\..\include\patchlev.h" -copy ..\..\include\patchl~1.h ..\..\include\patchlev.h -if exist ..\..\include\patchlev.old del /Q ..\..\include\patchlev.old -ren ..\..\include\patchl~1.h patchlev.old -:long2ok - -REM Missing guidebook is not fatal to the build process -if exist ..\..\doc\guideboo.txt goto long3ok -if exist ..\..\doc\guidebook.txt goto long3a -if exist ..\..\doc\guideb~1.txt goto long3b -goto warn3long -:long3a -echo "Copying ..\..\doc\guidebook.txt -> ..\..\doc\guideboo.txt" -copy ..\..\doc\guidebook.txt ..\..\doc\guideboo.txt -if exist ..\..\doc\guideboo.old del /Q ..\..\doc\guideboo.old -ren ..\..\doc\guidebook.txt guideboo.old -goto long3ok -:long3b -echo "Copying ..\..\doc\guideb~1.txt -> ..\..\doc\guideboo.txt" -copy ..\..\doc\guideb~1.txt ..\..\doc\guideboo.txt -if exist ..\..\doc\guideboo.old del /Q ..\..\doc\guideboo.old -ren ..\..\doc\guideb~1.txt guideboo.old -goto long3ok -:warn3long -echo "Warning - There is no NetHack Guidebook (..\..\doc\guideboo.txt)" -echo " included in your distribution. Build will proceed anyway." -:long3ok - -if "%1"=="GCC" goto ok_gcc -if "%1"=="gcc" goto ok_gcc -if "%1"=="nmake" goto ok_msc -if "%1"=="NMAKE" goto ok_msc -if "%1"=="BC" goto ok_bc -if "%1"=="bc" goto ok_bc -if "%1"=="MSC" goto ok_msc -if "%1"=="msc" goto ok_msc -goto err_set - -:ok_gcc -echo Symbolic links, msdos style -echo "Makefile.GCC -> ..\..\src\makefile" -copy makefile.GCC ..\..\src\makefile -goto done - -:ok_msc -echo Copying Makefile for Microsoft C and Microsoft NMAKE. -echo "Makefile.MSC -> ..\..\src\makefile" -copy Makefile.MSC ..\..\src\makefile -echo Copying overlay schemas to ..\..\src -copy schema*.MSC ..\..\src\schema*.DEF -:ok_cl -goto done - -:ok_bc -echo Copying Makefile for Borland C and Borland's MAKE. -echo "Makefile.BC -> ..\..\src\makefile" -copy Makefile.BC ..\..\src\makefile -echo Copying overlay schemas to ..\..\src -copy schema*.BC ..\..\src -goto done - -:err_long -echo. -echo ** ERROR - New file system with "long file name support" problem. ** -echo A couple of NetHack distribution files that are packaged with -echo a long filename ( exceeds 8.3) appear to be missing from your -echo distribution. -echo The following files need to exist under the names on the -echo right in order to build NetHack: -echo. -echo ..\..\dat\data.base needs to be copied to ..\..\dat\data.bas -echo ..\..\include\patchlevel.h needs to be copied to ..\..\include\patchlev.h -echo. -echo setup.bat was unable to perform the necessary changes because at least -echo one of the files doesn't exist under its short name, and the -echo original (long) file name to copy it from was not found either. -echo. -goto end - -:err_set -echo. -echo Usage: -echo "%0 " -echo. -echo Run this batch file specifying on of the following: -echo GCC, MSC, BC -echo. -echo (depending on which compiler and/or make utility you are using). -echo. -echo The GCC argument is for use with djgpp and the NDMAKE utility. -echo. -echo The MSC argument is for use with Microsoft C and the NMAKE utility -echo that ships with it (MSC 7.0 or greater only, including Visual C). -echo. -echo The BC argument is for use with Borland C and Borland's MAKE utility -echo that ships with it (Borland C++ 3.1 only). -echo. -goto end - -:err_dir -echo/ -echo Your directories are not set up properly, please re-read the -echo Install.dos and README documentation. -goto end - -:done -echo Setup Done! -echo Please continue with next step from Install.dos. - -:end +@echo off +REM SCCS Id: @(#)setup.bat 2002/03/17 +REM Copyright (c) NetHack PC Development Team 1990 - 2002 +REM NetHack may be freely redistributed. See license for details. + +echo. +echo Copyright (c) NetHack PC Development Team 1990 - 2002 +echo NetHack may be freely redistributed. See license for details. +echo. +REM setup batch file for msdos, see Install.dos for details. + +if not %1.==. goto ok_parm +goto err_set + +:ok_parm +echo Checking to see if directories are set up properly ... +if not exist ..\..\include\hack.h goto err_dir +if not exist ..\..\src\hack.c goto err_dir +if not exist ..\..\dat\wizard.des goto err_dir +if not exist ..\..\util\makedefs.c goto err_dir +if not exist ..\..\win\tty\wintty.c goto err_dir +if not exist ..\share\lev_yacc.c goto err_dir +echo Directories OK. + +if not exist ..\..\binary\* mkdir ..\..\binary +if NOT exist ..\..\binary\license copy ..\..\dat\license ..\..\binary\license >nul + +if exist ..\..\dat\data.bas goto long1ok +if exist ..\..\dat\data.base goto long1a +if exist ..\..\dat\data~1.bas goto long1b +goto err_long +:long1a +echo Changing some long-named distribution file names: +echo "Copying ..\..\dat\data.base -> ..\..\dat\data.bas" +copy ..\..\dat\data.base ..\..\dat\data.bas +if exist ..\..\dat\data.old del /Q ..\..\dat\data.old +ren ..\..\dat\data.base data.old +goto long1ok +:long1b +echo Changing some long-named distribution file names: +echo "Copying ..\..\dat\data~1.bas -> ..\..\dat\data.bas" +copy ..\..\dat\data~1.bas ..\..\dat\data.bas +if exist ..\..\dat\data.old del /Q ..\..\dat\data.old +ren ..\..\dat\data~1.bas data.old +:long1ok + +if exist ..\..\include\patchlev.h goto long2ok +if exist ..\..\include\patchlevel.h goto long2a +if exist ..\..\include\patchl~1.h goto long2b +goto err_long +:long2a +echo "Copying ..\..\include\patchlevel.h -> ..\..\include\patchlev.h" +copy ..\..\include\patchlevel.h ..\..\include\patchlev.h +if exist ..\..\include\patchlev.old del /Q ..\..\include\patchlev.old +ren ..\..\include\patchlevel.h patchlev.old +goto long2ok +:long2b +echo "Copying ..\..\include\patchl~1.h -> ..\..\include\patchlev.h" +copy ..\..\include\patchl~1.h ..\..\include\patchlev.h +if exist ..\..\include\patchlev.old del /Q ..\..\include\patchlev.old +ren ..\..\include\patchl~1.h patchlev.old +:long2ok + +REM Missing guidebook is not fatal to the build process +if exist ..\..\doc\guideboo.txt goto long3ok +if exist ..\..\doc\guidebook.txt goto long3a +if exist ..\..\doc\guideb~1.txt goto long3b +goto warn3long +:long3a +echo "Copying ..\..\doc\guidebook.txt -> ..\..\doc\guideboo.txt" +copy ..\..\doc\guidebook.txt ..\..\doc\guideboo.txt +if exist ..\..\doc\guideboo.old del /Q ..\..\doc\guideboo.old +ren ..\..\doc\guidebook.txt guideboo.old +goto long3ok +:long3b +echo "Copying ..\..\doc\guideb~1.txt -> ..\..\doc\guideboo.txt" +copy ..\..\doc\guideb~1.txt ..\..\doc\guideboo.txt +if exist ..\..\doc\guideboo.old del /Q ..\..\doc\guideboo.old +ren ..\..\doc\guideb~1.txt guideboo.old +goto long3ok +:warn3long +echo "Warning - There is no NetHack Guidebook (..\..\doc\guideboo.txt)" +echo " included in your distribution. Build will proceed anyway." +:long3ok + +if "%1"=="GCC" goto ok_gcc +if "%1"=="gcc" goto ok_gcc +if "%1"=="nmake" goto ok_msc +if "%1"=="NMAKE" goto ok_msc +if "%1"=="BC" goto ok_bc +if "%1"=="bc" goto ok_bc +if "%1"=="MSC" goto ok_msc +if "%1"=="msc" goto ok_msc +goto err_set + +:ok_gcc +echo Symbolic links, msdos style +echo "Makefile.GCC -> ..\..\src\makefile" +copy makefile.GCC ..\..\src\makefile +goto done + +:ok_msc +echo Copying Makefile for Microsoft C and Microsoft NMAKE. +echo "Makefile.MSC -> ..\..\src\makefile" +copy Makefile.MSC ..\..\src\makefile +echo Copying overlay schemas to ..\..\src +copy schema*.MSC ..\..\src\schema*.DEF +:ok_cl +goto done + +:ok_bc +echo Copying Makefile for Borland C and Borland's MAKE. +echo "Makefile.BC -> ..\..\src\makefile" +copy Makefile.BC ..\..\src\makefile +echo Copying overlay schemas to ..\..\src +copy schema*.BC ..\..\src +goto done + +:err_long +echo. +echo ** ERROR - New file system with "long file name support" problem. ** +echo A couple of NetHack distribution files that are packaged with +echo a long filename ( exceeds 8.3) appear to be missing from your +echo distribution. +echo The following files need to exist under the names on the +echo right in order to build NetHack: +echo. +echo ..\..\dat\data.base needs to be copied to ..\..\dat\data.bas +echo ..\..\include\patchlevel.h needs to be copied to ..\..\include\patchlev.h +echo. +echo setup.bat was unable to perform the necessary changes because at least +echo one of the files doesn't exist under its short name, and the +echo original (long) file name to copy it from was not found either. +echo. +goto end + +:err_set +echo. +echo Usage: +echo "%0 " +echo. +echo Run this batch file specifying on of the following: +echo GCC, MSC, BC +echo. +echo (depending on which compiler and/or make utility you are using). +echo. +echo The GCC argument is for use with djgpp and the NDMAKE utility. +echo. +echo The MSC argument is for use with Microsoft C and the NMAKE utility +echo that ships with it (MSC 7.0 or greater only, including Visual C). +echo. +echo The BC argument is for use with Borland C and Borland's MAKE utility +echo that ships with it (Borland C++ 3.1 only). +echo. +goto end + +:err_dir +echo/ +echo Your directories are not set up properly, please re-read the +echo Install.dos and README documentation. +goto end + +:done +echo Setup Done! +echo Please continue with next step from Install.dos. + +:end diff -Naurd ../nethack-3.4.0/sys/msdos/template.mak ./sys/msdos/template.mak --- ../nethack-3.4.0/sys/msdos/template.mak Wed Mar 20 23:43:44 2002 +++ ./sys/msdos/template.mak Thu Jan 1 01:00:00 1970 @@ -1,2232 +0,0 @@ -# SCCS Id: @(#)template.mak 3.4 1996/10/25 -# Copyright (c) NetHack PC Development Team 1996 -# -?BEGIN? -?SCCS? -?MSC? -# PC NetHack 3.4 Makefile for Microsoft(tm) "C" >= 7.0 and MSVC >= 1.0 -?ENDMSC? -?BC? -# PC NetHack 3.4 Makefile for Borland C++ 3.1. -?ENDBC? -# -# Nota Bene: Before you get to here you should have already read -# the Install.dos file located in the sys/msdos directory. -?BC? -# Additionally, you should run this makefile with the -N -# Microsoft Compatibility option. -# -# This Makefile is for use with Borland C++ version 3.1. -# -# This Makefile is specific to Borland's MAKE which is supplied with the -# compiler. It supports only one overlay management facility - VROOMM. -# (This Makefile won't work with make45l or NDMAKE) -?ENDBC? -?MSC? -# -# This Makefile is for use with Microsoft C version 7 and Microsoft Visual C++ -# Professional Edition (MSVC) version 1.0 or greater. -# -# This Makefile is specific to Microsoft's NMAKE which is supplied with the -# more recent Microsoft C compilers. -# It supports only one overlay management facility - MOVE. -# (This Makefile won't work with make45l or NDMAKE) -# -# In addition to your C compiler, -# -# if you want to change you will need a -# files with suffix workalike for -# .y yacc (such as bison or byacc) -# .l lex (such as flex) -?ENDMSC? - -# -# Game Installation Variables. -# NOTE: Make sure GAMEDIR exists before nmake is started. -# - -GAME = NetHack -GAMEDIR = c:\games\nethack - -# -# -# Directories -# - -DAT = ..\dat -DOC = ..\doc -INCL = ..\include -SRC = ..\src -OBJ = o -MSYS = ..\sys\msdos -SYS = ..\sys\share -UTIL = ..\util -WTTY = ..\win\tty -WSHR = ..\win\share - - -# -# Compiler File Info. -# ($(MAKE) macro is often predefined, so we use $(MAKEBIN) instead.) -# - -?MSC? -CC = cl # Compiler -LINK = link # Linker -ASM = masm # Assembler (not currently needed for MSC 7 and > ) -MAKEBIN = nmake -UUDECODE = uudecode # Unix style uudecoder -?ENDMSC? -?BC? -CC = bcc # Compiler -LINK = tlink # Linker -ASM = tasm # Assembler (not currently needed for BC) -MAKEBIN = make -UUDECODE = uudecode # Unix style uudecoder - -#BCTOP = c:\borlandc # main Borland C++ directory -BCTOP = c:\bc31 -?ENDBC? - -# -# Yacc/Lex ... if you got 'em. -# -# If you have yacc and lex programs (or work-alike such as bison -# and flex), comment out the upper two lines below, and uncomment -# the lower two. -?BC? -# -# On Borland C++, the newest versions of flex and bison provide -# problems when run from MAKE. -?ENDBC? -# - -DO_YACC = YACC_MSG -DO_LEX = LEX_MSG -#DO_YACC = YACC_ACT -#DO_LEX = LEX_ACT - -# -# - Specify your yacc and lex programs (or work-alikes for each) here. -# - -YACC = bison -y -#YACC = yacc -#YACC = byacc - -LEX = flex -#LEX = lex - -# -# - Specify your flex skeleton file (if needed). -# -FLEXSKEL = -#FLEXSKEL = -Sc:\tools16\flex.ske - -# -# - Your yacc (or work-alike) output files -# -YTABC = y_tab.c -YTABH = y_tab.h -#YTABC = ytab.c -#YTABH = ytab.h - -# -# - Your lex (or work-alike) output files -# -LEXYYC = lexyy.c -#LEXYYC = lex.yy.c - -# -# Optional high-quality BSD random number generation routines -# (see pcconf.h). Set to nothing if not used. -# - -RANDOM = $(OBJ)\random.o -#RANDOM = - -# -# If TERMLIB is #defined in the source (in include\pcconf.h), -# comment out the upper line and uncomment the lower. Make sure -# that TERMLIB contains the full pathname to the termcap library. - -TERMLIB = -#TERMLIB = $(SYS)\termcap.lib - -# -# MEMORY USAGE AND OVERLAYING -# -# Overlay Schema 1 -# -# - Minimal extended memory available, lots of 640K base RAM free -# Minimize overlay turns. Requires that a minimum of -?MSC? -# 560K RAM be free as follows: -# 430K Executable load requirement -# 60K Overlay buffer -# 70K for malloc() calls -# 560K Total memory requirement -?ENDMSC? -?BC? -# 607K RAM be free as follows: -# 462K Executable load requirement -# 115K for malloc() calls -# 30K Overlay buffer -# 607K Total memory requirement -?ENDBC? -# -# Overlay Schema 2 -# -# - Favor small load size, requires extended memory for bearable performance. -# If you have very little base 640K RAM available, but lots of extended -# memory for caching overlays, you might try this. (eg. A machine with -# lots of TSR's or network drivers). Do not try to set SCHEMA = 2 -# without a disk cache and extended memory. -?BC? -# 381K Executable load requirement -# 115K for malloc() calls -# 30K Overlay buffer -# 526K Total memory requirement -?ENDBC? -?MSC? -# 360K Executable load requirement -# 60K Overlay buffer -# 70K for malloc() calls -# 419K Total memory requirement -# -# Overlay Schema 3 -# -# - Minimal extended memory available, lots of 640K base RAM free -# Similar to schema1, but the overlay buffer is twice as large, so -# in theory more overlays can be resident at the same time. The cost is -# that the base memory requirement goes up considerably. -# This requires that you obtain the moveinit.c and moveapi.h files from -# your Microsoft C source/move directory, and place them into the src -# directory. Then apply the patch moveinit.pat file found in sys/msdos. -# Requirements: -# 360K Executable load requirement -# 95K Overlay buffer -# 70K for malloc() calls -# 525K Total memory requirement -?ENDMSC? -# -?BC? -# On Borland C++, you have to make a full rebuild of all object modules each -# time you change schemas. -# -?ENDBC? - -SCHEMA = 1 - -# -# OPTIONAL TILE SUPPORT. -# -# This release of NetHack allows you to build a version of NetHack -# that will draw 16x16 color tiles on the display to represent -# NetHack maps, objects, monsters, etc. on machines with appropriate -# display hardware. Currently the only supported video hardware is -# VGA. -# -# Note: You can build NetHack with tile support and then choose -# whether to use it or not at runtime via the defaults.nh file option -# "video". -# - -TILESUPPORT = Y - -# -# C COMPILER AND LINKER SETTINGS -# -# For debugging ability, comment out the upper three -# macros and uncomment the lower three. You can also -# uncomment only either LDFLAGSU or LDFLAGSN if you -# want to include debug information only in the utilities -# or only in the game file. -?BC? - -# On Borland C++, you cannot include debug information for -# all the object modules because the linker cannot handle -# it. -?ENDBC? - -#CDFLAGS = -?MSC? -#LDFLAGSN = -?ENDMSC? -?BC? -LDFLAGSN = -?ENDBC? -#LDFLAGSU = - -?MSC? -CDFLAGS = /Zi # use debug info (compiler) -LDFLAGSN = /CO # use debug info (linker - game) -LDFLAGSU = /CO # use debug info (linker - utilities) -?ENDMSC? -?BC? -CDFLAGS = -v -vi # use debug info (compiler) -#LDFLAGSN = /v # use debug info (linker - game) -LDFLAGSU = /v # use debug info (linker - utilities) -?ENDBC? - -# -?MSC? -# - Force a change in the C warning level for all builds. -# (Its W0 setting in the CL environment variable will take -# precedence if left blank here). -?ENDMSC? -?BC? -# - Don't warn about unreachable code because flex generates a whole bunch -# of unreachable code warnings, which stops the compile process. -?ENDBC? -# - -?MSC? -CW = -#CW =/W3 -?ENDMSC? -?BC? -CW = -w-rch -?ENDBC? - -# -# Select whether to use pre-compiled headers or not. -# Set PRECOMPHEAD to Y to use pre-compiled headers, set it to anything -# else and pre-compiled headers will not be used. -# (Pre-compiled headers speed up compiles, but require a bit more -# disk space during the build. The pre-compiled headers can be deleted -# afterwards via DEL *.PCH if desired). -# - -PRECOMPHEAD = N - -# -# C Compiler Flags -# -?MSC? -# Note: -# -# CL environment variable should already be set to: -# CL= /AL /G2 /Oo /Gs /Gt16 /Zp1 /W0 /I..\include /nologo /DMOVERLAY -# -?ENDMSC? - -?MSC? -CFLAGS = /c -?ENDMSC? -?BC? -CFLAGS = -c -?ENDBC? - -# Uncomment the line below if you want to store all the level files, -# help files, etc. in a single library file (recommended). - -USE_DLB = Y - -# -######################################################################## -######################################################################## -# -# Nothing below here should have to be changed. -# -######################################################################## -######################################################################## -# -# Warning: -# -# Changing anything below here means that you should be *very* -# familiar with your compiler's workings, *very* knowledgeable -# about the overlay structure and mechanics of NetHack, and *very* -# confident in your understanding of Makefiles and Make utilities. -# -######################################################################## -# -# Default Make Procedure -# - -default: $(GAME) - -# -######################################################################## -# Tile preparation -# - -! IF ("$(TILESUPPORT)"=="Y") - -TILEGAME = $(OBJ)\tile.o $(OBJ)\pctiles.0 $(OBJ)\pctiles.b - -# -# - VGA Tile Support, uncomment these three lines. -# - -TILEVGA = $(OBJ)\vidvga.0 $(OBJ)\vidvga.1 $(OBJ)\vidvga.2 $(OBJ)\vidvga.b -PLANAR_TIB = NetHack1.tib -OVERVIEW_TIB = NetHacko.tib - -# -# Leave this line uncommented and unchanged. -TILEUTIL = $(TILEGAME) $(TILEVGA) $(UTIL)\tile2bin.exe $(UTIL)\til2bin2.exe \ - $(PLANAR_TIB) $(OVERVIEW_TIB) - -! ENDIF - -! IF ("$(USE_DLB)"=="Y") -DLB = nhdat -! ELSE -DLB = -! ENDIF - -# -############################################################################# -# -# General Overlay Schema Settings -# - -?MSC? -LNKOPT = schema$(SCHEMA).def -?ENDMSC? -?BC? -!include schema$(SCHEMA).bc -OVLINIT =$(OBJ)\ovlinit.o -?ENDBC? - -?MSC? -# -# - Specific Overlay Schema Settings -# - -! IF ($(SCHEMA)==1) -INTOVL = /DYNAMIC:1250 /NOE -OVLINIT = -! ENDIF - -! IF ($(SCHEMA)==2) -INTOVL = /DYNAMIC:1380 /NOE -OVLINIT = -! ENDIF - -! IF ($(SCHEMA)==3) -INTOVL = /DYNAMIC:1170 -OVLINIT = $(OBJ)\moveinit.o $(OBJ)\ovlinit.o -! ENDIF -?ENDMSC? - -# -############################################################################# -# -# C Compiler and Linker Setup Options -# (To Maintainer; modify only if absolutely necessary) -# - -?BC? -BCINCL = $(BCTOP)\include # include directory for main BC headers -BCLIB = $(BCTOP)\lib # library directory for main BC libraries -BCCFG = nethack.cfg # name of the nethack configuration file -?ENDBC? - -# -# Model -# - -?MSC? -MODEL = L -?ENDMSC? -?BC? -MODEL = h -?ENDBC? - -# -# - Optional C library specifier for those with non-standard -# libraries or a multiple-target library setup. -# - -CLIB = -?MSC? -#CLIB = llibcer /nod -?ENDMSC? - -?BC? -# -# Borland C++ libraries -# - -BCOVL = $(BCLIB)\OVERLAY -BCMDL = $(BCLIB)\C$(MODEL) - -?ENDBC? -# -# Compiler Options -# - -?MSC? -CNOLNK = /c # just generate .OBJ -CPCHUSE = /YuHACK.H # use precompiled headers -CPCHGEN = /YcHACK.H # generate precompiled headers -CPCHNAM = /Fp # set the name of the precompiled header file -CPCHEXT = .PCH # precompiled header extension -CDEFINE = /D # define a macro -CCSNAM = /NT # set the code segment name -COBJNAM = /Fo # name the .OBJ file -CNOOPT = /f- /Od # disable optimizations (must be first in line) - # /f- = don't use the "fast" compiler,its buggy -?ENDMSC? -?MSCMACRO:CSNAMOA= ? -?MSCMACRO:CSNAMOB=$(CCSNAM)$(@F) ? -?MSCMACRO:CSNAM0=$(CCSNAM)$(@F) ? -?MSCMACRO:CSNAM1=$(CCSNAM)$(@F) ? -?MSCMACRO:CSNAM2=$(CCSNAM)$(@F) ? -?MSCMACRO:CSNAM3=$(CCSNAM)$(@F) ? -?MSCMACRO:CSNAMB=$(CCSNAM)$(@F) ? -?BC? -CNOLNK = -c # just generate .OBJ -CPCHUSE = -Hu # use precompiled headers -CPCHGEN = -H # generate precompiled headers -CPCHNAM = -H= # set the name of the precompiled header file -CPCHEXT = .PCH # precompiled header extension -CDEFINE = -D # define a macro -CSTKSZ = -DSTKSIZ= # set stack size -CCSNAM = -zC # set the code segment name -COBJNAM = -o # name the .OBJ file -?ENDBC? -?BCMACRO:CSNAMOA=$$($(@B)_o) ? -?BCMACRO:CSNAMOB=$$($(@B)_o) ? -?BCMACRO:CSNAM0=$$($(@B)_0) ? -?BCMACRO:CSNAM1=$$($(@B)_1) ? -?BCMACRO:CSNAM2=$$($(@B)_2) ? -?BCMACRO:CSNAM3=$$($(@B)_3) ? -?BCMACRO:CSNAMB=$$($(@B)_b) ? - -# -# Linker Options -# - -?MSC? -LWCASE = /NOI # treat case as significant -LMAP = /MAP # create map file -LSTKSZ = /ST: # set stack size -LMAXSEG = /SE:400 # maximum number of segments allowed -LMAXALL = /CPARM:1 # maximum program memory allocation (?) -LINFO = /INFO # display link information while processing -?ENDMSC? -?BC? -LWCASE = /c # treat case as significant -LMAP = /m # create map file -LINIT = $(BCLIB)\C0$(MODEL) # initialization object file -LOVL = /oOVLY # overlay all needed segments -?ENDBC? - -# -# Stack Sizes -# - -STKSUTL = 4096 # Utilities Stack Size -STKSNRM = 5120 # Normal Stack Size - -?MSC? -LUSTACK = $(LSTKSZ)$(STKSUTL) # Utilities Stack Set for Linker -LNSTACK = $(LSTKSZ)$(STKSNRM) # Normal Stack Set for Linker -?ENDMSC? -?BC? -CUSTACK = $(CSTKSZ)$(STKSUTL) # Utilities Stack Set for Compiler -CNSTACK = $(CSTKSZ)$(STKSNRM) # Normal Stack Set for Compiler -?ENDBC? - - -# -######################################################################## -# DLB preparation -# - -! IF ("$(USE_DLB)"=="Y") -DLBFLG = $(CDEFINE)DLB -! ELSE -DLBFLG = -! ENDIF - -# -######################################################################## -# tile preparation -# - -! IF ("$(TILESUPPORT)"=="Y") -TILFLG = $(CDEFINE)USE_TILES -! ELSE -TILFLG = -! ENDIF - -############################################################################# -# -# Overlay switches -# - -COVL0 = $(CDEFINE)OVL0 -COVL1 = $(CDEFINE)OVL1 -COVL2 = $(CDEFINE)OVL2 -COVL3 = $(CDEFINE)OVL3 -COVLB = $(CDEFINE)OVLB - -# -# Flags -# - -FLAGOPT = $(DLBFLG) $(TILFLG) - -# -# Precompiled Header Section -# - -?BC? -#common options (placed in $(BCCFG)) -CFLGTOT = $(CDFLAGS) $(CFLAGS) $(FLAGOPT) $(CW) -#util builds -CFLAGSU = +$(BCCFG) $(CUSTACK) -#normal build, no PCH -CFLAGSN = +$(BCCFG) $(CNSTACK) -?ENDBC? -?MSC? -#util builds -CFLAGSU = $(CDFLAGS) $(CFLAGS) $(CW) $(FLAGOPT) $(CUSTACK) -#normal build, no PCH -CFLAGSN = $(CDFLAGS) $(CFLAGS) $(CW) $(FLAGOPT) $(CNSTACK) -?ENDMSC? -#no optimizations -CFLAGNO = $(CNOOPT) $(CFLAGSN) - -! IF ("$(PRECOMPHEAD)"!="Y") - -CFLAGCO = $(COVLO) -CFLAGUO = $(COVLO) -CFLAGC0 = $(COVL0) -CFLAGU0 = $(COVL0) -CFLAGC1 = $(COVL1) -CFLAGU1 = $(COVL1) -CFLAGC2 = $(COVL2) -CFLAGU2 = $(COVL2) -CFLAGC3 = $(COVL3) -CFLAGU3 = $(COVL3) -CFLAGCB = $(COVLB) -CFLAGUB = $(COVLB) -PCHO = -PCH0 = -PCH1 = -PCH2 = -PCH3 = -PCHB = - -precomp.msg: - @echo Not using precompiled headers... - -! ELSE - -# .o files -CFLAGUO = $(CPCHUSE) $(CPCHNAM)PHO$(CPCHEXT) $(COVLO) -CFLAGCO = $(CPCHGEN) $(CPCHNAM)PHO$(CPCHEXT) $(COVLO) -PCHO = PHO$(CPCHEXT) -# .0 files -CFLAGU0 = $(CPCHUSE) $(CPCHNAM)PH0$(CPCHEXT) $(COVL0) -CFLAGC0 = $(CPCHGEN) $(CPCHNAM)PH0$(CPCHEXT) $(COVL0) -PCH0 = PH0$(CPCHEXT) -# .1 files -CFLAGU1 = $(CPCHUSE) $(CPCHNAM)PH1$(CPCHEXT) $(COVL1) -CFLAGC1 = $(CPCHGEN) $(CPCHNAM)PH1$(CPCHEXT) $(COVL1) -PCH1 = PH1$(CPCHEXT) -# .2 files -CFLAGU2 = $(CPCHUSE) $(CPCHNAM)PH2$(CPCHEXT) $(COVL2) -CFLAGC2 = $(CPCHGEN) $(CPCHNAM)PH2$(CPCHEXT) $(COVL2) -PCH2 = PH2$(CPCHEXT) -# .3 files -CFLAGU3 = $(CPCHUSE) $(CPCHNAM)PH3$(CPCHEXT) $(COVL3) -CFLAGC3 = $(CPCHGEN) $(CPCHNAM)PH3$(CPCHEXT) $(COVL3) -PCH3 = PH3$(CPCHEXT) -# .B files -CFLAGUB = $(CPCHUSE) $(CPCHNAM)PHB$(CPCHEXT) $(COVLB) -CFLAGCB = $(CPCHGEN) $(CPCHNAM)PHB$(CPCHEXT) $(COVLB) -PCHB = PHB$(CPCHEXT) - -precomp.msg: - @echo Using precompiled headers... - -! ENDIF - - -?BC? -FLAGCO = $(CNSTACK) +CFLAGCO.CFG -FLAGUO = $(CNSTACK) +CFLAGUO.CFG -FLAGC0 = $(CNSTACK) +CFLAGC0.CFG -FLAGU0 = $(CNSTACK) +CFLAGU0.CFG -FLAGC1 = $(CNSTACK) +CFLAGC1.CFG -FLAGU1 = $(CNSTACK) +CFLAGU1.CFG -FLAGC2 = $(CNSTACK) +CFLAGC2.CFG -FLAGU2 = $(CNSTACK) +CFLAGU2.CFG -FLAGC3 = $(CNSTACK) +CFLAGC3.CFG -FLAGU3 = $(CNSTACK) +CFLAGU3.CFG -FLAGCB = $(CNSTACK) +CFLAGCB.CFG -FLAGUB = $(CNSTACK) +CFLAGUB.CFG -?ENDBC? -?MSC? -FLAGCO = $(CFLAGSN) $(CFLAGCO) -FLAGUO = $(CFLAGSN) $(CFLAGUO) -FLAGC0 = $(CFLAGSN) $(CFLAGC0) -FLAGU0 = $(CFLAGSN) $(CFLAGU0) -FLAGC1 = $(CFLAGSN) $(CFLAGC1) -FLAGU1 = $(CFLAGSN) $(CFLAGU1) -FLAGC2 = $(CFLAGSN) $(CFLAGC2) -FLAGU2 = $(CFLAGSN) $(CFLAGU2) -FLAGC3 = $(CFLAGSN) $(CFLAGC3) -FLAGU3 = $(CFLAGSN) $(CFLAGU3) -FLAGCB = $(CFLAGSN) $(CFLAGCB) -FLAGUB = $(CFLAGSN) $(CFLAGUB) -?ENDMSC? - -# End of Pre-compiled header section -#=========================================================================== - -?MSC? -# -# Controls whether MOVE tracing is enabled in the executable -# This should be left commented unless you are tinkering with the -# overlay structure of NetHack. The executable runs _very_ -# slowly when the movetr.lib is linked in. -# - -#MOVETR= movetr.lib - -# do not change this -! IF ("$(MOVETR)"!="") -MVTRCL = $(CDEFINE)MOVE_PROF -! ELSE -MVTRCL = -! ENDIF - -?ENDMSC? -# -# Linker options for building various things. -# - -LFLAGSU = $(LDFLAGSU) $(LUSTACK) $(LINIT) -LFLAGSN = $(LDFLAGSN) $(LNSTACK) $(LWCASE) $(LMAXSEG) $(INTOVL) $(LMAXALL) \ - $(LINFO) $(LINIT) $(LOVL) - -# -# Make Roolz dude. -# Due to the inadequacy of some makes these must accord with a -# topological sort of the generated-from relation... output on -# the left, input on the right. Trust me. -# - -.SUFFIXES: .exe .0 .1 .2 .3 .B .o .til .uu .c .y .l - -# -# Rules for files in src -# - - -.c{$(OBJ)}.o: - @$(CC) $(FLAGUO) ?[CSNAMOB]$(COBJNAM)$@ $< - -{$(SRC)}.c{$(OBJ)}.o: - $(CC) $(FLAGUO) ?[CSNAMOB]$(COBJNAM)$@ $< - -{$(SRC)}.c{$(OBJ)}.0: - $(CC) $(FLAGU0) ?[CSNAM0]$(COBJNAM)$@ $< - -{$(SRC)}.c{$(OBJ)}.1: - $(CC) $(FLAGU1) ?[CSNAM1]$(COBJNAM)$@ $< - -{$(SRC)}.c{$(OBJ)}.2: - $(CC) $(FLAGU2) ?[CSNAM2]$(COBJNAM)$@ $< - -{$(SRC)}.c{$(OBJ)}.3: - $(CC) $(FLAGU3) ?[CSNAM3]$(COBJNAM)$@ $< - -{$(SRC)}.c{$(OBJ)}.B: - $(CC) $(FLAGUB) ?[CSNAMB]$(COBJNAM)$@ $< - -# -# Rules for files in sys\share -# - -{$(SYS)}.c{$(OBJ)}.o: - $(CC) $(FLAGUO) ?[CSNAMOA]$(COBJNAM)$@ $< - -{$(SYS)}.c{$(OBJ)}.0: - $(CC) $(FLAGU0) ?[CSNAM0]$(COBJNAM)$@ $< - -{$(SYS)}.c{$(OBJ)}.1: - $(CC) $(FLAGU1) ?[CSNAM1]$(COBJNAM)$@ $< - -{$(SYS)}.c{$(OBJ)}.2: - $(CC) $(FLAGU2) ?[CSNAM2]$(COBJNAM)$@ $< - -{$(SYS)}.c{$(OBJ)}.3: - $(CC) $(FLAGU3) ?[CSNAM3]$(COBJNAM)$@ $< - -{$(SYS)}.c{$(OBJ)}.B: - $(CC) $(FLAGUB) ?[CSNAMB]$(COBJNAM)$@ $< - -# -# Rules for files in sys\msdos -# - -{$(MSYS)}.c{$(OBJ)}.o: - $(CC) $(FLAGUO) ?[CSNAMOA]$(COBJNAM)$@ $< - -{$(MSYS)}.c{$(OBJ)}.0: - $(CC) $(FLAGU0) ?[CSNAM0]$(COBJNAM)$@ $< - -{$(MSYS)}.c{$(OBJ)}.1: - $(CC) $(FLAGU1) ?[CSNAM1]$(COBJNAM)$@ $< - -{$(MSYS)}.c{$(OBJ)}.2: - $(CC) $(FLAGU2) ?[CSNAM2]$(COBJNAM)$@ $< - -{$(MSYS)}.c{$(OBJ)}.3: - $(CC) $(FLAGU3) ?[CSNAM3]$(COBJNAM)$@ $< - -{$(MSYS)}.c{$(OBJ)}.B: - $(CC) $(FLAGUB) ?[CSNAMB]$(COBJNAM)$@ $< - -{$(MSYS)}.h{$(INCL)}.h: - @copy $< $@ - -# -# Rules for files in util -# - -{$(UTIL)}.c{$(OBJ)}.o: - $(CC) $(CFLAGSU) ?[CSNAMOB]$(COBJNAM)$@ $< - -# -# Rules for files in win\share -# - -{$(WSHR)}.c.o: - @$(CC) $(FLAGUO) ?[CSNAMOA]$(COBJNAM)$@ $< - -{$(WSHR)}.c{$(OBJ)}.o: - @$(CC) $(FLAGUO) ?[CSNAMOA]$(COBJNAM)$@ $< - -{$(WSHR)}.h{$(INCL)}.h: - @copy $< $@ - -{$(WSHR)}.txt{$(DAT)}.txt: - @copy $< $@ - -# -# Rules for files in win\tty -# - -{$(WTTY)}.c{$(OBJ)}.o: - $(CC) $(FLAGUO) ?[CSNAMOA]$(COBJNAM)$@ $< - -{$(WTTY)}.c{$(OBJ)}.0: - $(CC) $(FLAGU0) ?[CSNAM0]$(COBJNAM)$@ $< - -{$(WTTY)}.c{$(OBJ)}.1: - $(CC) $(FLAGU1) ?[CSNAM1]$(COBJNAM)$@ $< - -{$(WTTY)}.c{$(OBJ)}.2: - $(CC) $(FLAGU2) ?[CSNAM2]$(COBJNAM)$@ $< - -{$(WTTY)}.c{$(OBJ)}.3: - $(CC) $(FLAGU3) ?[CSNAM3]$(COBJNAM)$@ $< - -{$(WTTY)}.c{$(OBJ)}.B: - $(CC) $(FLAGUB) ?[CSNAMB]$(COBJNAM)$@ $< - -# -# NETHACK OBJECTS -# -# This section creates shorthand macros for many objects -# referenced later on in the Makefile. -# - -# -# Shorten up the location for some files -# - -O = $(OBJ)\ # comment so \ isn't last char - -U = $(UTIL)\ # comment so \ isn't last char - -# -# Utility Objects. -# - -MAKESRC = $(U)makedefs.c - -SPLEVSRC = $(U)lev_yacc.c $(U)lev_$(LEX).c $(U)lev_main.c $(U)panic.c - -DGNCOMPSRC = $(U)dgn_yacc.c $(U)dgn_$(LEX).c $(U)dgn_main.c - -MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o - -?LIST:SPLEVOBJS? - $(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o - $(O)alloc.o $(O)decl.o $(O)drawing.o - $(O)monst.o $(O)objects.o $(O)panic.o $(O)stubvid.o -?ENDLIST? - -?LIST:DGNCOMPOBJS? - $(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o - $(O)alloc.o $(O)panic.o -?ENDLIST? - -RECOVOBJS = $(O)recover.o - -?LIST:GIFREADERS? - $(O)gifread.o $(O)alloc.o $(O)panic.o -?ENDLIST? - -?LIST:TEXT_IO? - $(O)tiletext.o $(O)tiletxt.o $(O)drawing.o - $(O)decl.o $(O)monst.o $(O)objects.o - $(O)stubvid.o -?ENDLIST? - -PPMWRITERS = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o - -?LIST:GIFREAD2? - $(O)gifread2.o $(O)alloc.o $(O)panic.o -?ENDLIST? - -?LIST:TEXT_IO2? - $(O)tiletex2.o $(O)tiletxt2.o $(O)drawing.o - $(O)decl.o $(O)monst.o $(O)objects.o - $(O)stubvid.o -?ENDLIST? - -PPMWRIT2 = $(O)ppmwrit2.o $(O)alloc.o $(O)panic.o - -TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt - -TILEFILES2 = $(WSHR)\monthin.txt $(WSHR)\objthin.txt $(WSHR)\oththin.txt - -DLBOBJS = $(O)dlb_main.o $(O)dlb.o $(O)alloc.o $(O)panic.o - -# -# Object files for the game itself. -# - -OBJ01 = $(O)alloc.o $(RANDOM) $(O)decl.o $(O)objects.o \ - $(O)muse.o $(O)display.o $(O)vision.o \ - $(O)rect.o $(O)vis_tab.o $(O)monst.o $(O)wintty.o \ - $(O)files.o $(O)sys.o $(O)monstr.o $(O)minion.o \ - $(O)worm.o $(O)detect.o $(O)exper.o $(O)mplayer.o \ - $(O)uhitm.o $(O)pager.o $(O)windows.o $(O)quest.o \ - $(O)questpgr.o $(O)write.o $(O)drawing.o $(O)dokick.o \ - $(O)dothrow.o $(O)pickup.o $(O)pray.o $(O)spell.o \ - $(O)ball.o $(O)wield.o $(O)worn.o $(O)fountain.o \ - $(O)music.o $(O)rumors.o $(O)dlb.o $(O)sit.o \ - $(O)bones.o $(O)mklev.o $(O)save.o $(O)restore.o \ - $(O)mkmaze.o $(O)mkmap.o $(O)end.o $(O)o_init.o \ - $(O)options.o $(O)rip.o $(O)sound.o $(O)teleport.o \ - $(O)topten.o $(O)tty.o $(O)u_init.o $(O)extralev.o \ - $(O)sp_lev.o $(O)dig.o $(O)pckeys.o $(O)role.o \ - $(O)steed.o $(O)region.o - -OVL0 = $(O)allmain.0 $(O)apply.0 $(O)artifact.0 $(O)attrib.0 \ - $(O)botl.0 $(O)cmd.0 $(O)dbridge.0 $(O)do.0 \ - $(O)do_name.0 $(O)do_wear.0 $(O)dogmove.0 $(O)dungeon.0 \ - $(O)eat.0 $(O)engrave.0 $(O)hacklib.0 $(O)invent.0 \ - $(O)lock.0 $(O)pcmain.0 $(O)mail.0 $(O)makemon.0 \ - $(O)mcastu.0 $(O)mhitm.0 $(O)mhitu.0 $(O)mkobj.0 \ - $(O)mkroom.0 $(O)mon.0 $(O)mondata.0 $(O)monmove.0 \ - $(O)mthrowu.0 $(O)objnam.0 $(O)polyself.0 $(O)priest.0 \ - $(O)rnd.0 $(O)shknam.0 $(O)sounds.0 $(O)steal.0 \ - $(O)timeout.0 $(O)track.0 $(O)trap.0 $(O)vault.0 \ - $(O)weapon.0 $(O)were.0 $(O)wizard.0 $(O)msdos.0 \ - $(O)termcap.0 $(O)video.0 $(O)vidtxt.0 $(O)zap.0 \ - $(O)explode.0 $(O)shk.0 - -OVL1 = $(O)allmain.1 $(O)apply.1 $(O)artifact.1 $(O)attrib.1 \ - $(O)botl.1 $(O)cmd.1 $(O)dbridge.1 $(O)do.1 \ - $(O)do_wear.1 $(O)dog.1 $(O)dungeon.1 $(O)eat.1 \ - $(O)engrave.1 $(O)hack.1 $(O)hacklib.1 $(O)invent.1 \ - $(O)makemon.1 $(O)mhitu.1 $(O)mkobj.1 $(O)mon.1 \ - $(O)mondata.1 $(O)monmove.1 $(O)mthrowu.1 $(O)objnam.1 \ - $(O)pcmain.1 $(O)polyself.1 $(O)rnd.1 $(O)shk.1 \ - $(O)steal.1 $(O)timeout.1 $(O)track.1 $(O)trap.1 \ - $(O)weapon.1 $(O)getline.1 $(O)termcap.1 $(O)topl.1 \ - $(O)video.1 $(O)zap.1 $(O)explode.1 - -OVL2 = $(O)attrib.2 $(O)do.2 $(O)do_name.2 $(O)do_wear.2 \ - $(O)dog.2 $(O)engrave.2 $(O)hack.2 $(O)hacklib.2 \ - $(O)invent.2 $(O)makemon.2 $(O)mon.2 $(O)mondata.2 \ - $(O)monmove.2 $(O)getline.2 $(O)shk.2 $(O)topl.2 \ - $(O)trap.2 $(O)zap.2 - -OVL3 = $(O)do.3 $(O)hack.3 $(O)invent.3 $(O)light.3 \ - $(O)shk.3 $(O)trap.3 $(O)zap.3 - - -OVLB = $(O)allmain.B $(O)apply.B $(O)artifact.B $(O)attrib.B \ - $(O)botl.B $(O)cmd.B $(O)dbridge.B $(O)do.B \ - $(O)do_name.B $(O)do_wear.B $(O)dog.B $(O)dogmove.B \ - $(O)eat.B $(O)engrave.B $(O)hack.B $(O)hacklib.B \ - $(O)invent.B $(O)lock.B $(O)mail.B $(O)makemon.B \ - $(O)mcastu.B $(O)mhitm.B $(O)mhitu.B $(O)mkobj.B \ - $(O)mkroom.B $(O)mon.B $(O)mondata.B $(O)monmove.B \ - $(O)mthrowu.B $(O)objnam.B $(O)pcmain.B $(O)pline.B \ - $(O)polyself.B $(O)potion.B $(O)priest.B $(O)read.B \ - $(O)rnd.B $(O)shk.B $(O)shknam.B $(O)sounds.B \ - $(O)steal.B $(O)timeout.B $(O)track.B $(O)trap.B \ - $(O)vault.B $(O)weapon.B $(O)were.B $(O)wizard.B \ - $(O)msdos.B $(O)pcunix.B $(O)termcap.B $(O)topl.B \ - $(O)video.B $(O)vidtxt.B $(O)zap.B - -TILOBJ = $(TILEGAME) $(TILEVGA) - -VVOBJ = $(O)version.o - -NVOBJ = $(OBJ01) $(OVL0) $(OVL1) $(OVL2) \ - $(OVL3) $(OVLB) $(TILOBJ) - -ALLOBJ= $(NVOBJ) $(VVOBJ) $(OVLINIT) - -# -# Header objects -# - -# This comment copied from sys/unix/Makefile.src, -# extern.h is ignored, even though its declared function types may affect the -# compilation of all the .c files, since extern.h changes every time the -# type of an external function does, and we would spend all our time recompiling -# if we did not ignore it. -#EXTERN_H = $(INCL)\extern.h -EXTERN_H = -PCCONF_H = $(INCL)\pcconf.h $(INCL)\micro.h $(INCL)\system.h -PERMONST_H = $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\align.h -YOUPROP_H = $(INCL)\prop.h $(PERMONST_H) $(INCL)\pm.h $(INCL)\youprop.h \ - $(INCL)\mondata.h -YOU_H = $(INCL)\attrib.h $(INCL)\monst.h $(YOUPROP_H) $(INCL)\align.h -DECL_H = $(INCL)\quest.h $(INCL)\spell.h $(INCL)\color.h \ - $(INCL)\obj.h $(YOU_H) $(INCL)\onames.h $(INCL)\pm.h - -CONFIG_H = $(INCL)\tradstdc.h $(INCL)\coord.h $(PCCONF_H) $(INCL)\config.h -HACK_H = $(CONFIG_H) $(INCL)\dungeon.h $(INCL)\align.h $(INCL)\monsym.h \ - $(INCL)\mkroom.h $(INCL)\objclass.h $(DECL_H) \ - $(INCL)\timeout.h $(INCL)\trap.h $(INCL)\flag.h $(INCL)\rm.h \ - $(INCL)\vision.h $(INCL)\mondata.h $(INCL)\wintype.h \ - $(INCL)\engrave.h $(INCL)\rect.h $(EXTERN_H) \ - $(INCL)\winprocs.h $(INCL)\trampoli.h $(INCL)\display.h -TILE_H = $(INCL)\tile.h $(INCL)\pctiles.h -PCVIDEO_H = $(INCL)\portio.h $(INCL)\pcvideo.h -ALIGN_H = $(INCL)\align.h -ARTIFACT_H = $(INCL)\artifact.h -ARTILIST_H = $(INCL)\artilist.h -COLOR_H = $(INCL)\color.h -DATE_H = $(INCL)\date.h -DGN_FILE_H = $(INCL)\dgn_file.h -DLB_H = $(INCL)\dlb.h -EMIN_H = $(INCL)\emin.h -EPRI_H = $(INCL)\epri.h -ESHK_H = $(INCL)\eshk.h -EDOG_H = $(INCL)\edog.h -FUNC_TAB_H = $(INCL)\func_tab.h -LEV_H = $(INCL)\lev.h -LEV_COMP_H = $(INCL)\lev_comp.h -MAIL_H = $(INCL)\mail.h -MFNDPOS_H = $(INCL)\mfndpos.h -MONSYM_H = $(INCL)\monsym.h -OBJ_H = $(INCL)\obj.h -OBJCLASS_H = $(INCL)\objclass.h -OBJECTS_H = $(INCL)\objects.h -PROP_H = $(INCL)\prop.h -QTEXT_H = $(INCL)\qtext.h -QUEST_H = $(INCL)\quest.h -SP_LEV_H = $(INCL)\sp_lev.h -TERMCAP_H = $(INCL)\tcap.h -VAULT_H = $(INCL)\vault.h -VIS_TAB_H = $(INCL)\vis_tab.h -WINTTY_H = $(INCL)\wintty.h - -# -# In the unix distribution this file is patchlevel.h, make it 8.3 here -# to avoid an nmake warning under dos. -# - -PATCHLEVEL_H = $(INCL)\patchlev.h - - -# -# The name of the game. -# - -GAMEFILE = $(GAMEDIR)\$(GAME).exe - -# -# make data.base an 8.3 filename to prevent an nmake warning -# - -DATABASE = $(DAT)\data.bas - -####################################################################### -# -# TARGETS - -# -# The main target. -# - -$(GAME): obj.tag envchk $(U)utility.tag $(GAMEFILE) - @echo $(GAME) is up to date. - -# -# Everything -# - -all : install - -install: $(GAME) install.tag - @echo Done. - - -install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ - $(DAT)\oracles $(DAT)\quest.dat $(DAT)\sp_lev.tag $(DLB) -! IF ("$(USE_DLB)"=="Y") - copy nhdat $(GAMEDIR) - copy $(DAT)\license $(GAMEDIR) -! ELSE - copy $(DAT)\*. $(GAMEDIR) - copy $(DAT)\*.dat $(GAMEDIR) - copy $(DAT)\*.lev $(GAMEDIR) - copy $(MSYS)\msdoshlp.txt $(GAMEDIR) - if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile -! ENDIF - copy $(SYS)\termcap $(GAMEDIR) - if exist $(DOC)\guideb*.txt copy $(DOC)\guideb*.txt $(GAMEDIR) - if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt - if exist $(DOC)\recover.txt copy $(DOC)\recover.txt $(GAMEDIR) - copy $(SYS)\nethack.cnf $(GAMEDIR)\defaults.nh - copy $(U)recover.exe $(GAMEDIR) - if exist *.tib copy *.tib $(GAMEDIR) - echo install done > $@ - -$(DAT)\sp_lev.tag: $(U)utility.tag $(DAT)\bigroom.des $(DAT)\castle.des \ - $(DAT)\endgame.des $(DAT)\gehennom.des $(DAT)\knox.des \ - $(DAT)\medusa.des $(DAT)\oracle.des $(DAT)\tower.des \ - $(DAT)\yendor.des $(DAT)\arch.des $(DAT)\barb.des \ - $(DAT)\caveman.des $(DAT)\elf.des $(DAT)\healer.des \ - $(DAT)\knight.des $(DAT)\priest.des $(DAT)\rogue.des \ - $(DAT)\samurai.des $(DAT)\tourist.des $(DAT)\valkyrie.des \ - $(DAT)\wizard.des - cd $(DAT) - $(U)lev_comp bigroom.des - $(U)lev_comp castle.des - $(U)lev_comp endgame.des - $(U)lev_comp gehennom.des - $(U)lev_comp knox.des - $(U)lev_comp mines.des - $(U)lev_comp medusa.des - $(U)lev_comp oracle.des - $(U)lev_comp tower.des - $(U)lev_comp yendor.des - $(U)lev_comp arch.des - $(U)lev_comp barb.des - $(U)lev_comp caveman.des - $(U)lev_comp elf.des - $(U)lev_comp healer.des - $(U)lev_comp knight.des - $(U)lev_comp priest.des - $(U)lev_comp rogue.des - $(U)lev_comp samurai.des - $(U)lev_comp tourist.des - $(U)lev_comp valkyrie.des - $(U)lev_comp wizard.des - cd $(SRC) - echo sp_levs done > $(DAT)\sp_lev.tag - -$(U)utility.tag: envchk $(INCL)\date.h $(INCL)\onames.h \ - $(INCL)\pm.h $(SRC)\monstr.c $(SRC)\vis_tab.c \ - $(U)lev_comp.exe $(VIS_TAB_H) $(U)dgn_comp.exe \ - $(U)recover.exe $(TILEUTIL) - @echo utilities made >$@ - @echo utilities made. - -tileutil: $(U)gif2txt.exe $(U)txt2ppm.exe - @echo Optional tile development utilities are up to date. - -?MSC? -# The section for linking the NetHack image looks a little strange at -# first, especially if you are used to UNIX makes, or NDMAKE. It is -# Microsoft nmake specific, and it gets around the problem of the link -# command line being too long for the linker. An "in-line" linker -# response file is generated temporarily. -# -# It takes advantage of the following features of nmake: -?ENDMSC? -# -# Inline files : -# Specifying the "<<" means to start an inline file. -# Another "<<" at the start of a line closes the -# inline file. -# -?MSC? -# Substitution within Macros: -# $(mymacro:string1=string2) replaces every -# occurrence of string1 with string2 in the -# macro mymacro. Special ascii key codes may be -# used in the substitution text by preceding it -# with ^ as we have done below. Every occurrence -# of a in $(ALLOBJ) is replaced by -# <+>. -# -?ENDMSC? -# DO NOT INDENT THE << below! -# - -?MSC? -$(GAMEFILE) : $(LNKOPT) $(ALLOBJ) -?ENDMSC? -?BC? -$(GAMEFILE) : $(ALLOBJ) -?ENDBC? - @echo Linking.... - $(LINK) $(LFLAGSN) @<<$(GAME).lnk -?BC? - $(ALLOBJ) -?ENDBC? -?MSC? - $(ALLOBJ:^ =+^ - ) -?ENDMSC? - $(GAMEFILE) - $(GAME) - $(TERMLIB) $(MOVETR) $(CLIB) $(BCOVL) $(BCMDL) -?MSC? - $(LNKOPT); -?ENDMSC? -<< - @if exist $(GAMEDIR)\$(GAME).bak del $(GAMEDIR)\$(GAME).bak - -# -# Makedefs Stuff -# - -$(U)makedefs.exe: $(MAKEOBJS) - @$(LINK) $(LFLAGSU) $(MAKEOBJS), $@,, $(CLIB) $(BCMDL); - -$(O)makedefs.o: $(CONFIG_H) $(PERMONST_H) $(OBJCLASS_H) \ - $(MONSYM_H) $(QTEXT_H) $(PATCHLEVEL_H) \ - $(U)makedefs.c - @$(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)makedefs.c - -# -# date.h should be remade every time any of the source or include -# files is modified. -# - -$(INCL)\date.h : $(U)makedefs.exe - $(U)makedefs -v - @echo A new $@ has been created. - -$(INCL)\onames.h : $(U)makedefs.exe - $(U)makedefs -o - -$(INCL)\pm.h : $(U)makedefs.exe - $(U)makedefs -p - -#$(INCL)\trap.h : $(U)makedefs.exe -# $(U)makedefs -t - -$(SRC)\monstr.c: $(U)makedefs.exe - $(U)makedefs -m - -$(INCL)\vis_tab.h: $(U)makedefs.exe - $(U)makedefs -z - -$(SRC)\vis_tab.c: $(U)makedefs.exe - $(U)makedefs -z - -# -# Level Compiler Stuff -# - -$(U)lev_comp.exe: $(SPLEVOBJS) - @echo Linking $@... -?MSC? - $(LINK) $(LFLAGSU) @<<$(@B).lnk -?ENDMSC? -?BC? - $(LINK) $(LFLAGSU) @&&! -?ENDBC? -?LINKLIST:SPLEVOBJS? - $@ - $(@B) - $(BCMDL); -?MSC? -<< -?ENDMSC? -?BC? -! -?ENDBC? - -$(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h $(U)lev_yacc.c - @$(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)lev_yacc.c - -$(O)lev_$(LEX).o: $(HACK_H) $(INCL)\lev_comp.h $(SP_LEV_H) \ - $(U)lev_$(LEX).c - $(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)lev_$(LEX).c - -$(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H) - @$(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)lev_main.c - -$(U)lev_yacc.c $(INCL)\lev_comp.h : $(U)lev_comp.y -! IF "$(DO_YACC)"=="YACC_ACT" - $(YACC) -d -l $(U)lev_comp.y - copy $(YTABC) $(U)lev_yacc.c - copy $(YTABH) $(INCL)\lev_comp.h - @del $(YTABC) - @del $(YTABH) -! ELSE - @echo. - @echo $(U)lev_comp.y has changed. - @echo To update $(U)lev_yacc.c and $(INCL)\lev_comp.h run $(YACC). - @echo. - @echo For now, we will copy the prebuilt lev_yacc.c - @echo from $(SYS) to $(U)lev_yacc.c, and copy the prebuilt - @echo lev_comp.h from $(SYS) to $(UTIL)\lev_comp.h - @echo and use those. - @echo. - copy $(SYS)\lev_yacc.c $@ >nul - touch $@ - copy $(SYS)\lev_comp.h $(INCL)\lev_comp.h >nul - touch $(INCL)\lev_comp.h -! ENDIF - -$(U)lev_$(LEX).c: $(U)lev_comp.l -! IF "$(DO_LEX)"=="LEX_ACT" - $(LEX) $(FLEXSKEL) $(U)lev_comp.l - copy $(LEXYYC) $@ - @del $(LEXYYC) -! ELSE - @echo. - @echo $(U)lev_comp.l has changed. To update $@ run $(LEX). - @echo. - @echo For now, we will copy a prebuilt lev_lex.c - @echo from $(SYS) to $@ and use it. - @echo. - copy $(SYS)\lev_lex.c $@ >nul - touch $@ -! ENDIF - -# -# Dungeon Stuff -# - -$(U)dgn_comp.exe: $(DGNCOMPOBJS) - @echo Linking $@... -?MSC? - $(LINK) $(LFLAGSU) @<<$(@B).lnk -?ENDMSC? -?BC? - $(LINK) $(LFLAGSU) @&&! -?ENDBC? -?LINKLIST:DGNCOMPOBJS? - $@ - $(@B) - $(BCMDL); -?MSC? -<< -?ENDMSC? -?BC? -! -?ENDBC? - -$(O)dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h \ - $(U)dgn_yacc.c - @$(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)dgn_yacc.c - -$(O)dgn_$(LEX).o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h \ - $(U)dgn_$(LEX).c - @$(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)dgn_$(LEX).c - -$(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c - @$(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)dgn_main.c - -$(U)dgn_yacc.c $(INCL)\dgn_comp.h : $(U)dgn_comp.y -! IF "$(DO_YACC)"=="YACC_ACT" - $(YACC) -d -l $(U)dgn_comp.y - copy $(YTABC) $(U)dgn_yacc.c - copy $(YTABH) $(INCL)\dgn_comp.h - @del $(YTABC) - @del $(YTABH) -! ELSE - @echo. - @echo $(U)dgn_comp.y has changed. To update $@ and - @echo $(INCL)\dgn_comp.h run $(YACC). - @echo. - @echo For now, we will copy the prebuilt dgn_yacc.c from - @echo $(SYS) to $(U)dgn_yacc.c, and copy the prebuilt - @echo dgn_comp.h from $(SYS) to $(INCL)\dgn_comp.h - @echo and use those. - @echo. - copy $(SYS)\dgn_yacc.c $@ >nul - touch $@ - copy $(SYS)\dgn_comp.h $(INCL)\dgn_comp.h >nul - touch $(INCL)\dgn_comp.h -! ENDIF - -$(U)dgn_$(LEX).c: $(U)dgn_comp.l -! IF "$(DO_LEX)"=="LEX_ACT" - $(LEX) $(FLEXSKEL) $(U)dgn_comp.l - copy $(LEXYYC) $@ - @del $(LEXYYC) -! ELSE - @echo. - @echo $(U)dgn_comp.l has changed. To update $@ run $(LEX). - @echo. - @echo For now, we will copy a prebuilt dgn_lex.c - @echo from $(SYS) to $@ and use it. - @echo. - copy $(SYS)\dgn_lex.c $@ >nul - touch $@ -! ENDIF - - -obj.tag: - @if not exist $(O)*.* mkdir $(OBJ) - @echo directory $(OBJ) created - @echo directory $(OBJ) created >$@ - -?MSC? -# -# The correct switches for the C compiler depend on the CL environment -# variable being set correctly. This will check that it is. -# The correct setting needs to be: -# CL= /AL /G2 /Oo /Gs /Gt16 /Zp1 /W0 /I..\include /nologo /DMOVERLAY -# - -?ENDMSC? -envchk: precomp.msg -?MSC? -! IF ("$(CL)"=="") -! MESSAGE The CL environment variable is not defined! -! MESSAGE You must CD $(MSYS) and execute the SETUP.BAT procedure -! MESSAGE ie. setup MSC -! MESSAGE -! ERROR -! ELSE - @echo CL Environment variable is defined: - @echo CL=$(CL) -! ENDIF -?ENDMSC? -?COMMENT? -# CL= /AL /G2 /Oo /Gs /Gt16 /Zp1 /W0 /I..\include /nologo /DMOVERLAY -?ENDCOMMENT? -?BC? -# -# Borland Configuration File Section -# - @echo Making Borland configuration files... - @echo -Y -O -Z -Oe -Ob -Os -Ff -I$(BCINCL);$(INCL) > $(BCCFG) - @echo -m$(MODEL) -D__IO_H $(CFLGTOT) -DSTRNCMPI >> $(BCCFG) - @type $(BCCFG) > CFLAGCO.CFG - @type $(BCCFG) > CFLAGUO.CFG - @type $(BCCFG) > CFLAGC0.CFG - @type $(BCCFG) > CFLAGU0.CFG - @type $(BCCFG) > CFLAGC1.CFG - @type $(BCCFG) > CFLAGU1.CFG - @type $(BCCFG) > CFLAGC2.CFG - @type $(BCCFG) > CFLAGU2.CFG - @type $(BCCFG) > CFLAGC3.CFG - @type $(BCCFG) > CFLAGU3.CFG - @type $(BCCFG) > CFLAGCB.CFG - @type $(BCCFG) > CFLAGUB.CFG - @echo -Y $(CFLAGCO) >> CFLAGCO.CFG - @echo -Y $(CFLAGUO) >> CFLAGUO.CFG - @echo -Y $(CFLAGC0) >> CFLAGC0.CFG - @echo -Y $(CFLAGU0) >> CFLAGU0.CFG - @echo -Y $(CFLAGC1) >> CFLAGC1.CFG - @echo -Y $(CFLAGU1) >> CFLAGU1.CFG - @echo -Y $(CFLAGC2) >> CFLAGC2.CFG - @echo -Y $(CFLAGU2) >> CFLAGU2.CFG - @echo -Y $(CFLAGC3) >> CFLAGC3.CFG - @echo -Y $(CFLAGU3) >> CFLAGU3.CFG - @echo -Y $(CFLAGCB) >> CFLAGCB.CFG - @echo -Y $(CFLAGUB) >> CFLAGUB.CFG -?ENDBC? -! IF "$(TILEGAME)"=="" - @echo. - @echo NOTE: This build will NOT include tile support. - @echo. -! ELSE - @echo. - @echo This build includes tile support. - @echo. -! ENDIF - -# -# SECONDARY TARGETS -# - -# -# Header files NOT distributed in ..\include -# - -$(INCL)\tile.h: $(WSHR)\tile.h - copy $(WSHR)\tile.h $@ - -$(INCL)\pctiles.h: $(MSYS)\pctiles.h - copy $(MSYS)\pctiles.h $@ - -$(INCL)\pcvideo.h: $(MSYS)\pcvideo.h - copy $(MSYS)\pcvideo.h $@ - -$(INCL)\portio.h: $(MSYS)\portio.h - copy $(MSYS)\portio.h $@ - -# -# Recover Utility -# - -$(U)recover.exe: $(RECOVOBJS) - @$(LINK) $(LFLAGSU) $(RECOVOBJS),$@,, $(CLIB) $(BCMDL); - -# -# Tile Mapping -# - -$(SRC)\tile.c: $(U)tilemap.exe - @echo A new $@ is being created. - @$(U)tilemap - -$(U)tilemap.exe: $(O)tilemap.o - @$(LINK) $(LFLAGSU) $(O)tilemap.o,$@,, $(CLIB) $(BCMDL); - -$(O)tilemap.o: $(WSHR)\tilemap.c $(HACK_H) - $(CC) $(CFLAGSU) $(COBJNAM)$@ $(WSHR)\tilemap.c - - -# -# Tile Utilities -# - -# -# Optional (for development) -# - - - -# - -$(U)gif2txt.exe: $(GIFREADERS) $(TEXT_IO) - @$(LINK) $(LFLAGSU) $(GIFREADERS) $(TEXT_IO),$@,, \ - $(CLIB) $(BCMDL); - -$(U)txt2ppm.exe: $(PPMWRITERS) $(TEXT_IO) - @$(LINK) $(LFLAGSU) $(PPMWRITERS) $(TEXT_IO),$@,, \ - $(CLIB) $(BCMDL); - -$(U)gif2txt2.exe: $(GIFREAD2) $(TEXT_IO2) - @$(LINK) $(LFLAGSU) $(GIFREAD2) $(TEXT_IO2),$@,, \ - $(CLIB) $(BCMDL); - -$(U)txt2ppm2.exe: $(PPMWRIT2) $(TEXT_IO2) - @$(LINK) $(LFLAGSU) $(PPMWRIT2) $(TEXT_IO2),$@,, \ - $(CLIB) $(BCMDL); - -# -# Required for tile support -# - -NetHack1.tib: $(TILEFILES) $(U)tile2bin.exe - @echo Creating binary tile files (this may take some time) - @$(U)tile2bin - -NetHackO.tib: thintile.tag $(TILEFILES2) $(U)til2bin2.exe - @echo Creating overview binary tile files (this may take some time) - @$(U)til2bin2 - -thintile.tag: $(U)thintile.exe $(TILEFILES) - $(U)thintile - @echo thintiles created >thintile.tag - -$(U)tile2bin.exe: $(O)tile2bin.o $(TEXT_IO) - @echo Linking $@... -?MSC? - $(LINK) $(LFLAGSU) @<<$(@B).lnk -?ENDMSC? -?BC? - $(LINK) $(LFLAGSU) @&&! -?ENDBC? - $(O)tile2bin.o+ -?LINKLIST:TEXT_IO? - $@ - $(@B) - $(BCMDL); -?MSC? -<< -?ENDMSC? -?BC? -! -?ENDBC? - -$(U)til2bin2.exe: $(O)til2bin2.o $(TEXT_IO2) - @echo Linking $@... -?MSC? - $(LINK) $(LFLAGSU) @<<$(@B).lnk -?ENDMSC? -?BC? - $(LINK) $(LFLAGSU) @&&! -?ENDBC? - $(O)til2bin2.o+ -?LINKLIST:TEXT_IO2? - $@ - $(@B) - $(BCMDL); -?MSC? -<< -?ENDMSC? -?BC? -! -?ENDBC? - - -$(U)thintile.exe: $(O)thintile.o - @$(LINK) $(LFLAGSU) $(O)thintile.o,$@,, $(CLIB) $(BCMDL); - -$(O)thintile.o: $(HACK_H) $(INCL)\tile.h $(WSHR)\thintile.c - $(CC) $(CFLAGSU) $(COBJNAM)$@ $(WSHR)\thintile.c - -$(O)tile2bin.o: $(HACK_H) $(TILE_H) $(PCVIDEO_H) - $(CC) $(CFLAGSU) $(COBJNAM)$@ $(MSYS)\tile2bin.c - -$(O)til2bin2.o: $(HACK_H) $(TILE_H) $(PCVIDEO_H) - $(CC) $(CFLAGSU) $(CDEFINE)TILE_X=8 $(CDEFINE)OVERVIEW_FILE \ - $(COBJNAM)$@ $(MSYS)\tile2bin.c - -?COMMENT? -$(U)tile2btb.exe: $(O)tile2btb.o $(GIFREADERS) - @echo Linking $@... - $(LINK) $(LFLAGSU) @&&! - $(O)tile2btb.o+ -?LINKLIST:GIFREADERS? - $@ - $(@B) - $(BCMDL) $(BGI_LIB); -! - -$(O)tile2btb.o: $(HACK_H) $(TILE_H) $(PCVIDEO_H) $(MSYS)\tile2btb.c - $(CC) -DBGI_FILE $(CFLAGSU) $(COBJNAM)$@ $(MSYS)\tile2btb.c -?ENDCOMMENT? - -# -# DLB stuff -# - -nhdat: $(U)dlb_main.exe - @copy $(MSYS)\msdoshlp.txt $(DAT) - @cd $(DAT) - @echo data >dlb.lst - @echo oracles >>dlb.lst - @echo options >>dlb.lst - @echo quest.dat >>dlb.lst - @echo rumors >>dlb.lst - @echo help >>dlb.lst - @echo hh >>dlb.lst - @echo cmdhelp >>dlb.lst - @echo history >>dlb.lst - @echo opthelp >>dlb.lst - @echo wizhelp >>dlb.lst - @echo dungeon >>dlb.lst - @echo license >>dlb.lst - @echo msdoshlp.txt >>dlb.lst - @for %%N in (*.lev) do echo %%N >>dlb.lst - $(U)dlb_main cvIf dlb.lst $(SRC)\nhdat - @cd $(SRC) - -$(U)dlb_main.exe: $(DLBOBJS) - @$(LINK) $(LFLAGSU) $(DLBOBJS),$@,, $(CLIB) $(BCMDL); - -$(O)dlb_main.o: $(U)dlb_main.c $(INCL)\config.h $(DLB_H) - $(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)dlb_main.c - -# -# Housekeeping -# - -spotless: clean - rmdir $(OBJ) - if exist $(DATE_H) del $(DATE_H) - if exist $(INCL)\onames.h del $(INCL)\onames.h - if exist $(INCL)\pm.h del $(INCL)\pm.h - if exist $(VIS_TAB_H) del $(VIS_TAB_H) - if exist $(SRC)\vis_tab.c del $(SRC)\vis_tab.c - if exist $(SRC)\tile.c del $(SRC)\tile.c - if exist $(DAT)\rumors del $(DAT)\rumors - if exist $(DAT)\data del $(DAT)\data - if exist $(DAT)\dungeon del $(DAT)\dungeon - if exist $(DAT)\dungeon.pdf del $(DAT)\dungeon.pdf - if exist $(DAT)\options del $(DAT)\options - if exist $(DAT)\oracles del $(DAT)\oracles - if exist $(DAT)\rumors del $(DAT)\rumors - if exist $(DAT)\quest.dat del $(DAT)\quest.dat - if exist $(DAT)\*.lev del $(DAT)\*.lev - if exist $(DAT)\sp_lev.tag del $(DAT)\sp_lev.tag - if exist $(SRC)\monstr.c del $(SRC)\monstr.c - if exist $(SRC)\vis_tab.c del $(SRC)\vis_tab.c - if exist $(SRC)\$(PLANAR_TIB) del $(SRC)\$(PLANAR_TIB) - if exist $(SRC)\$(OVERVIEW_TIB) del $(SRC)\$(OVERVIEW_TIB) - if exist $(U)recover.exe del $(U)recover.exe - -clean: - if exist $(O)*.o del $(O)*.o - if exist $(O)*.0 del $(O)*.0 - if exist $(O)*.1 del $(O)*.1 - if exist $(O)*.2 del $(O)*.2 - if exist $(O)*.3 del $(O)*.3 - if exist $(O)*.b del $(O)*.b - if exist $(U)utility.tag del $(U)utility.tag - if exist $(U)makedefs.exe del $(U)makedefs.exe - if exist $(U)lev_comp.exe del $(U)lev_comp.exe - if exist $(U)dgn_comp.exe del $(U)dgn_comp.exe - if exist $(U)dlb_main.exe del $(U)dlb_main.exe - if exist $(SRC)\*.lnk del $(SRC)\*.lnk - if exist $(SRC)\*.map del $(SRC)\*.map - if exist $(SRC)\*$(CPCHEXT) del $(SRC)\*$(CPCHEXT) -?BC? - if exist $(SRC)\*.cfg del $(SRC)\*.cfg -?ENDBC? - if exist $(DAT)\dlb.lst del $(DAT)\dlb.lst - -pch.c: $(HACK_H) - @echo ^#include "hack.h" > $@ - @echo main(int argc, char *argv[]) >> $@ - @echo { >> $@ - @echo } >> $@ - @echo. >> $@ - -# -# OTHER DEPENDENCIES -# - -# -# Precompiled Header dependencies -# (We need to force the generation of these at the beginning) -# - -PHO$(CPCHEXT): $(HACK_H) pch.c - @echo Generating new precompiled header for .O files - @$(CC) $(FLAGCO) pch.c -PH0$(CPCHEXT): $(HACK_H) pch.c - @echo Generating new precompiled header for .0 files - @$(CC) $(FLAGC0) pch.c -PH1$(CPCHEXT): $(HACK_H) pch.c - @echo Generating new precompiled header for .1 files - @$(CC) $(FLAGC1) pch.c -PH2$(CPCHEXT): $(HACK_H) pch.c - @echo Generating new precompiled header for .2 files - @$(CC) $(FLAGC2) pch.c -PH3$(CPCHEXT): $(HACK_H) pch.c - @echo Generating new precompiled header for .3 files - @$(CC) $(FLAGC3) pch.c -PHB$(CPCHEXT): $(HACK_H) pch.c - @echo Generating new precompiled header for .B files - @$(CC) $(FLAGCB) pch.c - -?MSC? -# -# Compiler supplied, manually moved file - MOVEINIT.C. -# - This is only compiled if you selected the alternate overlay -# schema3. (MOVEAPI.H must reside in your include search list, -# and MOVEINIT.C must be in your src directory). The patch -# in sys/msdos/moveinit.pat must be applied to moveinit.c -# MS will not allow us to distribute an already patched version. - -$(O)moveinit.o: $(SRC)\moveinit.c - $(CC) $(CFLAGSN) $(COBJNAM)$@ $(MVTRCL) $(SRC)\moveinit.c - -$(SRC)\moveinit.c: - @echo. - @echo * CANNOT COMPLETE THE BUILD * - @echo You must manually copy moveinit.c and moveinit.h - @echo from your Microsoft C Compiler directory tree - @echo source/move directory and apply the sys/msdos/moveinit.pat - @echo patch to moveinit.c after doing so. - @echo. -?ENDMSC? - -?BC? -# Overlay initialization routines used by pcmain() at startup to -# determine EMS/XMS memory usage. - -# Comment out the following line if you don't want Borland C++ to check for -# extended memory. -RECOGNIZE_XMS = $(CDEFINE)RECOGNIZE_XMS - -?ENDBC? -?MSC? -# Overlay initialization routines used by MOVEINIT.C -?ENDMSC? - -$(O)ovlinit.o: $(MSYS)\ovlinit.c $(HACK_H) - $(CC) $(CFLAGSN) $(RECOGNIZE_XMS) $(COBJNAM)$@ $(MSYS)\ovlinit.c - -# -# dat dependencies -# - -$(DAT)\data: $(U)utility.tag $(DATABASE) - $(U)makedefs -d - -$(DAT)\rumors: $(U)utility.tag $(DAT)\rumors.tru $(DAT)\rumors.fal - $(U)makedefs -r - -$(DAT)\quest.dat: $(U)utility.tag $(DAT)\quest.txt - $(U)makedefs -q - -$(DAT)\oracles: $(U)utility.tag $(DAT)\oracles.txt - $(U)makedefs -h - -$(DAT)\dungeon: $(U)utility.tag $(DAT)\dungeon.def - $(U)makedefs -e - cd $(DAT) - $(U)dgn_comp dungeon.pdf - cd $(SRC) - -# -# Util Dependencies. -# - -$(O)panic.o: $(U)panic.c $(CONFIG_H) - $(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)panic.c - -$(O)recover.o: $(CONFIG_H) $(U)recover.c - $(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)recover.c - -# -# from win\share -# - -$(O)tiletxt.o: $(WSHR)\tilemap.c $(HACK_H) - $(CC) $(CFLAGSU) $(CDEFINE)TILETEXT $(COBJNAM)$@ $(WSHR)\tilemap.c - -$(O)tiletxt2.o: $(WSHR)\tilemap.c $(HACK_H) - $(CC) $(CFLAGSU) $(CDEFINE)TILETEXT \ - $(CDEFINE)TILE_X=8 $(COBJNAM)$@ $(WSHR)\tilemap.c - -$(O)gifread.o: $(WSHR)\gifread.c $(CONFIG_H) $(INCL)\tile.h - $(CC) $(CFLAGSU) $(COBJNAM)$@ $(WSHR)\gifread.c - -$(O)gifread2.o: $(WSHR)\gifread.c $(CONFIG_H) $(INCL)\tile.h - $(CC) $(CFLAGSU) $(COBJNAM)$@ $(CDEFINE)TILE_X=8 $(WSHR)\gifread.c - -$(O)ppmwrite.o: $(WSHR)\ppmwrite.c $(CONFIG_H) $(INCL)\tile.h - $(CC) $(CFLAGSU) $(COBJNAM)$@ $(WSHR)\ppmwrite.c - -$(O)ppmwrit2.o: $(WSHR)\ppmwrite.c $(CONFIG_H) $(INCL)\tile.h - $(CC) $(CFLAGSU) $(COBJNAM)$@ $(CDEFINE)TILE_X=8 $(WSHR)\ppmwrite.c - -$(O)tiletext.o: $(WSHR)\tiletext.c $(CONFIG_H) $(INCL)\tile.h - $(CC) $(CFLAGSU) $(COBJNAM)$@ $(WSHR)\tiletext.c - -$(O)tiletex2.o: $(WSHR)\tiletext.c $(CONFIG_H) $(INCL)\tile.h - $(CC) $(CFLAGSU) $(CDEFINE)TILE_X=8 $(COBJNAM)$@ $(WSHR)\tiletext.c - -# -# from win\tty -# - -$(O)getline.1: $(PCH1) $(WTTY)\getline.c $(HACK_H) $(WINTTY_H) $(FUNC_TAB_H) - $(CC) $(FLAGU1) ?[CSNAM1]$(COBJNAM)$@ $(WTTY)\getline.c - -$(O)getline.2: $(PCH2) $(WTTY)\getline.c $(HACK_H) $(WINTTY_H) $(FUNC_TAB_H) - $(CC) $(FLAGU2) ?[CSNAM2]$(COBJNAM)$@ $(WTTY)\getline.c - -$(O)termcap.0: $(PCH0) $(WTTY)\termcap.c $(HACK_H) $(WINTTY_H) $(TERMCAP_H) - $(CC) $(FLAGU0) ?[CSNAM0]$(COBJNAM)$@ $(WTTY)\termcap.c - -$(O)termcap.1: $(PCH1) $(WTTY)\termcap.c $(HACK_H) $(WINTTY_H) $(TERMCAP_H) - $(CC) $(FLAGU1) ?[CSNAM1]$(COBJNAM)$@ $(WTTY)\termcap.c - -$(O)termcap.B: $(PCHB) $(WTTY)\termcap.c $(HACK_H) $(WINTTY_H) $(TERMCAP_H) - $(CC) $(FLAGUB) ?[CSNAMB]$(COBJNAM)$@ $(WTTY)\termcap.c - -$(O)topl.1: $(PCH1) $(WTTY)\topl.c $(HACK_H) $(TERMCAP_H) $(WINTTY_H) - $(CC) $(FLAGU1) ?[CSNAM1]$(COBJNAM)$@ $(WTTY)\topl.c - -$(O)topl.2: $(PCH2) $(WTTY)\topl.c $(HACK_H) $(TERMCAP_H) $(WINTTY_H) - $(CC) $(FLAGU2) ?[CSNAM2]$(COBJNAM)$@ $(WTTY)\topl.c - -$(O)topl.B: $(PCHB) $(WTTY)\topl.c $(HACK_H) $(TERMCAP_H) $(WINTTY_H) - $(CC) $(FLAGUB) ?[CSNAMB]$(COBJNAM)$@ $(WTTY)\topl.c - -$(O)wintty.o: $(PCHO) $(CONFIG_H) $(WTTY)\wintty.c $(PATCHLEVEL_H) - $(CC) $(FLAGUO) ?[CSNAMOB]$(COBJNAM)$@ $(WTTY)\wintty.c - -# -# from sys\share -# - -$(O)pcmain.0: $(PCH0) $(HACK_H) $(SYS)\pcmain.c - $(CC) $(FLAGU0) ?[CSNAM0]$(COBJNAM)$@ $(SYS)\pcmain.c - -$(O)pcmain.1: $(PCH1) $(HACK_H) $(SYS)\pcmain.c - $(CC) $(FLAGU1) ?[CSNAM1]$(COBJNAM)$@ $(SYS)\pcmain.c - -$(O)pcmain.B: $(PCHB) $(HACK_H) $(SYS)\pcmain.c - $(CC) $(FLAGUB) ?[CSNAMB]$(COBJNAM)$@ $(SYS)\pcmain.c - -$(O)pcunix.B: $(PCHB) $(SYS)\pcunix.c $(HACK_H) - $(CC) $(FLAGUB) ?[CSNAMB]$(COBJNAM)$@ $(SYS)\pcunix.c - -$(O)tty.o: $(HACK_H) $(WINTTY_H) $(SYS)\pctty.c - $(CC) $(CFLAGSN) ?[CSNAMOB]$(COBJNAM)$@ $(SYS)\pctty.c - -$(O)sys.o: $(HACK_H) $(SYS)\pcsys.c - $(CC) $(CFLAGSN) ?[CSNAMOB]$(COBJNAM)$@ $(SYS)\pcsys.c - -$(O)random.o: $(PCHO) $(HACK_H) $(SYS)\random.c - $(CC) $(FLAGUO) ?[CSNAMOB]$(COBJNAM)$@ $(SYS)\random.c - -# -# from sys\msdos -# - -$(O)msdos.0: $(MSYS)\msdos.c $(HACK_H) $(PCVIDEO_H) -?BC? - $(CC) $(CFLAGSN) $(COVL0) $$($(@B)_0) $(COBJNAM)$@ $(MSYS)\msdos.c -?ENDBC? -?MSC? - $(CC) $(FLAGU0) $(CCSNAM)$(@F) $(COBJNAM)$@ $(MSYS)\msdos.c -?ENDMSC? -?COMMENT? - $(CC) $(CFLAGSN) $(COVL0) ?[CSNAM0]$(COBJNAM)$@ $(MSYS)\vidtxt.c -?ENDCOMMENT? - -$(O)msdos.B: $(MSYS)\msdos.c $(HACK_H) $(PCVIDEO_H) -?BC? - $(CC) $(CFLAGSN) $(COVLB) $$($(@B)_b) $(COBJNAM)$@ $(MSYS)\msdos.c -?ENDBC? -?MSC? - $(CC) $(FLAGUB) $(CCSNAM)$(@F) $(COBJNAM)$@ $(MSYS)\msdos.c -?ENDMSC? -?COMMENT? - $(CC) $(CFLAGSN) $(COVLB) ?[CSNAMB]$(COBJNAM)$@ $(MSYS)\vidtxt.c -?ENDCOMMENT? - -$(O)pctiles.0: $(PCH0) $(MSYS)\pctiles.c $(HACK_H) $(TILE_H) $(PCVIDEO_H) - $(CC) $(FLAGU0) ?[CSNAM0]$(COBJNAM)$@ $(MSYS)\pctiles.c - -$(O)pctiles.B: $(PCHB) $(MSYS)\pctiles.c $(HACK_H) $(TILE_H) $(PCVIDEO_H) - $(CC) $(FLAGUB) ?[CSNAMB]$(COBJNAM)$@ $(MSYS)\pctiles.c - -$(O)sound.o: $(PCH0) $(MSYS)\sound.c $(HACK_H) $(INCL)\portio.h - $(CC) $(FLAGUO) ?[CSNAMOB]$(COBJNAM)$@ $(MSYS)\sound.c - -$(O)pckeys.o: $(PCHO) $(MSYS)\pckeys.c $(HACK_H) $(PCVIDEO_H) - $(CC) $(FLAGUO) ?[CSNAMOB]$(COBJNAM)$@ $(MSYS)\pckeys.c - -$(O)stubvid.o : $(MSYS)\video.c $(HACK_H) - $(CC) $(FLAGUO) $(CDEFINE)STUBVIDEO ?[CSNAMOB]$(COBJNAM)$@ $(MSYS)\video.c - -$(O)video.0: $(PCH0) $(MSYS)\video.c $(HACK_H) $(WINTTY_H) $(PCVIDEO_H) \ - $(TILE_H) - $(CC) $(FLAGU0) ?[CSNAM0]$(COBJNAM)$@ $(MSYS)\video.c - -$(O)video.1: $(PCH1) $(MSYS)\video.c $(HACK_H) $(WINTTY_H) $(PCVIDEO_H) \ - $(TILE_H) - $(CC) $(FLAGU1) ?[CSNAM1]$(COBJNAM)$@ $(MSYS)\video.c - -$(O)video.B: $(PCHB) $(MSYS)\video.c $(HACK_H) $(WINTTY_H) $(PCVIDEO_H) \ - $(TILE_H) - $(CC) $(FLAGUB) ?[CSNAMB]$(COBJNAM)$@ $(MSYS)\video.c - -$(O)vidtxt.0: $(MSYS)\vidtxt.c $(HACK_H) $(WINTTY_H) $(PCVIDEO_H) -?BC? - $(CC) $(CFLAGSN) $(COVL0) $$($(@B)_0) $(COBJNAM)$@ $(MSYS)\vidtxt.c -?ENDBC? -?MSC? - $(CC) $(FLAGU0) $(CCSNAM)$(@F) $(COBJNAM)$@ $(MSYS)\vidtxt.c -?ENDMSC? -?COMMENT? - $(CC) $(CFLAGSN) $(COVL0) ?[CSNAM0]$(COBJNAM)$@ $(MSYS)\vidtxt.c -?ENDCOMMENT? - -$(O)vidtxt.B: $(MSYS)\vidtxt.c $(HACK_H) $(WINTTY_H) $(PCVIDEO_H) -?BC? - $(CC) $(CFLAGSN) $(COVLB) $$($(@B)_b) $(COBJNAM)$@ $(MSYS)\vidtxt.c -?ENDBC? -?MSC? - $(CC) $(FLAGUB) $(CCSNAM)$(@F) $(COBJNAM)$@ $(MSYS)\vidtxt.c -?ENDMSC? -?COMMENT? - $(CC) $(CFLAGSN) $(COVLB) ?[CSNAMB]$(COBJNAM)$@ $(MSYS)\vidtxt.c -?ENDCOMMENT? - -$(O)vidvga.0: $(PCH0) $(MSYS)\vidvga.c $(HACK_H) $(WINTTY_H) $(PCVIDEO_H) \ - $(TILE_H) - $(CC) $(FLAGU0) ?[CSNAM0]$(COBJNAM)$@ $(MSYS)\vidvga.c - -$(O)vidvga.1: $(PCH1) $(MSYS)\vidvga.c $(HACK_H) $(WINTTY_H) $(PCVIDEO_H) \ - $(TILE_H) - $(CC) $(FLAGU1) ?[CSNAM0]$(COBJNAM)$@ $(MSYS)\vidvga.c - -$(O)vidvga.2: $(PCH2) $(MSYS)\vidvga.c $(HACK_H) $(WINTTY_H) $(PCVIDEO_H) \ - $(TILE_H) - $(CC) $(FLAGU2) ?[CSNAM0]$(COBJNAM)$@ $(MSYS)\vidvga.c - -$(O)vidvga.B: $(PCHB) $(MSYS)\vidvga.c $(HACK_H) $(WINTTY_H) $(PCVIDEO_H) \ - $(TILE_H) - $(CC) $(FLAGUB) ?[CSNAMB]$(COBJNAM)$@ $(MSYS)\vidvga.c - -# -# from src -# - -$(O)alloc.o: $(SRC)\alloc.c $(CONFIG_H) - $(CC) $(CFLAGSN) ?[CSNAMOB]$(COBJNAM)$@ $(SRC)\alloc.c -$(O)ball.o: $(PCHO) $(SRC)\ball.c $(HACK_H) -$(O)bones.o: $(PCHO) $(SRC)\bones.c $(HACK_H) $(LEV_H) -$(O)decl.o: $(PCHO) $(SRC)\decl.c $(HACK_H) $(QUEST_H) -$(O)detect.o: $(PCHO) $(SRC)\detect.c $(HACK_H) $(ARTIFACT_H) -$(O)dig.o: $(PCHO) $(SRC)\dig.c $(HACK_H) $(EDOG_H) # check dep -$(O)display.o: $(PCHO) $(SRC)\display.c $(HACK_H) -$(O)dlb.o: $(SRC)\dlb.c $(DLB_H) $(HACK_H) - $(CC) $(CFLAGSN) ?[CSNAMOB]$(COBJNAM)$@ $(SRC)\dlb.c -$(O)dokick.o: $(PCHO) $(SRC)\dokick.c $(HACK_H) $(ESHK_H) -$(O)dothrow.o: $(PCHO) $(SRC)\dothrow.c $(HACK_H) -$(O)drawing.o: $(SRC)\drawing.c $(HACK_H) $(TERMCAP_H) - $(CC) $(CFLAGSN) ?[CSNAMOB]$(COBJNAM)$@ $(SRC)\drawing.c -$(O)end.o: $(SRC)\end.c $(HACK_H) $(ESHK_H) $(DLB_H) - $(CC) $(CFLAGSN) ?[CSNAMOB]$(COBJNAM)$@ $(SRC)\end.c -$(O)exper.o: $(PCHO) $(SRC)\exper.c $(HACK_H) -$(O)extralev.o: $(PCHO) $(SRC)\extralev.c $(HACK_H) -$(O)files.o: $(PCHO) $(SRC)\files.c $(HACK_H) $(DLB_H) -$(O)fountain.o: $(PCHO) $(SRC)\fountain.c $(HACK_H) -$(O)minion.o: $(PCHO) $(SRC)\minion.c $(HACK_H) $(EMIN_H) $(EPRI_H) -$(O)mklev.o: $(PCHO) $(SRC)\mklev.c $(HACK_H) -$(O)mkmap.o: $(PCHO) $(SRC)\mkmap.c $(HACK_H) $(SP_LEV_H) -$(O)mkmaze.o: $(PCHO) $(SRC)\mkmaze.c $(HACK_H) $(SP_LEV_H) $(LEV_H) -$(O)monst.o: $(SRC)\monst.c $(CONFIG_H) $(PERMONST_H) $(MONSYM_H) \ - $(ESHK_H) $(EPRI_H) $(COLOR_H) $(ALIGN_H) - $(CC) $(CFLAGSN) ?[CSNAMOB]$(COBJNAM)$@ $(SRC)\monst.c -$(O)monstr.o: $(SRC)\monstr.c $(CONFIG_H) - $(CC) $(CFLAGSN) ?[CSNAMOB]$(COBJNAM)$@ $(SRC)\monstr.c -$(O)mplayer.o: $(PCHO) $(SRC)\mplayer.c $(HACK_H) -$(O)muse.o: $(PCHO) $(SRC)\muse.c $(HACK_H) -$(O)music.o: $(PCHO) $(SRC)\music.c $(HACK_H) -$(O)o_init.o: $(PCHO) $(SRC)\o_init.c $(HACK_H) $(LEV_H) -$(O)objects.o: $(SRC)\objects.c $(CONFIG_H) $(OBJ_H) $(OBJCLASS_H) \ - $(PROP_H) $(COLOR_H) - $(CC) $(CFLAGSN) ?[CSNAMOB]$(COBJNAM)$@ $(SRC)\objects.c -$(O)options.o: $(SRC)\options.c $(HACK_H) $(TERMCAP_H) $(OBJCLASS_H) - $(CC) $(CFLAGSN) ?[CSNAMOB]$(COBJNAM)$@ $(SRC)\options.c -$(O)pager.o: $(SRC)\pager.c $(HACK_H) $(DLB_H) - $(CC) $(CFLAGNO) $(COBJNAM)$@ ?[CSNAMOA]$(SRC)\pager.c -$(O)pickup.o: $(PCHO) $(SRC)\pickup.c $(HACK_H) -$(O)pray.o: $(PCHO) $(SRC)\pray.c $(HACK_H) $(EPRI_H) -$(O)quest.o: $(PCHO) $(SRC)\quest.c $(HACK_H) $(QUEST_H) $(QTEXT_H) -$(O)questpgr.o: $(PCHO) $(SRC)\questpgr.c $(HACK_H) $(QTEXT_H) $(DLB_H) -$(O)rect.o: $(PCHO) $(SRC)\rect.c $(HACK_H) -$(O)region.o: $(PCHO) $(SRC)\region.c $(HACK_H) -$(O)restore.o: $(PCHO) $(SRC)\restore.c $(HACK_H) $(LEV_H) $(TERMCAP_H) \ - $(QUEST_H) -$(O)rip.o: $(PCHO) $(SRC)\rip.c $(HACK_H) -$(O)role.o: $(PCHO) $(SRC)\role.c $(HACK_H) -$(O)rumors.o: $(PCHO) $(SRC)\rumors.c $(HACK_H) $(DLB_H) -$(O)save.o: $(PCHO) $(SRC)\save.c $(HACK_H) $(LEV_H) $(QUEST_H) -$(O)sit.o: $(PCHO) $(SRC)\sit.c $(HACK_H) $(ARTIFACT_H) -$(O)steed.o: $(PCHO) $(SRC)\steed.c $(HACK_H) -$(O)sp_lev.o: $(PCHO) $(SRC)\sp_lev.c $(HACK_H) $(SP_LEV_H) $(DLB_H) -$(O)spell.o: $(PCHO) $(SRC)\spell.c $(HACK_H) -$(O)teleport.o: $(PCHO) $(SRC)\teleport.c $(HACK_H) # check dep -$(O)tile.o: $(PCHO) $(SRC)\tile.c $(HACK_H) -$(O)topten.o: $(PCHO) $(SRC)\topten.c $(HACK_H) $(DLB_H) $(PATCHLEVEL_H) -$(O)u_init.o: $(PCHO) $(SRC)\u_init.c $(HACK_H) -$(O)uhitm.o: $(PCHO) $(SRC)\uhitm.c $(HACK_H) -$(O)version.o: $(PCHO) $(SRC)\version.c $(HACK_H) $(PATCHLEVEL_H) -$(O)vision.o: $(PCHO) $(SRC)\vision.c $(HACK_H) $(VIS_TAB_H) -$(O)vis_tab.o: $(SRC)\vis_tab.c $(HACK_H) $(VIS_TAB_H) - $(CC) $(CFLAGSN) ?[CSNAMOB]$(COBJNAM)$@ $(SRC)\vis_tab.c -$(O)wield.o: $(PCHO) $(SRC)\wield.c $(HACK_H) -$(O)windows.o: $(PCHO) $(SRC)\windows.c $(HACK_H) $(WINTTY_H) -$(O)worm.o: $(PCHO) $(SRC)\worm.c $(HACK_H) $(LEV_H) -$(O)worn.o: $(PCHO) $(SRC)\worn.c $(HACK_H) -$(O)write.o: $(PCHO) $(SRC)\write.c $(HACK_H) - -# -# Overlays -# - -# OVL0 -# - -$(O)allmain.0: $(PCH0) $(SRC)\allmain.c $(HACK_H) -$(O)apply.0: $(PCH0) $(SRC)\apply.c $(HACK_H) $(EDOG_H) -$(O)artifact.0: $(PCH0) $(SRC)\artifact.c $(HACK_H) $(ARTIFACT_H) $(ARTILIST_H) -$(O)attrib.0: $(PCH0) $(SRC)\attrib.c $(HACK_H) -$(O)botl.0: $(PCH0) $(SRC)\botl.c $(HACK_H) -$(O)cmd.0: $(PCH0) $(SRC)\cmd.c $(HACK_H) $(FUNC_TAB_H) -$(O)dbridge.0: $(PCH0) $(SRC)\dbridge.c $(HACK_H) -$(O)do.0: $(PCH0) $(SRC)\do.c $(HACK_H) $(LEV_H) -$(O)do_name.0: $(PCH0) $(SRC)\do_name.c $(HACK_H) -$(O)do_wear.0: $(PCH0) $(SRC)\do_wear.c $(HACK_H) -$(O)dogmove.0: $(PCH0) $(SRC)\dogmove.c $(HACK_H) $(MFNDPOS_H) $(EDOG_H) -$(O)dungeon.0: $(PCH0) $(SRC)\dungeon.c $(HACK_H) $(ALIGN_H) $(DGN_FILE_H) \ - $(DLB_H) -$(O)eat.0: $(PCH0) $(SRC)\eat.c $(HACK_H) -$(O)engrave.0: $(PCH0) $(SRC)\engrave.c $(HACK_H) $(LEV_H) -$(O)explode.0: $(PCH0) $(SRC)\explode.c $(HACK_H) -$(O)hacklib.0: $(PCH0) $(SRC)\hacklib.c $(HACK_H) -$(O)invent.0: $(PCH0) $(SRC)\invent.c $(HACK_H) $(ARTIFACT_H) -$(O)lock.0: $(PCH0) $(SRC)\lock.c $(HACK_H) -$(O)mail.0: $(PCH0) $(SRC)\mail.c $(HACK_H) $(MAIL_H) $(PATCHLEVEL_H) -$(O)makemon.0: $(PCH0) $(SRC)\makemon.c $(HACK_H) $(EPRI_H) $(EMIN_H) -$(O)mcastu.0: $(PCH0) $(SRC)\mcastu.c $(HACK_H) -$(O)mhitm.0: $(PCH0) $(SRC)\mhitm.c $(HACK_H) $(ARTIFACT_H) $(EDOG_H) -$(O)mhitu.0: $(PCH0) $(SRC)\mhitu.c $(HACK_H) $(ARTIFACT_H) $(EDOG_H) -$(O)mkobj.0: $(PCH0) $(SRC)\mkobj.c $(HACK_H) $(ARTIFACT_H) $(PROP_H) -$(O)mkroom.0: $(PCH0) $(SRC)\mkroom.c $(HACK_H) -$(O)mon.0: $(PCH0) $(SRC)\mon.c $(HACK_H) $(MFNDPOS_H) $(EDOG_H) -$(O)mondata.0: $(PCH0) $(SRC)\mondata.c $(HACK_H) $(ESHK_H) $(EPRI_H) -$(O)monmove.0: $(PCH0) $(SRC)\monmove.c $(HACK_H) $(MFNDPOS_H) $(ARTIFACT_H) -$(O)mthrowu.0: $(PCH0) $(SRC)\mthrowu.c $(HACK_H) -$(O)objnam.0: $(PCH0) $(SRC)\objnam.c $(HACK_H) -$(O)polyself.0: $(PCH0) $(SRC)\polyself.c $(HACK_H) -$(O)priest.0: $(PCH0) $(SRC)\priest.c $(HACK_H) $(MFNDPOS_H) $(ESHK_H) \ - $(EPRI_H) $(EMIN_H) -$(O)rnd.0: $(PCH0) $(SRC)\rnd.c $(HACK_H) -$(O)shk.0: $(PCH0) $(SRC)\shk.c $(HACK_H) $(ESHK_H) -$(O)shknam.0: $(PCH0) $(SRC)\shknam.c $(HACK_H) $(ESHK_H) -$(O)sounds.0: $(PCH0) $(SRC)\sounds.c $(HACK_H) $(EDOG_H) -$(O)steal.0: $(PCH0) $(SRC)\steal.c $(HACK_H) -$(O)timeout.0: $(PCH0) $(SRC)\timeout.c $(HACK_H) $(LEV_H) -$(O)track.0: $(PCH0) $(SRC)\track.c $(HACK_H) -$(O)trap.0: $(PCH0) $(SRC)\trap.c $(HACK_H) -$(O)vault.0: $(PCH0) $(SRC)\vault.c $(HACK_H) $(VAULT_H) -$(O)weapon.0: $(PCH0) $(SRC)\weapon.c $(HACK_H) -$(O)were.0: $(PCH0) $(SRC)\were.c $(HACK_H) -$(O)wizard.0: $(PCH0) $(SRC)\wizard.c $(HACK_H) $(QTEXT_H) -$(O)zap.0: $(PCH0) $(SRC)\zap.c $(HACK_H) - -# -# OVL1 -# - -$(O)allmain.1: $(PCH1) $(SRC)\allmain.c $(HACK_H) -$(O)apply.1: $(PCH1) $(SRC)\apply.c $(HACK_H) $(EDOG_H) -$(O)artifact.1: $(PCH1) $(SRC)\artifact.c $(HACK_H) $(ARTIFACT_H) $(ARTILIST_H) -$(O)attrib.1: $(PCH1) $(SRC)\attrib.c $(HACK_H) -$(O)botl.1: $(PCH1) $(SRC)\botl.c $(HACK_H) -$(O)cmd.1: $(PCH1) $(SRC)\cmd.c $(HACK_H) $(FUNC_TAB_H) -$(O)dbridge.1: $(PCH1) $(SRC)\dbridge.c $(HACK_H) -$(O)do.1: $(PCH1) $(SRC)\do.c $(HACK_H) $(LEV_H) -$(O)do_wear.1: $(PCH1) $(SRC)\do_wear.c $(HACK_H) -$(O)dog.1: $(PCH1) $(SRC)\dog.c $(HACK_H) $(EDOG_H) -$(O)dungeon.1: $(PCH1) $(SRC)\dungeon.c $(HACK_H) $(ALIGN_H) $(DGN_FILE_H) $(DLB_H) -$(O)eat.1: $(PCH1) $(SRC)\eat.c $(HACK_H) -$(O)engrave.1: $(PCH1) $(SRC)\engrave.c $(HACK_H) $(LEV_H) -$(O)explode.1: $(PCH1) $(SRC)\explode.c $(HACK_H) -$(O)hack.1: $(PCH1) $(SRC)\hack.c $(HACK_H) -$(O)hacklib.1: $(PCH1) $(SRC)\hacklib.c $(HACK_H) -$(O)invent.1: $(PCH1) $(SRC)\invent.c $(HACK_H) $(ARTIFACT_H) -$(O)makemon.1: $(PCH1) $(SRC)\makemon.c $(HACK_H) $(EPRI_H) $(EMIN_H) -$(O)mhitu.1: $(PCH1) $(SRC)\mhitu.c $(HACK_H) $(ARTIFACT_H) $(EDOG_H) -$(O)mkobj.1: $(PCH1) $(SRC)\mkobj.c $(HACK_H) $(ARTIFACT_H) $(PROP_H) -$(O)mon.1: $(PCH1) $(SRC)\mon.c $(HACK_H) $(MFNDPOS_H) $(EDOG_H) -$(O)mondata.1: $(PCH1) $(SRC)\mondata.c $(HACK_H) $(ESHK_H) $(EPRI_H) -$(O)monmove.1: $(PCH1) $(SRC)\monmove.c $(HACK_H) $(MFNDPOS_H) $(ARTIFACT_H) -$(O)mthrowu.1: $(PCH1) $(SRC)\mthrowu.c $(HACK_H) -$(O)objnam.1: $(PCH1) $(SRC)\objnam.c $(HACK_H) -$(O)polyself.1: $(PCH1) $(SRC)\polyself.c $(HACK_H) -$(O)rnd.1: $(PCH1) $(SRC)\rnd.c $(HACK_H) -$(O)shk.1: $(PCH1) $(SRC)\shk.c $(HACK_H) $(ESHK_H) -$(O)steal.1: $(PCH1) $(SRC)\steal.c $(HACK_H) -$(O)timeout.1: $(PCH1) $(SRC)\timeout.c $(HACK_H) $(LEV_H) -$(O)track.1: $(PCH1) $(SRC)\track.c $(HACK_H) -$(O)trap.1: $(PCH1) $(SRC)\trap.c $(HACK_H) -$(O)weapon.1: $(PCH1) $(SRC)\weapon.c $(HACK_H) -$(O)zap.1: $(PCH1) $(SRC)\zap.c $(HACK_H) - -# -# OVL2 -# - -$(O)attrib.2: $(PCH2) $(SRC)\attrib.c $(HACK_H) -$(O)do.2: $(PCH2) $(SRC)\do.c $(HACK_H) $(LEV_H) -$(O)do_name.2: $(PCH2) $(SRC)\do_name.c $(HACK_H) -$(O)do_wear.2: $(PCH2) $(SRC)\do_wear.c $(HACK_H) -$(O)dog.2: $(PCH2) $(SRC)\dog.c $(HACK_H) $(EDOG_H) -$(O)engrave.2: $(PCH2) $(SRC)\engrave.c $(HACK_H) $(LEV_H) -$(O)hack.2: $(PCH2) $(SRC)\hack.c $(HACK_H) -$(O)hacklib.2: $(PCH2) $(SRC)\hacklib.c $(HACK_H) -$(O)invent.2: $(PCH2) $(SRC)\invent.c $(HACK_H) $(ARTIFACT_H) -$(O)makemon.2: $(PCH2) $(SRC)\makemon.c $(HACK_H) $(EPRI_H) $(EMIN_H) -$(O)mon.2: $(PCH2) $(SRC)\mon.c $(HACK_H) $(MFNDPOS_H) $(EDOG_H) -$(O)mondata.2: $(PCH2) $(SRC)\mondata.c $(HACK_H) $(ESHK_H) $(EPRI_H) -$(O)monmove.2: $(PCH2) $(SRC)\monmove.c $(HACK_H) $(MFNDPOS_H) $(ARTIFACT_H) -$(O)shk.2: $(PCH2) $(SRC)\shk.c $(HACK_H) $(ESHK_H) -$(O)trap.2: $(PCH2) $(SRC)\trap.c $(HACK_H) -$(O)zap.2: $(PCH2) $(SRC)\zap.c $(HACK_H) - -# -# OVL3 -# - -$(O)do.3: $(PCH3) $(SRC)\do.c $(HACK_H) $(LEV_H) -$(O)hack.3: $(PCH3) $(SRC)\hack.c $(HACK_H) -$(O)invent.3: $(PCH3) $(SRC)\invent.c $(HACK_H) $(ARTIFACT_H) -$(O)light.3: $(PCH3) $(SRC)\light.c $(HACK_H) -$(O)shk.3: $(PCH3) $(SRC)\shk.c $(HACK_H) $(ESHK_H) -$(O)trap.3: $(PCH3) $(SRC)\trap.c $(HACK_H) -$(O)zap.3: $(PCH3) $(SRC)\zap.c $(HACK_H) - -# -# OVLB -# - -$(O)allmain.B: $(PCHB) $(SRC)\allmain.c $(HACK_H) -$(O)apply.B: $(PCHB) $(SRC)\apply.c $(HACK_H) $(EDOG_H) -$(O)artifact.B: $(PCHB) $(SRC)\artifact.c $(HACK_H) $(ARTIFACT_H) $(ARTILIST_H) -$(O)attrib.B: $(PCHB) $(SRC)\attrib.c $(HACK_H) -$(O)botl.B: $(PCHB) $(SRC)\botl.c $(HACK_H) -$(O)cmd.B: $(PCHB) $(SRC)\cmd.c $(HACK_H) $(FUNC_TAB_H) -$(O)dbridge.B: $(PCHB) $(SRC)\dbridge.c $(HACK_H) -$(O)do.B: $(PCHB) $(SRC)\do.c $(HACK_H) $(LEV_H) -$(O)do_name.B: $(PCHB) $(SRC)\do_name.c $(HACK_H) -$(O)do_wear.B: $(PCHB) $(SRC)\do_wear.c $(HACK_H) -$(O)dog.B: $(PCHB) $(SRC)\dog.c $(HACK_H) $(EDOG_H) -$(O)dogmove.B: $(PCHB) $(SRC)\dogmove.c $(HACK_H) $(MFNDPOS_H) $(EDOG_H) -$(O)eat.B: $(PCHB) $(SRC)\eat.c $(HACK_H) -$(O)engrave.B: $(PCHB) $(SRC)\engrave.c $(HACK_H) $(LEV_H) -$(O)hack.B: $(PCHB) $(SRC)\hack.c $(HACK_H) -$(O)hacklib.B: $(PCHB) $(SRC)\hacklib.c $(HACK_H) -$(O)invent.B: $(PCHB) $(SRC)\invent.c $(HACK_H) $(ARTIFACT_H) -$(O)lock.B: $(PCHB) $(SRC)\lock.c $(HACK_H) -$(O)mail.B: $(PCHB) $(SRC)\mail.c $(HACK_H) $(MAIL_H) $(PATCHLEVEL_H) -$(O)makemon.B: $(PCHB) $(SRC)\makemon.c $(HACK_H) $(EPRI_H) $(EMIN_H) -$(O)mcastu.B: $(PCHB) $(SRC)\mcastu.c $(HACK_H) -$(O)mhitm.B: $(PCHB) $(SRC)\mhitm.c $(HACK_H) $(ARTIFACT_H) $(EDOG_H) -$(O)mhitu.B: $(PCHB) $(SRC)\mhitu.c $(HACK_H) $(ARTIFACT_H) $(EDOG_H) -$(O)mkobj.B: $(PCHB) $(SRC)\mkobj.c $(HACK_H) $(ARTIFACT_H) $(PROP_H) -$(O)mkroom.B: $(PCHB) $(SRC)\mkroom.c $(HACK_H) -$(O)mon.B: $(PCHB) $(SRC)\mon.c $(HACK_H) $(MFNDPOS_H) $(EDOG_H) -$(O)mondata.B: $(PCHB) $(SRC)\mondata.c $(HACK_H) $(ESHK_H) $(EPRI_H) -$(O)monmove.B: $(PCHB) $(SRC)\monmove.c $(HACK_H) $(MFNDPOS_H) $(ARTIFACT_H) -$(O)mthrowu.B: $(PCHB) $(SRC)\mthrowu.c $(HACK_H) -$(O)objnam.B: $(PCHB) $(SRC)\objnam.c $(HACK_H) -$(O)pline.B: $(SRC)\pline.c $(HACK_H) $(EPRI_H) - $(CC) $(CFLAGSN) ?[CSNAMB]$(COBJNAM)$@ $(SRC)\pline.c -$(O)polyself.B: $(PCHB) $(SRC)\polyself.c $(HACK_H) -$(O)potion.B: $(PCHB) $(SRC)\potion.c $(HACK_H) -$(O)priest.B: $(PCHB) $(SRC)\priest.c $(HACK_H) $(MFNDPOS_H) $(ESHK_H) \ - $(EPRI_H) $(EMIN_H) -$(O)read.B: $(PCHB) $(SRC)\read.c $(HACK_H) -$(O)rnd.B: $(PCHB) $(SRC)\rnd.c $(HACK_H) -$(O)shk.B: $(PCHB) $(SRC)\shk.c $(HACK_H) $(ESHK_H) -$(O)shknam.B: $(PCHB) $(SRC)\shknam.c $(HACK_H) $(ESHK_H) -$(O)sounds.B: $(PCHB) $(SRC)\sounds.c $(HACK_H) $(EDOG_H) -$(O)steal.B: $(PCHB) $(SRC)\steal.c $(HACK_H) -$(O)timeout.B: $(PCHB) $(SRC)\timeout.c $(HACK_H) $(LEV_H) -$(O)track.B: $(PCHB) $(SRC)\track.c $(HACK_H) -$(O)trap.B: $(PCHB) $(SRC)\trap.c $(HACK_H) -$(O)vault.B: $(PCHB) $(SRC)\vault.c $(HACK_H) $(VAULT_H) -$(O)weapon.B: $(PCHB) $(SRC)\weapon.c $(HACK_H) -$(O)were.B: $(PCHB) $(SRC)\were.c $(HACK_H) -$(O)wizard.B: $(PCHB) $(SRC)\wizard.c $(HACK_H) $(QTEXT_H) -$(O)zap.B: $(PCHB) $(SRC)\zap.c $(HACK_H) - -# end of file diff -Naurd ../nethack-3.4.0/sys/msdos/vidtxt.c ./sys/msdos/vidtxt.c --- ../nethack-3.4.0/sys/msdos/vidtxt.c Wed Mar 20 23:43:44 2002 +++ ./sys/msdos/vidtxt.c Mon Feb 24 15:25:05 2003 @@ -126,21 +126,12 @@ int86(DOS_EXT_FUNC, ®s, ®s); - txt_xputc(' ',attrib_text_normal); - - regs.h.dl = 0x01; /* one column */ - regs.h.ah = CURSOR_LEFT; - regs.h.cl = DIRECT_CON_IO; - - (void) int86(DOS_EXT_FUNC, ®s, ®s); # else int col,row; txt_get_cursor(&col, &row); if (col > 0) col = col-1; txt_gotoxy(col,row); - txt_xputc(' ',attrib_text_normal); - txt_gotoxy(col,row); # endif } diff -Naurd ../nethack-3.4.0/sys/msdos/vidvga.c ./sys/msdos/vidvga.c --- ../nethack-3.4.0/sys/msdos/vidvga.c Wed Mar 20 23:43:44 2002 +++ ./sys/msdos/vidvga.c Mon Feb 24 15:25:05 2003 @@ -228,8 +228,6 @@ if (col > 0) col = col-1; vga_gotoloc(col,row); - vga_xputc(' ',g_attribute); - vga_gotoloc(col,row); } # endif /* OVLB */