(from <Someone>)

I have made what I hope are some final changes to the OS/2 makefile
These include more removal of old/obsolete comments, additional changes
to support X11 compilation as well as changing versions to 3.4.
This commit is contained in:
nethack.allison
2002-02-10 16:45:04 +00:00
parent 27b76ffe47
commit 325c1e38d6

View File

@@ -2,8 +2,9 @@
# OS/2 NetHack 3.4 Makefile for OS/2 versions 1.x and 2.x
# Copyright (C) 1990, 1991, 1992, 1993, 1996 Timo Hakulinen
#
# The supported compilers list is mainly from the NetHack 3.1 era.
# There should be newer versions of all these compilers nowadays.
# Several compilers exist for OS/2 but, currently only GCC emx is tested
# and used for releases. make programs other than dmake are not tested
# and the support is left here for historic purposes.
#
# Supported compilers: GCC emx 0.9g
#
@@ -26,7 +27,7 @@
#
# "GCC" refers to GCC emx only. No other ports of GCC are supported.
# Additional credits for honing GCC support for 3.2 go to Ronald
# Van Iwaarden (rrt0136@ibm.net) and Stefan Neis (neis@cs.uni-sb.de).
# Van Iwaarden (ron@vaniwaarden.org) and Stefan Neis (neis@cs.uni-sb.de).
#
# "OMF" is short for "Object Module Format" and refers to the
# standard OS/2 object format, which e.g. link386 uses. MSC and
@@ -167,7 +168,7 @@ LEXYYC = lexyy.c
# Source tree base directory.
#
NHSRC = \nh020122
NHSRC = \nethack
#
# Source directories. Makedefs hardcodes these, don't change them.
@@ -196,7 +197,7 @@ WINSHARE= $(NHSRC)\win\share # Shared system files
OBJ = \tmp\obj # Object files
TEMP = \tmp\bin # Temporary files during make process
GAMEDIR = \games\nh332 # Game directory
GAMEDIR = \games\nh34 # Game directory
PLIBP = c:\emx\lib # Protected mode C libraries
RLIBP = c:\emx\lib # Possible real mode C libraries
@@ -205,27 +206,15 @@ RLIBP = c:\emx\lib # Possible real mode C libraries
#
GAME = nethack
GAMEDES = "NetHack 3.4.0"
GAMEDES = "NetHack 3.4"
#
# The uppermost two lines for MSC, the middle two for GCC, and
# the lowermost two for CSet/2.
#
# MSC: compile only, compiler id, large memory model, optimization level,
# remove stack probes, 80286 instruction set, dedicated datasegment for
# items >= 10 bytes, pack structures on 1 byte boundaries, generate code
# for 8087 coprocessor, compiler warning level, include file path, invoke
# large model compiler, debug flags, ANSI conformance.
#
# GCC: compile only, compiler id, object format selection, warnings,
# include file path, debug flags, ANSI conformance.
#
# CSet/2: compile only, compiler id, migration lib, remove stack probes,
# large 32 bit memory model, fast integer code, optimize (to avoid a
# compiler bug - sometimes it *does* work that way around), don't print
# IBM logo, force optlink linkage on function calls, warning level,
# include file path, debug flags, ANSI conformance.
#
CFLAGS = -c $(GCCO) $(WARN) -I$(INCL) $(CDFLAGS) $(STDC) $(WINX11CFLAGS)
O = -s -O -o
@@ -236,17 +225,11 @@ O = -s -O -o
# from masses of benign warnings. If any problems arise, however,
# they may help in finding the trouble.
#
# MSC: warning level 3 is highest in 5.1, second highest in 6.0.
# Cries a lot, but for no real cause. Warning level 0 for distribution.
#
# GCC: max. reasonable GCC warning levels. Can't use -Wall, because then
# it would whine about all the zillions of unused declarations etc.
# Even with these switches you'll get a lot of warnings, but they should
# all be benign.
#
# CSet/2: warning level 3. The second optional parameter gives
# lots of extra warnings.
#
WARN = #-W -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -DGCC_WARN # GCC
@@ -296,12 +279,6 @@ SYSOBJ = # MSC, GCC a.out, CSet/2
#
# Compiler library selection. Change if necessary.
#
# MSC: Protected mode C libraries for 8087 emulator,
# OS/2 API entry points.
#
# GCC emx 0.8 OMF: C standard lib, extra GCC lib, static system lib,
# OS/2 API entry points.
#
# GCC emx 0.9 OMF: C single-threaded libs, Unix system call alias lib,
# extra GCC lib, single threaded system lib, OS/2 API entry points.
# Note that emx changed library naming convention between 0.8 and 0.9.
@@ -481,8 +458,6 @@ do_cmd : cmd_act # generate nethack.cmd
# out the lower line and uncomment the upper. Also, make sure
# that DLB is defined in config.h.
#
# NOTE: this feature is presently untested under OS/2.
#
do_dlb : dlb_yup
#do_dlb : dlb_nope
@@ -570,9 +545,10 @@ QUEST_LEVS = \
Val-goal.lev Val-fila.lev Val-filb.lev Val-loca.lev Val-strt.lev \
Wiz-goal.lev Wiz-fila.lev Wiz-filb.lev Wiz-loca.lev Wiz-strt.lev
VARDATD = \
data oracles options quest.dat rumors
data oracles options quest.dat rumors $(WINX11VARDAT)
DATDLB = $(DATHELP) dungeon $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD)
DATDLB = $(DATHELP) dungeon $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) \
$(do_dlb)
#
# Object files for the game itself.
@@ -1121,7 +1097,7 @@ $(TEMP)\dlb.rsp : $(DLBOBJS) $(TEMP)\$(DLBDEF)
$(OBJ)\dlb_main.o : $(UTIL)\$(CB) $(CONFIG_H) $(INCL)\dlb.h
$(UTILCC)
$(GAMEDIR)\nhdat :
$(GAMEDIR)\nhdat : $(WINX11VARDAT)
$(MAKEB) do_dlb
dlb_yup : dlb
@@ -1165,6 +1141,8 @@ dlb_yup : dlb
-$(RM) $(GAMEDIR)\rumors
-$(RM) $(GAMEDIR)\dungeon
-$(RM) $(GAMEDIR)\soko?-?.lev
# -$(RM) $(GAMEDIR)\pet_mark.xbm
# -$(RM) $(GAMEDIR)\rip.xpm
dlb_nope :
$(ECHO) DLB not requested.
@@ -1270,7 +1248,8 @@ $(OBJ)\wintty.o : $(WIN)\$(CB) $(HACK_H) $(INCL)\tcap.h
dat : spec_lev help_fil $(GAMEDIR)\dungeon $(GAMEDIR)\data $(GAMEDIR)\rumors \
$(GAMEDIR)\oracles $(GAMEDIR)\quest.dat $(GAMEDIR)\$(GAME).ico \
$(GAMEDIR)\$(GAME).cmd $(GAMEDIR)\nethack.cnf $(GAMEDIR)\nhdat
$(GAMEDIR)\$(GAME).cmd $(GAMEDIR)\nethack.cnf $(GAMEDIR)\nhdat \
$(WINX11VARDAT)
help_fil : $(GAMEDIR)\cmdhelp $(GAMEDIR)\help $(GAMEDIR)\hh $(GAMEDIR)\history \
$(GAMEDIR)\license $(GAMEDIR)\opthelp $(GAMEDIR)\wizhelp
@@ -1778,11 +1757,28 @@ x11tiles: $(TEMP)\tile2x11.exe $(WINSHARE)\monsters.txt \
$(WINSHARE)\other.txt
cp x11tiles $(GAMEDIR)\x11tiles
$(TEMP)\tile2x11.exe: tile2x11.o $(TEXT_IO)
$(CC) $(LFLAGS) -o tile2x11 tile2x11.o $(TEXT_IO) $(LIBS)
TEXT_IO = $(OBJ)\tiletext.o \
$(OBJ)\tiletxt.o \
$(OBJ)\drawing.o \
$(OBJ)\decl.o \
$(OBJ)\monst.o \
$(OBJ)\objects.o
$(OBJ)\tiletext.o: ../win/share/tiletext.c $(CONFIG_H) $(WINSHARE)\tile.h
$(CC) $(CFLAGS) -c $(WINSHARE)\tiletext.c -o$(OBJ)\tiletext.o
$(OBJ)\tiletxt.o: $(WINSHARE)\tilemap.c $(HACK_H)
$(CC) $(CFLAGS) -c -DTILETEXT $(WINSHARE)\tilemap.c -o$(OBJ)\tiletxt.o
$(TEMP)\tile2x11.exe: $(OBJ)\tile2x11.o $(TEXT_IO)
$(CC) $(LFLAGS) -o $(TEMP)\tile2x11.exe $(OBJ)\tile2x11.o $(TEXT_IO) $(LIBS)
pet_mark.xbm: $(WINX11)\pet_mark.xbm
cp $(WINX11)\pet_mark.xbm $(GAMEDIR)\pet_mark.xbm
rip.xpm: $(WINX11)\rip.xpm
cp $(WINX11)\rip.xpm $(GAMEDIR)\rip.xpm
$(OBJ)\tile2x11.o : $(WINX11)\tile2x11.c $(INCL)\tile2x11.h
$(CC) $(CFLAGS) -o$(OBJ)\tile2x11.o -c $(WINX11)\tile2x11.c \
-I$(WINSHARE)