/* amiconf.h). In the future this will be the */
/* hook for mail reader implementation. */
-/*# define PC_LOCKING */ /* Allow confirmation before overwriting game */
- /* that is in progress or aborted when another */
- /* game is started with the same player name. */
-
/* The following is needed for prototypes of certain functions */
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__SC__)
#include "system.h"
#endif
-#ifdef __GO32__
+#ifdef __DJGPP__
#include <unistd.h> /* close(), etc. */
-/* setmode is in io.h but lock() in io.h interferes with lock[] in decl.h */
-extern int FDECL(setmode, (int,int));
+/* lock() in io.h interferes with lock[] in decl.h */
+#define lock djlock
+#include <io.h>
+#undef lock
#include <pc.h> /* kbhit() */
#define PC_LOCKING
+#define HOLD_LOCKFILE_OPEN
+#define SELF_RECOVER /* NetHack itself can recover games */
#endif
# ifdef MSDOS
CWSDPMI = $(subst /,\,$(DJ1))bin\CWSDPMI.*
endif
+ifdef BUILDRECOVER
+RECOVEREXE = $(U)RECOVER.EXE
+RECOVEROBJ = $(O)RECOVER.O
+endif
+
#==========================================
# Primary Targets.
#==========================================
$(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 $(U)recover.exe $(TILEUTIL)
+ $(U)lev_comp.exe $(U)dgn_comp.exe $(RECOVEREXE) $(TILEUTIL)
$(subst /,\,echo utilities made > $@)
tileutil: $(U)gif2txt.exe $(U)txt2ppm.exe
@$(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 $(U)recover.exe $(GAMEDIR))
+ifdef BUILDRECOVER
+ @$(subst /,\,copy $(RECOVEREXE) $(GAMEDIR))
+endif
@$(subst /,\,copy $(DOC)/guidebo*.txt $(GAMEDIR))
+ifdef BUILDRECOVER
@$(subst /,\,if exist $(DOC)/recover.txt copy $(DOC)/recover.txt $(GAMEDIR))
+endif
@$(subst /,\,if exist $(DOC)/nethack.txt copy $(DOC)/nethack.txt $(GAMEDIR))
ifdef CWSDPMI
@$(subst /,\,if exist $(CWSDPMI) copy $(CWSDPMI) $(GAMEDIR))
# The main target.
#==========================================
-$(GAMEFILE): $(O)obj.tag $(PATCHLEV_H) $(O)utility.tag $(O)$(GAME).lnk
+$(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 /,\,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)
+ifdef BUILDRECOVER
+ $(subst /,\,if exist $(RECOVEREXE) del $(RECOVEREXE))
+endif
$(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)
# Recover Utility
#==========================================
+ifdef BUILDRECOVER
$(U)recover.exe: $(RECOVOBJS)
$(LINK) $(LFLAGS) -o$@ $(O)recover.o
$(O)recover.o: $(CONFIG_H) $(U)recover.c
$(CC) $(cflags) -o$@ $(U)recover.c
+endif
#==========================================
# Header file moves required for tile support