Merge branch 'NetHack-3.7' into keni-prefix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# NetHack Top-level Makefile.
|
||||
# NetHack 3.7 Makefile.top $NHDT-Date: 1693519381 2023/08/31 22:03:01 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.91 $
|
||||
# NetHack 3.7 Makefile.top $NHDT-Date: 1722119081 2024/07/27 22:24:41 $ $NHDT-Branch: keni-fetchlua $:$NHDT-Revision: 1.109 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
@@ -161,6 +161,16 @@ luabin:
|
||||
( cd $(LUATOP) \
|
||||
&& make $(LUAMAKEFILES) all && cd $(LUA2NHTOP) )
|
||||
|
||||
# This is only needed for some internal tools.
|
||||
nhlua:
|
||||
base=`ls -td lib/lua-*|head -1` ; \
|
||||
[ -z $$base ] && $(MAKE) fetch-lua ; \
|
||||
base=`ls -td lib/lua-*|head -1` ; \
|
||||
cp -R $$base/ lib/nhlsrc ; \
|
||||
rm -f util/nhlua ; \
|
||||
( cd lib/nhlsrc && $(MAKE) clean posix ) ; \
|
||||
cp lib/nhlsrc/src/lua util/nhlua
|
||||
|
||||
# hints file could set LUATESTTARGET to this if GITSUBMODULES is defined
|
||||
submodules/lua/lua.h:
|
||||
git submodule init submodules/lua
|
||||
@@ -322,45 +332,55 @@ dofiles-nodlb:
|
||||
|
||||
LUA_URL :=www.lua.org/ftp
|
||||
LUA_URL_MIRROR :=www.tecgraf.puc-rio.br/lua/mirror/ftp
|
||||
LUA_URL_NHD :=www.nethack.org/download/thirdparty
|
||||
LUA_URL_list:=$(LUA_URL) $(LUA_URL_MIRROR) $(LUA_URL_NHD)
|
||||
|
||||
fetch-lua-mirror: LUA_URL :=$(LUA_URL_MIRROR)
|
||||
fetch-lua-mirror: LUA_URL_list:=$(LUA_URL_MIRROR)
|
||||
fetch-lua-mirror: fetch-Lua
|
||||
@true
|
||||
|
||||
fetch-lua-nhd: LUA_URL_list:=$(LUA_URL_NHD)
|
||||
fetch-lua-nhd: fetch-Lua
|
||||
@true
|
||||
|
||||
fetch-lua: fetch-Lua
|
||||
@true
|
||||
|
||||
fetch-Lua:
|
||||
@( mkdir -p lib && cd lib && \
|
||||
n=0; \
|
||||
@( \
|
||||
shac1=`command -v shasum`; \
|
||||
shac2=`command -v sha256sum`; \
|
||||
if [ ! -z $$shac1 ]; then \
|
||||
shac="$$shac1 -a 256"; elif [ ! -z $$shac2 ]; then \
|
||||
shac=$$shac2; else echo "CAUTION: no way to check integrity"; \
|
||||
fi; \
|
||||
set -- DUMMY $(LUA_URL_list); \
|
||||
luafile=lua-$(LUA_VERSION).tar.gz; \
|
||||
export curlstatus=1; \
|
||||
while [ $${n} -lt 2 ]; do \
|
||||
mkdir -p lib && cd lib && \
|
||||
while [ $$# -gt 0 ]; do \
|
||||
shift; \
|
||||
if [ $$curlstatus -ne 0 ]; then \
|
||||
if [ $${n} -eq 0 ]; then \
|
||||
luaurl=https://$(LUA_URL)/lua-$(LUA_VERSION).tar.gz; \
|
||||
fi; \
|
||||
if [ $${n} -eq 1 ]; then \
|
||||
luaurl=https://$(LUA_URL_MIRROR)/lua-$(LUA_VERSION).tar.gz; \
|
||||
fi; \
|
||||
echo trying $$luaurl; \
|
||||
shac1=`command -v shasum`; \
|
||||
shac2=`command -v sha256sum`; \
|
||||
if [ ! -z $$shac1 ]; then \
|
||||
shac="$$shac1 -a 256"; elif [ ! -z $$shac2 ]; then \
|
||||
shac=$$shac2; else echo "CAUTION: no way to check integrity"; \
|
||||
fi; \
|
||||
luaurl=https://$$1/$$luafile; \
|
||||
echo Trying $$luaurl; \
|
||||
curl -R -O $$luaurl; \
|
||||
export curlstatus=$$?; \
|
||||
curlstatus=$$?; \
|
||||
if [ $$curlstatus -eq 0 ]; then \
|
||||
if [ ! -z "$$shac" ]; then \
|
||||
echo Checking integrity with $$shac; \
|
||||
$$shac -w -c ../submodules/CHKSUMS < lua-$(LUA_VERSION).tar.gz; \
|
||||
CHKSUMS=../submodules/CHKSUMS; \
|
||||
CHKSUMSTMP=../submodules/CHKSUMS.tmp; \
|
||||
fgrep $$luafile < $$CHKSUMS > $$CHKSUMSTMP; \
|
||||
if [ -z $$CHKSUMSTMP ]; then \
|
||||
echo "Cannot check $$luafile - no checksum known"; \
|
||||
else \
|
||||
echo Checking integrity of $$luafile with $$shac; \
|
||||
$$shac -w --ignore-missing -c $$CHKSUMSTMP < $$luafile; \
|
||||
fi; \
|
||||
fi; \
|
||||
tar zxf lua-$(LUA_VERSION).tar.gz && \
|
||||
rm -f lua-$(LUA_VERSION).tar.gz; \
|
||||
tar zxf $$luafile && \
|
||||
rm -f $$luafile; \
|
||||
fi; \
|
||||
fi; \
|
||||
n=`expr $$n + 1`; \
|
||||
done; \
|
||||
true )
|
||||
|
||||
|
||||
@@ -7,6 +7,19 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
056E43C62C810EE800FD1F52 /* coloratt.c in Sources */ = {isa = PBXBuildFile; fileRef = 056E43BC2C810EE800FD1F52 /* coloratt.c */; };
|
||||
056E43C72C810EE800FD1F52 /* nhmd4.c in Sources */ = {isa = PBXBuildFile; fileRef = 056E43C02C810EE800FD1F52 /* nhmd4.c */; };
|
||||
056E43C82C810EE800FD1F52 /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 056E43BF2C810EE800FD1F52 /* Makefile */; };
|
||||
056E43C92C810EE800FD1F52 /* report.c in Sources */ = {isa = PBXBuildFile; fileRef = 056E43C12C810EE800FD1F52 /* report.c */; };
|
||||
056E43CA2C810EE800FD1F52 /* selvar.c in Sources */ = {isa = PBXBuildFile; fileRef = 056E43C22C810EE800FD1F52 /* selvar.c */; };
|
||||
056E43CB2C810EE800FD1F52 /* calendar.c in Sources */ = {isa = PBXBuildFile; fileRef = 056E43BB2C810EE800FD1F52 /* calendar.c */; };
|
||||
056E43CC2C810EE800FD1F52 /* stairs.c in Sources */ = {isa = PBXBuildFile; fileRef = 056E43C32C810EE800FD1F52 /* stairs.c */; };
|
||||
056E43CD2C810EE800FD1F52 /* glyphs.c in Sources */ = {isa = PBXBuildFile; fileRef = 056E43BE2C810EE800FD1F52 /* glyphs.c */; };
|
||||
056E43CE2C810EE800FD1F52 /* strutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 056E43C42C810EE800FD1F52 /* strutil.c */; };
|
||||
056E43CF2C810EE800FD1F52 /* getpos.c in Sources */ = {isa = PBXBuildFile; fileRef = 056E43BD2C810EE800FD1F52 /* getpos.c */; };
|
||||
056E43D02C810EE800FD1F52 /* wizcmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 056E43C52C810EE800FD1F52 /* wizcmds.c */; };
|
||||
059660BE2C80B00400398EDE /* hacklib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A36421A238040055BD01 /* hacklib.c */; };
|
||||
059660C12C80B0C700398EDE /* hacklib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A36421A238040055BD01 /* hacklib.c */; };
|
||||
31B8A30C21A20D8B0055BD01 /* makedefs.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A30B21A20D8B0055BD01 /* makedefs.c */; };
|
||||
31B8A30F21A20DC10055BD01 /* objects.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A30D21A20DC10055BD01 /* objects.c */; };
|
||||
31B8A31021A20DC10055BD01 /* monst.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A30E21A20DC10055BD01 /* monst.c */; };
|
||||
@@ -244,6 +257,15 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
059660C42C80B15300398EDE /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 8;
|
||||
dstPath = /usr/share/man/man1;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
3189576F21A1FCC100FB2ABE /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -271,18 +293,20 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
31B8A45521A26A970055BD01 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
056E43BB2C810EE800FD1F52 /* calendar.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = calendar.c; path = ../../src/calendar.c; sourceTree = "<group>"; };
|
||||
056E43BC2C810EE800FD1F52 /* coloratt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = coloratt.c; path = ../../src/coloratt.c; sourceTree = "<group>"; };
|
||||
056E43BD2C810EE800FD1F52 /* getpos.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = getpos.c; path = ../../src/getpos.c; sourceTree = "<group>"; };
|
||||
056E43BE2C810EE800FD1F52 /* glyphs.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = glyphs.c; path = ../../src/glyphs.c; sourceTree = "<group>"; };
|
||||
056E43BF2C810EE800FD1F52 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; name = Makefile; path = ../../src/Makefile; sourceTree = "<group>"; };
|
||||
056E43C02C810EE800FD1F52 /* nhmd4.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = nhmd4.c; path = ../../src/nhmd4.c; sourceTree = "<group>"; };
|
||||
056E43C12C810EE800FD1F52 /* report.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = report.c; path = ../../src/report.c; sourceTree = "<group>"; };
|
||||
056E43C22C810EE800FD1F52 /* selvar.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = selvar.c; path = ../../src/selvar.c; sourceTree = "<group>"; };
|
||||
056E43C32C810EE800FD1F52 /* stairs.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = stairs.c; path = ../../src/stairs.c; sourceTree = "<group>"; };
|
||||
056E43C42C810EE800FD1F52 /* strutil.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = strutil.c; path = ../../src/strutil.c; sourceTree = "<group>"; };
|
||||
056E43C52C810EE800FD1F52 /* wizcmds.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = wizcmds.c; path = ../../src/wizcmds.c; sourceTree = "<group>"; };
|
||||
2A953FB221A3F404007906E5 /* XCode.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = XCode.xcconfig; sourceTree = "<group>"; };
|
||||
3186A36D21A4B0F90052BF02 /* xwindowp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xwindowp.h; path = ../../include/xwindowp.h; sourceTree = "<group>"; };
|
||||
3186A36E21A4B0FA0052BF02 /* botl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = botl.h; path = ../../include/botl.h; sourceTree = "<group>"; };
|
||||
@@ -628,6 +652,17 @@
|
||||
3189578C21A1FF8200FB2ABE /* src */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
056E43BB2C810EE800FD1F52 /* calendar.c */,
|
||||
056E43BC2C810EE800FD1F52 /* coloratt.c */,
|
||||
056E43BD2C810EE800FD1F52 /* getpos.c */,
|
||||
056E43BE2C810EE800FD1F52 /* glyphs.c */,
|
||||
056E43BF2C810EE800FD1F52 /* Makefile */,
|
||||
056E43C02C810EE800FD1F52 /* nhmd4.c */,
|
||||
056E43C12C810EE800FD1F52 /* report.c */,
|
||||
056E43C22C810EE800FD1F52 /* selvar.c */,
|
||||
056E43C32C810EE800FD1F52 /* stairs.c */,
|
||||
056E43C42C810EE800FD1F52 /* strutil.c */,
|
||||
056E43C52C810EE800FD1F52 /* wizcmds.c */,
|
||||
54A3D3EB282C55A900143F8C /* utf8map.c */,
|
||||
54435B51247999CB00804CB3 /* nhlobj.c */,
|
||||
54FB2B4A246310A600397C0E /* symbols.c */,
|
||||
@@ -1022,6 +1057,7 @@
|
||||
3189577C21A1FDA400FB2ABE /* Frameworks */,
|
||||
3189577D21A1FDA400FB2ABE /* CopyFiles */,
|
||||
317E7C4B21A35F0500F6E4E5 /* Copy makedefs */,
|
||||
059660C02C80B07100398EDE /* Codesign makedefs */,
|
||||
319CBA3821A3458100150830 /* Build data */,
|
||||
317E7C4521A3548F00F6E4E5 /* Build rumors */,
|
||||
317E7C4E21A3697300F6E4E5 /* Build options */,
|
||||
@@ -1045,6 +1081,8 @@
|
||||
31B8A44621A26A4B0055BD01 /* Sources */,
|
||||
31B8A44721A26A4B0055BD01 /* Frameworks */,
|
||||
31B8A44821A26A4B0055BD01 /* CopyFiles */,
|
||||
059660C32C80B12300398EDE /* Copy recover */,
|
||||
059660C52C80B1A000398EDE /* Codesign recover */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -1062,8 +1100,9 @@
|
||||
buildPhases = (
|
||||
31B8A45321A26A970055BD01 /* Sources */,
|
||||
31B8A45421A26A970055BD01 /* Frameworks */,
|
||||
31B8A45521A26A970055BD01 /* CopyFiles */,
|
||||
3192867221A3AA5700325BEB /* copy dlb */,
|
||||
059660C42C80B15300398EDE /* CopyFiles */,
|
||||
3192867221A3AA5700325BEB /* Copy dlb */,
|
||||
059660C22C80B0FD00398EDE /* Codesign dlb */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -1084,6 +1123,7 @@
|
||||
BAE8010727B97760002B3786 /* Sources */,
|
||||
BAE8010827B97760002B3786 /* Frameworks */,
|
||||
BAE8010F27B9825E002B3786 /* Build nhlua.h */,
|
||||
056E43A42C81094100FD1F52 /* Copy libnhlua.a */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -1143,6 +1183,97 @@
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
056E43A42C81094100FD1F52 /* Copy libnhlua.a */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Copy libnhlua.a";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "echo \"Copying ${BUILT_PRODUCTS_DIR}/libnhlua.a to ${NH_LIB_DIR}/libnhlua.a\"\ncp \"${BUILT_PRODUCTS_DIR}\"/libnhlua.a \"${NH_LIB_DIR}\"/libnhlua.a\necho \"Copying ${BUILT_PRODUCTS_DIR}/libnhlua.a to ${NH_LIB_DIR}/libnhlua.a\"\ncp \"${BUILT_PRODUCTS_DIR}\"/libnhlua.a \"${NH_LIB_DIR}\"/libnhlua.a\n";
|
||||
};
|
||||
059660C02C80B07100398EDE /* Codesign makedefs */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Codesign makedefs";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "codesign --force --deep -s - \"${NH_UTIL_DIR}\"/makedefs\n";
|
||||
};
|
||||
059660C22C80B0FD00398EDE /* Codesign dlb */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Codesign dlb";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "codesign --force --deep -s - \"${NH_UTIL_DIR}\"/dlb\n";
|
||||
};
|
||||
059660C32C80B12300398EDE /* Copy recover */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Copy recover";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "cp \"${BUILT_PRODUCTS_DIR}\"/recover \"${NH_UTIL_DIR}\"/recover\n";
|
||||
};
|
||||
059660C52C80B1A000398EDE /* Codesign recover */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Codesign recover";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "codesign --force --deep -s - \"${NH_UTIL_DIR}\"/recover\n";
|
||||
};
|
||||
317E7C4521A3548F00F6E4E5 /* Build rumors */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -1466,7 +1597,7 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "cp \"${BUILT_PRODUCTS_DIR}\"/nethack \"${NH_SRC_DIR}\"/nethack\n";
|
||||
};
|
||||
3192867221A3AA5700325BEB /* copy dlb */ = {
|
||||
3192867221A3AA5700325BEB /* Copy dlb */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -1476,7 +1607,7 @@
|
||||
inputPaths = (
|
||||
"${BUILT_PRODUCTS_DIR}/dlb",
|
||||
);
|
||||
name = "copy dlb";
|
||||
name = "Copy dlb";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
@@ -1545,7 +1676,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "cd $NH_ROOT_DIR\necho LUA VERSION: $LUA_VERSION\nif test ! -d lib/lua-$LUA_VERSION ; then ( echo \"Fetching $LUA_VERSION\" && \\\n mkdir -p lib && cd lib && \\\n curl -s -S -R -O http://www.lua.org/ftp/lua-$LUA_VERSION.tar.gz && \\\n tar zxf lua-$LUA_VERSION.tar.gz && \\\n rm -f lua-$LUA_VERSION.tar.gz ) ; fi\n";
|
||||
shellScript = "cd $NH_ROOT_DIR\necho LUA VERSION: $LUA_VERSION\nif test ! -d lib/lua-$LUA_VERSION ; then ( echo \"Fetching $LUA_VERSION\" && \\\n mkdir -p lib && cd lib && \\\n curl -s -S -R -O https://www.lua.org/ftp/lua-$LUA_VERSION.tar.gz && \\\n tar zxf lua-$LUA_VERSION.tar.gz && \\\n rm -f lua-$LUA_VERSION.tar.gz ) ; fi\n";
|
||||
};
|
||||
BAE8010F27B9825E002B3786 /* Build nhlua.h */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
@@ -1616,6 +1747,17 @@
|
||||
31B8A3CB21A238060055BD01 /* alloc.c in Sources */,
|
||||
31B8A39821A238060055BD01 /* mail.c in Sources */,
|
||||
31B8A3C821A238060055BD01 /* options.c in Sources */,
|
||||
056E43C62C810EE800FD1F52 /* coloratt.c in Sources */,
|
||||
056E43C72C810EE800FD1F52 /* nhmd4.c in Sources */,
|
||||
056E43C82C810EE800FD1F52 /* Makefile in Sources */,
|
||||
056E43C92C810EE800FD1F52 /* report.c in Sources */,
|
||||
056E43CA2C810EE800FD1F52 /* selvar.c in Sources */,
|
||||
056E43CB2C810EE800FD1F52 /* calendar.c in Sources */,
|
||||
056E43CC2C810EE800FD1F52 /* stairs.c in Sources */,
|
||||
056E43CD2C810EE800FD1F52 /* glyphs.c in Sources */,
|
||||
056E43CE2C810EE800FD1F52 /* strutil.c in Sources */,
|
||||
056E43CF2C810EE800FD1F52 /* getpos.c in Sources */,
|
||||
056E43D02C810EE800FD1F52 /* wizcmds.c in Sources */,
|
||||
31B8A3CD21A238060055BD01 /* write.c in Sources */,
|
||||
31B8A40F21A23EEC0055BD01 /* cursmesg.c in Sources */,
|
||||
31B8A3DF21A238060055BD01 /* end.c in Sources */,
|
||||
@@ -1716,6 +1858,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
059660BE2C80B00400398EDE /* hacklib.c in Sources */,
|
||||
544A5CF0277B40CF00734B53 /* panic.c in Sources */,
|
||||
5493735A277AAE830031FE02 /* alloc.c in Sources */,
|
||||
5439B3BC275AADC600B8FB2F /* date.c in Sources */,
|
||||
@@ -1737,6 +1880,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
059660C12C80B0C700398EDE /* hacklib.c in Sources */,
|
||||
31B8A46121A26AF60055BD01 /* panic.c in Sources */,
|
||||
31B8A45E21A26ACF0055BD01 /* dlb.c in Sources */,
|
||||
31B8A46021A26AE70055BD01 /* dlb_main.c in Sources */,
|
||||
@@ -2003,6 +2147,23 @@
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
INSTALL_PATH = "$(NH_INSTALL_DIR)";
|
||||
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
|
||||
OTHER_CFLAGS = (
|
||||
"-DNOMAIL",
|
||||
"-DNOTPARMDECL",
|
||||
"-DDEFAULT_WINDOW_SYS=\\\"tty\\\"",
|
||||
"-DDLB",
|
||||
"-DGREPPATH=\\\"/usr/bin/grep\\\"",
|
||||
"-DSYSCF",
|
||||
"-DSYSCF_FILE=\\\"$(NH_INSTALL_DIR)/sysconf\\\"",
|
||||
"-DHACKDIR=\\\"$(NH_INSTALL_DIR)\\\"",
|
||||
"-DSECURE",
|
||||
"-DCURSES_GRAPHICS",
|
||||
"-DSND_LIB_MACSOUND",
|
||||
"-DSND_SOUNDEFFECTS_AUTOMAP",
|
||||
"-DUSER_SOUNDS",
|
||||
"-DCURSES_UNICODE",
|
||||
"-D_XOPEN_SOURCE_EXTENDED",
|
||||
);
|
||||
"OTHER_LDFLAGS[arch=*]" = "-L${NH_LIB_DIR}/lua";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
@@ -2017,6 +2178,20 @@
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
INSTALL_PATH = "$(NH_INSTALL_DIR)";
|
||||
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
|
||||
OTHER_CFLAGS = (
|
||||
"-DNOMAIL",
|
||||
"-DNOTPARMDECL",
|
||||
"-DDEFAULT_WINDOW_SYS=\\\"tty\\\"",
|
||||
"-DDLB",
|
||||
"-DGREPPATH=\\\"/usr/bin/grep\\\"",
|
||||
"-DSYSCF",
|
||||
"-DSYSCF_FILE=\\\"$(NH_INSTALL_DIR)/sysconf\\\"",
|
||||
"-DHACKDIR=\\\"$(NH_INSTALL_DIR)\\\"",
|
||||
"-DSECURE",
|
||||
"-DCURSES_GRAPHICS",
|
||||
"-DCURSES_UNICODE",
|
||||
"-D_XOPEN_SOURCE_EXTENDED",
|
||||
);
|
||||
"OTHER_LDFLAGS[arch=*]" = "-L${NH_LIB_DIR}/lua";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
|
||||
@@ -82,10 +82,10 @@ dodata:
|
||||
endif # CROSS_TO_MSDOS
|
||||
|
||||
ifdef CROSS_TO_WASM
|
||||
$(WASM_TARGET): pregame $(TARGETPFX)date.o $(HOSTOBJ) $(HOBJ) $(LUACROSSLIB) $(WASM_DATA_DIR)
|
||||
$(WASM_TARGET): pregame $(TARGET_HACKLIB) $(TARGETPFX)date.o $(HOSTOBJ) $(HOBJ) $(LUACROSSLIB) $(WASM_DATA_DIR)
|
||||
-rm $@
|
||||
$(TARGET_CC) $(TARGET_LFLAGS) $(TARGET_CFLAGS) -o $@ \
|
||||
$(HOBJ) $(TARGETPFX)date.o $(TARGET_LIBS)
|
||||
$(HOBJ) $(TARGETPFX)date.o $(TARGET_HACKLIB) $(TARGET_LIBS)
|
||||
|
||||
$(WASM_DATA_DIR): $(WASM_DATA_DIR)/nhdat
|
||||
touch $(WASM_DATA_DIR)/perm
|
||||
|
||||
@@ -275,7 +275,8 @@ WASM_CFLAGS += -Wshadow
|
||||
# Nethack C flags
|
||||
WASM_CFLAGS += $(WINCFLAGS) #WINCFLAGS set from multiw-2.370
|
||||
WASM_CFLAGS += -DSYSCF -DSYSCF_FILE=\"/sysconf\" -DSECURE
|
||||
WASM_CFLAGS += -g -I../include -DNOTPARMDECL
|
||||
#WASM_CFLAGS += -g -I../include -DNOTPARMDECL
|
||||
WASM_CFLAGS += -I../include -DNOTPARMDECL
|
||||
# NetHack sources control
|
||||
WASM_CFLAGS += -DDLB
|
||||
WASM_CFLAGS += -DHACKDIR=\"$(HACKDIR)\"
|
||||
|
||||
@@ -99,7 +99,7 @@ main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
gh.hname = argv[0];
|
||||
gh.hackpid = getpid();
|
||||
svh.hackpid = getpid();
|
||||
(void) umask(0777 & ~FCMASK);
|
||||
|
||||
choose_windows(DEFAULT_WINDOW_SYS);
|
||||
@@ -164,7 +164,7 @@ main(int argc, char *argv[])
|
||||
*/
|
||||
u.uhp = 1; /* prevent RIP on early quits */
|
||||
#if defined(HANGUPHANDLING)
|
||||
gp.program_state.preserve_locks = 1;
|
||||
program_state.preserve_locks = 1;
|
||||
#ifndef NO_SIGNAL
|
||||
sethanguphandler((SIG_RET_TYPE) hangup);
|
||||
#endif
|
||||
@@ -195,7 +195,7 @@ main(int argc, char *argv[])
|
||||
/* wizard mode access is deferred until here */
|
||||
set_playmode(); /* sets plname to "wizard" for wizard mode */
|
||||
/* hide any hyphens from plnamesuffix() */
|
||||
gp.plnamelen = exact_username ? (int) strlen(gp.plname) : 0;
|
||||
gp.plnamelen = exact_username ? (int) strlen(svp.plname) : 0;
|
||||
/* strip role,race,&c suffix; calls askname() if plname[] is empty
|
||||
or holds a generic user name like "player" or "games" */
|
||||
plnamesuffix();
|
||||
@@ -236,14 +236,14 @@ main(int argc, char *argv[])
|
||||
* clock, &c not currently in use in the playground directory
|
||||
* (for gl.locknum > 0).
|
||||
*/
|
||||
if (*gp.plname) {
|
||||
if (*svp.plname) {
|
||||
getlock();
|
||||
#if defined(HANGUPHANDLING)
|
||||
gp.program_state.preserve_locks = 0; /* after getlock() */
|
||||
program_state.preserve_locks = 0; /* after getlock() */
|
||||
#endif
|
||||
}
|
||||
|
||||
if (*gp.plname && (nhfp = restore_saved_game()) != 0) {
|
||||
if (*svp.plname && (nhfp = restore_saved_game()) != 0) {
|
||||
const char *fq_save = fqname(gs.SAVEF, SAVEPREFIX, 1);
|
||||
|
||||
(void) chmod(fq_save, 0); /* disallow parallel restores */
|
||||
@@ -276,13 +276,13 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gp.program_state.in_self_recover) {
|
||||
gp.program_state.in_self_recover = FALSE;
|
||||
if (program_state.in_self_recover) {
|
||||
program_state.in_self_recover = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!resuming) {
|
||||
boolean neednewlock = (!*gp.plname);
|
||||
boolean neednewlock = (!*svp.plname);
|
||||
/* new game: start by choosing role, race, etc;
|
||||
player might change the hero's name while doing that,
|
||||
in which case we try to restore under the new name
|
||||
@@ -291,7 +291,7 @@ main(int argc, char *argv[])
|
||||
if (!plsel_once)
|
||||
player_selection();
|
||||
plsel_once = TRUE;
|
||||
if (neednewlock && *gp.plname)
|
||||
if (neednewlock && *svp.plname)
|
||||
goto attempt_restore;
|
||||
if (iflags.renameinprogress) {
|
||||
/* player has renamed the hero while selecting role;
|
||||
@@ -474,12 +474,12 @@ process_options(int argc, char *argv[])
|
||||
break;
|
||||
case 'u':
|
||||
if (arg[2]) {
|
||||
(void) strncpy(gp.plname, arg + 2, sizeof gp.plname - 1);
|
||||
(void) strncpy(svp.plname, arg + 2, sizeof svp.plname - 1);
|
||||
gp.plnamelen = 0; /* plname[] might have -role-race attached */
|
||||
} else if (argc > 1) {
|
||||
argc--;
|
||||
argv++;
|
||||
(void) strncpy(gp.plname, argv[0], sizeof gp.plname - 1);
|
||||
(void) strncpy(svp.plname, argv[0], sizeof svp.plname - 1);
|
||||
gp.plnamelen = 0;
|
||||
} else {
|
||||
config_error_add("Character name expected after -u");
|
||||
@@ -916,7 +916,7 @@ whoami(void)
|
||||
* Note that we trust the user here; it is possible to play under
|
||||
* somebody else's name.
|
||||
*/
|
||||
if (!*gp.plname) {
|
||||
if (!*svp.plname) {
|
||||
register const char *s;
|
||||
|
||||
s = nh_getenv("USER");
|
||||
@@ -926,8 +926,8 @@ whoami(void)
|
||||
s = getlogin();
|
||||
|
||||
if (s && *s) {
|
||||
(void) strncpy(gp.plname, s, sizeof gp.plname - 1);
|
||||
if (strchr(gp.plname, '-'))
|
||||
(void) strncpy(svp.plname, s, sizeof svp.plname - 1);
|
||||
if (strchr(svp.plname, '-'))
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -1052,7 +1052,7 @@ check_user_string(const char *optstr)
|
||||
if (optstr[0] == '*')
|
||||
return TRUE; /* allow any user */
|
||||
if (sysopt.check_plname)
|
||||
pwname = gp.plname;
|
||||
pwname = svp.plname;
|
||||
else if ((pw = get_unix_pw()) != 0)
|
||||
pwname = pw->pw_name;
|
||||
if (!pwname || !*pwname)
|
||||
|
||||
@@ -82,7 +82,7 @@ eraseoldlocks(void)
|
||||
int i;
|
||||
|
||||
#if defined(HANGUPHANDLING)
|
||||
gp.program_state.preserve_locks = 0; /* not required but shows intent */
|
||||
program_state.preserve_locks = 0; /* not required but shows intent */
|
||||
/* cannot use maxledgerno() here, because we need to find a lock name
|
||||
* before starting everything (including the dungeon initialization
|
||||
* that sets astral_level, needed for maxledgerno()) up
|
||||
@@ -132,7 +132,7 @@ getlock(void)
|
||||
'a','b',&c below; override the default and use <uid><charname>
|
||||
if we aren't restricting the number of simultaneous games */
|
||||
if (!gl.locknum)
|
||||
Sprintf(gl.lock, "%u%s", (unsigned) getuid(), gp.plname);
|
||||
Sprintf(gl.lock, "%u%s", (unsigned) getuid(), svp.plname);
|
||||
|
||||
regularize(gl.lock);
|
||||
set_levelfile_name(gl.lock, 0);
|
||||
@@ -216,7 +216,7 @@ getlock(void)
|
||||
}
|
||||
#ifdef SELF_RECOVER
|
||||
if (c == 'r' || c == 'R') {
|
||||
if (recover_savefile() && gp.program_state.in_self_recover) {
|
||||
if (recover_savefile() && program_state.in_self_recover) {
|
||||
set_levelfile_name(gl.lock, 0);
|
||||
fq_lock = fqname(gl.lock, LEVELPREFIX, 0);
|
||||
goto gotlock;
|
||||
@@ -246,8 +246,8 @@ getlock(void)
|
||||
error("cannot creat lock file (%s).", fq_lock);
|
||||
/*NOTREACHED*/
|
||||
} else {
|
||||
if (write(fd, (genericptr_t) &gh.hackpid, sizeof gh.hackpid)
|
||||
!= sizeof gh.hackpid) {
|
||||
if (write(fd, (genericptr_t) &svh.hackpid, sizeof svh.hackpid)
|
||||
!= sizeof svh.hackpid) {
|
||||
error("cannot write lock (%s)", fq_lock);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user