Update the cross-compiling doc at the top.
Remove sys/msdos/Makefile1.cross, sys/msdos/Makefile2.cross, and
sys/msdos/msdos-cross-compile.sh as they are no longer required.
Remove occurrences of CROSSCOMPILE_HOST as the host-side of a
cross-compile can be determined from:
defined(CROSSCOMPILE) && !defined(CROSSCOMPILE_TARGET)
without the additional macro.
-Cross-compiling NetHack 3.7 Last edit: May 31, 2020
+Cross-compiling NetHack 3.7 Last edit: September 29, 2020
The NetHack 3.7 build process differs from the build process of previous
versions in some important ways that make it possible to use a cross-compiler
B2. What needs to be built and executed on the HOST?
B3. What needs to be built for the TARGET?
B4. Case sample: msdos
+ B5. Case sample: amiga (started but incomplete)
--------------------------------------------------------------------------------
Part A - Cross-compiling NetHack
o Compilers: Some of the native compilers on historical platforms may only
support the particular dialect of C that was popular when the platform and
- compiler were in their prime.
+ compiler were in their prime.
Another useful potential result of cross-compiling, is that it paves the way
for carrying out test and production builds of NetHack for multiple target
(a) additional build steps to follow, including some header
files: pm.h, onames.h, date.h.
(b) creation of files, containing information required by,
- or about the game during its execution, that are stored in a
+ or about the game during its execution, that are stored in a
portable, platform-independent way, that need to be inserted
into the game package.
(c) creation of files containing information required by, or about
the game during its execution, that are stored in an architecture
and/or platform and/or operating system dependent way, that need
- to be inserted into the game package (the quest text format is
+ to be inserted into the game package (the quest text format is
one example).
- 3. Compile and link the level compiler. This step needs to execute
+ 3. Compile and link the level compiler. This step needs to execute
work-alike tools to lex and yacc, or needs to build pre-built lex and
yacc output (.c, .h files) that are provided in the sys/share part of
the NetHack source code tree.
4. Execute the level compiler to read dat/*.des files and create
- a set of binary output files that are architecture and/or operating
+ a set of binary output files that are architecture and/or operating
system dependent on the build platform, for use by the game during
its execution.
5. Compile and link the dungeon compiler. Like the level compiler, this
- step needs to execute work-alike tools to lex and yacc, or needs to
+ step needs to execute work-alike tools to lex and yacc, or needs to
build pre-built lex and yacc output (.c, .h files) that are provided
in the sys/share part of the NetHack source code tree.
- 6. Execute the dungeon compiler to read dat/dungeon.def and create
+ 6. Execute the dungeon compiler to read dat/dungeon.def and create
a set of binary output files that are architecture and/or operating
system dependent on the build platform, for use by the game during
its execution.
(a) additional build steps to follow, including some header
files: pm.h, onames.h, date.h.
(b) creation of files, containing information required by,
- or about the game during its execution, that are stored in a
+ or about the game during its execution, that are stored in a
portable, platform-independent way, that need to be inserted
into the game package.
3. Compile and link several less critical utilities such as uudecode,
previous steps 2b, 3 and 4 above.
Step 4 is now the only impediment to cross-compiling NetHack, and is resolved
-by executing step 4 using a cross-compiler that runs on the build (host)
+by executing step 4 using a cross-compiler that runs on the build (host)
platform to produce a resulting binary for the target platform, instead of
executing the native compiler.
o There is no creation of platform-dependent files, such as the quest
text files, by makedefs during the build process. Instead, the quest
text files have been converted to Lua and are inserted into the game
- package for processing by the embedded Lua <fixme: interpreter?>
- during execution of NetHack.
+ package for processing by the embedded Lua during execution of NetHack.
o There is no build-time level compiler involved. Instead, the level
descriptions have been converted to Lua and are inserted into the game
- package for processing by the embeded Lua <fixme: interpreter?>
- during execution of NetHack.
+ package for processing by the embeded Lua during execution of NetHack.
o There is no build-time dungeon compiler involved. Instead, the dungeon
description has been converted to Lua and is inserted into the game
- package for processing by the embeded Lua <fixme: interpreter?>
- during execution of NetHack.
+ package for processing by the embeded Lua during execution of NetHack.
o Some of the build and option information that was formerly produced
during build time by makedefs, and contained information about the
+------------------------------------------------------------+
o If you have a favourite target platform (let's call it XX-Platform for
- example purposes) that you'd like to see NetHack be able to run on, do
+ example purposes) that you'd like to see NetHack be able to run on, do
some research to find out if a cross-compiler exists that:
- produces output for XX-Platform.
- executes on a platform that you use and love (Linux, Windows,
o Then, make the community, devteam, and others aware that you're starting
a cross-compile of NetHack for XX-Platform. You might need to ask some
- "starting out" questions initially, and as you get deeper into it, you
+ "starting out" questions initially, and as you get deeper into it, you
might need to ask some tougher questions.
-
+
o Perhaps consider forking from NetHack on GitHub, and do the
cross-compiler work there in your fork. Strive to get it to a point where
it's ready to play-test on XX-Platform, or perhaps even use an emulator
- It will make it possible and straightforward to merge upstream
NetHack changes into your work for the XX-Platform cross-compile
so that it stays current with the game as it evolves.
- - You may get help from others in the form of suggestions, or
+ - You may get help from others in the form of suggestions, or
pull-requests, or offers to join the development. Chances are,
- you aren't the only person out there that would like to
+ you aren't the only person out there that would like to
establish/resurrect/maintain NetHack on XX-Platform.
Have fun!
a) Using the HOST native compiler, build HOST native utility makedefs
Compile and link the following with these compiler switches:
- -DCROSSCOMPILE and -DCROSSCOMPILE_HOST
+ -DCROSSCOMPILE
from sources: util/makedefs.c, src/mdlib.c, src/monst.c, src/objects.c
b) Execute HOST native makedefs utility, util/makedefs, as follows:
util/uudecode
from sources: sys/share/uudecode.c
- purpose: convert some binary files, that are
+ purpose: convert some binary files, that are
distributed in the NetHack sources in
uuencoded format, back into their
original binary state
Cross-compiler used: Andrew Wu's djgpp cross-compiler
Cross-compiler url: https://github.com/andrewwutw/build-djgpp
Cross-compiler pre-built binary downloads:
- https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/
- Mac OS X pre-built binary: djgpp-osx-gcc550.tar.bz2 (tested)
- Linux pre-built binary : djgpp-linux64-gcc550.tar.bz2 (tested)
- mingw pre-built binary : djgpp-mingw-gcc550-standalone.zip (untested)
-
-The msdos cross-compile for NetHack 3.7 uses two phases of compiles:
-Phase1 is the host-side prerequisite stuff that needs to be done first.
-Phase2 is the cross-compile pieces using the djgpp cross-compiler hosted on
-Linux, Mac OS X, or Windows mingw.
-
-First, on the host platform, you need to set up for a native Unix NetHack
-build in the usual way. For example, on linux:
- cd sys/unix
- sh setup.sh hints/linux
- cd ../..
- make fetch-lua
-
-Now, you could proceed to go ahead and issue
- make all
-to build a native NetHack at that point if you wish, but it is not needed
-for the msdos cross-compile.
-
-Instead, a test shell script has been put together that will next accomplish
-each of the following tasks when it is executed. The shell script can be
-invoked by:
- sh sys/msdos/msdos-cross-compile.sh
-but before you do that, please read the paragraphs below.
-
-The shell script is meant to accomplish the following things:
-
- Prep : the script downloads the djgpp cross-compiler for the host
- platform into lib/djgpp (it doesn't install anything on the
- system, nor does it need to, it just downloads them into the
- identified directories), it downloads a copy of the msdos
- dos-extender into lib/djgpp/cwsdpmi for later packaging up with
- the msdos game, and it downloads pdcurses into lib/pdcurses
- for cross-compiling during the TARGET build.
-
- Be certain to ensure the right products are at the url's
- identified above *before* you execute the Case sample msdos
- cross-compile script. The correct products were at those url's
- at the time this was written in Dec 2019, but we don't assume
- any responsibility for what is at those url's now or in the
- future. You need to check before executing the script.
-
- Phase1 : the script uses the Makefile sys/msdos/Makefile1.cross
- to complete the host-side build steps using the native gcc
- compiler for the host platform. During phase1 the host obj
- files are put in subfolder src/host_o to keep them separated
- and distinguishable from the target obj files that will be
- built in phase2.
-
- Phase2 : the script uses the Makefile sys/msdos/Makefile2.cross
- to complete the target-side build steps using the
- cross-compiler that was obtained during the prep step of the
- script described above. During phase2 the target obj files
- are put in src/msdos_o to keep them separated and
- distinguishable from the host obj files
-
- Package: the script then packages up the results that reside in
- msdos-binary into a zip file which it places in lib called
- nh370dos.zip.
+ https://github.com/andrewwutw/build-djgpp/releases/download/v3.0/
+ Cross-compiler bits tested:
+ https://github.com/andrewwutw/build-djgpp
+ and the pre-built binary for your platform from:
+ https://github.com/andrewwutw/build-djgpp/releases/download/v3.0/
+ and a DOS-extender (for including in msdos packaging) from
+ http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip
+ and pdcurses from:
+ https://github.com/wmcbrine/PDCurses.git
+
+ - A shell script to download that djgpp cross-compiler and associated
+ pieces for either linux or macOS is available:
+
+ sh sys/msdos/fetch-cross-compiler.sh
+
+ That script won't install anything, it just does file fetches and stores
+ them in subfolders of lib. The linux.2020 and macOS.2020 hints files are
+ configured to find the cross-compiler there if you add
+ CROSS_TO_MSDOS=1
+ on your make command line.
+
+ Note: Both the fetch-cross-compiler.sh script and and the msdos
+ cross-compile and package procedures require unzip and zip to be available
+ on your host build system.
+
+ On your linux host:
+
+ cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
+ make fetch-lua
+
+ On your macOS host:
+
+ cd sys/unix ; sh setup.sh hints/macOS.2020 ; cd ../..
+ make fetch-lua
+
+ The MSDOS cross-compile can then be carried out by specifying
+ CROSS_TO_MSDOS=1 on the make command line:
+
+ make CROSS_TO_MSDOS=1 all
+ make CROSS_TO_MSDOS=1 package
+
+ You can explicitly include tty and curses support if desired. The default
+ you'll end up with is a tty-only cross-compile build:
+
+ make WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_MSDOS=1 all
+ make WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_MSDOS=1 package
+
+ Result: The "make package" target will bundle all of the necessary
+ components to run NetHack on msdos into a folder:
+ targets/msdos/pkg
+ and then it zips the contents of that folder into:
+ targets/msdos/nh370dos.zip
+
+ Also note that building the msdos targets using the make command
+ above, does not preclude you from building local linux or macOS
+ targets as well. Just drop the CROSS_TO_MSDOS=1 from the make
+ command line. That's because the cross-compiler hints additions are
+ enclosed inside ifdef sections and won't interfere with the
+ non-cross-compile build in that case.
+
+ +-------------------------+
+ | B5. Case sample: amiga |
+ +-------------------------+
+
+Disclaimer: This is a minimal recipe, just to help someone else get
+ started if they have a desire to get a full cross-compile of
+ NetHack going for the Amiga.
+ See CAVEATS below.
+
+Cross-compiler used: bebbo's amiga-gcc
+Cross-compiler url: https://github.com/bebbo/amiga-gcc
+
+ To our knowledge, a pre-built copy of the cross-compiler isn't available,
+ so you will likely have to obtain the cross-compiler sources via git and
+ build it on your system.
+
+ The build prerequisite packages for building the compiler on Ubuntu can be
+ easily obtained:
+
+ sudo apt install make wget git gcc g++ lhasa libgmp-dev \
+ libmpfr-dev libmpc-dev flex bison gettext texinfo ncurses-dev \
+ autoconf rsync
+
+ The build prerequisite packages for macOS via homebrew are documented but
+ not tested by us any of us to date.
+
+ brew install bash wget make lhasa gmp mpfr libmpc flex gettext \
+ texinfo gcc make autoconf
+
+ After installing the prerequite packages and the cross-compiler
+ it was a straightforward build:
+
+ git clone https://github.com/bebbo/amiga-gcc.git
+ cd amiga-gcc
+ make update
+
+ [Note that you may have to take ownership of the files in the bebbo
+ repo via chown before succesfully carrying out the next steps]
+
+ make clean
+ make clean-prefix
+ date; make all -j3 >&b.log; date
+
+ The compiler pieces are installed in /opt/amiga by default. If you prefer,
+ you can alter the prefix before you build if you want. The instructions
+ for doing so were spelled out at the time of this writing at:
+
+ https://github.com/bebbo/amiga-gcc
+
+ On your linux host:
+
+ cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
+ make fetch-lua
+
+ On your macOS host:
+
+ cd sys/unix ; sh setup.sh hints/macOS.2020 ; cd ../..
+ make fetch-lua
+
+ The Amiga cross-compile can then be carried out by specifying
+ CROSS_TO_AMIGA=1 on the make command line:
+
+ make CROSS_TO_AMIGA=1 all
+ make CROSS_TO_AMIGA=1 package
+
+ You can explicitly include tty and curses support if desired, otherwise
+ you'll end up with a tty-only cross-compile build. The SDL1 pdcurses
+ support has not been tested.
+
+ make WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_AMIGA=1 all
+
+ Result: The "make package" target will bundle the (hopefully) necessary
+ components to run NetHack on msdos into a folder:
+ targets/amiga/pkg
+ and then it zips the contents of that folder into:
+ targets/amiga/nh370ami.zip
+
+ Also note that building the amiga targets using the make command
+ above, does not preclude you from building local linux or macOS
+ targets as well. Just drop the CROSS_TO_AMIGA=1 from the make
+ command line.
+
+ The cross-compiler hints additions are enclosed inside ifdef sections
+ and won't interfere with the non-cross-compile build in that case.
+
+ CAVEATS: The original NetHack Amiga build steps included the source for
+ some utilities that were built and executed on the amiga:
+ txt2iff and xpm2iff
+ as part of the NetHack build procedure on amiga.
+ Those did not compile out-of-the-box on the linux host. They
+ will either have to be:
+ - ported to build and run on the linux or macOS cross-compile
+ host
+ or
+
+ - their functionality will have to be rolled into amiga NetHack
+ itself and executed on the target Amiga the first time the game
+ is run, perhaps.
+ If you make headway, or are successful getting a working copy of
+ NetHack going on the amiga, drop us a note at devteam@nethack.org.
+---
#if defined(NETHACK_GIT_SHA)
const char *NetHack_git_sha
-#if !defined(CROSSCOMPILE) || (defined(CROSSCOMPILE) && defined(CROSSCOMPILE_HOST))
+#if !defined(CROSSCOMPILE) || !defined(CROSSCOMPILE_TARGET)
= NETHACK_GIT_SHA
#else
#ifdef NETHACK_HOST_GIT_SHA
#if defined(NETHACK_GIT_BRANCH)
const char *NetHack_git_branch
-#if !defined(CROSSCOMPILE) || (defined(CROSSCOMPILE) && defined(CROSSCOMPILE_HOST))
+#if !defined(CROSSCOMPILE) || !defined(CROSSCOMPILE_TARGET)
= NETHACK_GIT_BRANCH
#else
#ifdef NETHACK_HOST_GIT_BRANCH
store_version(nhfp)
NHFILE *nhfp;
{
-#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST)
+#if !defined(CROSSCOMPILE) || !defined(CROSSCOMPILE_TARGET)
static const struct version_info version_data = {
VERSION_NUMBER, VERSION_FEATURES,
VERSION_SANITY1, VERSION_SANITY2, VERSION_SANITY3
#endif
};
-#if defined(CROSSCOMPILE) && !defined(CROSSCOMPILE_HOST)
+#if defined(CROSSCOMPILE) && defined(CROSSCOMPILE_TARGET)
version_data.incarnation = VERSION_NUMBER; /* actual version number */
version_data.feature_set = VERSION_FEATURES; /* bitmask of config settings */
version_data.entity_count = VERSION_SANITY1; /* # of monsters and objects */
+++ /dev/null
-# NetHack 3.7 Makefile1.cross
-# Cross-compile msdos version of NetHack using a
-# linux-hosted djgpp cross-compiler.
-#
-# Makefile1.cross (this file) is for the host-side obj files and
-# utilities that will run on the host platform only.
-#
-# Makefile2.cross is for the target platform obj files
-# and utilities.
-#
-# Makefile2 utilizes the djgpp cross-compiler from Andrew Wu:
-# https://github.com/andrewwutw/build-djgpp
-#
-# Currently, in NetHack 3.7, it is now feasible to cross-compile
-# the game in a 2-stage process. Makefile1.cross (this file) carries
-# out the 1st stage.
-#
-# The GNU Make has a problem if you include a drive spec below.
-GAMEDIR =../msdos-binary
-
-#
-#==============================================================================
-# This marks the end of the BUILD DECISIONS section.
-#==============================================================================
-#
-# Directories, gcc likes unix style directory specs
-#
-
-OBJ = o
-HOBJ = host_o
-DAT = ../dat
-DOC = ../doc
-INCL = ../include
-LIB = ../lib
-MSYS = ../sys/msdos
-SRC = ../src
-SSHR = ../sys/share
-UTIL = ../util
-WIN = ../win/tty
-WCURSES = ../win/curses
-WSHR = ../win/share
-
-#
-# Executables.
-#
-HOST_CC = gcc
-HOST_LINK = gcc
-MAKEBIN = make
-
-#
-# Special libraries and how to link them in.
-#
-LIBS = -lpc
-LIBRARIES = $(LIBS)
-
-#
-# Yacc/Lex off
-#
-YACC_LEX = N
-
-#
-# Uncomment the line below if you want to store all the level files,
-# help files, etc. in a single library file.
-#
-USE_DLB = Y
-
-#===============================================
-#======= End of Modification Section ===========
-#===============================================
-################################################
-# #
-# Nothing below here should have to be changed.#
-# #
-################################################
-
-# Changing this conditional block is not recommended
-ifeq "$(USE_DLB)" "Y"
-DLBFLG = -DDLB
-else
-DLBFLG =
-endif
-
-TERMLIB =
-
-#==========================================
-#================ MACROS ==================
-#==========================================
-# This section creates shorthand macros for many objects
-# referenced later on in the Makefile.
-#
-# Have windows path styles available for use in commands
-#
-W_OBJ =$(subst /,\, $(OBJ))
-W_INCL =$(subst /,\, $(INCL))
-W_DAT =$(subst /,\, $(DAT))
-W_DOC =$(subst /,\, $(DOC))
-W_UTIL =$(subst /,\, $(UTIL))
-W_SRC =$(subst /,\, $(SRC))
-W_SSYS =$(subst /,\, $(SSYS))
-W_MSWSYS =$(subst /,\, $(MSWSYS))
-W_TTY =$(subst /,\, $(TTY))
-W_MSWIN =$(subst /,\, $(MSWIN))
-ifeq "$(ADD_CURSES)" "Y"
-W_WCURSES =$(subst /,\, $(WCURSES))
-endif
-W_WSHR =$(subst /,\, $(WSHR))
-W_GAMEDIR =$(subst /,\, $(GAMEDIR))
-
-#
-# Shorten up the location for some files
-#
-
-O = $(OBJ)/
-HOST_O = $(HOBJ)/
-U = $(UTIL)/
-
-#==========================================
-# Utility Objects.
-#==========================================
-
-MAKESRC = makedefs.c
-
-MAKEDEFSOBJS = $(HOST_O)makedefs.o $(HOST_O)monst.o $(HOST_O)objects.o
-
-LUA_QTEXT_FILE = "quest.lua"
-
-#==========================================
-# Tile related object files.
-#==========================================
-
-TILOBJ2 = $(HOST_O)tileset.o $(HOST_O)bmptiles.o $(HOST_O)giftiles.o
-
-TEXTIO = $(HOST_O)tiletext.o $(HOST_O)tiletxt.o $(HOST_O)drawing.o $(HOST_O)monst.o \
- $(HOST_O)objects.o
-
-TEXTIO2 = $(HOST_O)tiletex2.o $(HOST_O)tiletxt2.o $(HOST_O)drawing.o $(HOST_O)monst.o \
- $(HOST_O)objects.o
-
-TILE_BMP = $(DAT)/NHTILES.BMP
-
-TILEUTIL = $(TILE_BMP)
-
-TILEFILES = $(WSHR)/monsters.txt $(WSHR)/objects.txt $(WSHR)/other.txt
-
-TILEFILES2 = $(WSHR)/monthin.txt $(WSHR)/objthin.txt $(WSHR)/oththin.txt
-
-GIFREADERS = $(HOST_O)gifread.o $(HOST_O)alloc.o $(HOST_O)panic.o
-
-GIFREAD2 = $(HOST_O)gifread2.o $(HOST_O)alloc.o $(HOST_O)panic.o
-
-PPMWRITERS = $(HOST_O)ppmwrite.o $(HOST_O)alloc.o $(HOST_O)panic.o
-
-PPMWRIT2 = $(HOST_O)ppmwrit2.o $(HOST_O)alloc.o $(HOST_O)panic.o
-
-#==========================================
-# Object files.
-#==========================================
-
-DLBOBJ = $(HOST_O)dlb.o
-
-ALLOBJ = $(MAKEDEFSOBJS) $(TILOBJ) $(TILOBJ2) $(TEXTIO) $(TEXTIO2)
-
-#==========================================
-# Header file macros
-#==========================================
-
-PATCHLEV_H = $(INCL)/patchlev.h
-DGN_FILE_H = $(INCL)/align.h $(INCL)/dgn_file.h
-DUNGEON_H = $(INCL)/align.h $(INCL)/dungeon.h
-MONDATA_H = $(INCL)/align.h $(INCL)/mondata.h
-MONST_H = $(INCL)/align.h $(INCL)/monst.h $(INCL)/mextra.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
-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
-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
-
-CONFIG_H = $(INCL)/config.h $(INCL)/config1.h $(INCL)/tradstdc.h \
- $(INCL)/global.h $(INCL)/coord.h $(INCL)/vmsconf.h \
- $(INCL)/system.h $(INCL)/nhlua.h $(INCL)/unixconf.h \
- $(INCL)/micro.h $(INCL)/pcconf.h $(INCL)/ntconf.h
-
-HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/lint.h $(INCL)/align.h \
- $(INCL)/dungeon.h $(INCL)/monsym.h $(INCL)/mkroom.h \
- $(INCL)/objclass.h $(INCL)/youprop.h $(INCL)/prop.h \
- $(INCL)/permonst.h $(INCL)/monattk.h \
- $(INCL)/monflag.h $(INCL)/mondata.h $(INCL)/pm.h \
- $(INCL)/wintype.h $(INCL)/context.h $(INCL)/rm.h \
- $(INCL)/botl.h $(INCL)/rect.h \
- $(INCL)/region.h $(INCL)/decl.h $(INCL)/quest.h \
- $(INCL)/spell.h $(INCL)/color.h $(INCL)/obj.h \
- $(INCL)/you.h $(INCL)/attrib.h $(INCL)/monst.h \
- $(INCL)/mextra.h $(INCL)/skills.h $(INCL)/onames.h \
- $(INCL)/timeout.h $(INCL)/trap.h $(INCL)/flag.h \
- $(INCL)/vision.h $(INCL)/display.h $(INCL)/engrave.h \
- $(INCL)/winprocs.h $(INCL)/sys.h $(INCL)/wintty.h \
- $(INCL)/trampoli.h
-
-DLB_H = $(INCL)/dlb.h
-
-ifeq ($(SUPPRESS_GRAPHICS),Y)
-TILE_H =
-else
-TILE_H = $(WSHR)/tile.h $(INCL)/tileset.h
-endif
-
-ifeq ($(USE_DLB),Y)
-DLB = dlb
-DLBOBJS = $(HOST_O)dlb_main.o $(HOST_O)dlb.o $(HOST_O)alloc.o $(HOST_O)panic.o
-else
-DLB =
-DLBOBJS =
-endif
-
-#==========================================
-# More compiler setup macros
-#==========================================
-#
-CURSESDEF=
-CURSESLIB=
-INCLDIR=-I../include -I../sys/msdos
-# Debugging
-#cflags = -pg -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS -DCROSSCOMPILE -CROSSCOMPILE_HOST
-#LFLAGS = -pg
-#
-#cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS -DCROSSCOMPILE -DCROSSCOMPILE_HOST
-#LFLAGS =
-#
-# Debugging
-#cflags = -g -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_HOST
-#LFLAGS = -g
-#
-# Normal
-cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_HOST
-LFLAGS =
-
-#==========================================
-#================ RULES ==================
-#==========================================
-
-.SUFFIXES: .o .til .uu .c .y .l
-
-#==========================================
-# Rules for host files in src
-#==========================================
-
-$(HOST_O)%.o : $(SRC)/%.c
- $(HOST_CC) $(cflags) -o$@ $<
-
-#==========================================
-# Rules for host files in sys/msdos
-#==========================================
-
-$(HOST_O)%.o : $(MSYS)/%.c
- $(HOST_CC) $(cflags) -I../sys/msdos -o$@ $<
-
-#==========================================
-# Rules for host files in util
-#==========================================
-
-$(HOST_O)%.o : $(SRC)/%.c
- $(HOST_CC) $(cflags) -o$@ $<
-
-$(HOST_O)%.o : $(UTIL)/%.c
- $(HOST_CC) $(cflags) -o$@ $<
-
-$(HOST_O)%.o : %.c
- $(HOST_CC) $(cflags) -o$@ $<
-
-#==========================================
-# Rules for host files in win/share
-#==========================================
-
-$(HOST_O)%.o : $(WSHR)/%.c
- $(HOST_CC) $(cflags) -I../win/share -o$@ $<
-
-#==========================================
-# Primary Targets.
-#==========================================
-
-# The default target.
-
-all : prereq
-
-prereq: $(HOST_O)prereq.tag
- @echo Done.
-
-default: prereq
-
-util: $(HOST_O)utility.tag
-
-$(HOST_O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \
- $(INCL)/pm.h vis_tab.c $(TILEUTIL) $(SRC)/tile.c
- echo host utilities made > $@
-
-tileutil: $(U)gif2txt $(U)txt2ppm
- @echo Optional tile development utilities are up to date.
-
-$(HOST_O)prereq.tag: $(INCL)/nhlua.h hobj.tag $(U)makedefs \
- $(HOST_O)utility.tag $(DAT)/nhdat
- echo prereq done >$@
-
-ifeq "$(LUA_VERSION)" "5.3.5"
-LUAVER=5.3.5
-else
-LUAVER=5.4.0
-endif
-
-$(INCL)/nhlua.h:
- cd $(INCL); \
- echo '/* nhlua.h - generated by Makefile1.cross */' > $@; \
- echo '#include "../lib/lua-$(LUAVER)/src/lua.h"' >> $@; \
- sed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' < $(LIB)/lua-$(LUAVER)/src/lua.h >> $@; \
- echo '#include "../lib/lua-$(LUAVER)/src/lualib.h"' >> $@; \
- echo '#include "../lib/lua-$(LUAVER)/src/lauxlib.h"' >> $@; \
- echo '/*nhlua.h*/' >> $@; \
- cd $(SRC)
-
-#==========================================
-# Other host targets.
-#==========================================
-
-#note that dir below assumes bin/dir from djgpp distribution
-#
-$(DAT)/nhdat: $(U)dlb_main $(DAT)/data $(DAT)/rumors \
- $(DAT)/oracles \
- $(DAT)/bogusmon $(DAT)/engrave $(DAT)/epitaph $(DAT)/tribute
- cd $(DAT); \
- pwd; \
- cp $(MSYS)/msdoshlp.txt .; \
- ls -1 data oracles options rumors help hh >dlb.lst; \
- ls -1 cmdhelp history opthelp wizhelp license >>dlb.lst; \
- ls -1 bogusmon engrave epitaph tribute msdoshlp.txt >>dlb.lst; \
- ls -1 *.lua >>dlb.lst; \
- $(U)dlb_main cvIf dlb.lst nhdat; \
- cd $(SRC)
-
-$(U)dlb_main: $(DLBOBJS)
- $(HOST_LINK) $(LFLAGS) -o$@ $(DLBOBJS)
-
-$(HOST_O)dlb_main.o: $(U)dlb_main.c $(INCL)/config.h $(DLB_H)
- $(HOST_CC) $(cflags) -o$@ $(U)dlb_main.c
-
-
-$(INCL)/date.h : $(U)makedefs
- -$(U)makedefs -v
-
-$(INCL)/onames.h: $(U)makedefs
- -$(U)makedefs -o
-
-$(INCL)/pm.h: $(U)makedefs
- -$(U)makedefs -p
-
-#monstr.c: $(U)makedefs
-# -$(U)makedefs -m
-
-$(INCL)/vis_tab.h: $(U)makedefs
- -$(U)makedefs -z
-
-vis_tab.c: $(U)makedefs
- -$(U)makedefs -z
-
-# make data.base an 8.3 filename to prevent an make warning
-DATABASE = $(DAT)/data.bas
-
-$(DAT)/data: $(HOST_O)utility.tag $(DATABASE)
- $(U)makedefs -d
-
-$(DAT)/rumors: $(HOST_O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal
- $(U)makedefs -r
-
-$(DAT)/oracles: $(HOST_O)utility.tag $(DAT)/oracles.txt
- $(U)makedefs -h
-
-$(DAT)/bogusmon: $(HOST_O)utility.tag $(DAT)/bogusmon.txt
- $(U)makedefs -s
-
-$(DAT)/engrave: $(HOST_O)utility.tag $(DAT)/engrave.txt
- $(U)makedefs -s
-
-$(DAT)/epitaph: $(HOST_O)utility.tag $(DAT)/epitaph.txt
- $(U)makedefs -s
-
-#===============================================
-# Create directory for holding host object files
-#===============================================
-
-hobj.tag:
- mkdir -p ./$(HOBJ)
- echo directory ready ./$(HOBJ)
-
-#==========================================
-# Makedefs Stuff
-#==========================================
-
-$(U)makedefs: $(MAKEDEFSOBJS)
- $(HOST_LINK) $(LFLAGS) -o$@ $(MAKEDEFSOBJS)
-
-$(HOST_O)makedefs.o: $(U)makedefs.c $(SRC)/mdlib.c $(CONFIG_H) $(INCL)/permonst.h \
- $(INCL)/objclass.h $(INCL)/monsym.h \
- $(INCL)/artilist.h $(INCL)/dungeon.h $(INCL)/obj.h \
- $(INCL)/monst.h $(INCL)/you.h $(INCL)/flag.h \
- $(INCL)/dlb.h $(INCL)/patchlevel.h
-
-#=============================================
-# Header file moves required for tile support
-#=============================================
-
-ifeq ($(SUPPRESS_GRAPHICS),Y)
-
-else
-#
-# Tile Mapping
-#
-
-$(SRC)/tile.c: $(U)tilemap
- @$(U)tilemap
- @echo A new $@ has been created
-
-$(U)tilemap: $(HOST_O)tilemap.o
- $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tilemap.o
-
-$(HOST_O)tilemap.o: $(WSHR)/tilemap.c $(HACK_H) $(TILE_H)
- $(HOST_CC) $(cflags) -I$(WSHR) -I$(MSYS) -DSTATUES_LOOK_LIKE_MONSTERS -o$@ $(WSHR)/tilemap.c
-
-
-#==========================================
-# Tile Utilities
-# Required for tile support
-#==========================================
-
-#$(DAT)/NetHack1.tib: $(TILEFILES) $(U)tile2bin
-# @echo Creating binary tile files
-# cd $(DAT)
-# $(U)tile2bin
-# cd $(SRC)
-
-#$(DAT)/NetHacko.tib: $(HOST_O)thintile.tag $(TILEFILES2) $(U)til2bin2
-# @echo Creating overview binary tile files
-# cd $(DAT)
-# $(U)til2bin2
-# cd $(SRC)
-
-$(DAT)/NHTILES.BMP: $(TILEFILES) $(U)tile2bmp
- @echo Creating binary tile files which may take some time
- @cd $(DAT)
- @$(U)tile2bmp $@
- @cd $(SRC)
-
-$(U)tile2bmp: $(HOST_O)tile2bmp.o $(TEXTIO)
- -rm -f temp.a
- ar r temp.a $(TEXTIO)
- $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tile2bmp.o temp.a
-
-#$(U)tile2bin: $(HOST_O)tile2bin.o $(TEXTIO)
-# -rm -f temp.a
-# ar r temp.a $(TEXTIO)
-# $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tile2bin.o temp.a
-
-#$(U)til2bin2: $(HOST_O)til2bin2.o $(TEXTIO2)
-# -rm -f temp.a
-# ar r temp.a $(TEXTIO2)
-# $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)til2bin2.o temp.a
-
-#$(U)thintile: $(HOST_O)thintile.o
-# $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)thintile.o
-
-#$(HOST_O)thintile.o: $(HACK_H) $(WSHR)/tile.h $(WSHR)/thintile.c
-# -rm -f temp.a
-# ar r temp.a $(TEXTIO)
-# $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)tile2bmp.o temp.a
-
-#$(HOST_O)thintile.o: $(HACK_H) $(WSHR)/tile.h $(WSHR)/thintile.c
-# $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE -DOVERVIEW_FILE -o$@ $(WSHR)/thintile.c
-
-#$(HOST_O)thintile.tag: $(U)thintile $(TILEFILES)
-# $(U)thintile
-# echo thintiles created >$@
-
-$(HOST_O)tile2bmp.o: $(HACK_H) $(TILE_H) $(WSHR)/tile2bmp.c
- $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(WSHR)/tile2bmp.c
-
-#$(HOST_O)tile2bin.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c
-# $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/tile2bin.c
-
-#$(HOST_O)til2bin2.o: $(HACK_H) $(TILE_H) $(MSYS)/pctiles.h $(MSYS)/pcvideo.h $(MSYS)/tile2bin.c
-# $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE_X=8 -DOVERVIEW_FILE -o$@ $(MSYS)/tile2bin.c
-
-$(HOST_O)tiletext.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tiletext.c
- $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(WSHR)/tiletext.c
-
-$(HOST_O)tiletex2.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tiletext.c
- $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILE_X=8 -o$@ $(WSHR)/tiletext.c
-
-$(HOST_O)tiletxt.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tilemap.c
- $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILETEXT -o$@ $(WSHR)/tilemap.c
-
-$(HOST_O)tiletxt2.o: $(CONFIG_H) $(TILE_H) $(WSHR)/tilemap.c
- $(HOST_CC) $(cflags) -I$(MSYS) -I$(WSHR) -DTILETEXT -DTILE_X=8 -o$@ $(WSHR)/tilemap.c
-#
-# Optional GIF Utilities (for development)
-#
-
-$(U)gif2txt: $(GIFREADERS) $(TEXTIO)
- $(HOST_LINK) $(LFLAGS) -o$@ $(GIFREADERS) $(TEXTIO)
-
-$(U)gif2txt2: $(GIFREAD2) $(TEXTIO2)
- $(HOST_LINK) $(LFLAGS) -o$@ $(GIFREAD2) $(TEXTIO2)
-
-$(U)txt2ppm: $(PPMWRITERS) $(TEXTIO)
- $(HOST_LINK) $(LFLAGS) -o$@ $(PPMWRITERS) $(TEXTIO)
-
-$(U)txt2ppm2: $(PPMWRIT2) $(TEXTIO2)
- $(HOST_LINK) $(LFLAGS) -o$@ $(PPMWRIT2) $(TEXTIO2)
-
-$(HOST_O)gifread.o: $(CONFIG_H) $(WSHR)/tile.h $(WSHR)/gifread.c
-
-$(HOST_O)gifread2.o: $(CONFIG_H) $(WSHR)/tile.h $(WSHR)/gifread.c
- $(HOST_CC) $(cflags) -DTILE_X=8 -o$@ $(WSHR)/gifread.c
-
-ppmwrite.c: $(WSHR)/ppmwrite.c
- cp $(WSHR)/ppmwrite.c .
-
-$(HOST_O)ppmwrite.o: $(CONFIG_H) $(WSHR)/tile.h
-
-$(HOST_O)ppmwrit2.o: $(CONFIG_H) $(WSHR)/tile.h ppmwrite.c
- $(HOST_CC) $(cflags) -DTILE_X=8 -o$@ ppmwrite.c
-
-#
-# Optional tile viewer (development sources only)
-#
-
-$(U)viewtib: $(HOST_O)viewtib.o
- $(HOST_LINK) $(LFLAGS) -o$@ $(HOST_O)viewtib.o $(LIBRARIES)
-
-$(HOST_O)viewtib.o: $(MSYS)/viewtib.c
-
-endif
-
-#==========================================
-# Other host Util Dependencies.
-#==========================================
-
-$(HOST_O)monst.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/monsym.h \
- $(INCL)/color.h monst.c
- $(HOST_CC) $(cflags) -o$@ monst.c
-
-$(HOST_O)objects.o: $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \
- $(INCL)/prop.h $(INCL)/color.h objects.c
- $(HOST_CC) $(cflags) -o$@ objects.c
-
-$(HOST_O)panic.o: $(CONFIG_H) $(U)panic.c
- $(HOST_CC) $(cflags) -o$@ $(U)panic.c
-
-#==========================================
-# Housekeeping for host side.
-#==========================================
-
-clean:
- -rm $(HOBJ)/*.o
- -rm ./msdos_o/*.o
- if [ -f $(HOST_O)prereq.tag ]; then rm $(HOST_O)prereq.tag; fi;
- if [ -f hobj.tag ]; then rm hobj.tag; fi;
- if [ -f $(HOST_O)utility.tag ]; then rm $(HOST_O)utility.tag; fi;
- if [ -f temp.a ]; then rm temp.a; fi;
-
-spotless: clean
-
- if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi;
-## if [ -f $(U)dgn_flex.c ]; then rm $(U)dgn_flex.c; fi;
-## if [ -f $(U)dgn_lex.c ]; then rm $(U)dgn_lex.c; fi;
-# if [ -f $(U)makedefs ]; then rm $(U)makedefs; fi;
-## if [ -f $(U)dgn_comp ]; then rm $(U)dgn_comp; fi;
-# if [ -f $(U)recover.exe ]; then rm $(U)recover.exe; fi;
-# if [ -f $(U)tilemap ]; then rm $(U)tilemap; fi;
-# if [ -f $(U)tile2bmp ]; then rm $(U)tile2bmp; fi;
-## if [ -f $(U)tile2bin ]; then rm $(U)tile2bin; fi;
-## if [ -f $(U)til2bin2 ]; then rm $(U)til2bin2; fi;
-## if [ -f $(U)thintile ]; then rm $(U)thintile; fi;
-# if [ -f $(U)dlb_main ]; then rm $(U)dlb_main; fi;
-# if [ -f $(INCL)/vis_tab.h ]; then rm $(INCL)/vis_tab.h; fi;
-# if [ -f $(INCL)/onames.h ]; then rm $(INCL)/onames.h; fi;
-# if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi;
-# if [ -f $(INCL)/date.h ]; then rm $(INCL)/date.h; fi;
-## if [ -f $(INCL)/dgn_comp.h ]; then rm $(INCL)/dgn_comp.h; fi;
-## if [ -f $(INCL)/lev_comp.h ]; then rm $(INCL)/lev_comp.h; fi;
-# if [ -f $(SRC)/vis_tab.c ]; then rm $(SRC)/vis_tab.c; fi;
-# if [ -f $(SRC)/tile.c ]; then rm $(SRC)/tile.c; fi;
-# if [ -f $(DAT)/options ]; then rm $(DAT)/options; fi;
-# if [ -f $(DAT)/data ]; then rm $(DAT)/data; fi;
-# if [ -f $(DAT)/rumors ]; then rm $(DAT)/rumors; fi;
-## if [ -f $(DAT)/dungeon.pdf ]; then rm $(DAT)/dungeon.pdf; fi;
-## if [ -f $(DAT)/dungeon ]; then rm $(DAT)/dungeon; fi;
-# if [ -f $(DAT)/oracles ]; then rm $(DAT)/oracles; fi;
-## if [ -f $(DAT)/quest.dat ]; then rm $(DAT)/quest.dat; fi;
-# if [ -f $(DAT)/bogusmon ]; then rm $(DAT)/bogusmon; fi;
-# if [ -f $(DAT)/engrave ]; then rm $(DAT)/engrave; fi;
-# if [ -f $(DAT)/epitaph ]; then rm $(DAT)/epitaph; fi;
-# if [ -f $(DAT)/dlb.lst ]; then rm $(DAT)/dlb.lst; fi;
-# if [ -f $(DAT)/nhdat ]; then rm $(DAT)/nhdat; fi;
-# if [ -f $(DAT)/*.lev ]; then rm $(DAT)/*.lev; fi;
-# if [ -f $(TILE_BMP) ]; then rm $(TILE_BMP); fi;
-# if [ -f $(WSHR)/monthin.txt ]; then rm $(WSHR)/monthin.txt; fi;
-# if [ -f $(WSHR)/objthin.txt ]; then rm $(WSHR)/objthin.txt; fi;
-# if [ -f $(WSHR)/oththin.txt ]; then rm $(WSHR)/oththin.txt; fi;
-
-#==========================================
-# Host Utility Dependencies
-#==========================================
-
-# src dependencies
-
-$(HOST_O)drawing.o: $(CONFIG_H) $(INCL)/color.h $(INCL)/rm.h \
- $(INCL)/objclass.h $(INCL)/monsym.h
-$(HOST_O)vis_tab.o: vis_tab.c $(CONFIG_H) $(INCL)/vis_tab.h
-$(HOST_O)alloc.o: alloc.c $(CONFIG_H)
-$(HOST_O)dlb.o: dlb.c $(CONFIG_H) $(INCL)/dlb.h
- $(HOST_CC) $(cflags) -I../sys/msdos -o$@ dlb.c
-$(HOST_O)monst.o: monst.c $(CONFIG_H) $(INCL)/permonst.h $(INCL)/align.h \
- $(INCL)/monattk.h $(INCL)/monflag.h $(INCL)/monsym.h \
- $(INCL)/color.h
-$(HOST_O)objects.o: objects.c $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \
- $(INCL)/prop.h $(INCL)/skills.h $(INCL)/color.h
-$(HOST_O)tileset.o: $(WSHR)/tileset.c $(HACK_H)
-$(HOST_O)bmptiles.o: $(WSHR)/bmptiles.c $(INCL)/config.h $(INCL)/tileset.h $(INCL)/integer.h
-$(HOST_O)giftiles.o: $(WSHR)/giftiles.c $(INCL)/config.h $(INCL)/tileset.h $(INCL)/integer.h
-
-# end of file
-
+++ /dev/null
-# NetHack 3.7 Makefile2.cross
-# Cross-compile msdos version of NetHack using a
-# linux-hosted djgpp cross-compiler.
-#
-# Makefile1.cross is for the host-side obj files and utilities that
-# will run on the host platform only.
-#
-# Makefile2.cross (this file) is for the target platform obj files
-# and utilities.
-#
-# Makefile2 utilizes the djgpp cross-compiler from Andrew Wu:
-# https://github.com/andrewwutw/build-djgpp
-#
-# Currently, in NetHack 3.7, it is now feasible to cross-compile
-# the game in a 2-stage process. Makefile2.cross (this file) carries
-# out the 2nd stage.
-#
-# A proof-of-concept to cross-compile NetHack 3.7 was achieved on
-# November 22, 2019 using the msdos set of Makefiles.
-#
-#
-
-# Game Installation Variables
-# NOTE: Make sure GAMEDIR exists before make is started.
-
-GAME = NETHACK
-# The GNU Make has a problem if you include a drive spec below (unfortunately).
-GAMEDIR =../msdos-binary
-
-# Optional PDCurses support
-# Uncomment these and set them appropriately if you want to
-# include curses port support alongside TTY support in your
-# NetHack.exe binary.
-#
-# You'll have to set PDCURSES_H to the correct location of the
-# PDCurses header (.h) files and PDCURSES_C to the location
-# of your PDCurses C files which must already be resident on
-# your machine.
-#
-ADD_CURSES=Y
-PDCURSES_TOP=../lib/pdcurses
-
-# Set top of djgpp if not specified through ENV variables prior to make:
-#DJGPP_TOP = $(HOME)/lib/djgpp
-
-#---------------------------------------------------------------
-ifeq "$(LUA_VERSION)" "5.3.5"
-LUAVER=5.3.5
-else
-LUAVER=5.4.0
-endif
-#---------------------------------------------------------------
-# Location of LUA
-#
-# Original source needs to be obtained from:
-# http://www.lua.org/ftp/lua-5.4.0.tar.gz
-#
-# This build assumes that the LUA sources are located
-# at the specified location. If they are actually elsewhere
-# you'll need to specify the correct spot below in order to
-# successfully build NetHack-3.7.
-#
-ADD_LUA=Y
-LUATOP=../lib/lua-$(LUAVER)
-#
-#
-#==============================================================================
-# This marks the end of the BUILD DECISIONS section.
-#==============================================================================
-#
-# Directories, gcc likes unix style directory specs
-#
-
-TARGET = msdos
-OBJ = $(TARGET)_o
-HOBJ = host_o
-DAT = ../dat
-DOC = ../doc
-INCL = ../include
-LIB = ../lib
-MSYS = ../sys/msdos
-SRC = ../src
-SSHR = ../sys/share
-UTIL = ../util
-WIN = ../win/tty
-WCURSES = ../win/curses
-WSHR = ../win/share
-
-#
-# Executables.
-ifndef DJGPP_TOP
-ifdef TRAVIS_BUILD_DIR
-DJGPP_TOP = TRAVIS_BUILD_DIR/lib/djgpp
-else
-DJGPP_TOP = $(HOME)/lib/djgpp
-endif
-endif
-
-TARGET_CC = $(DJGPP_TOP)/i586-pc-msdosdjgpp/bin/gcc
-TARGET_LINK = $(DJGPP_TOP)/i586-pc-msdosdjgpp/bin/gcc
-TARGET_STUBEDIT = $(DJGPP_TOP)/i586-pc-msdosdjgpp/bin/stubedit
-TARGET_AR = $(DJGPP_TOP)/i586-pc-msdosdjgpp/bin/ar
-MAKEBIN = make
-
-#
-# Special libraries and how to link them in.
-
-LIBS = -lpc
-
-# If TERMLIB is defined in pcconf.h, comment out the upper line and
-# uncomment the lower. Note that you must build the termc library
-# and place it in djgpp's lib directory. See termcap.zip for details
-
-TERMLIB =
-#TERMLIB = -ltermc
-
-LIBRARIES = $(LIBS) $(TERMLIB)
-
-#
-# Yacc/Lex ... if you got 'em.
-#
-# If you have yacc/lex or a work-alike set YACC_LEX to Y
-#
-YACC_LEX = N
-
-ifeq "$(YACC_LEX)" "Y"
-DO_YACC = YACC_ACT
-DO_LEX = LEX_ACT
-endif
-
-# If YACC_LEX is Y above, set the following to values appropriate for
-# your tools.
-#
-YACC = bison -y
-LEX = lex
-#
-# If your flex and bison port mess with the output names directly
-# you must set the file names to the appropriate output file names
-# here
-#YTABC = y_tab.c
-#YTABH = y_tab.h
-#LEXYYC = lexyy.c
-#
-# If your flex and bison are able to produce files named
-# y.tab.c, y.tab.h or lex.yy.c you might have to set these
-# to the short file name equivalent (DIR /X to reveal them):
-YTABC = ytab~1.c
-YTABH = ytab~1.h
-LEXYYC = lexyy~1.c
-
-#
-# Uncomment the line below if you want to store all the level files,
-# help files, etc. in a single library file.
-
-USE_DLB = Y
-
-# djgpp includes ls.exe and touch.exe in fil41b.zip from the v2gnu
-# folder so be sure to include that when downloading djgpp. Doing
-# so will make changing this unnecessary.
-
-LS = ls -1 # ls.exe from djgpp distribution
-#LS = dir /l/b # DOS command
-
-# To build a binary without any graphics
-# suitable for blind players,
-# set SUPPRESS_GRAPHICS to Y
-# (Note: binary will require ANSI.SYS driver or equivalent loaded)
-# SUPPRESS_GRAPHICS = Y
-SUPPRESS_GRAPHICS =
-
-# ZLIB Support
-# To support zlib compression in bones and save files, you must
-# define ZLIB_COMP in include/config.h.
-# You must also have a zlib library to link NetHack with, and
-# for the djgpp build, you need one compatible with djgpp.
-# At the time that this was written (post-NetHack 3.4.3) the
-# following URL was a valid place to get a pre-built djgpp library
-# to add to your djgpp tools directory tree.
-# http://www.delorie.com/pub/djgpp/current/v2tk/zlib114b.zip
-#
-# If you defined ZLIB_COMP in include/config.h to build in support
-# for ZLIB compression, you need to uncomment the line below.
-#ZLIB= -lz
-
-#===============================================
-#======= End of Modification Section ===========
-#===============================================
-################################################
-# #
-# Nothing below here should have to be changed.#
-# #
-################################################
-
-GAMEFILE = $(GAMEDIR)/$(GAME).EXE
-
-# Changing this conditional block is not recommended
-ifeq "$(USE_DLB)" "Y"
-DLBFLG = -DDLB
-else
-DLBFLG =
-endif
-
-TERMLIB =
-# Build NetHack suitable for blind players
-
-#==========================================
-#================ MACROS ==================
-#==========================================
-# This section creates shorthand macros for many objects
-# referenced later on in the Makefile.
-#
-# Have windows path styles available for use in commands
-#
-W_OBJ =$(subst /,\, $(OBJ))
-W_INCL =$(subst /,\, $(INCL))
-W_DAT =$(subst /,\, $(DAT))
-W_DOC =$(subst /,\, $(DOC))
-W_UTIL =$(subst /,\, $(UTIL))
-W_SRC =$(subst /,\, $(SRC))
-W_SSYS =$(subst /,\, $(SSYS))
-W_MSWSYS =$(subst /,\, $(MSWSYS))
-W_TTY =$(subst /,\, $(TTY))
-W_MSWIN =$(subst /,\, $(MSWIN))
-ifeq "$(ADD_CURSES)" "Y"
-W_WCURSES =$(subst /,\, $(WCURSES))
-endif
-W_WSHR =$(subst /,\, $(WSHR))
-W_GAMEDIR =$(subst /,\, $(GAMEDIR))
-
-#
-# Shorten up the location for some files
-#
-
-O = $(OBJ)/
-HOST_O = $(HOBJ)/
-U = $(UTIL)/
-
-#==========================================
-# Tile related object files.
-#==========================================
-
-PLANAR_TIB = $(DAT)/NETHACK1.tib
-OVERVIEW_TIB = $(DAT)/NETHACKO.tib
-TILE_BMP = $(DAT)/NHTILES.BMP
-
-##REGEX = $(O)pmatchregex.o
-##REGEX = $(O)cppregex.o
-REGEX = $(O)posixreg.o
-DLBOBJ = $(O)dlb.o
-VIDEO_OBJ = $(O)vidvga.o $(O)vidvesa.o $(O)tile.o $(O)tileset.o $(O)bmptiles.o $(O)giftiles.o
-RECOVOBJS = $(O)recover.o
-
-# Object files for the game itself.
-
-VOBJ01 = $(O)allmain.o $(O)alloc.o $(O)apply.o $(O)artifact.o
-VOBJ02 = $(O)attrib.o $(O)ball.o $(O)bones.o $(O)botl.o
-VOBJ03 = $(O)cmd.o $(O)dbridge.o $(O)decl.o $(O)detect.o
-VOBJ04 = $(O)display.o $(O)dlb.o $(O)dig.o $(O)do.o
-VOBJ05 = $(O)do_name.o $(O)do_wear.o $(O)dog.o $(O)dogmove.o
-VOBJ06 = $(O)dokick.o $(O)dothrow.o $(O)drawing.o $(O)dungeon.o
-VOBJ07 = $(O)eat.o $(O)end.o $(O)engrave.o $(O)exper.o
-VOBJ08 = $(O)explode.o $(O)extralev.o $(O)files.o $(O)fountain.o
-VOBJ09 = $(O)getline.o $(O)hack.o $(O)hacklib.o $(O)insight.o
-VOBJ10 = $(O)invent.o $(O)isaac64.o $(O)light.o $(O)lock.o
-VOBJ11 = $(O)mail.o $(O)main.o $(O)makemon.o $(O)mapglyph.o
-VOBJ12 = $(O)mcastu.o $(O)mhitm.o $(O)mhitu.o $(O)minion.o
-VOBJ13 = $(O)mkmap.o $(O)mklev.o $(O)mkmaze.o $(O)mkobj.o
-VOBJ14 = $(O)mkroom.o $(O)mon.o $(O)mondata.o $(O)monmove.o
-VOBJ15 = $(O)monst.o $(O)mplayer.o $(O)mthrowu.o $(O)muse.o
-VOBJ16 = $(O)music.o $(O)o_init.o $(O)objects.o $(O)objnam.o
-VOBJ17 = $(O)options.o $(O)pickup.o $(O)pline.o $(O)polyself.o
-VOBJ18 = $(O)potion.o $(O)quest.o $(O)questpgr.o $(O)pager.o
-VOBJ19 = $(O)pray.o $(O)priest.o $(O)read.o $(O)rect.o
-VOBJ20 = $(O)region.o $(O)restore.o $(O)rip.o $(O)rnd.o
-VOBJ21 = $(O)role.o $(O)rumors.o $(O)save.o $(O)sfstruct.o
-VOBJ22 = $(O)shk.o $(O)shknam.o $(O)sit.o $(O)sounds.o
-VOBJ23 = $(O)sp_lev.o $(O)spell.o $(O)steal.o $(O)steed.o
-VOBJ24 = $(O)symbols.o $(O)sys.o $(O)teleport.o $(O)termcap.o
-VOBJ25 = $(O)timeout.o $(O)topl.o $(O)topten.o $(O)track.o
-VOBJ26 = $(O)trap.o $(O)u_init.o $(O)uhitm.o $(O)vault.o
-VOBJ27 = $(O)vision.o $(O)vis_tab.o $(O)weapon.o $(O)were.o
-VOBJ28 = $(O)wield.o $(O)windows.o $(O)wintty.o $(O)wizard.o
-VOBJ29 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o
-VOBJ30 = $(REGEX) $(VIDEO_OBJ)
-
-SOBJ = $(O)msdos.o $(O)pcsys.o $(O)tty.o $(O)unix.o \
- $(O)video.o $(O)vidtxt.o $(O)pckeys.o
-
-VVOBJ = $(O)version.o
-
-MDLIB = $(O)mdlib.o
-
-ifeq "$(ADD_LUA)" "Y"
-LUAOBJ = $(O)nhlua.o $(O)nhlsel.o $(O)nhlobj.o
-endif
-
-ifeq "$(ADD_CURSES)" "Y"
-CURSESOBJ= $(O)cursdial.o $(O)cursinit.o $(O)cursinvt.o $(O)cursmain.o \
- $(O)cursmesg.o $(O)cursmisc.o $(O)cursstat.o $(O)curswins.o
-else
-CURSESOBJ=
-endif
-
-VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
- $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \
- $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \
- $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \
- $(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \
- $(VOBJ26) $(VOBJ27) $(VOBJ28) $(VOBJ29) $(VOBJ30) \
- $(LUAOBJ) $(CURSESOBJ) $(MDLIB)
-
-ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(TILOBJ2) $(VVOBJ)
-
-ifeq "$(ADD_LUA)" "Y"
-#===============-=================================================
-# LUA library
-# Source from http://www.lua.org/ftp/lua-5.4.0.tar.gz
-#=================================================================
-
-LUASRC = $(LUATOP)/src
-LUALIB = $(O)lua$(subst .,, $(LUAVER))s.a
-#LUADLL = $(O)lua$(subst .,, $(LUAVER)).a
-LUAINCL = -I$(LUASRC)
-#LUAFLAGS = unix added -lm here?
-LUATARGETS = lua.exe luac.exe $(LUALIB)
-#LUATARGETS = $(LUADLL) $(LUALIB)
-
-LUASRCFILES = lapi.c lauxlib.c lbaselib.c lcode.c \
- lcorolib.c lctype.c ldblib.c ldebug.c ldo.c \
- ldump.c lfunc.c lgc.c linit.c liolib.c llex.c \
- lmathlib.c lmem.c loadlib.c lobject.c lopcodes.c \
- loslib.c lparser.c lstate.c lstring.c lstrlib.c \
- ltable.c ltablib.c ltm.c lundump.c lutf8lib.c \
- lvm.c lzio.c
-
-LUAOBJFILES1 = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o \
- $(O)lcode.o $(O)lcorolib.o $(O)lctype.o $(O)ldblib.o
-LUAOBJFILES2 = $(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o \
- $(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o
-LUAOBJFILES3 = $(O)lmathlib.o $(O)lmem.o $(O)loadlib.o $(O)lobject.o \
- $(O)lopcodes.o $(O)loslib.o $(O)lparser.o $(O)lstate.o
-LUAOBJFILES4 = $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \
- $(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o
-
-#LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o \
-# $(O)lcode.o $(O)lcorolib.o $(O)lctype.o $(O)ldblib.o \
-# $(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o \
-# $(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o \
-# $(O)lmathlib.o $(O)lmem.o $(O)loadlib.o $(O)lobject.o \
-# $(O)lopcodes.o $(O)loslib.o $(O)lparser.o $(O)lstate.o \
-# $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \
-# $(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o
-
-ifeq "$(LUAVER)" "5.3.5"
-LUASRCFILES = $(LUASRCFILES) lbitlib.c
-LUAOBJFILES1 = $(LUAOBJFILES1) $(O)lbitlib.o
-endif
-LUALIBOBJS = $(LUAOBJFILES1) $(LUAOBJFILES2) $(LUAOBJFILES3) $(LUAOBJFILES4)
-
-endif
-ifeq "$(ADD_CURSES)" "Y"
-#==========================================
-# PDCurses build macros
-#==========================================
-PDCURSES_CURSES_H = $(PDCURSES_TOP)/curses.h
-PDCURSES_CURSPRIV_H = $(PDCURSES_TOP)/curspriv.h
-PDCURSES_HEADERS = $(PDCURSES_CURSES_H) $(PDCURSES_CURSPRIV_H)
-PDCSRC = $(PDCURSES_TOP)/pdcurses
-PDCDOS = $(PDCURSES_TOP)/dos
-PDCLIBOBJS1 = $(O)addch.o $(O)addchstr.o $(O)addstr.o $(O)attr.o $(O)beep.o \
- $(O)bkgd.o $(O)border.o $(O)clear.o $(O)color.o $(O)delch.o $(O)deleteln.o \
- $(O)getch.o
-PDCLIBOBJS2 = $(O)getstr.o $(O)getyx.o $(O)inch.o $(O)inchstr.o $(O)initscr.o \
- $(O)inopts.o $(O)insch.o $(O)insstr.o $(O)instr.o $(O)kernel.o \
- $(O)keyname.o $(O)mouse.o
-PDCLIBOBJS3 = $(O)move.o $(O)outopts.o $(O)overlay.o $(O)pad.o $(O)panel.o \
- $(O)printw.o $(O)refresh.o $(O)scanw.o $(O)scr_dump.o $(O)scroll.o \
- $(O)slk.o $(O)termattr.o
-PDCLIBOBJS4 = $(O)touch.o $(O)util.o $(O)window.o $(O)debug.o
-PDCLIBOBJS = $(PDCLIBOBJS1) $(PDCLIBOBJS2) $(PDCLIBOBJS3) $(PDCLIBOBJS4)
-
-PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o \
- $(O)pdcscrn.o $(O)pdcsetsc.o $(O)pdcutil.o
-
-#PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o $(O)pdcscrn.o \
-# $(O)pdcsetsc.o $(O)pdcutil.o
-
-PDCLIB = $(O)pdcurses.a
-
-#PDCINCL = -I$(PDCURSES_TOP) -I$(PDCSRC) -I$(PDCDOS)
-PDCINCL = -I$(PDCURSES_TOP) -I$(PDCDOS)
-else
-PDCLIB =
-endif
-
-#==========================================
-# Header file macros
-#==========================================
-
-PATCHLEV_H = $(INCL)/patchlev.h
-DGN_FILE_H = $(INCL)/align.h $(INCL)/dgn_file.h
-DUNGEON_H = $(INCL)/align.h $(INCL)/dungeon.h
-MONDATA_H = $(INCL)/align.h $(INCL)/mondata.h
-MONST_H = $(INCL)/align.h $(INCL)/monst.h $(INCL)/mextra.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
-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
-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
-
-CONFIG_H = $(INCL)/config.h $(INCL)/config1.h $(INCL)/tradstdc.h \
- $(INCL)/global.h $(INCL)/coord.h $(INCL)/vmsconf.h \
- $(INCL)/system.h $(INCL)/nhlua.h $(INCL)/unixconf.h \
- $(INCL)/micro.h $(INCL)/pcconf.h $(INCL)/ntconf.h
-
-HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/lint.h $(INCL)/align.h \
- $(INCL)/dungeon.h $(INCL)/monsym.h $(INCL)/mkroom.h \
- $(INCL)/objclass.h $(INCL)/youprop.h $(INCL)/prop.h \
- $(INCL)/permonst.h $(INCL)/monattk.h \
- $(INCL)/monflag.h $(INCL)/mondata.h $(INCL)/pm.h \
- $(INCL)/wintype.h $(INCL)/context.h $(INCL)/rm.h \
- $(INCL)/botl.h $(INCL)/rect.h \
- $(INCL)/region.h $(INCL)/decl.h $(INCL)/quest.h \
- $(INCL)/spell.h $(INCL)/color.h $(INCL)/obj.h \
- $(INCL)/you.h $(INCL)/attrib.h $(INCL)/monst.h \
- $(INCL)/mextra.h $(INCL)/skills.h $(INCL)/onames.h \
- $(INCL)/timeout.h $(INCL)/trap.h $(INCL)/flag.h \
- $(INCL)/vision.h $(INCL)/display.h $(INCL)/engrave.h \
- $(INCL)/winprocs.h $(INCL)/sys.h $(INCL)/wintty.h \
- $(INCL)/trampoli.h
-
-DLB_H = $(INCL)/dlb.h
-
-ifeq ($(SUPPRESS_GRAPHICS),Y)
-TILE_H =
-else
-TILE_H = $(WSHR)/tile.h $(INCL)/tileset.h
-endif
-
-ifeq ($(USE_DLB),Y)
-DLB = dlb
-DLBOBJS = $(O)dlb_main.o $(O)dlb.o $(O)alloc.o $(O)panic.o
-else
-DLB =
-DLBOBJS =
-endif
-
-#==========================================
-# More compiler setup macros
-#==========================================
-#
-ifeq "$(ADD_CURSES)" "Y"
-CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
-else
-CURSESDEF=
-CURSESLIB=
-endif
-
-INCLDIR=-I../include -I../sys/msdos $(LUAINCL)
-
-# Debugging
-#cflags = -pg -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS -DCROSSCOMPILE -DCROSSCOMPILE_TARGET
-#LFLAGS = -pg
-
-#cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS -DCROSSCOMPILE-DCROSSCOMPILE_TARGET
-#LFLAGS =
-
-# Debugging
-#cflags = -g -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_TARGET
-#LFLAGS = -g
-
-# Normal
-cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_TARGET
-LFLAGS =
-
-#==========================================
-#================ RULES ==================
-#==========================================
-
-.SUFFIXES: .o .til .uu .c .y .l
-
-#==========================================
-# Rules for files in src
-#==========================================
-
-$(OBJ)/%.o : %.c
- $(TARGET_CC) $(cflags) -o$@ $<
-
-$(OBJ)/%.o : $(SRC)/%.c
- $(TARGET_CC) $(cflags) -o$@ $<
-
-#==========================================
-# Rules for files in sys/share
-#==========================================
-
-$(OBJ)/%.o : $(SSHR)/%.c
- $(TARGET_CC) $(cflags) -o$@ $<
-
-#==========================================
-# Rules for files in sys/msdos
-#==========================================
-
-$(OBJ)/%.o : $(MSYS)/%.c
- $(TARGET_CC) $(cflags) -I../sys/msdos -o$@ $<
-
-#==========================================
-# Rules for files in util
-#==========================================
-
-$(OBJ)/%.o : $(UTIL)/%.c
- $(TARGET_CC) $(cflags) -o$@ $<
-
-#==========================================
-# Rules for files in win/share
-#==========================================
-
-$(OBJ)/%.o : $(WSHR)/%.c
- $(TARGET_CC) $(cflags) -I../win/share -o$@ $<
-
-#==========================================
-# Rules for files in win/tty
-#==========================================
-
-$(OBJ)/%.o : $(TTY)/%.c
- $(TARGET_CC) $(cflags) -o$@ $<
-
-#==========================================
-# Rules for files in win/curses
-#==========================================
-
-$(OBJ)/%.o : $(WCURSES)/%.c
- $(TARGET_CC) -DPDC_NCMOUSE $(PDCINCL) $(cflags) -o$@ $<
-
-#==========================================
-# Rules for files in PDCurses
-#==========================================
-
-$(OBJ)/%.o : $(PDCURSES_TOP)/%.c
- $(TARGET_CC) $(PDCINCL) $(cflags) -o$@ $<
-
-$(OBJ)/%.o : $(PDCSRC)/%.c
- $(TARGET_CC) $(PDCINCL) $(cflags) -o$@ $<
-
-$(OBJ)/%.o : $(PDCDOS)/%.c
- $(TARGET_CC) $(PDCINCL) $(cflags) -o$@ $<
-
-ifeq "$(ADD_LUA)" "Y"
-#==========================================
-# Rules for LUA files
-#==========================================
-
-$(OBJ)/%.o : $(LUASRC)/%.c
- $(TARGET_CC) $(cflags) -o$@ $<
-endif
-
-#==========================================
-# Primary Targets.
-#==========================================
-
-# The default target.
-
-all : install
-
-install: $(GAMEFILE) $(O)install.tag
- @echo Done.
-
-default: $(GAMEFILE)
-
-tileutil: $(U)gif2txt $(U)txt2ppm
- @echo Optional tile development utilities are up to date.
-
-recover.exe: $(U)recover
-# @$(subst /,\,if exist $(U)recover copy $(U)recover $(GAMEDIR))
-# @$(subst /,\,if exist $(DOC)/recover.txt copy $(DOC)/recover.txt $(GAMEDIR))
-
-$(O)install.tag: $(DAT)/nhdat $(GAMEFILE)
-ifeq ($(USE_DLB),Y)
- cp $(DAT)/nhdat $(GAMEDIR)/NHDAT
- cp $(DAT)/license $(GAMEDIR)/LICENSE
-else
- cp $(DAT)/*. $(GAMEDIR)
- cp $(DAT)/*.dat $(GAMEDIR)
- cp $(MSYS)/msdoshlp.txt $(GAMEDIR))
-ifeq "$(ADD_LUA)" "Y"
- cp $(DAT)/*.lua $(GAMEDIR)
-endif
-endif
-ifdef TERMLIB
- cp $(SSHR)/termcap $(GAMEDIR)/TERMCAP)
-endif
-# if [ -f $(TILE_BMP) ]; then rm $(TILE_BMP); fi;
- if [ -f $(TILE_BMP) ]; then cp $(TILE_BMP) $(GAMEDIR)/NHTILES.BMP; fi;
- if [ -f $(DAT)/symbols ]; then cp $(DAT)/symbols $(GAMEDIR)/SYMBOLS; fi;
- if [ -f $(SSHR)/NetHack.cnf ]; then cp $(SSHR)/NetHack.cnf $(GAMEDIR)/NETHACK.CNF; fi;
- -touch $(GAMEDIR)/RECORD
- if [ -f ../sys/msdos/sysconf ]; then cp ../sys/msdos/sysconf $(GAMEDIR)/SYSCONF; fi;
- if [ -f $(DOC)/nethack.txt ]; then cp $(DOC)/nethack.txt $(GAMEDIR)/NETHACK.TXT; fi;
- @echo install done > $@
-
-#==========================================
-# The main target.
-#==========================================
-
-$(GAMEFILE): $(O)obj.tag $(PDCLIB) $(LUALIB) \
- $(ALLOBJ) $(O)$(GAME).lnk
- if [ -f temp.a ]; then rm temp.a; fi;
- @$(TARGET_AR) r temp.a $(VOBJ01)
- @$(TARGET_AR) r temp.a $(VOBJ02)
- @$(TARGET_AR) r temp.a $(VOBJ03)
- @$(TARGET_AR) r temp.a $(VOBJ04)
- @$(TARGET_AR) r temp.a $(VOBJ05)
- @$(TARGET_AR) r temp.a $(VOBJ06)
- @$(TARGET_AR) r temp.a $(VOBJ07)
- @$(TARGET_AR) r temp.a $(VOBJ08)
- @$(TARGET_AR) r temp.a $(VOBJ09)
- @$(TARGET_AR) r temp.a $(VOBJ10)
- @$(TARGET_AR) r temp.a $(VOBJ11)
- @$(TARGET_AR) r temp.a $(VOBJ12)
- @$(TARGET_AR) r temp.a $(VOBJ13)
- @$(TARGET_AR) r temp.a $(VOBJ14)
- @$(TARGET_AR) r temp.a $(VOBJ15)
- @$(TARGET_AR) r temp.a $(VOBJ16)
- @$(TARGET_AR) r temp.a $(VOBJ17)
- @$(TARGET_AR) r temp.a $(VOBJ18)
- @$(TARGET_AR) r temp.a $(VOBJ19)
- @$(TARGET_AR) r temp.a $(VOBJ20)
- @$(TARGET_AR) r temp.a $(VOBJ21)
- @$(TARGET_AR) r temp.a $(VOBJ22)
- @$(TARGET_AR) r temp.a $(VOBJ23)
- @$(TARGET_AR) r temp.a $(VOBJ24)
- @$(TARGET_AR) r temp.a $(VOBJ25)
- @$(TARGET_AR) r temp.a $(VOBJ26)
- @$(TARGET_AR) r temp.a $(VOBJ27)
- @$(TARGET_AR) r temp.a $(VOBJ28)
- @$(TARGET_AR) r temp.a $(VOBJ29)
- @$(TARGET_AR) r temp.a $(VOBJ30)
- @$(TARGET_AR) r temp.a $(VIDEO_OBJ)
- @$(TARGET_AR) r temp.a $(SOBJ)
- @$(TARGET_AR) r temp.a $(TILOBJ)
- @$(TARGET_AR) r temp.a $(TILOBJ2)
-ifeq "$(ADD_LUA)" "Y"
- @$(TARGET_AR) r temp.a $(LUAOBJ)
-endif
- @$(TARGET_AR) r temp.a $(VVOBJ)
-ifeq "$(ADD_CURSES)" "Y"
- @$(TARGET_AR) r temp.a $(CURSESOBJ)
-endif
- @$(TARGET_AR) r temp.a $(MDLIB)
- $(TARGET_LINK) $(LFLAGS) -o$(GAME).exe temp.a $(PDCLIB) $(LUALIB) $(LIBRARIES) $(ZLIB)
- $(TARGET_STUBEDIT) $(GAME).exe minstack=2048K
- cp $(GAME).exe $(GAMEFILE)
- rm $(GAME).exe
-
-$(O)$(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 $(VOBJ24) >> $@
- echo $(VOBJ25) >> $@
- echo $(VOBJ26) >> $@
- echo $(VOBJ27) >> $@
- echo $(VOBJ28) >> $@
- echo $(VOBJ29) >> $@
- echo $(VOBJ30) >> $@
- echo $(SOBJ) >> $@
- echo $(TILOBJ) >> $@
- echo $(TILOBJ2) >> $@
-ifeq "$(ADD_LUA)" "Y"
- echo $(LUAOBJ) >> $@
-endif
- echo $(VVOBJ) >> $@
-ifeq "$(ADD_CURSES)" "Y"
- echo $(CURSESOBJ) >> $@
-endif
-
-#==========================================
-#=========== SECONDARY TARGETS ============
-#==========================================
-#
-#==========================================
-# Recover Utility
-#==========================================
-
-$(U)recover.exe: $(RECOVOBJS)
- $(TARGET_LINK) $(LFLAGS) -o$@ $(O)recover.o
-
-$(O)recover.o: $(CONFIG_H) $(U)recover.c
- $(TARGET_CC) $(cflags) -o$@ $(U)recover.c
-
-#==========================================
-# Header file moves required for tile support
-#==========================================
-
-ifeq ($(SUPPRESS_GRAPHICS),Y)
-
-else
-#
-# Tile Mapping
-#
-
-#$(SRC)/tile.c: $(U)tilemap
-# @$(U)tilemap
-# @echo A new $@ has been created
-
-endif
-
-#==========================================
-# PDCurses Library
-#==========================================
-
-$(O)pdcurses.a : $(PDCLIBOBJS) $(PDCOBJS)
- if [ -f $@ ]; then rm $@; fi;
- $(TARGET_AR) rcS $@ $(PDCLIBOBJS1)
- $(TARGET_AR) rcS $@ $(PDCLIBOBJS2)
- $(TARGET_AR) rcS $@ $(PDCLIBOBJS3)
- $(TARGET_AR) rcS $@ $(PDCLIBOBJS4)
- $(TARGET_AR) rcs $@ $(PDCOBJS)
-
-#==========================================
-# Other Util Dependencies.
-#==========================================
-
-$(O)alloc.o: $(CONFIG_H) alloc.c
- $(TARGET_CC) $(cflags) -o$@ alloc.c
-
-$(O)drawing.o: drawing.c $(CONFIG_H) $(INCL)/color.h $(INCL)/rm.h \
- $(INCL)/objclass.h $(INCL)/monsym.h $(MSYS)/pcvideo.h
- $(TARGET_CC) $(cflags) -I$(MSYS) -o$@ drawing.c
-
-$(O)decl.o: $(CONFIG_H) decl.c
- $(TARGET_CC) $(cflags) -o$@ decl.c
-
-$(O)monst.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/monsym.h \
- $(INCL)/color.h monst.c
- $(TARGET_CC) $(cflags) -o$@ monst.c
-
-$(O)objects.o: $(CONFIG_H) $(INCL)/obj.h $(INCL)/objclass.h \
- $(INCL)/prop.h $(INCL)/color.h objects.c
- $(TARGET_CC) $(cflags) -o$@ objects.c
-
-$(O)dat.tag: $(DAT)/nhdat
- @echo dat done >$@
-
-#=============================================================
-# Lua
-#=============================================================
-
-lua.exe: $(O)lua.o $(LUALIB)
- $(TARGET_LINK) $(LFLAGS) -o$@ $(O)lua.o $(LUALIB)
-
-luac.exe: $(O)luac.o $(LUALIB)
- $(TARGET_LINK) $(LFLAGSU) -o$@ $(O)luac.o $(LUALIB)
-
-$(O)lua.o: $(LUASRC)/lua.c
-$(O)luac.o: $(LUASRC)/luac.c
-
-#==========================================
-# Lua lib
-#==========================================
-
-$(LUALIB): $(LUALIBOBJS)
- if [ -f $@ ]; then rm $@; fi;
- $(TARGET_AR) rcS $@ $(LUAOBJFILES1)
- $(TARGET_AR) rcS $@ $(LUAOBJFILES2)
- $(TARGET_AR) rcS $@ $(LUAOBJFILES3)
- $(TARGET_AR) rcs $@ $(LUAOBJFILES4)
-
-#$(LUADLL): $(LUALIBOBJS)
-# $(TARGET_CC) -shared -Wl,--export-all-symbols \
-# -Wl,--add-stdcall-alias -o $@ $<
-
-#==========================================
-# Housekeeping.
-#==========================================
-
-clean:
- rm ./o/*.o
- if [ -f $(O)install.tag ]; then rm $(O)install.tag; fi;
- if [ -f $(O)obj.tag ]; then rm $(O)obj.tag; fi;
- if [ -f $(O)$(GAME).lnk ]; then rm temp.a; fi;
- if [ -f temp.a ]; then rm temp.a; fi;
-
-spotless: clean
-
- if [ -f $(U)recover.exe ]; then rm $(U)recover.exe; fi;
- if [ -f $(INCL)/vis_tab.h ]; then rm $(INCL)/vis_tab.h; fi;
- if [ -f $(INCL)/onames.h ]; then rm $(INCL)/onames.h; fi;
- if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi;
- if [ -f $(INCL)/date.h ]; then rm $(INCL)/date.h; fi;
-# if [ -f $(SRC)/monstr.c ]; then rm $(SRC)/monstr.c; fi;
- if [ -f $(SRC)/vis_tab.c ]; then rm $(SRC)/vis_tab.c; fi;
- if [ -f $(SRC)/tile.c ]; then rm $(SRC)/tile.c; fi;
- if [ -f $(DAT)/options ]; then rm $(DAT)/options; fi;
- if [ -f $(DAT)/data ]; then rm $(DAT)/data; fi;
- if [ -f $(DAT)/rumors ]; then rm $(DAT)/rumors; fi;
- if [ -f $(DAT)/oracles ]; then rm $(DAT)/oracles; fi;
- if [ -f $(DAT)/bogusmon ]; then rm $(DAT)/bogusmon; fi;
- if [ -f $(DAT)/engrave ]; then rm $(DAT)/engrave; fi;
- if [ -f $(DAT)/epitaph ]; then rm $(DAT)/epitaph; fi;
- if [ -f $(DAT)/dlb.lst ]; then rm $(DAT)/dlb.lst; fi;
- if [ -f $(TILE_BMP) ]; then rm $(TILE_BMP); fi;
- if [ -f $(PLANAR_TIB) ]; then rm $(PLANAR_TIB); fi;
- if [ -f $(OVERVIEW_TIB) ]; then rm $(OVERVIEW_TIB); fi;
- if [ -f $(WSHR)/monthin.txt ]; then rm $(WSHR)/monthin.txt; fi;
- if [ -f $(WSHR)/objthin.txt ]; then rm $(WSHR)/objthin.txt; fi;
- if [ -f $(WSHR)/oththin.txt ]; then rm $(WSHR)/oththin.txt; fi;
-
-#==========================================
-# Create directory for holding object files
-#==========================================
-
-$(O)obj.tag:
- -mkdir -p $(OBJ)
- @echo directory ready $(OBJ)
-
-#==========================================
-# Game Dependencies
-#==========================================
-
-# sys/share
-$(O)main.o: $(HACK_H) $(DLB_H) $(SSHR)/pcmain.c
- $(TARGET_CC) $(cflags) -o$@ $(SSHR)/pcmain.c
-
-$(O)tty.o: $(HACK_H) $(INCL)/wintty.h $(SSHR)/pctty.c
- $(TARGET_CC) $(cflags) -o$@ $(SSHR)/pctty.c
-
-$(O)unix.o: $(HACK_H) $(SSHR)/pcunix.c
- $(TARGET_CC) $(cflags) -o$@ $(SSHR)/pcunix.c
-
-$(O)pcsys.o : $(HACK_H) $(SSHR)/pcsys.c
- $(TARGET_CC) $(cflags) -o$@ $(SSHR)/pcsys.c
-
-$(O)posixreg.o : $(HACK_H) $(SSHR)/posixreg.c
- $(TARGET_CC) $(cflags) -o$@ $(SSHR)/posixreg.c
-
-$(O)cppregex.o : $(HACK_H) $(SSHR)/cppregex.cpp
- gpp $(cflags) -std=c++11 -o$@ $(SSHR)/cppregex.cpp
-
-$(O)pmatchre.o : $(HACK_H) $(SSHR)/pmatchre.c
- $(TARGET_CC) $(cflags) -o$@ $(SSHR)/pmatchre.c
-
-# sys/msdos
-$(O)tile.o : $(HACK_H) $(SRC)/tile.c
-$(O)msdos.o : $(HACK_H) $(MSYS)/msdos.c
-$(O)pckeys.o : $(HACK_H) $(MSYS)/pckeys.c
-$(O)pctiles.o : $(HACK_H) $(MSYS)/pctiles.c $(MSYS)/portio.h
- $(TARGET_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/pctiles.c
-$(O)sound.o : $(HACK_H) $(MSYS)/sound.c $(MSYS)/portio.h
-$(O)video.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(MSYS)/video.c
-$(O)vidvga.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(TILE_H) $(MSYS)/vidvga.c
- $(TARGET_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/vidvga.c
-$(O)vidvesa.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(TILE_H) $(MSYS)/vidvesa.c
- $(TARGET_CC) $(cflags) -I$(MSYS) -I$(WSHR) -o$@ $(MSYS)/vidvesa.c
-$(O)vidtxt.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/portio.h $(TILE_H) $(MSYS)/vidtxt.c
-$(O)stubvid.o : $(HACK_H) $(MSYS)/pcvideo.h $(MSYS)/video.c
- $(TARGET_CC) $(cflags) -I$(MSYS) -DSTUBVIDEO -o$@ $(MSYS)/video.c
-#
-# 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 $(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.
-#
-#
-# src dependencies
-$(O)pcmain.o: ../sys/share/pcmain.c $(HACK_H) $(INCL)/dlb.h \
- #$(INCL)/win32api.h
- $(TARGET_CC) $(cflags) -o$@ ../sys/share/pcmain.c
-$(O)pctty.o: ../sys/share/pctty.c $(HACK_H)
- $(TARGET_CC) $(cflags) -o$@ ../sys/share/pctty.c
-$(O)pcunix.o: ../sys/share/pcunix.c $(HACK_H)
- $(TARGET_CC) $(cflags) -o$@ ../sys/share/pcunix.c
-$(O)random.o: ../sys/share/random.c $(HACK_H)
- $(TARGET_CC) $(cflags) -o$@ ../sys/share/random.c
-$(O)ioctl.o: ../sys/share/ioctl.c $(HACK_H) $(INCL)/tcap.h
- $(TARGET_CC) $(cflags) -o$@ ../sys/share/ioctl.c
-$(O)unixtty.o: ../sys/share/unixtty.c $(HACK_H)
- $(TARGET_CC) $(cflags) -o$@ ../sys/share/unixtty.c
-$(O)unixmain.o: ../sys/unix/unixmain.c $(HACK_H) $(INCL)/dlb.h
- $(TARGET_CC) $(cflags) -o$@ ../sys/unix/unixmain.c
-$(O)unixunix.o: ../sys/unix/unixunix.c $(HACK_H)
- $(TARGET_CC) $(cflags) -o$@ ../sys/unix/unixunix.c
-$(O)unixres.o: ../sys/unix/unixres.c $(CONFIG_H)
- $(TARGET_CC) $(cflags) -o$@ ../sys/unix/unixres.c
-$(O)bemain.o: ../sys/be/bemain.c $(HACK_H) $(INCL)/dlb.h
- $(TARGET_CC) $(cflags) -o$@ ../sys/be/bemain.c
-$(O)getline.o: ../win/tty/getline.c $(HACK_H) $(INCL)/func_tab.h
- $(TARGET_CC) $(cflags) -o$@ ../win/tty/getline.c
-$(O)termcap.o: ../win/tty/termcap.c $(HACK_H) $(INCL)/tcap.h
- $(TARGET_CC) $(cflags) -o$@ ../win/tty/termcap.c
-$(O)topl.o: ../win/tty/topl.c $(HACK_H) $(INCL)/tcap.h
- $(TARGET_CC) $(cflags) -o$@ ../win/tty/topl.c
-$(O)wintty.o: ../win/tty/wintty.c $(HACK_H) $(INCL)/dlb.h \
- $(INCL)/date.h $(INCL)/tcap.h
- $(TARGET_CC) $(cflags) -o$@ ../win/tty/wintty.c
-$(O)Window.o: ../win/X11/Window.c $(INCL)/xwindowp.h $(INCL)/xwindow.h \
- $(CONFIG_H)
- $(TARGET_CC) $(cflags) -o$@ ../win/X11/Window.c
-$(O)dialogs.o: ../win/X11/dialogs.c $(CONFIG_H)
- $(TARGET_CC) $(cflags) -o$@ ../win/X11/dialogs.c
-$(O)winX.o: ../win/X11/winX.c $(HACK_H) $(INCL)/winX.h $(INCL)/dlb.h \
- ../win/X11/nh72icon \
- ../win/X11/nh56icon ../win/X11/nh32icon
- $(TARGET_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
- $(TARGET_CC) $(cflags) -o$@ ../win/X11/winmap.c
-$(O)winmenu.o: ../win/X11/winmenu.c $(HACK_H) $(INCL)/winX.h
- $(TARGET_CC) $(cflags) -o$@ ../win/X11/winmenu.c
-$(O)winmesg.o: ../win/X11/winmesg.c $(INCL)/xwindow.h $(HACK_H) $(INCL)/winX.h
- $(TARGET_CC) $(cflags) -o$@ ../win/X11/winmesg.c
-$(O)winmisc.o: ../win/X11/winmisc.c $(HACK_H) $(INCL)/func_tab.h \
- $(INCL)/winX.h
- $(TARGET_CC) $(cflags) -o$@ ../win/X11/winmisc.c
-$(O)winstat.o: ../win/X11/winstat.c $(HACK_H) $(INCL)/winX.h
- $(TARGET_CC) $(cflags) -o$@ ../win/X11/winstat.c
-$(O)wintext.o: ../win/X11/wintext.c $(HACK_H) $(INCL)/winX.h $(INCL)/xwindow.h
- $(TARGET_CC) $(cflags) -o$@ ../win/X11/wintext.c
-$(O)winval.o: ../win/X11/winval.c $(HACK_H) $(INCL)/winX.h
- $(TARGET_CC) $(cflags) -o$@ ../win/X11/winval.c
-#$(O)tile.o: tile.c $(HACK_H)
-#$(HOST_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 $(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)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)
-$(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)
-$(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)
-$(O)display.o: display.c $(HACK_H)
-$(O)dlb.o: dlb.c $(CONFIG_H) $(INCL)/dlb.h
- $(TARGET_CC) $(cflags) -I../sys/msdos -o$@ dlb.c
-$(O)do.o: do.c $(HACK_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)
-$(O)dogmove.o: dogmove.c $(HACK_H) $(INCL)/mfndpos.h
-$(O)dokick.o: dokick.c $(HACK_H)
-$(O)dothrow.o: dothrow.c $(HACK_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)/dlb.h
-$(O)engrave.o: engrave.c $(HACK_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)insight.o: insight.c $(HACK_H)
-$(O)invent.o: invent.c $(HACK_H)
-$(O)light.o: light.c $(HACK_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)
-$(O)mapglyph.o: mapglyph.c $(HACK_H)
-$(O)mcastu.o: mcastu.c $(HACK_H)
-$(O)mhitm.o: mhitm.c $(HACK_H) $(INCL)/artifact.h
-$(O)mhitu.o: mhitu.c $(HACK_H) $(INCL)/artifact.h
-$(O)minion.o: minion.c $(HACK_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
-$(O)mkobj.o: mkobj.c $(HACK_H)
-$(O)mkroom.o: mkroom.c $(HACK_H)
-$(O)mon.o: mon.c $(HACK_H) $(INCL)/mfndpos.h
-$(O)mondata.o: mondata.c $(HACK_H)
-$(O)monmove.o: monmove.c $(HACK_H) $(INCL)/mfndpos.h $(INCL)/artifact.h
-$(O)monst.o: monst.c $(CONFIG_H) $(INCL)/permonst.h $(INCL)/align.h \
- $(INCL)/monattk.h $(INCL)/monflag.h $(INCL)/monsym.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)
-$(O)music.o: music.c $(HACK_H) #interp.c
-$(O)nhlua.o: nhlua.c $(HACK_H)
-$(O)nhlsel.o: nhlsel.c $(HACK_H)
-$(O)nhlobj.o: nhlobj.c $(HACK_H)
-$(O)o_init.o: o_init.c $(HACK_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)
-$(O)polyself.o: polyself.c $(HACK_H)
-$(O)potion.o: potion.c $(HACK_H)
-$(O)pray.o: pray.c $(HACK_H)
-$(O)priest.o: priest.c $(HACK_H) $(INCL)/mfndpos.h
-$(O)quest.o: quest.c $(HACK_H)
-$(O)questpgr.o: questpgr.c $(HACK_H) $(INCL)/dlb.h
-$(O)read.o: read.c $(HACK_H)
-$(O)rect.o: rect.c $(HACK_H)
-$(O)region.o: region.c $(HACK_H)
-$(O)restore.o: restore.c $(HACK_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)/dlb.h
-$(O)save.o: save.c $(HACK_H)
-$(O)shk.o: shk.c $(HACK_H)
-$(O)shknam.o: shknam.c $(HACK_H)
-$(O)sit.o: sit.c $(HACK_H) $(INCL)/artifact.h
-$(O)sounds.o: sounds.c $(HACK_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)symbols.o: symbols.c $(HACK_H) $(INCL)/tcap.h
-$(O)sys.o: sys.c $(HACK_H)
-$(O)teleport.o: teleport.c $(HACK_H)
-$(O)timeout.o: timeout.c $(HACK_H)
-$(O)topten.o: topten.c $(HACK_H) $(INCL)/dlb.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)
-$(O)version.o: version.c $(HACK_H) $(INCL)/date.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)
-$(O)worm.o: worm.c $(HACK_H)
-$(O)worn.o: worn.c $(HACK_H)
-$(O)write.o: write.c $(HACK_H)
-$(O)zap.o: zap.c $(HACK_H)
-$(O)pmatchre.o: $(SSHR)/pmatchre.c $(HACK_H)
-$(O)tileset.o: $(WSHR)/tileset.c $(HACK_H)
-$(O)bmptiles.o: $(WSHR)/bmptiles.c $(INCL)/config.h $(INCL)/tileset.h $(INCL)/integer.h
-$(O)giftiles.o: $(WSHR)/giftiles.c $(INCL)/config.h $(INCL)/tileset.h $(INCL)/integer.h
-
-#end of file
-
+++ /dev/null
-#!/bin/sh
-#set -x
-
-if [ -z "$TRAVIS_BUILD_DIR" ]; then
- export DJGPP_TOP=$(pwd)/lib/djgpp
-else
- export DJGPP_TOP="$TRAVIS_BUILD_DIR/lib/djgpp"
-fi
-
-if [ -z "$GCCVER" ]; then
- export GCCVER=gcc1010
-fi
-
-if [ -z "$LUA_VERSION" ]; then
- export LUA_VERSION=5.4.0
-fi
-
-if [ ! -d "$(pwd)/lib" ]; then
- echo "Set up for Unix build and 'make fetch-lua' first."
- exit 1
-fi
-
-#DJGPP_URL="https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/"
-DJGPP_URL="https://github.com/andrewwutw/build-djgpp/releases/download/v3.0/"
-if [ "$(uname)" = "Darwin" ]; then
- #Mac
- DJGPP_FILE="djgpp-osx-$GCCVER.tar.bz2"
- if [ -z "HINTS" ]; then
- export HINTS=macOS.2020
- fi
-elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then
- #Linux
- DJGPP_FILE="djgpp-linux64-$GCCVER.tar.bz2"
- if [ -z "$HINTS" ]; then
- export HINTS=linux.2020
- fi
-elif [ "$(expr substr $(uname -s) 1 10)" = "MINGW32_NT" ]; then
- #mingw
- DJGPP_FILE="djgpp-mingw-$GCCVER-standalone.zip"
-else
- echo "No DJGPP release for you, sorry."
- exit 1
-fi
-
-DJGPP_URL="$DJGPP_URL$DJGPP_FILE"
-
-# export
-
-if [ ! -d lib ]; then
-mkdir -p lib
-fi
-
-cd lib
-if [ ! -f "$DJGPP_FILE" ]; then
- if [ "$(uname)" = "Darwin" ]; then
- #Mac
- curl -L $DJGPP_URL -o $DJGPP_FILE
- else
- wget --no-hsts "$DJGPP_URL"
- fi
-fi
-
-if [ ! -d djgpp/i586-pc-msdosdjgpp ]; then
- tar xjf "$DJGPP_FILE"
- rm -f $DJGPP_FILE
-fi
-
-# DOS-extender for use with djgpp
-if [ ! -d djgpp/cwsdpmi ]; then
- if [ "$(uname)" = "Darwin" ]; then
- #Mac
- curl http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip -o csdpmi7b.zip
- else
- wget --no-hsts http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip
- fi
- cd djgpp
- mkdir -p cwsdpmi
- cd cwsdpmi
- unzip ../../csdpmi7b.zip
- cd ../../
- rm csdpmi7b.zip
-fi
-
-# PDCurses
-if [ ! -d "pdcurses" ]; then
- echo "Getting ../pdcurses from https://github.com/wmcbrine/PDCurses.git" ; \
- git clone --depth 1 https://github.com/wmcbrine/PDCurses.git pdcurses
-fi
-
-cd ../
-
-# Don't fail the build if lua fetch failed because we cannot do anything about it
-# but don't bother proceeding forward either
-if [ ! -d "lib/lua-$LUA_VERSION/src" ]; then
- exit 0
-fi
-
-#echo after dos extender
-
-cd src
-
-mkdir -p ../msdos-binary
-cp ../dat/data.base ../dat/data.bas
-cp ../include/patchlevel.h ../include/patchlev.h
-cp ../doc/Guidebook.txt ../doc/guidebk.txt
-cp ../sys/share/posixregex.c ../sys/share/posixreg.c
-#cp ../sys/msdos/Makefile1.cross ../src/Makefile1
-#cp ../sys/msdos/Makefile2.cross ../src/Makefile2
-make -f ../sys/msdos/Makefile1.cross
-#cat ../include/date.h
-export GCC_EXEC_PREFIX=$DJGPP_TOP/lib/gcc/
-# export
-
-#pwd
-
-make -f ../sys/msdos/Makefile2.cross
-unset GCC_EXEC_PREFIX
-#pwd
-
-if [ -f ../lib/djgpp/cwsdpmi/bin/CWSDPMI.EXE ]; then
- cp ../lib/djgpp/cwsdpmi/bin/CWSDPMI.EXE ../msdos-binary/CWSDPMI.EXE;
-fi
-
-# ls -l ../msdos-binary
-cd ../msdos-binary
-zip -9 ../lib/NH370DOS.ZIP *
-cd ../
-ls -l lib/NH370DOS.ZIP
-
# Source from http://www.lua.org/ftp/lua-5.4.0.tar.gz
#=================================================================
-CFLAGS += -DCROSSCOMPILE -DCROSSCOMPILE_HOST
+CFLAGS += -DCROSSCOMPILE
#
# Override the build tools and some obj files to
# Amiga m68k from https://github.com/bebbo/amiga-gcc
#=================================================================
-CFLAGS += -DCROSSCOMPILE -DCROSSCOMPILE_HOST
+CFLAGS += -DCROSSCOMPILE
#
# Override the build tools and some obj files to
!IFDEF TEST_CROSSCOMPILE
HOST=_host
CROSSCOMPILE_TARGET= -DCROSSCOMPILE_TARGET
-CROSSCOMPILE_HOST= -DCROSSCOMPILE_HOST
CROSSCOMPILE= -DCROSSCOMPILE
!ELSE
HOST=
CROSSCOMPILE_TARGET=
-CROSSCOMPILE_HOST=
CROSSCOMPILE=
!ENDIF
$(link) $(lflagsBuild) -out:$@ $(O)nhsizes.o $(O)panic$(HOST).o $(O)alloc$(HOST).o
$(O)nhsizes3.o: $(CONFIG_H) nhsizes3.c
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ nhsizes3.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) -Fo$@ nhsizes3.c
$(U)makedefs.exe: $(MAKEDEFSOBJS)
@echo Linking $(@:\=/)
$(INCL)\dlb.h
@if not exist $(OBJ)\*.* echo creating directory $(OBJ:\=/)
@if not exist $(OBJ)\*.* mkdir $(OBJ)
- @$(cc) -DENUM_PM $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ $(U)makedefs.c
-# @$(cc) -DENUM_PM $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /EP -Fo$@ $(U)makedefs.c >makedefs.c.preprocessed
+ @$(cc) -DENUM_PM $(cflagsBuild) $(CROSSCOMPILE) -Fo$@ $(U)makedefs.c
+# @$(cc) -DENUM_PM $(cflagsBuild) $(CROSSCOMPILE) /EP -Fo$@ $(U)makedefs.c >makedefs.c.preprocessed
#
# date.h should be remade every time any of the source or include
@$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)uudecode.o
$(O)uudecode.o: $(SSYS)\uudecode.c
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c
$(MSWSYS)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu
chdir $(MSWSYS)
!IFDEF TEST_CROSSCOMPILE
$(O)dlb$(HOST).o: $(O)dlb_main$(HOST).o $(O)alloc$(HOST).o $(O)panic$(HOST).o $(INCL)\dlb.h
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /Fo$@ $(SRC)\dlb.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) /Fo$@ $(SRC)\dlb.c
!ENDIF
$(O)dlb.o: $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)\dlb.h
!IFDEF TEST_CROSSCOMPILE
$(O)dlb_main$(HOST).o: $(UTIL)\dlb_main.c $(INCL)\config.h $(INCL)\dlb.h
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /Fo$@ $(UTIL)\dlb_main.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) /Fo$@ $(UTIL)\dlb_main.c
!ENDIF
$(O)dlb_main.o: $(UTIL)\dlb_main.c $(INCL)\config.h $(INCL)\dlb.h
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) /Fo$@ $(UTIL)\dlb_main.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) /Fo$@ $(UTIL)\dlb_main.c
$(DAT)\porthelp: $(MSWSYS)\porthelp
@copy $(MSWSYS)\porthelp $@ >nul
@$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)tilemap.o
$(O)tilemap.o: $(WSHR)\tilemap.c $(HACK_H)
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ $(WSHR)\tilemap.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) -Fo$@ $(WSHR)\tilemap.c
$(O)tiletx32.o: $(WSHR)\tilemap.c $(HACK_H)
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /DTILETEXT /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tilemap.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) /DTILETEXT /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tilemap.c
$(O)tiletxt.o: $(WSHR)\tilemap.c $(HACK_H)
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) /DTILETEXT -Fo$@ $(WSHR)\tilemap.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) /DTILETEXT -Fo$@ $(WSHR)\tilemap.c
$(O)gifread.o: $(WSHR)\gifread.c $(CONFIG_H) $(TILE_H)
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) -Fo$@ $(WSHR)\gifread.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) -I$(WSHR) -Fo$@ $(WSHR)\gifread.c
$(O)gifrd32.o: $(WSHR)\gifread.c $(CONFIG_H) $(TILE_H)
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\gifread.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\gifread.c
$(O)ppmwrite.o: $(WSHR)\ppmwrite.c $(CONFIG_H) $(TILE_H)
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) -Fo$@ $(WSHR)\ppmwrite.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) -I$(WSHR) -Fo$@ $(WSHR)\ppmwrite.c
$(O)tiletext.o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H)
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) -Fo$@ $(WSHR)\tiletext.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) -I$(WSHR) -Fo$@ $(WSHR)\tiletext.c
$(O)tilete32.o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H)
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tiletext.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tiletext.c
#==========================================
# Optional Tile Utilities
<<
$(O)tile2bmp.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) /DPACKED_FILE /Fo$@ $(WSHR)\tile2bmp.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) -I$(WSHR) /DPACKED_FILE /Fo$@ $(WSHR)\tile2bmp.c
$(O)til2bm32.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c
$(U)tile2x11.exe: $(O)tile2x11.o $(O)tiletext.o $(O)tiletxt.o $(O)alloc.o \
$(O)panic.o $(O)monst.o $(O)objects.o
<<
$(O)tile2x11.o: $(X11)\tile2x11.c $(HACK_H) $(TILE_H) $(INCL)\tile2x11.h
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -I$(WSHR) /DPACKED_FILE /Fo$@ $(X11)\tile2x11.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) -I$(WSHR) /DPACKED_FILE /Fo$@ $(X11)\tile2x11.c
$(SRC)\x11tiles: $(U)tile2x11.exe $(WSHR)\monsters.txt $(WSHR)\objects.txt \
$(WSHR)\other.txt \
!IFDEF TEST_CROSSCOMPILE
$(O)mdlib$(HOST).o: $(SRC)\mdlib.c
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ $(SRC)\mdlib.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) -Fo$@ $(SRC)\mdlib.c
!ENDIF
$(O)mdlib.o: $(SRC)\mdlib.c
# These have dual-roles and need to be build for host and target platforms.
#
$(O)panic_host.o: $(U)panic.c $(CONFIG_H)
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ $(U)panic.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) -Fo$@ $(U)panic.c
$(O)panic.o: $(U)panic.c $(CONFIG_H)
@$(cc) $(cflagsBuild) -Fo$@ $(U)panic.c
$(O)drawing_host.o: drawing.c $(CONFIG_H)
- @$(cc) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_HOST) -Fo$@ drawing.c
+ @$(cc) $(cflagsBuild) $(CROSSCOMPILE) -Fo$@ drawing.c
$(O)drawing.o: drawing.c $(CONFIG_H) $(INCL)\color.h $(INCL)\rm.h \
$(INCL)\objclass.h $(INCL)\monsym.h
char githash[BUFSZ], gitbranch[BUFSZ];
char *c, cbuf[60], buf[BUFSZ];
const char *ul_sfx;
-#if defined(CROSSCOMPILE) && defined(CROSSCOMPILE_HOST)
+#if defined(CROSSCOMPILE) && !defined(CROSSCOMPILE_TARGET)
int steps = 0;
const char ind[] = " ";
const char *xpref = "HOST_";
#else
const char *xpref = (const char *) 0;
-#endif /* CROSSCOMPILE && CROSSCOMPILE_HOST */
+#endif /* CROSSCOMPILE && !CROSSCOMPILE_TARGET */
/* before creating date.h, make sure that xxx_GRAPHICS and
DEFAULT_WINDOW_SYS have been set up in a viable fashion */
ul_sfx = "L";
#endif
-#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST)
+#if !defined(CROSSCOMPILE) || !defined(CROSSCOMPILE_TARGET)
Fprintf(ofp,
- "\n#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST)\n");
-#endif /* CROSSCOMPILE || CROSSCOMPILE_HOST */
+ "\n#if !defined(CROSSCOMPILE) || !defined(CROSSCOMPILE_TARGET)\n");
+#endif /* CROSSCOMPILE || !CROSSCOMPILE_TARGET */
if (date_via_env)
Fprintf(ofp, "#define SOURCE_DATE_EPOCH (%lu%s) /* via getenv() */\n",
(unsigned long) clocktim, ul_sfx);
Fprintf(ofp, "#define NETHACK_GIT_BRANCH \"%s\"\n", gitbranch);
}
if (xpref && get_gitinfo(githash, gitbranch)) {
- Fprintf(ofp, "#else /* !CROSSCOMPILE || CROSSCOMPILE_HOST */\n");
+ Fprintf(ofp, "#else /* !CROSSCOMPILE || !CROSSCOMPILE_TARGET */\n");
Fprintf(ofp, "#define NETHACK_%sGIT_SHA \"%s\"\n",
xpref, githash);
Fprintf(ofp, "#define NETHACK_%sGIT_BRANCH \"%s\"\n",
xpref, gitbranch);
}
- Fprintf(ofp, "#endif /* !CROSSCOMPILE || CROSSCOMPILE_HOST */\n");
+ Fprintf(ofp, "#endif /* !CROSSCOMPILE || !CROSSCOMPILE_TARGET */\n");
Fprintf(ofp, "\n");
#ifdef AMIGA
{