From <Someone>.

] Attached are changes to the makefile and a small change to get dlb
] working correctly.
This commit is contained in:
jwalz
2002-03-31 22:56:30 +00:00
parent 11856d20b7
commit 1d656d8f00
2 changed files with 32 additions and 29 deletions

View File

@@ -125,7 +125,7 @@ long FDECL(dlb_ftell, (DLB_P));
#endif #endif
#define RDTMODE "r" #define RDTMODE "r"
#if (defined(MSDOS) || defined(WIN32) || defined(TOS)) && defined(DLB) #if (defined(MSDOS) || defined(WIN32) || defined(TOS) || defined(OS2)) && defined(DLB)
#define WRTMODE "w+b" #define WRTMODE "w+b"
#else #else
#define WRTMODE "w+" #define WRTMODE "w+"

View File

@@ -1,5 +1,5 @@
# SCCS Id: @(#)Makefile.os2 3.4 1996/10/29 # SCCS Id: @(#)Makefile.os2 3.4.1 1996/10/29
# OS/2 NetHack 3.4 Makefile for OS/2 versions 1.x and 2.x # OS/2 NetHack 3.4.1 Makefile for OS/2 versions 1.x and 2.x
# Copyright (C) 1990, 1991, 1992, 1993, 1996 Timo Hakulinen # Copyright (C) 1990, 1991, 1992, 1993, 1996 Timo Hakulinen
# #
# Several compilers exist for OS/2 but, currently only GCC emx is tested # Several compilers exist for OS/2 but, currently only GCC emx is tested
@@ -95,25 +95,25 @@ LINK = gcc
#CMD = # Command processor name if required #CMD = # Command processor name if required
#AB = $*.c # Base name of the target in target action #AB = $*.c # Base name of the target in target action
#CB = $*.c # - " - dependent #CB = $*.c # - " - dependent
#B = ( # Command line begin in shell one-liners #BEG = ( # Command line begin in shell one-liners
#E = ) # - " - end - " - #END = ) # - " - end - " -
#S = ; # Command separator - " - #SEP = ; # Command separator - " -
#P = % # Literal percent sign #P = % # Literal percent sign
#MAKEB = nmake #MAKEB = nmake
#CMD = #CMD =
#AB = $(@B).c #AB = $(@B).c
#CB = $$(@B).c #CB = $$(@B).c
#B = ( #BEG = (
#E = ) #END = )
#S = & #SEP = &
#P = %% #P = %%
MAKEB = dmake MAKEB = dmake
CMD = cmd /C CMD = cmd /C
AB = $(@:B).c AB = $(@:B).c
CB = $$(@:B).c CB = $$(@:B).c
B = $(CMD) " BEG = $(CMD) "
E = " END = "
S = & SEP = &
P = % P = %
# #
@@ -168,7 +168,7 @@ LEXYYC = lexyy.c
# Source tree base directory. # Source tree base directory.
# #
NHSRC = \nethack NHSRC = \nethack-3.4.0
# #
# Source directories. Makedefs hardcodes these, don't change them. # Source directories. Makedefs hardcodes these, don't change them.
@@ -197,7 +197,7 @@ WINSHARE= $(NHSRC)\win\share # Shared system files
OBJ = \tmp\obj # Object files OBJ = \tmp\obj # Object files
TEMP = \tmp\bin # Temporary files during make process TEMP = \tmp\bin # Temporary files during make process
GAMEDIR = \games\nh34 # Game directory GAMEDIR = \games\nh34x11 # Game directory
PLIBP = c:\emx\lib # Protected mode C libraries PLIBP = c:\emx\lib # Protected mode C libraries
RLIBP = c:\emx\lib # Possible real mode C libraries RLIBP = c:\emx\lib # Possible real mode C libraries
@@ -217,7 +217,8 @@ GAMEDES = "NetHack 3.4"
# #
CFLAGS = -c $(GCCO) $(WARN) -I$(INCL) $(CDFLAGS) $(STDC) $(WINX11CFLAGS) CFLAGS = -c $(GCCO) $(WARN) -I$(INCL) $(CDFLAGS) $(STDC) $(WINX11CFLAGS)
O = -s -O -o #OPT = -s -O -o
OPT =
# #
# Compiler warning levels. These are really for development, so # Compiler warning levels. These are really for development, so
@@ -258,10 +259,11 @@ CL =
# Prepare for a debugger. # Prepare for a debugger.
# #
CDFLAGS = #LFLAGS = /noig /stack:40000 # GCC OMF
CDFLAGS = -O -s
LDFLAGS = LDFLAGS =
CDFLAGS = -g # GDB (GCC a.out) #CDFLAGS = -g # GDB (GCC a.out)
LDFLAGS = -g # - " - #LDFLAGS = -g # - " -
# #
# How to produce the most ANSI-like environment. # How to produce the most ANSI-like environment.
@@ -300,12 +302,12 @@ PLIBS = -lgcc -lc -lgcc -los2 $(X11LIBS) # GCC a.out
#RLIBS = $(RLIBP)\llibcer #RLIBS = $(RLIBP)\llibcer
RLIBS = $(PLIBS) RLIBS = $(PLIBS)
SRCCC = $(CC) $(CFLAGS) $(O) $@ $(AB) SRCCC = $(CC) $(CFLAGS) $(OPT) $@ $(AB)
UTILCC = $(B) cd $(UTIL) $(S) $(CC) $(CFLAGS) $(O) $@ $(AB) $(E) UTILCC = $(BEG) cd $(UTIL) $(SEP) $(CC) $(CFLAGS) $(OPT) $@ $(AB) $(END)
SYSCC = $(B) cd $(SYS) $(S) $(CC) $(CFLAGS) $(O) $@ $(AB) $(E) SYSCC = $(BEG) cd $(SYS) $(SEP) $(CC) $(CFLAGS) $(OPT) $@ $(AB) $(END)
SSYSCC = $(B) cd $(SSYS) $(S) $(CC) $(CFLAGS) $(O) $@ $(AB) $(E) SSYSCC = $(BEG) cd $(SSYS) $(SEP) $(CC) $(CFLAGS) $(OPT) $@ $(AB) $(END)
PSYSCC = $(B) cd $(SSYS) $(S) $(CC) $(CFLAGS) $(O) $@ pc$(AB) $(E) PSYSCC = $(BEG) cd $(SSYS) $(SEP) $(CC) $(CFLAGS) $(OPT) $@ pc$(AB) $(END)
WINCC = $(B) cd $(WIN) $(S) $(CC) $(CFLAGS) $(O) $@ $(AB) $(E) WINCC = $(BEG) cd $(WIN) $(SEP) $(CC) $(CFLAGS) $(OPT) $@ $(AB) $(END)
# #
# Default linker skeletons. The upper six lines for everything # Default linker skeletons. The upper six lines for everything
@@ -524,7 +526,8 @@ SPEC_LEVS = \
asmodeus.lev baalz.lev bigrm-1.lev \ asmodeus.lev baalz.lev bigrm-1.lev \
bigrm-2.lev bigrm-3.lev bigrm-4.lev castle.lev fakewiz1.lev fakewiz2.lev \ bigrm-2.lev bigrm-3.lev bigrm-4.lev castle.lev fakewiz1.lev fakewiz2.lev \
juiblex.lev knox.lev medusa-1.lev medusa-2.lev minend-1.lev minend-2.lev \ juiblex.lev knox.lev medusa-1.lev medusa-2.lev minend-1.lev minend-2.lev \
minefill.lev minetn-1.lev minetn-2.lev oracle.lev orcus.lev sanctum.lev \ minend-3.lev minefill.lev minetn-1.lev minetn-2.lev minetn-3.lev minetn-4.lev \
minetn-5.lev minetn-6.lev minetn-7.lev oracle.lev orcus.lev sanctum.lev \
tower1.lev tower2.lev tower3.lev valley.lev wizard1.lev wizard2.lev \ tower1.lev tower2.lev tower3.lev valley.lev wizard1.lev wizard2.lev \
wizard3.lev astral.lev air.lev earth.lev fire.lev water.lev \ wizard3.lev astral.lev air.lev earth.lev fire.lev water.lev \
soko1-1.lev soko1-2.lev soko2-1.lev soko2-2.lev \ soko1-1.lev soko1-2.lev soko2-1.lev soko2-2.lev \
@@ -1059,7 +1062,7 @@ realtouch :
$(TOUCH) $(TT) $(TOUCH) $(TT)
faketouch : faketouch :
$(B) $(CAT) $(TT) > $(TEMP)\foo.bar $(S) $(CP) $(TEMP)\foo.bar $(TT) $(S) $(RM) $(TEMP)\foo.bar $(E) $(BEG) $(CAT) $(TT) > $(TEMP)\foo.bar $(SEP) $(CP) $(TEMP)\foo.bar $(TT) $(SEP) $(RM) $(TEMP)\foo.bar $(END)
# #
# Targets for the recovery utility. # Targets for the recovery utility.
@@ -1755,7 +1758,7 @@ x11tiles: $(TEMP)\tile2x11.exe $(WINSHARE)\monsters.txt \
$(WINSHARE)\other.txt $(WINSHARE)\other.txt
$(TEMP)\tile2x11.exe $(WINSHARE)\monsters.txt $(WINSHARE)\objects.txt \ $(TEMP)\tile2x11.exe $(WINSHARE)\monsters.txt $(WINSHARE)\objects.txt \
$(WINSHARE)\other.txt $(WINSHARE)\other.txt
cp x11tiles $(GAMEDIR)\x11tiles $(CP) x11tiles $(GAMEDIR)\x11tiles
TEXT_IO = $(OBJ)\tiletext.o \ TEXT_IO = $(OBJ)\tiletext.o \
$(OBJ)\tiletxt.o \ $(OBJ)\tiletxt.o \
@@ -1773,10 +1776,10 @@ $(TEMP)\tile2x11.exe: $(OBJ)\tile2x11.o $(TEXT_IO)
$(CC) $(LFLAGS) -o $(TEMP)\tile2x11.exe $(OBJ)\tile2x11.o $(TEXT_IO) $(LIBS) $(CC) $(LFLAGS) -o $(TEMP)\tile2x11.exe $(OBJ)\tile2x11.o $(TEXT_IO) $(LIBS)
pet_mark.xbm: $(WINX11)\pet_mark.xbm pet_mark.xbm: $(WINX11)\pet_mark.xbm
cp $(WINX11)\pet_mark.xbm $(GAMEDIR)\pet_mark.xbm $(CP) $(WINX11)\pet_mark.xbm $(GAMEDIR)\pet_mark.xbm
rip.xpm: $(WINX11)\rip.xpm rip.xpm: $(WINX11)\rip.xpm
cp $(WINX11)\rip.xpm $(GAMEDIR)\rip.xpm $(CP) $(WINX11)\rip.xpm $(GAMEDIR)\rip.xpm
$(OBJ)\tile2x11.o : $(WINX11)\tile2x11.c $(INCL)\tile2x11.h $(OBJ)\tile2x11.o : $(WINX11)\tile2x11.c $(INCL)\tile2x11.h
$(CC) $(CFLAGS) -o$(OBJ)\tile2x11.o -c $(WINX11)\tile2x11.c \ $(CC) $(CFLAGS) -o$(OBJ)\tile2x11.o -c $(WINX11)\tile2x11.c \