split some code into separate files
new .h files: hacklib.h selvar.h stairs.h
new .c files: calendar.c, getpos.c, report.c, selvar.c, stairs.c,
strutil.c, wizcmds.c
cleanup of hacklib.c and mdlib.c
hacklib contains functions that do not have to link with the core
relocate wiz commands from cmd.c to wizcmds.c
relocate CRASHREPORT stuff to report.c
relocate getpos stuff from do_name.c to getpos.c
remove temporary struct definition from extern.h
cross-compile PRE-section split into cross-pre1.370 and cross-pre2.370
Windows sys/windows/Makefile.nmake and sys/windows/Makefile.mingw32 and
visual studio project file updates
Unix sys/unix/Makefile.src, sys/unix/Makefile.utl
populate selvar.c and selvar.h
build on MS-DOS (not cross-compile) Makefile updates
for sys/msdos/Makefile.GCC (untested)
vms updates for above (untested)
This commit is contained in:
@@ -188,6 +188,9 @@ SYSOBJ = $(TARGETPFX)ioctl.o $(TARGETPFX)unixmain.o $(TARGETPFX)unixtty.o \
|
||||
#CFLAGS = -O -I../include
|
||||
#LFLAGS =
|
||||
|
||||
AR = ar
|
||||
ARFLAGS = rcs
|
||||
|
||||
# The Qt and Be window systems are written in C++, while the rest of
|
||||
# NetHack is standard C. If using Qt, uncomment the LINK line here to get
|
||||
# the C++ libraries linked in.
|
||||
@@ -210,6 +213,8 @@ TARGET_LFLAGS = $(LFLAGS)
|
||||
TARGET_CXX = $(CXX)
|
||||
TARGET_CXXFLAGS = $(CXXFLAGS)
|
||||
TARGET_LIBS = $(LIBS)
|
||||
TARGET_AR = $(AR)
|
||||
TARGET_ARFLAGS = $(ARFLAGS)
|
||||
|
||||
# we specify C preprocessor flags via CFLAGS; files built with default rules
|
||||
# might include $(CPPFLAGS) which could get a value from user's environment;
|
||||
@@ -478,6 +483,10 @@ AT = $(AT_V$(QUIETCC))
|
||||
PREGAME=@true
|
||||
PACKAGE=@true
|
||||
|
||||
HACKLIBSRC = hacklib.c
|
||||
HACKLIBOBJS = hacklib.o
|
||||
HACKLIB = hacklib.a
|
||||
|
||||
MAKEDEFS = ../util/makedefs
|
||||
|
||||
# -lm required by lua
|
||||
@@ -493,24 +502,23 @@ HACK_H = ../src/hack.h-t
|
||||
# all .c that are part of the main NetHack program and are not operating- or
|
||||
# windowing-system specific. Do not include date.c in this list.
|
||||
HACKCSRC = allmain.c alloc.c apply.c artifact.c attrib.c ball.c bones.c \
|
||||
botl.c coloratt.c cmd.c dbridge.c decl.c detect.c dig.c display.c \
|
||||
dlb.c do.c \
|
||||
do_name.c do_wear.c dog.c dogmove.c dokick.c dothrow.c drawing.c \
|
||||
dungeon.c eat.c end.c engrave.c exper.c explode.c extralev.c \
|
||||
files.c fountain.c hack.c hacklib.c \
|
||||
insight.c invent.c isaac64.c light.c \
|
||||
botl.c calendar.c cmd.c coloratt.c dbridge.c decl.c detect.c dig.c display.c \
|
||||
dlb.c do.c do_name.c do_wear.c dog.c dogmove.c dokick.c dothrow.c \
|
||||
drawing.c dungeon.c eat.c end.c engrave.c exper.c explode.c \
|
||||
extralev.c files.c fountain.c hack.c hacklib.c \
|
||||
getpos.c insight.c invent.c isaac64.c light.c \
|
||||
lock.c mail.c makemon.c mcastu.c mdlib.c mhitm.c \
|
||||
mhitu.c minion.c mklev.c mkmap.c mkmaze.c mkobj.c mkroom.c mon.c \
|
||||
mondata.c monmove.c monst.c mplayer.c mthrowu.c muse.c music.c \
|
||||
nhlua.c nhlsel.c nhlobj.c nhmd4.c o_init.c objects.c objnam.c \
|
||||
options.c pager.c pickup.c pline.c polyself.c potion.c pray.c \
|
||||
priest.c quest.c questpgr.c read.c rect.c region.c restore.c \
|
||||
rip.c rnd.c role.c rumors.c save.c sfstruct.c \
|
||||
shk.c shknam.c sit.c sounds.c \
|
||||
sp_lev.c spell.c steal.c steed.c symbols.c sys.c teleport.c \
|
||||
priest.c quest.c questpgr.c read.c rect.c region.c report.c restore.c \
|
||||
rip.c rnd.c role.c rumors.c save.c selvar.c sfstruct.c \
|
||||
shk.c shknam.c sit.c sounds.c sp_lev.c spell.c stairs.c steal.c steed.c \
|
||||
strutil.c symbols.c sys.c teleport.c \
|
||||
timeout.c topten.c track.c trap.c u_init.c utf8map.c \
|
||||
uhitm.c vault.c version.c vision.c weapon.c were.c wield.c \
|
||||
windows.c wizard.c worm.c worn.c write.c zap.c
|
||||
windows.c wizard.c wizcmds.c worm.c worn.c write.c zap.c
|
||||
|
||||
# all operating-system-dependent .c (for dependencies and such)
|
||||
SYSCSRC = ../sys/share/pcmain.c ../sys/share/pcsys.c \
|
||||
@@ -536,10 +544,10 @@ CHAINOBJ = $(TARGETPFX)wc_chainin.o $(TARGETPFX)wc_chainout.o \
|
||||
$(TARGETPFX)wc_trace.o
|
||||
|
||||
# .c files for this version (for date.h)
|
||||
VERSOURCES = $(HACKCSRC) $(SYSSRC) $(WINSRC) $(CHAINSRC) $(GENCSRC)
|
||||
VERSOURCES = $(HACKCSRC) $(HACKLIBSRC) $(SYSSRC) $(WINSRC) $(CHAINSRC) $(GENCSRC)
|
||||
|
||||
# .c files for all versions using this Makefile (for lint and tags)
|
||||
CSOURCES = $(HACKCSRC) $(SYSCSRC) $(WINCSRC) $(CHAINSRC) $(GENCSRC)
|
||||
CSOURCES = $(HACKCSRC) $(HACKLIBSRC) $(SYSCSRC) $(WINCSRC) $(CHAINSRC) $(GENCSRC)
|
||||
|
||||
|
||||
# all .h files except date.h, which would
|
||||
@@ -552,8 +560,8 @@ HACKINCL = align.h artifact.h artilist.h attrib.h botl.h \
|
||||
func_tab.h global.h warnings.h hack.h lint.h mextra.h mfndpos.h \
|
||||
micro.h mkroom.h monattk.h mondata.h monflag.h monst.h monsters.h \
|
||||
nhmd4.h obj.h objects.h objclass.h optlist.h patchlevel.h pcconf.h \
|
||||
permonst.h prop.h rect.h region.h sym.h defsym.h rm.h sp_lev.h \
|
||||
spell.h sndprocs.h seffects.h sys.h tcap.h timeout.h \
|
||||
permonst.h prop.h rect.h region.h selvar.h sym.h defsym.h rm.h sp_lev.h \
|
||||
spell.h sndprocs.h seffects.h stairs.h sys.h tcap.h timeout.h \
|
||||
tradstdc.h trap.h unixconf.h vision.h vmsconf.h wintty.h wincurs.h \
|
||||
winX.h winprocs.h wintype.h you.h youprop.h cstd.h
|
||||
|
||||
@@ -569,8 +577,8 @@ HOSTOBJ = $(FIRSTOBJ) alloc.o drawing.o
|
||||
HOBJ = $(TARGETPFX)allmain.o $(TARGETPFX)alloc.o \
|
||||
$(TARGETPFX)apply.o $(TARGETPFX)artifact.o $(TARGETPFX)attrib.o \
|
||||
$(TARGETPFX)ball.o $(TARGETPFX)bones.o $(TARGETPFX)botl.o \
|
||||
$(TARGETPFX)coloratt.o \
|
||||
$(TARGETPFX)cmd.o $(TARGETPFX)dbridge.o $(TARGETPFX)decl.o \
|
||||
$(TARGETPFX)calendar.o \
|
||||
$(TARGETPFX)cmd.o $(TARGETPFX)coloratt.o $(TARGETPFX)dbridge.o $(TARGETPFX)decl.o \
|
||||
$(TARGETPFX)detect.o $(TARGETPFX)dig.o $(TARGETPFX)display.o \
|
||||
$(TARGETPFX)dlb.o $(TARGETPFX)do.o $(TARGETPFX)do_name.o \
|
||||
$(TARGETPFX)do_wear.o $(TARGETPFX)dog.o $(TARGETPFX)dogmove.o \
|
||||
@@ -578,7 +586,7 @@ HOBJ = $(TARGETPFX)allmain.o $(TARGETPFX)alloc.o \
|
||||
$(TARGETPFX)dungeon.o $(TARGETPFX)eat.o $(TARGETPFX)end.o \
|
||||
$(TARGETPFX)engrave.o $(TARGETPFX)exper.o $(TARGETPFX)explode.o \
|
||||
$(TARGETPFX)extralev.o $(TARGETPFX)files.o $(TARGETPFX)fountain.o \
|
||||
$(TARGETPFX)hack.o $(TARGETPFX)hacklib.o $(TARGETPFX)insight.o \
|
||||
$(TARGETPFX)getpos.o $(TARGETPFX)hack.o $(TARGETPFX)insight.o \
|
||||
$(TARGETPFX)invent.o $(TARGETPFX)isaac64.o $(TARGETPFX)light.o \
|
||||
$(TARGETPFX)lock.o $(TARGETPFX)mail.o $(TARGETPFX)makemon.o \
|
||||
$(TARGETPFX)mcastu.o $(TARGETPFX)mdlib.o \
|
||||
@@ -594,22 +602,23 @@ HOBJ = $(TARGETPFX)allmain.o $(TARGETPFX)alloc.o \
|
||||
$(TARGETPFX)pickup.o $(TARGETPFX)pline.o $(TARGETPFX)polyself.o \
|
||||
$(TARGETPFX)potion.o $(TARGETPFX)pray.o $(TARGETPFX)priest.o \
|
||||
$(TARGETPFX)quest.o $(TARGETPFX)questpgr.o $(TARGETPFX)read.o \
|
||||
$(TARGETPFX)rect.o $(TARGETPFX)region.o $(TARGETPFX)restore.o \
|
||||
$(TARGETPFX)rip.o $(TARGETPFX)rnd.o $(TARGETPFX)role.o \
|
||||
$(TARGETPFX)rumors.o $(TARGETPFX)save.o $(TARGETPFX)sfstruct.o \
|
||||
$(TARGETPFX)rect.o $(TARGETPFX)region.o $(TARGETPFX)report.o \
|
||||
$(TARGETPFX)restore.o $(TARGETPFX)rip.o $(TARGETPFX)rnd.o \
|
||||
$(TARGETPFX)role.o $(TARGETPFX)rumors.o $(TARGETPFX)save.o \
|
||||
$(TARGETPFX)selvar.o $(TARGETPFX)sfstruct.o \
|
||||
$(TARGETPFX)shk.o $(TARGETPFX)shknam.o $(TARGETPFX)sit.o \
|
||||
$(TARGETPFX)sounds.o $(TARGETPFX)sp_lev.o $(TARGETPFX)spell.o \
|
||||
$(TARGETPFX)sounds.o $(TARGETPFX)sp_lev.o $(TARGETPFX)spell.o $(TARGETPFX)stairs.o \
|
||||
$(TARGETPFX)symbols.o $(TARGETPFX)sys.o $(TARGETPFX)steal.o \
|
||||
$(TARGETPFX)steed.o $(TARGETPFX)teleport.o $(TARGETPFX)timeout.o \
|
||||
$(TARGETPFX)topten.o $(TARGETPFX)track.o $(TARGETPFX)trap.o \
|
||||
$(TARGETPFX)steed.o $(TARGETPFX)strutil.o $(TARGETPFX)teleport.o \
|
||||
$(TARGETPFX)timeout.o $(TARGETPFX)topten.o $(TARGETPFX)track.o $(TARGETPFX)trap.o \
|
||||
$(TARGETPFX)u_init.o $(TARGETPFX)uhitm.o $(TARGETPFX)utf8map.o \
|
||||
$(TARGETPFX)vault.o $(TARGETPFX)vision.o $(TARGETPFX)weapon.o \
|
||||
$(TARGETPFX)were.o $(TARGETPFX)wield.o $(TARGETPFX)windows.o \
|
||||
$(TARGETPFX)wizard.o $(TARGETPFX)worm.o $(TARGETPFX)worn.o \
|
||||
$(TARGETPFX)wizard.o $(TARGETPFX)wizcmds.o $(TARGETPFX)worm.o $(TARGETPFX)worn.o \
|
||||
$(TARGETPFX)write.o $(TARGETPFX)zap.o \
|
||||
$(REGEXOBJ) $(RANDOBJ) $(SYSOBJ) $(WINOBJ) $(HINTOBJ) $(SNDLIBOBJ) \
|
||||
$(TARGETPFX)version.o
|
||||
#
|
||||
|
||||
DATE_O = $(TARGETPFX)date.o
|
||||
|
||||
# the .o files from the HACKCSRC, SYSSRC, and WINSRC lists
|
||||
@@ -624,41 +633,46 @@ pregame:
|
||||
$(GAME): pregame $(MAKEDEFS) $(LUALIB) $(WAVS) $(SYSTEM)
|
||||
@echo "$(GAME) is up to date."
|
||||
|
||||
Sysunix: $(HOSTOBJ) $(HOBJ) $(DATE_O) $(BUILDMORE) Makefile
|
||||
Sysunix: $(HOSTOBJ) $(HOBJ) $(TARGETPFX)$(HACKLIB) $(DATE_O) $(BUILDMORE) Makefile
|
||||
@echo "Linking $(GAME)."
|
||||
$(AT)$(TARGET_LINK) $(TARGET_LFLAGS) -o $(GAMEBIN) \
|
||||
$(HOBJ) $(DATE_O) $(WINLIB) $(TARGET_LIBS) $(LUALIBS) \
|
||||
$(AUTOLIBS)
|
||||
$(HOBJ) $(DATE_O) $(TARGETPFX)$(HACKLIB) $(WINLIB) \
|
||||
$(TARGET_LIBS) $(LUALIBS) $(AUTOLIBS)
|
||||
@touch Sysunix
|
||||
|
||||
Sys3B2: $(HOSTOBJ) $(HOBJ) $(DATE_O) $(BUILDMORE) Makefile
|
||||
Sys3B2: $(HOSTOBJ) $(HOBJ) $(TARGETPFX)$(HACKLIB) $(DATE_O) $(BUILDMORE) Makefile
|
||||
@echo "Linking $(GAME)."
|
||||
$(AT)$(TARGET_LINK) $(TARGET_LFLAGS) -o $(GAMEBIN) \
|
||||
$(HOBJ) $(DATE_O) $(WINLIB) $(LUALIBS) -lmalloc
|
||||
$(HOBJ) $(DATE_O) $(TARGETPFX)$(HACKLIB) $(WINLIB) \
|
||||
$(LUALIBS) -lmalloc
|
||||
@touch Sys3B2
|
||||
|
||||
Sysatt: $(HOSTOBJ) $(HOBJ) $(DATE_O) $(BUILDMORE) Makefile
|
||||
Sysatt: $(HOSTOBJ) $(HOBJ) $(TARGETPFX)$(HACKLIB) $(DATE_O) $(BUILDMORE) Makefile
|
||||
@echo "Loading $(GAME)."
|
||||
$(AT)$(LD) $(TARGET_LFLAGS) /lib/crt0s.o /lib/shlib.ifile \
|
||||
-o $(GAMEBIN) $(HOSTOBJ) $(HOBJ) $(DATE_O) $(LUALIBS)
|
||||
-o $(GAMEBIN) $(HOSTOBJ) $(HOBJ) $(DATE_O) $(TARGETPFX)$(HACKLIB) \
|
||||
$(LUALIBS)
|
||||
@touch Sysatt
|
||||
|
||||
Systos: $(HOSTOBJ) $(HOBJ) $(DATE_O) $(BUILDMORE) Makefile
|
||||
Systos: $(HOSTOBJ) $(HOBJ) $(TARGETPFX)$(HACKLIB) $(DATE_O) $(BUILDMORE) Makefile
|
||||
@echo "Linking $(GAME)."
|
||||
$(AT)$(TARGET_LINK) $(TARGET_LFLAGS) -o $(GAMEBIN) \
|
||||
$(HOBJ) $(DATE_O) $(WINLIB) $(LUALIBS)
|
||||
$(HOBJ) $(DATE_O) $(TARGETPFX)$(HACKLIB) \
|
||||
$(WINLIB) $(LUALIBS)
|
||||
@touch Systos
|
||||
|
||||
SysV-AT: DUMB.Setup $(HOSTOBJ) $(HOBJ) $(DATE_O) $(BUILDMORE) Makefile
|
||||
SysV-AT: DUMB.Setup $(HOSTOBJ) $(HOBJ) $(TARGETPFX)$(HACKLIB) $(DATE_O) $(BUILDMORE) Makefile
|
||||
@echo "Linking $(GAME)."
|
||||
$(AT)$(TARGET_LINK) $(TARGET_LFLAGS) -o $(GAMEBIN) \
|
||||
$(HOBJ) $(DATE_O) $(WINLIB) $(LUALIBS)
|
||||
$(HOBJ) $(DATE_O) $(TARGETPFX)$(HACKLIB) \
|
||||
$(WINLIB) $(LUALIBS)
|
||||
@touch SysV-AT
|
||||
|
||||
SysBe: $(HOSTOBJ) $(HOBJ) $(DATE_O) $(BUILDMORE) Makefile
|
||||
SysBe: $(HOSTOBJ) $(HOBJ) $(TARGETPFX)$(HACKLIB) $(DATE_O) $(BUILDMORE) Makefile
|
||||
@echo "Linking $(GAME)."
|
||||
$(AT)$(TARGET_LINK) $(TARGET_LFLAGS) -o $(GAME) \
|
||||
$(HOBJ) $(DATE_O) $(WINLIB) $(TARGET_LIBS) $(LUALIBS)
|
||||
$(HOBJ) $(DATE_O) $(TARGETPFX)$(HACKLIB) \
|
||||
$(WINLIB) $(TARGET_LIBS) $(LUALIBS)
|
||||
@xres -o $(GAME) ../win/BeOS/nethack.rsrc
|
||||
@mimeset -f $(GAME)
|
||||
@touch SysBe
|
||||
@@ -730,6 +744,12 @@ $(MAKEDEFS): $(FIRSTOBJ) \
|
||||
tile.c: ../win/share/tilemap.c $(HACK_H)
|
||||
@( cd ../util ; $(MAKE) ../src/tile.c )
|
||||
|
||||
#
|
||||
# hacklib (a library of utility routines)
|
||||
#
|
||||
|
||||
hacklib.a: hacklib.o
|
||||
$(AR) $(ARFLAGS) $@ hacklib.o
|
||||
|
||||
../win/gnome/gn_rip.h: ../win/X11/rip.xpm
|
||||
cp ../win/X11/rip.xpm ../win/gnome/gn_rip.h
|
||||
@@ -738,7 +758,7 @@ $(TARGETPFX)sfstruct.o: sfstruct.c $(HACK_H)
|
||||
|
||||
# date.c should be recompiled any time any of the source or include code
|
||||
# is modified.
|
||||
$(TARGETPFX)date.o: date.c $(HACK_H) $(HACKCSRC) $(HOBJ)
|
||||
$(TARGETPFX)date.o: date.c $(HACK_H) $(HACKCSRC) $(HOBJ) $(TARGETPFX)$(HACKLIB)
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) $(GITHASH) $(GITBRANCH) -c -o $@ date.c
|
||||
|
||||
# date.h should be remade any time any of the source or include code
|
||||
@@ -774,7 +794,7 @@ clean:
|
||||
true; $(CLEANMORE)
|
||||
|
||||
spotless: clean
|
||||
-rm -f a.out core $(GAMEBIN) Sys*
|
||||
-rm -f a.out core $(HACKLIB) $(GAMEBIN) Sys*
|
||||
-rm -f ../include/nhlua.h
|
||||
-rm -f ../include/date.h #created but no longer used, at least by core
|
||||
-rm -f ../include/onames.h ../include/pm.h #obsolete generated files
|
||||
|
||||
@@ -189,7 +189,12 @@ CALLOC = ../src/alloc.c panic.c
|
||||
OALLOC = $(OBJDIR)/alloc.o panic.o
|
||||
# build time info
|
||||
CDATE = ../src/date.c
|
||||
ODATE = $(OBJDIR)/date.o
|
||||
ODATE = $(OBJDIR)/date.o
|
||||
|
||||
# hacklib utility routines
|
||||
HACKLIB = $(OBJDIR)/hacklib.a
|
||||
HACKLIBSRC = ../src/hacklib.c
|
||||
HACKLIBOBJ = $(OBJDIR)/hacklib.o panic.o
|
||||
|
||||
# object files for makedefs
|
||||
MAKEOBJS = makedefs.o $(OMONOBJ) $(ODATE) $(OALLOC)
|
||||
@@ -213,11 +218,12 @@ TARGET_CLINK = $(CLINK)
|
||||
TARGET_LFLAGS = $(LFLAGS)
|
||||
TARGET_CXX = $(CXX)
|
||||
TARGET_CXXFLAGS = $(CXXFLAGS)
|
||||
TARGET_AR = $(AR)
|
||||
|
||||
# dependencies for makedefs
|
||||
#
|
||||
makedefs: $(MAKEOBJS) mdgrep.h
|
||||
$(CLINK) $(LFLAGS) -o makedefs $(MAKEOBJS)
|
||||
makedefs: $(HACKLIB) $(MAKEOBJS) mdgrep.h
|
||||
$(CLINK) $(LFLAGS) -o makedefs $(MAKEOBJS) $(HACKLIB)
|
||||
|
||||
|
||||
# note: the headers listed here are maintained manually rather than via
|
||||
@@ -233,6 +239,8 @@ makedefs.o: makedefs.c ../src/mdlib.c $(CONFIG_H) \
|
||||
../include/dlb.h ../include/patchlevel.h mdgrep.h
|
||||
$(CC) $(CFLAGS) $(CSTD) -c makedefs.c -o $@
|
||||
|
||||
$(OBJDIR)/hacklib.o: $(HACKLIBSRC)
|
||||
|
||||
# Don't require perl to build; that is why mdgrep.h is spelled wrong below.
|
||||
mdgreph: mdgrep.pl
|
||||
perl mdgrep.pl
|
||||
@@ -252,6 +260,9 @@ lintdefs:
|
||||
../include/date.h::
|
||||
@( cd ../src ; $(MAKE) ../include/date.h )
|
||||
|
||||
$(HACKLIB): $(CONFIG_H) $(HACKLIBSRC) panic.o
|
||||
@( cd ../src ; $(MAKE) hacklib.a )
|
||||
|
||||
# support code used by several of the utility programs (but not makedefs)
|
||||
panic.o: panic.c $(CONFIG_H)
|
||||
$(CC) $(CFLAGS) $(CSTD) -c panic.c -o $@
|
||||
@@ -275,8 +286,8 @@ $(TARGETPFX)recover.o: recover.c $(CONFIG_H)
|
||||
|
||||
# dependencies for dlb
|
||||
#
|
||||
dlb: $(DLBOBJS)
|
||||
$(CLINK) $(LFLAGS) -o dlb $(DLBOBJS) $(LIBS)
|
||||
dlb: $(DLBOBJS) $(HACKLIB)
|
||||
$(CLINK) $(LFLAGS) -o dlb $(DLBOBJS) $(HACKLIB) $(LIBS)
|
||||
|
||||
dlb_main.o: dlb_main.c $(CONFIG_H) ../include/dlb.h
|
||||
$(CC) $(CFLAGS) $(CSTD) -c dlb_main.c -o $@
|
||||
@@ -295,30 +306,34 @@ gif2txt: $(GIFREADERS) $(TEXT_IO)
|
||||
txt2ppm: $(PPMWRITERS) $(TEXT_IO)
|
||||
$(CLINK) $(LFLAGS) -o txt2ppm $(PPMWRITERS) $(TEXT_IO) $(LIBS)
|
||||
|
||||
tile2x11: tile2x11.o $(TEXT_IO)
|
||||
$(CLINK) $(LFLAGS) -o tile2x11 tile2x11.o $(TEXT_IO) $(LIBS)
|
||||
tile2x11: tile2x11.o $(TEXT_IO) $(HACKLIB)
|
||||
$(CLINK) $(LFLAGS) -o tile2x11 tile2x11.o $(TEXT_IO) \
|
||||
$(HACKLIB) $(LIBS)
|
||||
|
||||
tile2img.ttp: tile2img.o bitmfile.o $(TEXT_IO)
|
||||
$(CLINK) $(LFLAGS) -o tile2img.ttp tile2img.o bitmfile.o \
|
||||
$(TEXT_IO) $(LIBS)
|
||||
|
||||
tile2bmp: tile2bmp.o $(TEXT_IO)
|
||||
$(CLINK) $(LFLAGS) -o tile2bmp tile2bmp.o $(TEXT_IO)
|
||||
tile2bmp: tile2bmp.o $(TEXT_IO) $(HACKLIB)
|
||||
$(CLINK) $(LFLAGS) -o tile2bmp tile2bmp.o $(TEXT_IO) $(HACKLIB)
|
||||
|
||||
xpm2img.ttp: xpm2img.o bitmfile.o
|
||||
$(CLINK) $(LFLAGS) -o xpm2img.ttp xpm2img.o bitmfile.o $(LIBS)
|
||||
|
||||
tile2beos: tile2beos.o $(TEXT_IO)
|
||||
$(CXXLINK) $(LFLAGS) -o tile2beos tile2beos.o $(TEXT_IO) -lbe
|
||||
tile2beos: tile2beos.o $(TEXT_IO) $(HACKLIB)
|
||||
$(CXXLINK) $(LFLAGS) -o tile2beos tile2beos.o \
|
||||
$(TEXT_IO) $(HACKLIB) -lbe
|
||||
|
||||
#--compiling and linking in one step leaves extra debugging files (in their
|
||||
# own subdirectories!) on OSX; compile and link separately to suppress
|
||||
# that without mucking about with extra OS-specific CFLAGS and/or LFLAGS
|
||||
#tilemap: ../win/share/tilemap.c $(HACK_H)
|
||||
# $(CC) $(CFLAGS) $(LFLAGS) -o tilemap ../win/share/tilemap.c $(LIBS)
|
||||
tilemap: tilemap.o $(OBJDIR)/objects.o $(OBJDIR)/monst.o $(OBJDIR)/drawing.o
|
||||
tilemap: tilemap.o $(OBJDIR)/objects.o $(OBJDIR)/monst.o $(OBJDIR)/drawing.o \
|
||||
$(HACKLIB)
|
||||
$(CLINK) $(LFLAGS) -o tilemap tilemap.o $(OBJDIR)/objects.o \
|
||||
$(OBJDIR)/monst.o $(OBJDIR)/drawing.o $(LIBS)
|
||||
$(OBJDIR)/monst.o $(OBJDIR)/drawing.o $(HACKLIB) \
|
||||
$(LIBS)
|
||||
../src/tile.c: tilemap
|
||||
./tilemap
|
||||
|
||||
@@ -426,6 +441,6 @@ clean: clean-fixup
|
||||
-rm -f *.o
|
||||
|
||||
spotless: clean
|
||||
-rm -f makedefs recover dlb
|
||||
-rm -f makedefs recover dlb $(HACKLIB)
|
||||
-rm -f gif2txt txt2ppm tile2x11 tile2img.ttp xpm2img.ttp \
|
||||
tilemap tileedit tile2bmp uudecode
|
||||
|
||||
@@ -22,9 +22,9 @@ $(TARGETPFX)tile.o : tile.c
|
||||
$(TARGETPFX)exceptn.o : ../lib/djgpp/djgpp-patch/src/libc/go32/exceptn.S
|
||||
$(TARGET_CC) -c -o $@ ../lib/djgpp/djgpp-patch/src/libc/go32/exceptn.S
|
||||
$(TARGET_AR) ru ../lib/djgpp/i586-pc-msdosdjgpp/lib/libc.a $(TARGETPFX)exceptn.o
|
||||
$(GAMEBIN) : $(HOBJ) $(LUACROSSLIB)
|
||||
$(GAMEBIN) : $(HOBJ) $(HACKLIB) $(LUACROSSLIB)
|
||||
$(TARGET_LINK) $(TARGET_LFLAGS) -o $(GAMEBIN) \
|
||||
$(HOBJ) $(WINLIB) $(TARGET_LIBS)
|
||||
$(HOBJ) $(HACKLIB) $(WINLIB) $(TARGET_LIBS)
|
||||
$(DOSFONT)/ter-u16b.psf: $(FONTTOP)/ter-u16b.bdf $(DOSFONT)/nh-u16b.bdf $(DOSFONT)/makefont.lua $(LUABIN)
|
||||
$(LUABIN) $(DOSFONT)/makefont.lua $(FONTTOP)/ter-u16b.bdf $(DOSFONT)/nh-u16b.bdf $@
|
||||
$(DOSFONT)/ter-u16v.psf: $(FONTTOP)/ter-u16v.bdf $(DOSFONT)/nh-u16v.bdf $(DOSFONT)/makefont.lua $(LUABIN)
|
||||
@@ -41,6 +41,8 @@ $(DOSFONT)/ter-u28b.psf: $(FONTTOP)/ter-u28b.bdf $(DOSFONT)/nh-u28b.bdf $(DOSFON
|
||||
$(LUABIN) $(DOSFONT)/makefont.lua $(FONTTOP)/ter-u28b.bdf $(DOSFONT)/nh-u28b.bdf $@
|
||||
$(DOSFONT)/ter-u32b.psf: $(FONTTOP)/ter-u32b.bdf $(DOSFONT)/nh-u32b.bdf $(DOSFONT)/makefont.lua $(LUABIN)
|
||||
$(LUABIN) $(DOSFONT)/makefont.lua $(FONTTOP)/ter-u32b.bdf $(DOSFONT)/nh-u32b.bdf $@
|
||||
$(TARGETPFX)hacklib.a: $(TARGETPFX)hacklib.o
|
||||
$(TARGET_AR) $(TARGET_ARFLAGS) $@ $(TARGETPFX)hacklib.o
|
||||
#
|
||||
.PHONY: dodata dospkg dosfonts
|
||||
dosfonts: $(FONTTARGETS)
|
||||
|
||||
49
sys/unix/hints/include/cross-pre1.370
Normal file
49
sys/unix/hints/include/cross-pre1.370
Normal file
@@ -0,0 +1,49 @@
|
||||
#===============-=================================================
|
||||
# NetHack 3.7 include/cross-pre1. $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-3.7 $
|
||||
#
|
||||
# Cross-compiling -PRE section 1
|
||||
#
|
||||
|
||||
ifdef CROSS_TO_MSDOS
|
||||
CROSS=1
|
||||
BUILD_TARGET_LUA=1
|
||||
BUILD_PDCURSES=1
|
||||
CROSS_SHARED=1
|
||||
override TARGET = msdos
|
||||
override TARGETDIR=../targets/$(TARGET)
|
||||
override TARGETPFX = $(TARGETDIR)/
|
||||
override TARGET_LIBS=
|
||||
endif
|
||||
|
||||
ifdef CROSS_TO_WASM
|
||||
CROSS=1
|
||||
BUILD_TARGET_LUA=1
|
||||
HACKDIR=/
|
||||
PREFIX=
|
||||
override TARGET = wasm
|
||||
override TARGETDIR=../targets/$(TARGET)
|
||||
override TARGETPFX = $(TARGETDIR)/
|
||||
override TARGET_LIBS=
|
||||
endif
|
||||
|
||||
ifdef CROSS_TO_MIPS
|
||||
CROSS=1
|
||||
BUILD_TARGET_LUA=1
|
||||
BUILD_TARGET_NCURSES=1
|
||||
HACKDIR=/
|
||||
PREFIX=
|
||||
override TARGET = mips
|
||||
override TARGETDIR=../targets/$(TARGET)
|
||||
override TARGETPFX = $(TARGETDIR)/
|
||||
override TARGET_LIBS=
|
||||
endif
|
||||
|
||||
ifdef CROSS
|
||||
override PREGAME=
|
||||
override BUILDMORE=
|
||||
override CLEANMORE=
|
||||
override PACKAGE=
|
||||
endif
|
||||
# End of cross-compiling -PRE section 1
|
||||
#===============-=================================================
|
||||
|
||||
@@ -1,50 +1,9 @@
|
||||
#===============-=================================================
|
||||
# NetHack 3.7 include/cross-pre $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-3.7 $
|
||||
# NetHack 3.7 include/cross-pre2 $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-3.7 $
|
||||
#
|
||||
# Cross-compiling -PRE section
|
||||
# Cross-compiling -PRE section 2
|
||||
#
|
||||
|
||||
ifdef CROSS_TO_MSDOS
|
||||
CROSS=1
|
||||
BUILD_TARGET_LUA=1
|
||||
BUILD_PDCURSES=1
|
||||
CROSS_SHARED=1
|
||||
override TARGET = msdos
|
||||
override TARGETDIR=../targets/$(TARGET)
|
||||
override TARGETPFX = $(TARGETDIR)/
|
||||
override TARGET_LIBS=
|
||||
endif
|
||||
|
||||
ifdef CROSS_TO_WASM
|
||||
CROSS=1
|
||||
BUILD_TARGET_LUA=1
|
||||
HACKDIR=/
|
||||
PREFIX=
|
||||
override TARGET = wasm
|
||||
override TARGETDIR=../targets/$(TARGET)
|
||||
override TARGETPFX = $(TARGETDIR)/
|
||||
override TARGET_LIBS=
|
||||
endif
|
||||
|
||||
ifdef CROSS_TO_MIPS
|
||||
CROSS=1
|
||||
BUILD_TARGET_LUA=1
|
||||
BUILD_TARGET_NCURSES=1
|
||||
HACKDIR=/
|
||||
PREFIX=
|
||||
override TARGET = mips
|
||||
override TARGETDIR=../targets/$(TARGET)
|
||||
override TARGETPFX = $(TARGETDIR)/
|
||||
override TARGET_LIBS=
|
||||
endif
|
||||
|
||||
ifdef CROSS
|
||||
override PREGAME=
|
||||
override BUILDMORE=
|
||||
override CLEANMORE=
|
||||
override PACKAGE=
|
||||
endif
|
||||
|
||||
ifdef BUILD_TARGET_LUA
|
||||
#===============-=================================================
|
||||
# LUA library
|
||||
@@ -27,7 +27,7 @@ ifeq ($(MAKELEVEL),0)
|
||||
PRECHECK+=checkmakefiles
|
||||
# all files included from this hints file get listed
|
||||
# in HINTSINCLNAMES (without suffix and without a path)
|
||||
HINTSINCLNAMES := compiler cross-pre cross-post \
|
||||
HINTSINCLNAMES := compiler cross-pre1 cross-pre2 cross-post \
|
||||
gbdates-pre gbdates-post \
|
||||
multiw-1 multiw-2 misc \
|
||||
multisnd1-pre multisnd2-pre multisnd-post
|
||||
@@ -43,6 +43,10 @@ endif
|
||||
GAMEUID = $(USER)
|
||||
GAMEGRP = games
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#-INCLUDE cross-pre1.370
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# You shouldn't need to change anything below here (in the hints file; if
|
||||
# you're reading this in Makefile augmented by hints, that may not be true).
|
||||
@@ -366,7 +370,7 @@ CHGRP=true
|
||||
# manpages directory
|
||||
MANDIR=/usr/share/man/man6
|
||||
#
|
||||
#-INCLUDE cross-pre.370
|
||||
#-INCLUDE cross-pre2.370
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
@@ -27,7 +27,7 @@ ifeq ($(MAKELEVEL),0)
|
||||
PRECHECK+=checkmakefiles
|
||||
# all files included from this hints file get listed
|
||||
# in HINTSINCLNAMES (without suffix and without a path)
|
||||
HINTSINCLNAMES := compiler cross-pre cross-post \
|
||||
HINTSINCLNAMES := compiler cross-pre1 cross-pre2 cross-post \
|
||||
gbdates-pre gbdates-post \
|
||||
multiw-1 multiw-2 misc \
|
||||
multisnd1-pre multisnd2-pre multisnd-post
|
||||
@@ -55,6 +55,8 @@ endif
|
||||
# you're reading this in Makefile augmented by hints, that may not be true).
|
||||
#
|
||||
|
||||
#-INCLUDE cross-pre1.370
|
||||
|
||||
#-INCLUDE multiw-2.370
|
||||
|
||||
# compiler.370 contains compiler detection and adjustments common
|
||||
@@ -427,7 +429,7 @@ SYSCONFENSURE = (if ! test -f $(INSTDIR)/sysconf ; then \
|
||||
# Install.Qt mentions a patch for macos - it's not there (it seems to be in the Qt binary
|
||||
# package under the docs directory).
|
||||
#
|
||||
#-INCLUDE cross-pre.370
|
||||
#-INCLUDE cross-pre2.370
|
||||
#
|
||||
#
|
||||
#-INCLUDE gbdates-pre.370
|
||||
|
||||
Reference in New Issue
Block a user