Merge branch 'NetHack-5.0' into twitch-interact
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
#
|
||||
# NetHack 5.0 unix $NHDT-Date: 1778708083 2026/05/13 21:34:43 $ $NHDT-Branch: NetHack-5.0 $:$NHDT-Revision: 1.0 $
|
||||
# Copyright 2026 by Anthony C Howe.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
# This is a contributed file. The NetHack Development Team makes this
|
||||
# file available so that others may benefit, but may not be able to
|
||||
# support or maintain it. Use at your own risk.
|
||||
#
|
||||
#-PRE
|
||||
# unix hints file
|
||||
# This hints file provides the legacy configuration that NetHack has shipped
|
||||
# with historically - this means you will most likely need to hand edit .h
|
||||
# and Makefiles.
|
||||
#
|
||||
# note: '#-INCLUDE' is not just a comment. setup.sh inserts the contents of
|
||||
# a file found in sys/unix/hints/include
|
||||
#-INCLUDE whichbsd.500
|
||||
|
||||
PREFIX=/usr/local
|
||||
|
||||
# Binaries and supporting data.
|
||||
HACKDIR=$(PREFIX)/libexec/nethackdir
|
||||
|
||||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
# Careful, this directory is deleted on install.
|
||||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
INSTDIR=$(HACKDIR)
|
||||
|
||||
# Save games
|
||||
VARDIR=/var/games/nethackdir
|
||||
|
||||
# Home for nethask.sh wrapper. If undefined, no wrapper installed.
|
||||
# Suggest leaving /usr/games as-is from bsdgames.tgz.
|
||||
SHELLDIR=$(PREFIX)/bin
|
||||
|
||||
CFLAGS=-O -I../include -USYSV -DBSD -DHACKDIR='"$(HACKDIR)"' -DVAR_PLAYGROUND='"$(VARDIR)"'
|
||||
LINK=$(CC)
|
||||
|
||||
WINSRC = $(WINTTYSRC)
|
||||
WINOBJ = $(WINTTYOBJ)
|
||||
WINLIB = $(WINTTYLIB)
|
||||
|
||||
WINTTYLIB=-ltermcap
|
||||
|
||||
CHOWN=chown
|
||||
CHGRP=chgrp
|
||||
|
||||
GAMEUID = games
|
||||
GAMEGRP = games
|
||||
|
||||
GAMEPERM = 04755
|
||||
VARFILEPERM = 0644
|
||||
VARDIRPERM = 0755
|
||||
|
||||
.ifdef MAKEFILE_DOC
|
||||
MAKEDEFS = ../util/makedefs
|
||||
NEEDMAKEDEFS = $(MAKEDEFS)
|
||||
|
||||
.if ${WHICHBSD} == "NETBSD"
|
||||
.if exists (/usr/pkg/bin/groff)
|
||||
NROFF = /usr/pkg/bin/groff
|
||||
.else
|
||||
NROFF = groff
|
||||
.endif # ? Is NROFF groff or /usr/pkg/bin/groff
|
||||
.else # WHICHBSD is not NETBSD
|
||||
NROFF = groff
|
||||
.endif # WHICHBSD
|
||||
|
||||
# NROFF_FLAGS comes from a hints file
|
||||
GUIDEBOOK = Guidebook # regular ASCII file
|
||||
COLCMD = col -bx
|
||||
PSCMD = $(NROFF)
|
||||
NHGREP = $(MAKEDEFS) --grep --input - --output -
|
||||
GUIDEBOOK_MN_SRC = Guidebook.mn
|
||||
GUIDEBOOK_MN = $(GUIDEBOOK_MN_SRC)
|
||||
GUIDE_PREFORMAT = cat $(GUIDEBOOK_MN) | $(NHGREP) | tbl tmac.n -
|
||||
ONEPAGE_PREFORMAT = cat Gbk-1pg-pfx.mn $(GUIDEBOOK_MN) Gbk-1pg-sfx.mn \
|
||||
| $(NHGREP) | tbl tmac.n -
|
||||
ONEPAGECMD = $(ONEPAGE_PREFORMAT) | $(NROFF) -c -Tascii $(NROFF_FLAGS) \
|
||||
| $(COLCMD)
|
||||
GUIDECMD = export GROFF_NO_SGR=1; \
|
||||
$(GUIDE_PREFORMAT) | $(NROFF) -c -Tascii $(NROFF_FLAGS) \
|
||||
| $(COLCMD)
|
||||
GUIDEBOOK_TEX_SRC = Guidebook.tex
|
||||
GUIDEBOOK_TEX = $(GUIDEBOOK_TEX_SRC)
|
||||
.endif # MAKEFILE_DOC
|
||||
@@ -1,5 +1,5 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# NetHack 3.7 compiler.370 $NHDT-Date: 1668359835 2022/11/13 17:17:15 $ $NHDT-Branch: NetHack-3.7 $
|
||||
# NetHack 5.0 compiler.500 $NHDT-Date: 1668359835 2022/11/13 17:17:15 $ $NHDT-Branch: NetHack-5.0 $
|
||||
|
||||
# compiler flags: CCFLAGS is used to construct a value for CFLAGS with
|
||||
# various -I, -D, and -W settings appended below;
|
||||
@@ -49,7 +49,7 @@ endif
|
||||
#CC= clang
|
||||
#CXX=clang++ -std=gnu++11
|
||||
|
||||
CFLAGS=$(CCFLAGS) -I../include -DNOTPARMDECL
|
||||
CFLAGS=$(CCFLAGS) -I../include
|
||||
CFLAGS+=-Wall -Wextra \
|
||||
-Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings
|
||||
CFLAGS+=-pedantic
|
||||
@@ -89,7 +89,7 @@ CXX=g++ -std=gnu++11
|
||||
GCCGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
|
||||
GCCGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
|
||||
GCCGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
|
||||
GCCGTEQ14 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 14)
|
||||
GCCGTEQ16 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 16)
|
||||
ifeq "$(GCCGTEQ9)" "1"
|
||||
# flags present in gcc version greater than or equal to 9 can go here
|
||||
CFLAGS+=-Wformat-overflow
|
||||
@@ -100,7 +100,8 @@ CFLAGS+=-Wimplicit-fallthrough
|
||||
#endif
|
||||
#ifeq "$(GCCGTEQ12)" "1"
|
||||
#endif
|
||||
#ifeq "$(GCCGTEQ14)" "1"
|
||||
#ifeq "$(GCCGTEQ16)" "1"
|
||||
NO_WARN_DISCARDED_QUALIFIERS=-Wno-discarded-qualifiers
|
||||
#endif
|
||||
# end of gcc-specific
|
||||
else # gcc or clang?
|
||||
@@ -109,6 +110,7 @@ CXX=clang++ -std=gnu++11
|
||||
CLANGGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
|
||||
CLANGGTEQ14 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 14)
|
||||
CLANGGTEQ21 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 21)
|
||||
CLANGGTEQ22 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 22)
|
||||
ifeq "$(CLANGGTEQ12)" "1"
|
||||
CFLAGS+=-Wimplicit-fallthrough
|
||||
endif
|
||||
@@ -123,12 +125,15 @@ endif
|
||||
ifeq "$(CLANGGTEQ21)" "1"
|
||||
CFLAGS+=-Wno-deprecated-octal-literals
|
||||
endif
|
||||
ifeq "$(CLANGGTEQ22)" "1"
|
||||
NO_WARN_DISCARDED_QUALIFIERS=-Wno-incompatible-pointer-types-discards-qualifiers
|
||||
endif
|
||||
# none
|
||||
endif # clang-specific ends here
|
||||
|
||||
ifdef MAKEFILE_SRC
|
||||
ifdef CPLUSPLUS_NEEDED
|
||||
CCXXFLAGS = -g -I../include -DNOTPARMDECL
|
||||
CCXXFLAGS = -g -I../include
|
||||
CCXXFLAGS+=-Wall -Wextra -Wno-missing-field-initializers \
|
||||
-Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings
|
||||
CCXXFLAGS+=-pedantic
|
||||
@@ -171,6 +176,9 @@ else # g++ version greater than or equal to 9? (no follows)
|
||||
CCXX=g++ -std=c++17
|
||||
endif # g++ version greater than or equal to 9
|
||||
endif # CPLUSPLUS_NEED20
|
||||
ifdef ADDITIONAL_NO_WARN_GPPCCX
|
||||
CCXXFLAGS+=$(ADDITIONAL_NO_WARN_GPPCCX)
|
||||
endif
|
||||
|
||||
|
||||
else # g++ or clang++ ?
|
||||
@@ -211,6 +219,9 @@ ifeq "$(CLANGPPGTEQ17)" "1"
|
||||
CCXX=clang++ -std=c++20
|
||||
endif # clang++ greater than or equal to 17
|
||||
endif # CPLUSPLUS_NEED20
|
||||
ifdef ADDITIONAL_NO_WARN_CLANGCCX
|
||||
CCXXFLAGS+=$(ADDITIONAL_NO_WARN_CLANGCCX)
|
||||
endif
|
||||
endif # end of clang++-specific section
|
||||
CXX=$(CCXX)
|
||||
endif # CPLUSPLUS_NEEDED
|
||||
@@ -262,5 +273,5 @@ ifneq "$(HAVECSTD)" ""
|
||||
CSTD = -std=$(HAVECSTD)
|
||||
endif
|
||||
|
||||
#end of compiler.370
|
||||
#end of compiler.500
|
||||
#------------------------------------------------------------------------------
|
||||
@@ -1,10 +1,14 @@
|
||||
#===============-=================================================
|
||||
# NetHack 3.7 include/cross-post $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-3.7 $
|
||||
# NetHack 5.0 include/cross-post $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-5.0 $
|
||||
#
|
||||
# Cross-compiling -POST section
|
||||
|
||||
ifdef CROSS_TO_MSDOS
|
||||
#
|
||||
.PHONY: tilemap
|
||||
tilemap: ../util/tilemap.o $(SRCDIR)/objects.o $(SRCDIR)/monst.o $(SRCDIR)/drawing.o $(HACKLIB)
|
||||
../util/tilemap.o : ../win/share/tilemap.c
|
||||
(cd ../util ; make tilemap.o ; cd ../src )
|
||||
$(TARGETPFX)msdos.o : ../sys/msdos/msdos.c $(HACK_H)
|
||||
$(TARGETPFX)font.o : ../sys/msdos/font.c ../sys/msdos/font.h $(HACK_H)
|
||||
$(TARGETPFX)pckeys.o : ../sys/msdos/pckeys.c $(HACK_H)
|
||||
@@ -18,13 +22,15 @@ $(TARGETPFX)vidvesa.o : ../sys/msdos/vidvesa.c ../sys/msdos/portio.h \
|
||||
../win/share/tile.h ../include/tileset.h ../sys/msdos/font.h $(HACK_H)
|
||||
$(TARGETPFX)vidstub.o : ../sys/msdos/vidvesa.c ../sys/msdos/portio.h \
|
||||
$(HACK_H)
|
||||
$(TARGETPFX)tile.o : tile.c
|
||||
$(TARGETPFX)tile.o : $(SRCDIR)/tile.c
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) -c -o $@ $(SRCDIR)/tile.c
|
||||
$(SRCDIR)/tile.c : tilemap
|
||||
$(TARGETPFX)exceptn.o : ../lib/djgpp/djgpp-patch/src/libc/go32/exceptn.S
|
||||
$(TARGET_CC) -c -o $@ ../lib/djgpp/djgpp-patch/src/libc/go32/exceptn.S
|
||||
$(TARGET_AR) ru ../lib/djgpp/i586-pc-msdosdjgpp/lib/libc.a $(TARGETPFX)exceptn.o
|
||||
$(GAMEBIN) : $(HOBJ) $(TARGETPFX)date.o $(TARGET_HACKLIB) $(LUACROSSLIB)
|
||||
$(TARGET_LINK) $(TARGET_LFLAGS) -o $@ \
|
||||
$(HOBJ) $(TARGET_HACKLIB) $(WINLIB) $(TARGET_LIBS)
|
||||
$(HOBJ) $(DATE_O) $(GENTILEOFILE) $(TARGET_HACKLIB) $(WINLIB) $(TARGET_LIBS)
|
||||
$(DOSFONT)/ter-u16b.psf: $(FONTTOP)/ter-u16b.bdf $(DOSFONT)/nh-u16b.bdf $(DOSFONT)/makefont.lua $(LUABIN)
|
||||
$(LUABIN) $(DOSFONT)/makefont.lua $(FONTTOP)/ter-u16b.bdf $(DOSFONT)/nh-u16b.bdf $@
|
||||
$(DOSFONT)/ter-u16v.psf: $(FONTTOP)/ter-u16v.bdf $(DOSFONT)/nh-u16v.bdf $(DOSFONT)/makefont.lua $(LUABIN)
|
||||
@@ -44,7 +50,7 @@ $(DOSFONT)/ter-u32b.psf: $(FONTTOP)/ter-u32b.bdf $(DOSFONT)/nh-u32b.bdf $(DOSFON
|
||||
#
|
||||
.PHONY: dodata dospkg dosfonts
|
||||
dosfonts: $(FONTTARGETS)
|
||||
dospkg: dodata dosfonts $(GAMEBIN) $(TARGETPFX)recover.exe ../dat/nhtiles.bmp
|
||||
dospkg: dodata dosfonts $(GAMEBIN) $(TARGETPFX)recover.exe $(NHTILES)
|
||||
$(TARGET_STUBEDIT) $(GAMEBIN) minstack=2048K
|
||||
mkdir -p $(TARGETPFX)pkg
|
||||
cp $(GAMEBIN) $(TARGETPFX)pkg/NETHACK.EXE
|
||||
@@ -52,7 +58,7 @@ dospkg: dodata dosfonts $(GAMEBIN) $(TARGETPFX)recover.exe ../dat/nhtiles.bmp
|
||||
-cp $(SFCTOOLBIN) $(TARGETPFX)pkg/SFCTOOL.EXE
|
||||
cp ../dat/nhdat $(TARGETPFX)pkg/NHDAT
|
||||
cp ../dat/license $(TARGETPFX)pkg/LICENSE
|
||||
cp ../dat/nhtiles.bmp $(TARGETPFX)pkg/NHTILES.BMP
|
||||
-cp ../dat/nhtiles.bmp $(TARGETPFX)pkg/NHTILES.BMP
|
||||
cp ../dat/symbols $(TARGETPFX)pkg/SYMBOLS
|
||||
cp ../sys/share/NetHack.cnf $(TARGETPFX)pkg/NETHACK.CNF
|
||||
cp ../sys/msdos/sysconf $(TARGETPFX)pkg/SYSCONF
|
||||
@@ -90,8 +96,8 @@ else
|
||||
fi; )
|
||||
endif
|
||||
-touch $(TARGETPFX)pkg/RECORD
|
||||
cd $(TARGETPFX)pkg ; zip -9 ../NH370DOS.ZIP * ; cd ../../..
|
||||
@echo msdos package zip file $(TARGETPFX)NH370DOS.ZIP
|
||||
cd $(TARGETPFX)pkg ; zip -9 ../NH$(NHV)DOS.ZIP * ; cd ../../..
|
||||
@echo msdos package zip file $(TARGETPFX)NH$(NHV)DOS.ZIP
|
||||
|
||||
$(LUABIN):
|
||||
( cd .. && make luabin && cd src)
|
||||
@@ -105,14 +111,14 @@ deploy-to-dosbox:
|
||||
endif
|
||||
.PHONY: deploytodosbox
|
||||
|
||||
deploytodosbox: $(TARGETPFX)NH370DOS.ZIP $(dosboxnhfolder) $(dosboxnhsrc) \
|
||||
deploytodosbox: $(TARGETPFX)NH$(NHV)DOS.ZIP $(dosboxnhfolder) $(dosboxnhsrc) \
|
||||
$(dosboxnhsrc)/src $(dosboxnhsrc)/include \
|
||||
$(dosboxnhsrc)/sys/msdos $(dosboxnhsrc)/sys/share \
|
||||
$(dosboxnhsrc)/win/share $(dosboxnhsrc)/win/curses \
|
||||
$(dosboxnhsrc)/win/tty $(dosboxnhsrc)/util \
|
||||
$(dosboxnhfolder)/NETHACK.EXE
|
||||
@echo DOS NetHack deployed to dosbox at $(dosboxnhfolder)
|
||||
$(TARGETPFX)NH370DOS.ZIP: dospkg
|
||||
$(TARGETPFX)NH$(NHV)DOS.ZIP: dospkg
|
||||
$(dosboxnhfolder):
|
||||
mkdir -p $@
|
||||
$(dosboxnhsrc): $(dosboxnhfolder)
|
||||
@@ -144,8 +150,8 @@ $(dosboxnhsrc)/util: $(dosboxnhsrc)
|
||||
mkdir -p $@
|
||||
cp --preserve=timestamps $(FLDR)util/*.c $(dosboxnhsrc)/util
|
||||
cp --preserve=timestamps $(FLDR)util/*.h $(dosboxnhsrc)/util
|
||||
$(dosboxnhfolder)/NETHACK.EXE: $(TARGETPFX)NH370DOS.ZIP
|
||||
unzip -o $(TARGETPFX)NH370DOS.ZIP -d $(dosboxnhfolder)
|
||||
$(dosboxnhfolder)/NETHACK.EXE: $(TARGETPFX)NH$(NHV)DOS.ZIP
|
||||
unzip -o $(TARGETPFX)NH$(NHV)DOS.ZIP -d $(dosboxnhfolder)
|
||||
find $(dosboxnhfolder) -type f -name "$(dosboxconfigfile)" \
|
||||
| xargs sed -i 's/#OPTIONS=video:autodetect/OPTIONS=video:autodetect/g'
|
||||
endif # dosbox
|
||||
@@ -225,21 +231,19 @@ mipspkg: dodata $(GAMEBIN) $(TARGETPFX)recover
|
||||
cp ../sys/msdos/sysconf $(TARGETPFX)pkg/sysconf
|
||||
cp ../doc/nethack.txt $(TARGETPFX)pkg/nethack.txt
|
||||
-touch $(TARGETPFX)pkg/record
|
||||
cd $(TARGETPFX)pkg ; zip -9 ../nh370mips.zip * ; cd ../../..
|
||||
@echo MIPS package zip file $(TARGETPFX)nh370mips.zip
|
||||
cd $(TARGETPFX)pkg ; zip -9 ../nh$(NHV)mips.zip * ; cd ../../..
|
||||
@echo MIPS package zip file $(TARGETPFX)nh$(NHV)mips.zip
|
||||
endif # CROSS_TO_MIPS
|
||||
|
||||
|
||||
ifdef CROSS_TO_AMIGA
|
||||
$(TARGETPFX)amidos.o : ../sys/amiga/amidos.c $(HACK_H)
|
||||
$(TARGETPFX)amigst.o : ../sys/amiga/amigst.c $(HACK_H)
|
||||
$(TARGETPFX)amirip.o : ../sys/amiga/amirip.c $(HACK_H)
|
||||
$(TARGETPFX)amistack.o : ../sys/amiga/amistack.c $(HACK_H)
|
||||
$(TARGETPFX)amitty.o : ../sys/amiga/amitty.c $(HACK_H)
|
||||
$(TARGETPFX)amiwind.o : ../sys/amiga/amiwind.c \
|
||||
../sys/amiga/amimenu.c $(HACK_H)
|
||||
$(TARGETPFX)winami.o : ../sys/amiga/winami.c $(HACK_H)
|
||||
$(TARGETPFX)winchar.o : ../sys/amiga/winchar.c tile.c $(HACK_H)
|
||||
$(TARGETPFX)winchar.o : ../sys/amiga/winchar.c $(SRCDIR)/tile.c $(HACK_H)
|
||||
$(TARGETPFX)winfuncs.o : ../sys/amiga/winfuncs.c $(HACK_H)
|
||||
$(TARGETPFX)winkey.o : ../sys/amiga/winkey.c $(HACK_H)
|
||||
$(TARGETPFX)winamenu.o : ../sys/amiga/winamenu.c $(HACK_H)
|
||||
@@ -309,31 +313,30 @@ UUDECODE = ../util/uudecode
|
||||
../util/uudecode: ../sys/share/uudecode.c
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
amigapkg: $(AMITILES) ../util/uudecode
|
||||
mkdir -p $(TARGETPFX)pkg/tiles $(TARGETPFX)pkg/hack
|
||||
cp $(GAMEBIN) $(TARGETPFX)pkg/nethack
|
||||
cp ../dat/nhdat $(TARGETPFX)pkg/nhdat
|
||||
cp ../dat/license $(TARGETPFX)pkg/license
|
||||
cp ../dat/symbols $(TARGETPFX)pkg/symbols
|
||||
cp $(TARGETPFX)tiles16.iff $(TARGETPFX)pkg/tiles/tiles16.iff
|
||||
cp $(TARGETPFX)tiles32.iff $(TARGETPFX)pkg/tiles/tiles32.iff
|
||||
cp $(TARGETPFX)tomb.iff $(TARGETPFX)pkg/tomb.iff
|
||||
cp ../sys/msdos/sysconf $(TARGETPFX)pkg/sysconf
|
||||
cp ../doc/nethack.txt $(TARGETPFX)pkg/nethack.txt
|
||||
( cd $(TARGETPFX)pkg && ../../../util/uudecode ../../../sys/amiga/amifont8.uu && mv 8 hack/8 )
|
||||
( cd $(TARGETPFX)pkg && ../../../util/uudecode ../../../sys/amiga/amifont.uu )
|
||||
cp $(AMISRC)/nethack.cnf $(TARGETPFX)pkg/nethack.cnf
|
||||
-( cd $(TARGETPFX)pkg && test -f ../../../sys/amiga/dflticon.uu && \
|
||||
../../../util/uudecode ../../../sys/amiga/dflticon.uu )
|
||||
-( cd $(TARGETPFX)pkg && test -f ../../../sys/amiga/NHinfo.uu && \
|
||||
../../../util/uudecode ../../../sys/amiga/NHinfo.uu )
|
||||
-( cd $(TARGETPFX)pkg && test -f ../../../sys/amiga/NewGame.uu && \
|
||||
../../../util/uudecode ../../../sys/amiga/NewGame.uu )
|
||||
-( cd $(TARGETPFX)pkg && test -f ../../../sys/amiga/HackWB.uu && \
|
||||
../../../util/uudecode ../../../sys/amiga/HackWB.uu )
|
||||
touch $(TARGETPFX)pkg/record
|
||||
( cd $(TARGETPFX)pkg && zip -9r ../NH370AMI.ZIP * )
|
||||
@echo amiga package zip file $(TARGETPFX)NH370AMI.ZIP
|
||||
amigapkg: $(GAMEBIN) $(AMITILES) ../util/uudecode
|
||||
mkdir -p $(TARGETPFX)pkg/NetHack/tiles $(TARGETPFX)pkg/NetHack/hack
|
||||
cp $(GAMEBIN) $(TARGETPFX)pkg/NetHack/nethack
|
||||
cp ../dat/nhdat $(TARGETPFX)pkg/NetHack/nhdat
|
||||
cp ../dat/license $(TARGETPFX)pkg/NetHack/license
|
||||
cp ../dat/symbols $(TARGETPFX)pkg/NetHack/symbols
|
||||
cp $(TARGETPFX)tiles16.iff $(TARGETPFX)pkg/NetHack/tiles/tiles16.iff
|
||||
cp $(TARGETPFX)tiles32.iff $(TARGETPFX)pkg/NetHack/tiles/tiles32.iff
|
||||
cp $(TARGETPFX)tomb.iff $(TARGETPFX)pkg/NetHack/tomb.iff
|
||||
cp ../doc/nethack.txt $(TARGETPFX)pkg/NetHack/nethack.txt
|
||||
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/amifont8.uu && mv 8 hack/8 )
|
||||
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/amifont.uu )
|
||||
cp $(AMISRC)/nethack.cnf $(TARGETPFX)pkg/NetHack/nethack.cnf
|
||||
cp $(AMISRC)/README.amiga $(TARGETPFX)pkg/NetHack/README.amiga
|
||||
cp $(AMISRC)/amii.hlp $(TARGETPFX)pkg/NetHack/amii.hlp
|
||||
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/NHinfo.uu )
|
||||
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/cnf-info.uu )
|
||||
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/license-info.uu )
|
||||
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/txt-info.uu )
|
||||
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/readme-info.uu )
|
||||
( cd $(TARGETPFX)pkg && ../../../util/uudecode ../../../sys/amiga/drawer-info.uu )
|
||||
touch $(TARGETPFX)pkg/NetHack/record
|
||||
( cd $(TARGETPFX)pkg && zip -9r ../NH$(NHV)AMI$(AMIPKGSEQ).ZIP NetHack NetHack.info )
|
||||
@echo amiga package zip file $(TARGETPFX)NH$(NHV)AMI$(AMIPKGSEQ).ZIP
|
||||
endif # CROSS_TO_AMIGA
|
||||
|
||||
ifdef CROSS_SHARED
|
||||
@@ -348,11 +351,15 @@ $(TARGETPFX)giftiles.o : ../win/share/giftiles.c
|
||||
endif # CROSS_SHARED
|
||||
#
|
||||
ifdef CROSS
|
||||
ifdef MAKEFILE_TOP
|
||||
# top-level liblua.a is a host-side build; keep TARGET_CC out of it
|
||||
LUAMAKEFLAGS = CC='$(CC)' SYSCFLAGS='$(SYSCFLAGS)'
|
||||
endif # MAKEFILE_TOP
|
||||
$(TARGETPFX)hacklib.a: $(TARGETPFX)hacklib.o
|
||||
$(TARGET_AR) $(TARGET_ARFLAGS) $@ $(TARGETPFX)hacklib.o
|
||||
ifdef MAKEFILE_UTL
|
||||
$(TARGETPFX)recover.o: recover.c $(CONFIG_H)
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) $(CSTD) -c recover.c -o $@
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) -c recover.c -o $@
|
||||
ifdef CROSS_TO_MSDOS
|
||||
$(TARGETPFX)recover.exe : $(TARGETPFX)recover.o $(TARGETPFX)rversion.o $(TARGETPFX)hacklib.a
|
||||
$(TARGET_LINK) $(TARGET_LFLAGS) \
|
||||
@@ -363,7 +370,7 @@ $(TARGETPFX)recover : $(TARGETPFX)recover.o $(TARGETPFX)rversion.o $(TARGETPFX)h
|
||||
$(TARGETPFX)recover.o $(TARGETPFX)rversion.o $(TARGETPFX)hacklib.a -o $@
|
||||
endif
|
||||
$(TARGETPFX)rversion.o: ../src/version.c $(HACK_H)
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) -DMINIMAL_FOR_RECOVER $(CSTD) -c ../src/version.c -o $@
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) -DMINIMAL_FOR_RECOVER -c ../src/version.c -o $@
|
||||
endif # MAKEFILE_UTL
|
||||
endif # CROSS
|
||||
|
||||
@@ -478,7 +485,11 @@ $(TARGETPFX)slk.o : $(PDCTOP)/pdcurses/slk.c
|
||||
$(TARGETPFX)termattr.o : $(PDCTOP)/pdcurses/termattr.c
|
||||
$(TARGETPFX)touch.o : $(PDCTOP)/pdcurses/touch.c
|
||||
$(TARGETPFX)util.o : $(PDCTOP)/pdcurses/util.c
|
||||
# We need an explicit recipe for the creation of $(TARGETPFX)window.o
|
||||
# because it will try and use the X11 version of window.c otherwise
|
||||
$(TARGETPFX)window.o : $(PDCTOP)/pdcurses/window.c
|
||||
$(TARGET_CC) $(PDCINCL) $(PDC_TARGET_CFLAGS) \
|
||||
-Wno-sign-compare -o$@ $(PDCTOP)/pdcurses/window.c
|
||||
$(TARGETPFX)debug.o : $(PDCTOP)/pdcurses/debug.c
|
||||
$(TARGETPFX)pdcclip.o : $(PDCPORT)/pdcclip.c
|
||||
$(TARGETPFX)pdcdisp.o : $(PDCPORT)/pdcdisp.c
|
||||
@@ -1,5 +1,5 @@
|
||||
#===============-=================================================
|
||||
# NetHack 3.7 include/cross-pre1. $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-3.7 $
|
||||
# NetHack 5.0 include/cross-pre1. $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-5.0 $
|
||||
#
|
||||
# Cross-compiling -PRE section 1
|
||||
#
|
||||
@@ -42,6 +42,7 @@ ifdef CROSS_TO_AMIGA
|
||||
CROSS=1
|
||||
BUILD_TARGET_LUA=1
|
||||
CROSS_SHARED=1
|
||||
HACKDIR=NetHack:
|
||||
override TARGET = amiga
|
||||
override TARGETDIR=../targets/$(TARGET)
|
||||
override TARGETPFX = $(TARGETDIR)/
|
||||
@@ -49,6 +50,7 @@ override TARGET_LIBS=
|
||||
endif
|
||||
|
||||
ifdef CROSS
|
||||
CROSSCOMPILE=1
|
||||
override PREGAME=
|
||||
override BUILDMORE=
|
||||
override CLEANMORE=
|
||||
@@ -1,5 +1,5 @@
|
||||
#===============-=================================================
|
||||
# NetHack 3.7 include/cross-pre2 $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-3.7 $
|
||||
# NetHack 5.0 include/cross-pre2 $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-5.0 $
|
||||
#
|
||||
# Cross-compiling -PRE section 2
|
||||
#
|
||||
@@ -134,6 +134,8 @@ override TARGET_CC = $(TOOLTOP1)/i586-pc-msdosdjgpp-gcc
|
||||
override TARGET_CXX = $(TOOLTOP1)/i586-pc-msdosdjgpp-g++
|
||||
override TARGET_AR = $(TOOLTOP1)/i586-pc-msdosdjgpp-gcc-ar
|
||||
override TARGET_STUBEDIT = ../lib/djgpp/i586-pc-msdosdjgpp/bin/stubedit
|
||||
override GENTILEOFILE = $(TARGETPFX)tile.o
|
||||
override UUIDOBJ =
|
||||
ifdef MAKEFILE_SRC
|
||||
FLDR=../
|
||||
endif
|
||||
@@ -146,7 +148,7 @@ ifdef DOSBOX
|
||||
dosbox=$(DOSBOX)
|
||||
endif
|
||||
ifdef dosbox
|
||||
dosboxgameid=NH370
|
||||
dosboxgameid=NH$(NHV)
|
||||
dosboxtop=$(dosbox)
|
||||
dosboxnhfolder=$(dosboxtop)/$(dosboxgameid)
|
||||
dosboxnhsrc=$(dosboxnhfolder)/NHSRC
|
||||
@@ -175,8 +177,31 @@ MSDOS_GPP_CFLAGS = -Wall -Wextra -Wno-missing-field-initializers -Wreturn-type \
|
||||
-Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings -pedantic \
|
||||
-Wmissing-declarations -Wformat-nonliteral -Wunreachable-code \
|
||||
-Wno-maybe-uninitialized
|
||||
ifndef WANT_WIN_TTY
|
||||
# A Curses-only configuration
|
||||
MSDOS_GRAPH_CONFIG = -DNOTTYGRAPHICS
|
||||
SKIP_TILES = 1
|
||||
ifndef WANT_DOSVGA
|
||||
SKIP_FONTS = 1
|
||||
endif
|
||||
SKIP_FONT_C = 1
|
||||
else ifdef NO_GRAPHICS
|
||||
MSDOS_GRAPH_CONFIG = -DSUPPRESS_GRAPHICS
|
||||
# Curses will need the fonts, but not font.c
|
||||
ifndef WANT_DOSVGA
|
||||
SKIP_FONTS = 1
|
||||
endif
|
||||
SKIP_FONT_C = 1
|
||||
SKIP_TILES = 1
|
||||
else ifdef NO_TILES
|
||||
MSDOS_GRAPH_CONFIG =
|
||||
# without SKIP_FONT_C; if ENHANCED_SYMBOLS is set, we'll need the fonts
|
||||
SKIP_TILES = 1
|
||||
else
|
||||
MSDOS_GRAPH_CONFIG = -DTILES_IN_GLYPHMAP
|
||||
endif
|
||||
MSDOS_TARGET_CFLAGS = -c -O $(DBGFLAGS) -I../include -I../sys/msdos -I../win/share \
|
||||
$(LUAINCL) -DDLB $(PDCURSESDEF) -DTILES_IN_GLYPHMAP \
|
||||
$(LUAINCL) -DDLB $(PDCURSESDEF) $(MSDOS_GRAPH_CONFIG) \
|
||||
-DCROSSCOMPILE -DCROSSCOMPILE_TARGET -DCROSS_TO_MSDOS \
|
||||
-D_NAIVE_DOS_REGS \
|
||||
$(MSDOS_GCC_CFLAGS) $(SNDCFLAGS)
|
||||
@@ -188,7 +213,11 @@ MSDOS_TARGET_CXXFLAGS = -c -O $(DBGFLAGS) -I../include -I../sys/msdos -I../win/s
|
||||
PDCINCL += -I$(PDCPORT)
|
||||
PDC_TARGET_CFLAGS = $(MSDOS_TARGET_CFLAGS) -Wno-unused-parameter \
|
||||
-Wno-missing-prototypes
|
||||
ifndef SKIP_FONTS_IN_CI
|
||||
ifdef SKIP_FONTS_IN_CI
|
||||
FONTTARGETS=
|
||||
else ifdef SKIP_FONTS
|
||||
FONTTARGETS=
|
||||
else
|
||||
FONTVER = terminus-font-4.49.1
|
||||
FONTTOP = ../lib/$(FONTVER)
|
||||
DOSFONT = ../sys/msdos/fonts
|
||||
@@ -196,8 +225,6 @@ FONTTARGETS = $(DOSFONT)/ter-u16b.psf $(DOSFONT)/ter-u16v.psf \
|
||||
$(DOSFONT)/ter-u18b.psf $(DOSFONT)/ter-u20b.psf \
|
||||
$(DOSFONT)/ter-u22b.psf $(DOSFONT)/ter-u24b.psf \
|
||||
$(DOSFONT)/ter-u28b.psf $(DOSFONT)/ter-u32b.psf
|
||||
else
|
||||
FONTTARGETS=
|
||||
endif
|
||||
LUABIN = ../lib/lua-$(LUA_VERSION)/src/lua
|
||||
LUA_TARGET_CFLAGS = $(MSDOS_TARGET_CFLAGS)
|
||||
@@ -214,22 +241,27 @@ override SYSSRC = ../sys/share/pcmain.c ../sys/msdos/msdos.c \
|
||||
../sys/share/pcsys.c ../sys/share/pctty.c \
|
||||
../sys/share/pcunix.c ../sys/msdos/video.c \
|
||||
../sys/msdos/vidtxt.c ../sys/msdos/pckeys.c \
|
||||
../sys/msdos/vidvga.c ../sys/msdos/vidvesa.c \
|
||||
../sys/msdos/font.c \
|
||||
../win/share/bmptiles.c ../win/share/giftiles.c \
|
||||
../win/share/tileset.c
|
||||
../sys/msdos/vidvga.c ../sys/msdos/vidvesa.c
|
||||
override SYSOBJ= $(TARGETPFX)pcmain.o $(TARGETPFX)msdos.o \
|
||||
$(TARGETPFX)pcsys.o $(TARGETPFX)pctty.o \
|
||||
$(TARGETPFX)pcunix.o $(TARGETPFX)video.o \
|
||||
$(TARGETPFX)vidtxt.o $(TARGETPFX)pckeys.o \
|
||||
$(TARGETPFX)vidvga.o $(TARGETPFX)vidvesa.o \
|
||||
$(TARGETPFX)font.o \
|
||||
$(TARGETPFX)bmptiles.o $(TARGETPFX)giftiles.o \
|
||||
$(TARGETPFX)tileset.o $(TARGETPFX)tile.o
|
||||
$(TARGETPFX)vidvga.o $(TARGETPFX)vidvesa.o
|
||||
ifndef SKIP_FONT_C
|
||||
override SYSSRC += ../sys/msdos/font.c
|
||||
override SYSOBJ += $(TARGETPFX)font.o
|
||||
endif
|
||||
ifndef SKIP_TILES
|
||||
override SYSSRC += ../win/share/bmptiles.c ../win/share/giftiles.c \
|
||||
../win/share/tileset.c
|
||||
override SYSOBJ += $(TARGETPFX)bmptiles.o $(TARGETPFX)giftiles.o \
|
||||
$(TARGETPFX)tileset.o
|
||||
endif
|
||||
override WINLIB=
|
||||
override LUALIB=
|
||||
override LUALIBS=
|
||||
override TOPLUALIB=
|
||||
override LUATOPLIB=
|
||||
override WINX11OBJ=
|
||||
override GAMEBIN = $(TARGETPFX)nethack.exe
|
||||
override RECOVERBIN = $(TARGETPFX)recover.exe
|
||||
override SFCTOOLBIN = $(TARGETPFX)sfctool.exe
|
||||
@@ -247,7 +279,12 @@ GDBEXE=
|
||||
GDBBAT=
|
||||
GDBCMDLINE=
|
||||
endif
|
||||
ifndef SKIP_TILES
|
||||
VARDATND += nhtiles.bmp
|
||||
NHTILES = ../dat/nhtiles.bmp
|
||||
else
|
||||
NHTILES =
|
||||
endif
|
||||
#
|
||||
ifdef WANT_WIN_CURSES
|
||||
# rules for pdcurses dos-specific files
|
||||
@@ -258,6 +295,11 @@ endif # WANT_WIN_CURSES
|
||||
# Rule for files in sys/msdos
|
||||
$(TARGETPFX)%.o : ../sys/msdos/%.c
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) -o$@ $<
|
||||
#
|
||||
# Rule for files in util
|
||||
$(TARGETPFX)%.o : ../util/%.c
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) -o$@ $<
|
||||
|
||||
endif # CROSS_TO_MSDOS
|
||||
#=================================================================
|
||||
|
||||
@@ -267,6 +309,7 @@ ifdef CROSS_TO_WASM
|
||||
# WASM
|
||||
# originally from https://github.com/NetHack/NetHack/pull/385
|
||||
#===============-=================================================
|
||||
#also set a make variable flagging this as a crosscompile
|
||||
#
|
||||
#WASM_DEBUG = 1
|
||||
WASM_DATA_DIR = $(TARGETPFX)wasm-data
|
||||
@@ -328,10 +371,10 @@ WASM_CFLAGS += -Wshadow
|
||||
# WASM_CFLAGS += -Wwrite-strings
|
||||
# WASM_CFLAGS += -Werror
|
||||
# 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 += -I../include -DNOTPARMDECL
|
||||
WASM_CFLAGS += $(WINCFLAGS) #WINCFLAGS set from multiw-2.500
|
||||
WASM_CFLAGS += -DSYSCF -DSYSCF_FILE=\"/sysconf\" -DSECURE -DNHUUID
|
||||
#WASM_CFLAGS += -g -I../include
|
||||
WASM_CFLAGS += -I../include
|
||||
# NetHack sources control
|
||||
WASM_CFLAGS += -DDLB
|
||||
WASM_CFLAGS += -DHACKDIR=\"$(HACKDIR)\"
|
||||
@@ -360,9 +403,10 @@ override SYSOBJ= $(TARGETPFX)libnhmain.o \
|
||||
$(TARGETPFX)winshim.o
|
||||
override WINLIB = emranlib
|
||||
override LUALIB=
|
||||
override TOPLUALIB=
|
||||
override LUATOPLIB=
|
||||
override REGEXOBJ = $(TARGETPFX)posixregex.o
|
||||
override WINOBJ=
|
||||
override UUIDOBJ=
|
||||
# don't bother Making regular NetHack executable
|
||||
override GAME=
|
||||
# the real VARDAT hasn't been defined yet for use in ALLDEP override
|
||||
@@ -442,7 +486,7 @@ override SYSOBJ = $(TARGETPFX)ioctl.o $(TARGETPFX)unixmain.o $(TARGETPFX)unixtty
|
||||
override WINLIB = $(NCURSESLIB)
|
||||
override LUALIB=
|
||||
override LUALIBS=
|
||||
override TOPLUALIB=
|
||||
override LUATOPLIB=
|
||||
override GAMEBIN=$(MIPS_TARGET)
|
||||
override RECOVERBIN = $(TARGETPFX)recover
|
||||
override PACKAGE = mipspkg
|
||||
@@ -470,7 +514,7 @@ ifdef CROSS_TO_AMIGA
|
||||
#
|
||||
# Cross-compiler: https://franke.ms/git/bebbo/amiga-gcc
|
||||
# Install to /opt/amiga, then:
|
||||
# sys/unix/setup.sh sys/unix/hints/linux.370
|
||||
# sys/unix/setup.sh sys/unix/hints/linux.500
|
||||
# make fetch-lua
|
||||
# make CROSS_TO_AMIGA=1 fetch-regex
|
||||
# make CROSS_TO_AMIGA=1 all
|
||||
@@ -499,8 +543,9 @@ override TARGET_CFLAGS = -c -O2 -noixemul $(TOOLARCH) \
|
||||
$(LUAINCL) -DAMIGA -DNOTTYGRAPHICS -DNO_TERMS -DNO_SIGNAL \
|
||||
-DTILES_IN_GLYPHMAP $(PDCURSESDEF) \
|
||||
-DCROSSCOMPILE -DCROSSCOMPILE_TARGET -DCROSS_TO_AMIGA \
|
||||
-DAMIGA_VERSION_STRING=\""VER: NetHack 3.7.0"\"
|
||||
-DAMIGA_VERSION_STRING=\""VER: NetHack 5.0.0"\"
|
||||
override TARGET_CXXFLAGS = $(TARGET_CFLAGS)
|
||||
override GENTILEOFILE = $(TARGETPFX)tile.o
|
||||
LUA_TARGET_CFLAGS = $(TARGET_CFLAGS)
|
||||
ifeq "$(REGEXOBJ)" "$(TARGETPFX)cppregex.o"
|
||||
override TARGET_LINK = $(TARGET_CXX)
|
||||
@@ -510,9 +555,9 @@ endif
|
||||
override TARGET_LFLAGS= $(TOOLARCH) -noixemul -Wl,--allow-multiple-definition
|
||||
override TARGET_LIBS += $(LIBLM)
|
||||
VARDATND += nhtiles.bmp
|
||||
override SYSSRC = ../sys/amiga/amidos.c ../sys/amiga/amigst.c \
|
||||
override SYSSRC = ../sys/amiga/amidos.c \
|
||||
../sys/amiga/amimenu.c ../sys/amiga/amirip.c \
|
||||
../sys/amiga/amistack.c ../sys/amiga/amitty.c \
|
||||
../sys/amiga/amistack.c \
|
||||
../sys/amiga/amiwind.c ../sys/amiga/clipwin.c \
|
||||
../sys/amiga/colorwin.c \
|
||||
../sys/amiga/winami.c ../sys/amiga/winchar.c \
|
||||
@@ -521,9 +566,9 @@ override SYSSRC = ../sys/amiga/amidos.c ../sys/amiga/amigst.c \
|
||||
../sys/amiga/winstr.c ../sys/share/pcmain.c \
|
||||
../win/share/bmptiles.c ../win/share/giftiles.c \
|
||||
../win/share/tileset.c
|
||||
override SYSOBJ = $(TARGETPFX)amidos.o $(TARGETPFX)amigst.o \
|
||||
override SYSOBJ = $(TARGETPFX)amidos.o \
|
||||
$(TARGETPFX)amirip.o $(TARGETPFX)amistack.o \
|
||||
$(TARGETPFX)amitty.o $(TARGETPFX)amiwind.o \
|
||||
$(TARGETPFX)amiwind.o \
|
||||
$(TARGETPFX)winami.o $(TARGETPFX)winchar.o \
|
||||
$(TARGETPFX)winfuncs.o $(TARGETPFX)winkey.o \
|
||||
$(TARGETPFX)winamenu.o $(TARGETPFX)winreq.o \
|
||||
@@ -534,7 +579,7 @@ override SYSOBJ = $(TARGETPFX)amidos.o $(TARGETPFX)amigst.o \
|
||||
override WINLIB=
|
||||
override LUALIB=
|
||||
override LUALIBS=
|
||||
override TOPLUALIB=
|
||||
override LUATOPLIB=
|
||||
override DLLIB=
|
||||
override WINOBJ=
|
||||
override GAMEBIN = $(TARGETPFX)nethack
|
||||
@@ -0,0 +1,123 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# NetHack 5.0 directories.500 $NHDT-Date: 1668359835 2022/11/13 17:17:15 $ $NHDT-Branch: NetHack-5.0 $
|
||||
|
||||
ifndef WANT_SHARED_INSTALL
|
||||
PREFIX=$(abspath $(NHSROOT))
|
||||
SOURCEINSTALL=1
|
||||
|
||||
# -----------------------------------------
|
||||
# This is for the Linux source tree install
|
||||
# -----------------------------------------
|
||||
ifeq "$(WHICH_OS)" "Linux"
|
||||
|
||||
HACKDIR ?=$(PREFIX)/playground
|
||||
INSTDIR ?=$(HACKDIR)
|
||||
VARDIR ?=$(HACKDIR)
|
||||
|
||||
GAMEPERM ?= 0700
|
||||
VARFILEPERM ?= 0600
|
||||
VARDIRPERM ?= 0700
|
||||
|
||||
else # macOS
|
||||
#
|
||||
# -----------------------------------------
|
||||
# This is for the macOS source tree install
|
||||
# -----------------------------------------
|
||||
#
|
||||
# The macOS setup sets things up two different
|
||||
# ways, depending on whether an explicit
|
||||
# WANT_SOURCE_INSTALL=1 was given, or not.
|
||||
ifdef WANT_SOURCE_INSTALL
|
||||
|
||||
HACKDIR ?=$(PREFIX)/playground
|
||||
CHOWN ?=/usr/bin/true
|
||||
CHGRP ?=/usr/bin/true
|
||||
|
||||
GAMEPERM ?= 0700
|
||||
VARFILEPERM ?= 0600
|
||||
VARDIRPERM ?= 0700
|
||||
else # WANT_SOURCE_INSTALL not expressed
|
||||
PREFIX:=$(wildcard ~)
|
||||
SHELLDIR ?=$(PREFIX)/bin
|
||||
HACKDIR ?=$(PREFIX)/nethackdir
|
||||
CHOWN ?=/usr/bin/true
|
||||
CHGRP ?=/usr/bin/true
|
||||
GAMEPERM ?= 0700
|
||||
VARFILEPERM ?= 0600
|
||||
VARDIRPERM ?= 0700
|
||||
|
||||
endif # WANT_SOURCE_INSTALL
|
||||
|
||||
INSTDIR ?=$(HACKDIR)
|
||||
VARDIR ?=$(HACKDIR)
|
||||
|
||||
endif # macOS
|
||||
endif # not WANT_SHARED_INSTALL
|
||||
|
||||
ifneq "$(SOURCEINSTALL)" "1"
|
||||
ifdef WANT_SHARED_INSTALL
|
||||
ifeq "$(WHICH_OS)" "Linux"
|
||||
# -----------------------------------------
|
||||
# This is for the Linux system-wide install
|
||||
# -----------------------------------------
|
||||
|
||||
PREFIX ?=$(wildcard ~)/nh/install
|
||||
HACKDIR ?=$(PREFIX)/games/lib/nethackdir
|
||||
SHELLDIR ?= $(PREFIX)/games
|
||||
INSTDIR ?=$(HACKDIR)
|
||||
VARDIR ?=$(HACKDIR)
|
||||
MANDIR ?=/usr/share/man/man6
|
||||
|
||||
VARDIRPERM ?= 0755
|
||||
VARFILEPERM ?= 0600
|
||||
GAMEPERM ?= 0755
|
||||
|
||||
# ----------------------------------
|
||||
# End of Linux system-wide install
|
||||
# ----------------------------------
|
||||
|
||||
else # macOS
|
||||
# ------------------------------------------------
|
||||
# This is for the macOS system-wide shared install
|
||||
# ------------------------------------------------
|
||||
|
||||
# if $GAMEUID is root, we install into roughly
|
||||
# proper Mac locations, otherwise we install
|
||||
# into ~/nethackdir
|
||||
|
||||
ifeq ($(GAMEUID),root)
|
||||
PREFIX:=/Library/NetHack
|
||||
SHELLDIR ?=/usr/local/bin
|
||||
HACKDIR ?=$(PREFIX)/nethackdir
|
||||
MANDIR ?=/usr/local/share/man/man6
|
||||
CHOWN ?=chown
|
||||
CHGRP ?=chgrp
|
||||
# We run sgid so the game has access to both HACKDIR
|
||||
# and user preferences
|
||||
GAMEPERM ?=02755
|
||||
|
||||
else # ! root
|
||||
PREFIX:=/Users/$(GAMEUID)
|
||||
SHELLDIR ?=$(PREFIX)/bin
|
||||
HACKDIR ?=$(PREFIX)/Library/NetHack/nethackdir
|
||||
CHOWN ?=/usr/bin/true
|
||||
CHGRP ?=/usr/bin/true
|
||||
GAMEPERM ?= 0500
|
||||
endif # ! root
|
||||
|
||||
INSTDIR ?=$(HACKDIR)
|
||||
VARDIR ?=$(HACKDIR)
|
||||
|
||||
VARFILEPERM ?= 0664
|
||||
VARDIRPERM ?= 0775
|
||||
|
||||
# ---------------------------------------
|
||||
# End of macOS system-wide shared install
|
||||
# --------------------------------------
|
||||
endif # WHICH_OS?
|
||||
endif # WANT_SHARED_INSTALL
|
||||
endif # SOURCEINSTALL != 1
|
||||
|
||||
#end of dirs-perms.500
|
||||
#--------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# NetHack 3.7 gbdates-post.370 $NHDT-Date: 1599687610 2020/09/09 21:40:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $
|
||||
# NetHack 5.0 gbdates-post.500 $NHDT-Date: 1599687610 2020/09/09 21:40:10 $ $NHDT-Branch: NetHack-5.0 $:$NHDT-Revision: 1.11 $
|
||||
ifdef MAKEFILE_DOC
|
||||
ifdef GB_DATESTAMP
|
||||
Guidebook.dated.mn: $(GUIDEBOOK_MN_SRC)
|
||||
@@ -1,4 +1,4 @@
|
||||
# NetHack 3.7 gbdates-pre.370 $NHDT-Date: 1599687610 2020/09/09 21:40:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $
|
||||
# NetHack 5.0 gbdates-pre.500 $NHDT-Date: 1599687610 2020/09/09 21:40:10 $ $NHDT-Branch: NetHack-5.0 $:$NHDT-Revision: 1.11 $
|
||||
|
||||
ifdef MAKEFILE_DOC
|
||||
ifneq "$(GIT)" "0"
|
||||
@@ -0,0 +1,25 @@
|
||||
# ----- linuxdistro.500 --------
|
||||
|
||||
LINUX_DISTRO=
|
||||
OS_ID := $(shell grep -E '^ID=' /etc/os-release 2>/dev/null | cut -d= -f2)
|
||||
#$(info OS_ID=$(OS_ID))
|
||||
|
||||
ifeq ($(OS_ID),alpine)
|
||||
LINUX_DISTRO=alpine
|
||||
USE_SYSTEM_LUA=1
|
||||
CURSPKG = ncurses
|
||||
endif
|
||||
ifeq ($(OS_ID),debian)
|
||||
LINUX_DISTRO=debian
|
||||
USE_SYSTEM_LUA=1
|
||||
endif
|
||||
ifeq ($(OS_ID),ubuntu)
|
||||
LINUX_DISTRO=ubuntu
|
||||
USE_SYSTEM_LUA=1
|
||||
endif
|
||||
ifeq ($(OS_ID),fedora)
|
||||
LINUX_DISTRO=fedora
|
||||
USE_SYSTEM_LUA=1
|
||||
endif
|
||||
#$(info LINUX_DIST=$(LINUX_DISTRO))
|
||||
# ----- end of linuxdistro.500 --------
|
||||
@@ -1,11 +1,11 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# NetHack 3.7 misc.370 $NHDT-Date: 1668359836 2022/11/13 17:17:16 $ $NHDT-Branch: NetHack-3.7 $
|
||||
# NetHack 5.0 misc.500 $NHDT-Date: 1668359836 2022/11/13 17:17:16 $ $NHDT-Branch: NetHack-5.0 $
|
||||
#
|
||||
# Further set-up for miscellaneous odds and ends (after compiler.370)
|
||||
# Further set-up for miscellaneous odds and ends (after compiler.500)
|
||||
#
|
||||
# Included from:
|
||||
# hints/linux.370
|
||||
# hints/macOS.370
|
||||
# hints/linux.500
|
||||
# hints/macOS.500
|
||||
#
|
||||
|
||||
# This ensures that .moc files are compatible with the version of Qt chosen.
|
||||
@@ -21,7 +21,7 @@ ifdef WANT_WIN_QT6
|
||||
# Qt 6 builds and runs (with a couple of warnings) but needs more testing
|
||||
QTn_H = Qt6.h-t
|
||||
else
|
||||
# Qt 5 is currently the default version for nethack 3.7.x's Qt interface
|
||||
# Qt 5 is currently the default version for nethack NetHack 5.0.x's Qt interface
|
||||
QTn_H = Qt5.h-t
|
||||
endif
|
||||
$(QTn_H) ::
|
||||
@@ -105,6 +105,6 @@ endif # end groff less than 1.23
|
||||
endif # end groff-specific
|
||||
endif # not USE_MANDOC
|
||||
|
||||
#end of hints/include/misc.370
|
||||
#end of hints/include/misc.500
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# NetHack 3.7 multisnd-post.370 $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-3.7 $
|
||||
# NetHack 5.0 multisnd-post.500 $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-5.0 $
|
||||
|
||||
ifeq "$(HAVE_SNDLIB)" "1"
|
||||
# note: one possible value for $(SNDLIBSRC) is 'macsound.m' which is written
|
||||
@@ -21,6 +21,6 @@ $(WAVDIR)/%.wav: ../util/uudecode $(WAVDIR)/%.uu
|
||||
endif # NEEDS_WAV
|
||||
endif # HAVE_SNDLIB
|
||||
|
||||
# end of multisnd-post.370
|
||||
# end of multisnd-post.500
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# NetHack 3.7 multisnd1-pre.370 $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-3.7 $
|
||||
# NetHack 5.0 multisnd1-pre.500 $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-5.0 $
|
||||
#
|
||||
# If it's cross-platform it belongs in this file.
|
||||
# If it's macOS-only, it belongs in macOS.370.
|
||||
# If it's linux-only, it belongs in linux.370.
|
||||
# If it's macOS-only, it belongs in macOS.500.
|
||||
# If it's linux-only, it belongs in linux.500.
|
||||
#
|
||||
|
||||
#ifdef WANT_TESTSOUND
|
||||
@@ -26,8 +26,8 @@ endif # HAVE_SNDLIB
|
||||
# HAVE_SNDLIB or NEEDS_SND_USERSOUNDS or NEEDS_SND_SEAUTOMAP
|
||||
# would have to be set prior to this. Any of them could have
|
||||
# been set just above, or they could have been set in
|
||||
# multiw-2 for Qt, or they could have been set in macOS.370
|
||||
# or linux.370 for something platform-specific.
|
||||
# multiw-2 for Qt, or they could have been set in macOS.500
|
||||
# or linux.500 for something platform-specific.
|
||||
# Regardless, if one of those is set, the related preprocessor
|
||||
# defines need to be added to SNDCFLAGS here.
|
||||
#
|
||||
@@ -1,5 +1,5 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# NetHack 3.7 multisnd2-pre.370 $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-3.7 $
|
||||
# NetHack 5.0 multisnd2-pre.500 $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-5.0 $
|
||||
#
|
||||
|
||||
ifdef NEEDS_WAV
|
||||
@@ -27,6 +27,6 @@ SNDWAVS = se_squeak_A se_squeak_B se_squeak_B_flat se_squeak_C se_squeak_D \
|
||||
WAVS = $(addprefix $(WAVDIR)/, $(addsuffix .wav, $(SNDWAVS)))
|
||||
endif # NEEDS_WAV
|
||||
|
||||
# end of multisnd2-pre.370
|
||||
# end of multisnd2-pre.500
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# NetHack 3.7 multiw-1.370 $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-3.7 $
|
||||
# NetHack 5.0 multiw-1.500 $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-5.0 $
|
||||
|
||||
# 1. Which windowing interface(s) should be included in this binary?
|
||||
# One or more of these can be manually uncommented and/or can be specified
|
||||
@@ -19,5 +19,9 @@
|
||||
#WANT_DEFAULT=Qt
|
||||
#WANT_DEFAULT=X11
|
||||
|
||||
#end of multiw-1.370
|
||||
# Based on the NetHack version 5.0.0
|
||||
# Used to build some filenames subsequently in other include files
|
||||
NHV=500
|
||||
|
||||
#end of multiw-1.500
|
||||
#------------------------------------------------------------------------------
|
||||
@@ -1,11 +1,11 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# NetHack 3.7 multiw-2.370 $NHDT-Date: 1599337709 2020/09/05 20:28:29 $ $NHDT-Branch: NetHack-3.7 $
|
||||
# NetHack 5.0 multiw-2.500 $NHDT-Date: 1599337709 2020/09/05 20:28:29 $ $NHDT-Branch: NetHack-5.0 $
|
||||
#
|
||||
# Sorts out support for multiple window ports (interfaces) to included in the build.
|
||||
#
|
||||
# Included from:
|
||||
# hints/linux.370
|
||||
# hints/macOS.370
|
||||
# hints/linux.500
|
||||
# hints/macOS.500
|
||||
#
|
||||
# The following will be set appropriately following this:
|
||||
# - WANT_WIN_XXX (at least one will be set; default is TTY)
|
||||
@@ -79,8 +79,6 @@ WINCFLAGS=
|
||||
WINSRC =
|
||||
WINOBJ0 =
|
||||
SND_CFLAGS=
|
||||
XTRASRC =
|
||||
XTRAOBJ =
|
||||
|
||||
ifdef WANT_WIN_TTY
|
||||
WINSRC += $(WINTTYSRC)
|
||||
@@ -104,8 +102,7 @@ ifdef WANT_WIN_X11
|
||||
WINCFLAGS += -DX11_GRAPHICS
|
||||
WINSRC += $(WIINX11SRC)
|
||||
WINOBJ0 += $(WINX11OBJ)
|
||||
XTRASRC += tile.c
|
||||
XTRAOBJ += $(TARGETPFX)tile.o
|
||||
GENTILECFILE = $(SRCDIR)/tile.c
|
||||
endif
|
||||
|
||||
ifndef WANT_WIN_QT
|
||||
@@ -156,8 +153,7 @@ endif #! WANT_WIN_QT4
|
||||
HAVE_SNDLIB = 1
|
||||
NEEDS_SND_USERSOUNDS = 1
|
||||
NEEDS_SND_SEAUTOMAP = 1
|
||||
XTRASRC += tile.c
|
||||
XTRAOBJ += $(TARGETPFX)tile.o
|
||||
GENTILECFILE = $(SRCDIR)/tile.c
|
||||
#
|
||||
ifndef CPLUSPLUS_NEEDED
|
||||
CPLUSPLUS_NEEDED = 1
|
||||
@@ -213,6 +209,6 @@ ifeq "$(NOCRASHREPORT)" "1"
|
||||
WINCFLAGS += -DNOCRASHREPORT
|
||||
endif
|
||||
|
||||
#end of hints/include/multiw-2.370
|
||||
#end of hints/include/multiw-2.500
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# NetHack 3.7 response.370 $NHDT-Date: 1668359835 2022/11/13 17:17:15 $ $NHDT-Branch: NetHack-3.7 $
|
||||
# NetHack 5.0 response.500 $NHDT-Date: 1668359835 2022/11/13 17:17:15 $ $NHDT-Branch: NetHack-5.0 $
|
||||
|
||||
ifeq "$(RESP)" "1"
|
||||
USE_RESPONSEFILE=1
|
||||
@@ -15,7 +15,6 @@ USE_RESPONSEFILE=1
|
||||
endif
|
||||
|
||||
ifeq "$(USE_RESPONSEFILE)" "1"
|
||||
RESPONSEFILES=create_responsefiles
|
||||
CXXFLAGS = $(CCXXFLAGS) -I. -I$(QTDIR)/include $(QTCXXFLAGS)
|
||||
CC_COMPILER_SWITCHES := $(subst \,\\,$(CFLAGS))
|
||||
CC_COMPILER_SWITCHES := $(subst ",\",$(CC_COMPILER_SWITCHES))
|
||||
@@ -23,11 +22,12 @@ CXX_COMPILER_SWITCHES := $(subst \,\\,$(CXXFLAGS))
|
||||
CXX_COMPILER_SWITCHES := $(subst ",\",$(CXX_COMPILER_SWITCHES))
|
||||
CC_RESPONSEFILE=../src/nethack_cc.rsp
|
||||
CXX_RESPONSEFILE=../src/nethack_cxx.rsp
|
||||
RESPONSEFILES=$(CC_RESPONSEFILE) $(CXX_RESPONSEFILE)
|
||||
CFLAGS=@$(CC_RESPONSEFILE)
|
||||
CXXFLAGS=@$(CXX_RESPONSEFILE)
|
||||
CLEAN_CC_RESPONSEFILE=rm -f $(CC_RESPONSEFILE);
|
||||
CLEAN_CXX_RESPONSEFILE=rm -f $(CXX_RESPONSEFILE);
|
||||
endif
|
||||
|
||||
#end of response.370
|
||||
#end of response.500
|
||||
#------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,23 @@
|
||||
#=================================================================
|
||||
# NetHack 5.0 include/whichbsd.500 $NHDT-Date: 1778861905 2026/05/15 16:18:25 $ $NHDT-Branch: NetHack-5.0 $
|
||||
#
|
||||
#
|
||||
.ifdef WHICHBSD
|
||||
.undef WHICHBSD
|
||||
.endif
|
||||
|
||||
OS!=uname -s
|
||||
|
||||
.if ${OS} == "FreeBSD"
|
||||
WHICHBSD=FREEBSD
|
||||
.elif ${OS} == "OpenBSD"
|
||||
WHICHBSD=OPENBSD
|
||||
.elif ${OS} == "NetBSD"
|
||||
WHICHBSD=NETBSD
|
||||
.else
|
||||
WHICHBSD=OTHERBSD
|
||||
.endif
|
||||
|
||||
# End of whichbsd.500 -PRE section
|
||||
#=================================================================
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# NetHack 3.7 linux $NHDT-Date: 1596498416 2020/08/03 23:46:56 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
|
||||
# NetHack 5.0 linux $NHDT-Date: 1596498416 2020/08/03 23:46:56 $ $NHDT-Branch: NetHack-5.0 $:$NHDT-Revision: 1.2 $
|
||||
# Copyright (c) Patric Mueller
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# NetHack 3.7 linux.370 $NHDT-Date: 1693519390 2023/08/31 22:03:10 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.61 $
|
||||
# NetHack 5.0 linux.500 $NHDT-Date: 1693519390 2023/08/31 22:03:10 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.61 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
@@ -12,29 +12,41 @@
|
||||
# And let us know about it.
|
||||
#
|
||||
|
||||
#-PRE
|
||||
# linux.370 hints file provides a single-user build for Linux (such
|
||||
# as Ubuntu focal).
|
||||
#-PRE xxxx
|
||||
|
||||
# note: '#-INCLUDE' is not just a comment
|
||||
# multiw-1.370 contains sections 1 to 2
|
||||
#-INCLUDE multiw-1.370
|
||||
|
||||
HINTSVERSION := 370
|
||||
WHICH_OS=Linux
|
||||
HINTSVERSION := 500
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
LUA_VERSION=5.4.8
|
||||
ifeq ($(MAKELEVEL),0)
|
||||
PRECHECK+=checkmakefiles
|
||||
# all files included from this hints file get listed
|
||||
# in HINTSINCLNAMES (without suffix and without a path)
|
||||
HINTSINCLNAMES := compiler cross-pre1 cross-pre2 cross-post \
|
||||
HINTSINCLNAMES := dirs-perms \
|
||||
compiler cross-pre1 cross-pre2 cross-post \
|
||||
gbdates-pre gbdates-post \
|
||||
linuxdistro \
|
||||
multiw-1 multiw-2 misc \
|
||||
multisnd1-pre multisnd2-pre multisnd-post
|
||||
multisnd1-pre multisnd2-pre multisnd-post \
|
||||
response
|
||||
HINTSINCLFILES := $(addsuffix .$(HINTSVERSION), $(HINTSINCLNAMES))
|
||||
endif
|
||||
endif
|
||||
|
||||
# linux.500 hints file provides a single-user build for Linux (such
|
||||
# as Ubuntu focal).
|
||||
|
||||
# note: '#-INCLUDE' is not just a comment
|
||||
# multiw-1.500 contains sections 1 to 2
|
||||
#-INCLUDE multiw-1.500
|
||||
|
||||
# note: '#-INCLUDE' is not just a comment
|
||||
# it pulls in the contents of dirs-perms.500
|
||||
#-INCLUDE dirs-perms.500
|
||||
|
||||
#-INCLUDE linuxdistro.500
|
||||
|
||||
ifndef LIBXPM
|
||||
LIBXPM= -L/opt/X11/lib -lXpm
|
||||
endif
|
||||
@@ -52,7 +64,7 @@ USE_NOSTATICFN = 1
|
||||
#USE_NONOSTATICFN = 1
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#-INCLUDE cross-pre1.370
|
||||
#-INCLUDE cross-pre1.500
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -60,12 +72,123 @@ USE_NOSTATICFN = 1
|
||||
# you're reading this in Makefile augmented by hints, that may not be true).
|
||||
#
|
||||
|
||||
#-INCLUDE multiw-2.370
|
||||
#-INCLUDE multiw-2.500
|
||||
|
||||
# compiler.370 contains compiler detection and adjustments common
|
||||
#QT6 prior to compiler include
|
||||
ifdef WANT_WIN_QT6
|
||||
CPLUSPLUS_NEED20=1
|
||||
ADDITIONAL_NO_WARN_GPPCCX=-Wno-sfinae-incomplete
|
||||
ADDITIONAL_NO_WARN_CLANGCCX=-Wno-c++26-extensions
|
||||
endif # WANT_WIN_QT6
|
||||
|
||||
# compiler.500 contains compiler detection and adjustments common
|
||||
# to both linux and macOS
|
||||
|
||||
#-INCLUDE compiler.370
|
||||
#-INCLUDE compiler.500
|
||||
|
||||
ifdef WANT_SYSTEM_LUA
|
||||
ifndef LUA_VERSION
|
||||
LUA_VERSION := 5.4.8
|
||||
endif
|
||||
LUASUBDELIM := $(subst ., ,$(LUA_VERSION))
|
||||
LUASHVER := $(word 1, $(LUASUBDELIM)).$(word 2, $(LUASUBDELIM))
|
||||
|
||||
ifeq ($(LINUX_DISTRO),alpine)
|
||||
# prereq: doas apk add lua5.4-dev
|
||||
# doas apk add linux-headers
|
||||
# doas apk add musl-dev
|
||||
USE_SYSTEM_LUA=1
|
||||
SHELLPKG :=pkg-config
|
||||
LUAPKGNAME = lua-$(LUASHVER)
|
||||
CURSPKG = ncurses
|
||||
#
|
||||
else ifeq ($(LINUX_DISTRO),debian)
|
||||
# prereq: sudo apt install lua5.4 liblua5.4-dev
|
||||
USE_SYSTEM_LUA=1
|
||||
SHELLPKG :=pkg-config
|
||||
LUAPKGNAME = lua-$(LUASHVER)
|
||||
#
|
||||
else ifeq ($(LINUX_DISTRO),ubuntu)
|
||||
# prereq: sudo apt install lua5.4 liblua5.4-dev
|
||||
USE_SYSTEM_LUA=1
|
||||
SHELLPKG :=dpkg
|
||||
LUAPKGNAME = lua$(LUASHVER)
|
||||
#
|
||||
else ifeq ($(LINUX_DISTRO),fedora)
|
||||
# prereq: sudo dnf install lua lua-devel
|
||||
USE_SYSTEM_LUA=1
|
||||
SHELLPKG :=rpm
|
||||
LUAPKGNAME = lua-devel
|
||||
#
|
||||
else
|
||||
USE_SYSTEM_LUA=0
|
||||
SHELLPKG :=
|
||||
endif # LINUX_DISTRO
|
||||
|
||||
ifeq ($(USE_SYSTEM_LUA),1)
|
||||
ifneq "$(SHELLPKG)" ""
|
||||
#
|
||||
# Two requirements must now pass:
|
||||
# 1. We need to be able to check if Lua package
|
||||
# is installed. We do that here.
|
||||
# 2. The lua.h header file needs to be present
|
||||
# where expected. We set LUATESTTARGET here,
|
||||
# but the check is done later on in the top
|
||||
# Makefile.
|
||||
#
|
||||
# Try to confirm package presence
|
||||
ifeq ($(SHELLPKG),pkg-config)
|
||||
PKG_EXISTS := $(shell pkg-config --exists $(LUAPKGNAME) \
|
||||
&& echo yes || echo no)
|
||||
#
|
||||
else ifeq ($(SHELLPKG),dpkg)
|
||||
PKG_EXISTS := $(shell dpkg -s $(LUAPKGNAME) > /dev/null 2>&1 \
|
||||
&& echo yes || echo no)
|
||||
#
|
||||
else ifeq ($(SHELLPKG),rpm)
|
||||
PKG_EXISTS := $(shell rpm -q $(LUAPKGNAME) > /dev/null 2>&1 \
|
||||
&& echo yes || echo no)
|
||||
#
|
||||
else
|
||||
PKG_EXISTS=no
|
||||
$(info Existance of package $(LUAPKGNAME) could not be verified)
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_EXISTS),yes)
|
||||
$(info Existance of package $(LUAPKGNAME) verified)
|
||||
#
|
||||
ifeq ($(LINUX_DISTRO),fedora)
|
||||
LUACFLAGS := $(shell pkg-config --cflags lua-$(LUASHVER))
|
||||
LUALIBS := $(shell pkg-config --libs lua-$(LUASHVER))
|
||||
LUAHEADERS := /usr/include/lua$(LUASHVER)
|
||||
LUATESTTARGET := $(LUAHEADERS)/lua.h
|
||||
#
|
||||
else ifeq ($(LINUX_DISTRO),ubuntu)
|
||||
LUACFLAGS := -I/usr/include/lua$(LUASHVER)
|
||||
LUALIBS := -llua$(LUASHVER) -lm -ldl
|
||||
LUAHEADERS := /usr/include/lua$(LUASHVER)
|
||||
LUATESTTARGET := $(LUAHEADERS)/lua.h
|
||||
#
|
||||
else ifeq ($(SHELLPKG),pkg-config)
|
||||
LUACFLAGS := $(shell pkg-config --cflags lua-$(LUASHVER))
|
||||
LUALIBS := $(shell pkg-config --libs lua-$(LUASHVER))
|
||||
LUAHEADERS := /usr/include/lua$(LUASHVER)
|
||||
LUATESTTARGET := $(LUAHEADERS)/lua.h
|
||||
endif
|
||||
#
|
||||
LUAHPREFIX=
|
||||
#LUATOP=
|
||||
#LUAMAKEFLAGS=
|
||||
#LUA2NHTOP=
|
||||
#LUABASELIB=
|
||||
LUATOPLIB=
|
||||
LUALIBBUILT=
|
||||
LUALIB=
|
||||
CFLAGS += $(LUACFLAGS)
|
||||
endif # PKG_EXISTS?
|
||||
endif # SHELLPKG has a value
|
||||
endif # USE_SYSTEM_LUA
|
||||
endif # WANT_SYSTEM_LUA
|
||||
|
||||
ifdef WANT_WIN_QT
|
||||
ifdef WANT_WIN_QT5
|
||||
@@ -80,10 +203,10 @@ endif # g++ greater than or equal to 14
|
||||
endif # WANT_WIN_QT6
|
||||
endif # WANT_WIN_QT
|
||||
|
||||
# misc.370 must come after compiler.370
|
||||
# misc.500 must come after compiler.500
|
||||
# and after QTDIR is defined.
|
||||
#
|
||||
#-INCLUDE misc.370
|
||||
#-INCLUDE misc.500
|
||||
|
||||
ifeq "$(USE_ASAN)" "1"
|
||||
CFLAGS+=-fsanitize=address
|
||||
@@ -96,6 +219,7 @@ LFLAGS+=-fsanitize=undefined
|
||||
endif
|
||||
|
||||
ifeq "$(USE_CURSESLIB)" "1"
|
||||
CURSPKG ?= ncursesw
|
||||
# default
|
||||
CURSESLIB = -lncurses -ltinfo
|
||||
# If CURSES_UNICODE is defined, we need ncursesw.
|
||||
@@ -103,8 +227,8 @@ CURSESLIB = -lncurses -ltinfo
|
||||
# CURSESLIB = -lncurses -ltinfo
|
||||
ifdef MAKEFILE_SRC
|
||||
comma:=,
|
||||
NCURSES_LFLAGS = $(shell pkg-config ncursesw --libs)
|
||||
NCURSES_CFLAGS = $(shell pkg-config ncursesw --cflags)
|
||||
NCURSES_LFLAGS = $(shell pkg-config $(CURSPKG) --libs)
|
||||
NCURSES_CFLAGS = $(shell pkg-config $(CURSPKG) --cflags)
|
||||
ifeq (,$(findstring ncursesw, $(NCURSES_LFLAGS)))
|
||||
ifeq (,$(findstring ncurses, $(NCURSES_LFLAGS)))
|
||||
#this indicates that pkg-config itself was unavailable
|
||||
@@ -177,7 +301,7 @@ NHCFLAGS+=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
|
||||
#NHCFLAGS+=-DLIVELOG
|
||||
#NHCFLAGS+=-DCHANGE_COLOR
|
||||
NHCFLAGS+=-DSELF_RECOVER
|
||||
ifdef WANT_WIN_CURSES
|
||||
ifeq "$(USE_CURSESLIB)" "1"
|
||||
NHCFLAGS+=$(NCURSES_CFLAGS)
|
||||
ifeq "$(HAVE_NCURSESW)" "1"
|
||||
NHCFLAGS+=-DCURSES_UNICODE
|
||||
@@ -186,10 +310,10 @@ ifdef MAKEFILE_SRC
|
||||
$(info Attention: CURSES_UNICODE is not being defined without ncursesw)
|
||||
endif #MAKEFILE_SRC
|
||||
endif #HAVE_NCURSESW
|
||||
endif #WANT_WIN_CURSES
|
||||
endif #USE_CURSESLIB
|
||||
|
||||
#
|
||||
#-INCLUDE multisnd1-pre.370
|
||||
#-INCLUDE multisnd1-pre.500
|
||||
#
|
||||
|
||||
ifeq "$(CCISCLANG)" "1"
|
||||
@@ -197,19 +321,22 @@ ifeq "$(CCISCLANG)" "1"
|
||||
# clang-specific ends
|
||||
else
|
||||
# gcc-specific starts
|
||||
ifndef MUSL
|
||||
# __sighandler_t does not exist in musl
|
||||
LIBCFLAGS+=-DSIG_RET_TYPE=__sighandler_t
|
||||
endif
|
||||
# gcc-specific ends
|
||||
endif
|
||||
|
||||
# WINCFLAGS set from multiw-2.370
|
||||
# SNDCFLAGS set from multisnd-pre.370
|
||||
# WINCFLAGS set from multiw-2.500
|
||||
# SNDCFLAGS set from multisnd-pre.500
|
||||
CFLAGS+= $(WINCFLAGS)
|
||||
CFLAGS+= $(SNDCFLAGS)
|
||||
CFLAGS+= $(NHCFLAGS)
|
||||
CFLAGS+= $(LIBCFLAGS)
|
||||
|
||||
# WINCFLAGS set from multiw-2.370
|
||||
# SNDCFLAGS set from multisnd-pre.370
|
||||
# WINCFLAGS set from multiw-2.500
|
||||
# SNDCFLAGS set from multisnd-pre.500
|
||||
CCXXFLAGS+= $(WINCFLAGS)
|
||||
CCXXFLAGS+= $(SNDCFLAGS)
|
||||
CCXXFLAGS+= $(NHCFLAGS)
|
||||
@@ -227,90 +354,106 @@ ifdef MAKEFILE_SRC
|
||||
ifdef CURSESLIB
|
||||
WINLIB += $(CURSESLIB)
|
||||
endif #CURSESLIB
|
||||
endif #MAKEFILE_SRC
|
||||
|
||||
ifneq "$(NO_NHUUID)" "1"
|
||||
UUID_LIB_CHECK := $(shell echo `/sbin/ldconfig -p | grep libuuid`)
|
||||
#$(info UUID_LIB_CHECK=$(UUID_LIB_CHECK))
|
||||
ifneq "$(UUID_LIB_CHECK)" ""
|
||||
UUID_LIB=1
|
||||
else
|
||||
UUID_LIB=0
|
||||
endif
|
||||
#$(info UUID_LIB=$(UUID_LIB))
|
||||
#
|
||||
# check for uuid development headers
|
||||
UUID_HEADERS_CHECK := $(wildcard /usr/include/uuid/uuid.h)
|
||||
#$(info UUID_HEADERS_CHECK=$(UUID_HEADERS_CHECK))
|
||||
ifneq "$(UUID_HEADERS_CHECK)" ""
|
||||
UUID_HEADERS = 1
|
||||
else
|
||||
UUID_HEADERS = 0
|
||||
endif
|
||||
#$(info UUID_HEADERS=$(UUID_HEADERS))
|
||||
|
||||
ifeq "$(UUID_LIB)" "1"
|
||||
ifeq "$(UUID_HEADERS)" "1"
|
||||
ifndef WANT_NHUUID
|
||||
WANT_NHUUID=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else # NO_NHUUID
|
||||
WANT_NHUUID=0
|
||||
endif # NO_NHUUID
|
||||
|
||||
ifeq "$(WANT_NHUUID)" "1"
|
||||
#$(info NHUUID support will be included)
|
||||
CFLAGS+= -DNHUUID
|
||||
LIBS+=-luuid
|
||||
else # WANT_NHUUID
|
||||
$(info Attention - No NHUUID support will be included)
|
||||
endif # WANT_NHUUID
|
||||
endif # MAKEFILE_SRC
|
||||
|
||||
ifdef WANT_WIN_X11
|
||||
USE_XPM=1
|
||||
USE_XFT=1
|
||||
USE_PNG=1
|
||||
WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
|
||||
VARDATND0 += x11tiles NetHack.ad pet_mark.xbm pilemark.xbm
|
||||
ifndef CROSSCOMPILE
|
||||
GENTILEOFILE = $(SRCDIR)/tile.o
|
||||
endif
|
||||
# -x: if built without dlb, some versions of mkfontdir think *.lev are fonts
|
||||
POSTINSTALL += bdftopcf win/X11/nh10.bdf > $(HACKDIR)/nh10.pcf; ( cd $(HACKDIR); mkfontdir -x .lev );
|
||||
# separate from CFLAGS so that we don't pass it to every file
|
||||
X11CFLAGS = -I/opt/X11/include
|
||||
# avoid repeated complaints about _X_NONNULL(args...) in <X11/Xfuncproto.h>
|
||||
X11CFLAGS += -Wno-variadic-macros
|
||||
ifdef USE_XFT
|
||||
CFLAGS += -DUSE_XFT
|
||||
X11CFLAGS += $(shell pkg-config --cflags xft fontconfig)
|
||||
WINX11LIB += $(shell pkg-config --libs xft fontconfig)
|
||||
endif
|
||||
ifdef USE_XPM
|
||||
CFLAGS += -DUSE_XPM
|
||||
WINX11LIB += -lXpm
|
||||
VARDATND0 += rip.xpm
|
||||
endif
|
||||
ifdef USE_PNG
|
||||
CFLAGS += -DUSE_PNG
|
||||
WINX11LIB += -lpng
|
||||
endif
|
||||
WINLIB += $(WINX11LIB)
|
||||
LFLAGS+=-L/opt/X11/lib
|
||||
endif # WANT_WIN_X11
|
||||
|
||||
ifdef WANT_WIN_QT
|
||||
LINK = $(CXX)
|
||||
ifndef CROSSCOMPILE
|
||||
GENTILEOFILE = $(SRCDIR)/tile.o
|
||||
endif
|
||||
# QT4
|
||||
ifdef WANT_WIN_QT4
|
||||
QTCXXFLAGS += $(sort $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config QtGui --cflags)) -DQT_NO_SOUND=1
|
||||
WINLIB += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config QtGui --libs)
|
||||
endif # WANT_WIN_QT4
|
||||
#QT5
|
||||
ifdef WANT_WIN_QT5
|
||||
QTCXXFLAGS += $(sort $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --cflags))
|
||||
WINLIB += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --libs)
|
||||
endif # WANT_WIN_QT5
|
||||
#QT6
|
||||
ifdef WANT_WIN_QT6
|
||||
ifdef QT6MANUAL
|
||||
# Try some likely spots for a self-built Qt6.
|
||||
# You'll have to change these manually before using the hints file
|
||||
# if they don't match the installed location on your system.
|
||||
ifneq "$(HOSTTYPE)" ""
|
||||
QTHOST=$(HOSTTYPE)
|
||||
else
|
||||
QTHOST=x86_64
|
||||
endif
|
||||
QTTOP=/usr/include/$(HOSTTYPE)-linux-gnu/qt6
|
||||
ifneq ($(wildcard $(QTTOP)/*),)
|
||||
#we don't set QTLOCATED=1 for this
|
||||
QTINCDIR=/usr/include/$(QTHOST)-linux-gnu/qt6
|
||||
QTLIBDIR=/usr/lib/$(QTHOST)-linux.gnu
|
||||
QTCXXFLAGS += -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB
|
||||
QTCXXFLAGS += -I$(QTINCDIR)/QtWidgets -I$(QTINCDIR) -I$(QTINCDIR)/QtMultimedia
|
||||
QTCXXFLAGS += -I$(QTINCDIR)/QtNetwork -I$(QTINCDIR)/QtGui -I$(QTINCDIR)/QtCore
|
||||
WINLIB += -L$(QTLIBDIR) -lQt6Widgets -lQt6Multimedia -lQt6Network -lQt6Gui -lQt6Core
|
||||
MOCPATH = /usr/lib/qt6/libexec/moc
|
||||
#/usr/lib/x86_64-linux-gnu/libQt6EglFSDeviceIntegration.so
|
||||
endif # QTTOP/*
|
||||
ifndef QTINCDIR
|
||||
ifneq ($(wildcard /usr/local/Qt6/*),)
|
||||
QTDIR=/usr/local/Qt6
|
||||
QTLOCATED=1
|
||||
endif # wildcard /usr/local/Qt6
|
||||
ifneq ($(wildcard /usr/local/qt6/*),)
|
||||
QTDIR=/usr/local/qt6
|
||||
QTLOCATED=1
|
||||
endif # wildcard /usr/local/qt6
|
||||
endif # !QTINCDIR
|
||||
ifdef QTLOCATED
|
||||
QTCXXFLAGS += -I$(QTDIR)/include/QtCore
|
||||
QTCXXFLAGS += -I$(QTDIR)/include/QtGui
|
||||
QTCXXFLAGS += -I$(QTDIR)/include/QtMultimedia
|
||||
QTCXXFLAGS += -I$(QTDIR)/include/QtWidgets
|
||||
MOCPATH = $(QTDIR)/libexec/moc
|
||||
WINLIB += -L$(QTDIR)/lib -lQt6Widgets -lQt6Multimedia -lQt6Network -lQt6Gui -lQt6Core
|
||||
endif # QTLOCATED
|
||||
else # !QT6MANUAL
|
||||
MOCDIR = $(shell pkg-config Qt6Gui --variable=libexecdir)
|
||||
ifneq ($(wildcard $(MOCDIR)/*),)
|
||||
MOCPATH = $(MOCDIR)/moc
|
||||
else
|
||||
MOCPATH = /usr/lib/qt6/libexec/moc
|
||||
endif # MOCDIR
|
||||
QTCXXFLAGS += $(sort $(shell pkg-config Qt6Gui Qt6Widgets Qt6Multimedia --cflags))
|
||||
WINLIB += $(shell pkg-config Qt6Gui Qt6Widgets Qt6Multimedia --libs)
|
||||
endif # QT6MANUAL
|
||||
QTCXXFLAGS += $(shell pkg-config --cflags Qt6Multimedia)
|
||||
WINLIB += $(shell pkg-config --libs Qt6Core Qt6Gui Qt6Widgets Qt6Multimedia)
|
||||
MOCPATH = $(shell pkg-config --variable=libexecdir Qt6Core)/moc
|
||||
endif # WANT_WIN_QT6
|
||||
|
||||
ifndef QTDIR
|
||||
ifndef WANT_WIN_QT6
|
||||
$(error QTDIR not defined in the environment or Makefile)
|
||||
endif # not WANT_WIN_QT6
|
||||
endif # QTDIR
|
||||
# XXX if /Developer/qt exists and QTDIR not set, use that
|
||||
# XXX make sure QTDIR points to something reasonable
|
||||
@@ -323,7 +466,7 @@ LINK = $(CC)
|
||||
endif # !WANT_WIN_QT
|
||||
|
||||
# prevent duplicate tile.o in WINOBJ
|
||||
WINOBJ = $(WINOBJ0) $(sort $(XTRAOBJ))
|
||||
WINOBJ = $(WINOBJ0)
|
||||
# prevent duplicates in VARDATND if both X11 and Qt are being supported
|
||||
VARDATND += $(sort $(VARDATND0))
|
||||
|
||||
@@ -369,27 +512,10 @@ SYSCONFENSURE = (if ! test -f $(INSTDIR)/sysconf ; then \
|
||||
chmod $(VARFILEPERM) $(INSTDIR)/sysconf; fi );
|
||||
|
||||
ifdef WANT_SOURCE_INSTALL
|
||||
PREFIX=$(abspath $(NHSROOT))
|
||||
#SHELLDIR=
|
||||
HACKDIR=$(PREFIX)/playground
|
||||
GAMEPERM = 0700
|
||||
VARFILEPERM = 0600
|
||||
VARDIRPERM = 0700
|
||||
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
|
||||
MOREALL=$(MAKE) install
|
||||
else #!WANT_SOURCE_INSTALL
|
||||
#PREFIX=/usr
|
||||
PREFIX=$(wildcard ~)/nh/install
|
||||
HACKDIR=$(PREFIX)/games/lib/nethackdir
|
||||
SHELLDIR = $(PREFIX)/games
|
||||
VARDIRPERM = 0755
|
||||
VARFILEPERM = 0600
|
||||
GAMEPERM = 0755
|
||||
endif #?WANT_SOURCE_INSTALL
|
||||
|
||||
INSTDIR=$(HACKDIR)
|
||||
VARDIR = $(HACKDIR)
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
TESTGDBPATH=/usr/bin/gdb
|
||||
POSTINSTALL+= test -f $(TESTGDBPATH) || \
|
||||
@@ -430,7 +556,7 @@ LFLAGS+=-rdynamic
|
||||
|
||||
# if TTY_TILES_ESCCODES
|
||||
#WINSRC += tile.c
|
||||
#WINOBJ += tile.o
|
||||
#GENTILEOFILE = $(SRCDIR)/tile.o
|
||||
# endif
|
||||
|
||||
CHOWN=true
|
||||
@@ -439,28 +565,28 @@ CHGRP=true
|
||||
# manpages directory
|
||||
MANDIR=/usr/share/man/man6
|
||||
#
|
||||
#-INCLUDE cross-pre2.370
|
||||
#-INCLUDE cross-pre2.500
|
||||
#
|
||||
|
||||
#
|
||||
#-INCLUDE gbdates-pre.370
|
||||
#-INCLUDE gbdates-pre.500
|
||||
#
|
||||
|
||||
#
|
||||
#-INCLUDE multisnd2-pre.370
|
||||
#-INCLUDE multisnd2-pre.500
|
||||
#
|
||||
|
||||
#
|
||||
#-INCLUDE response.370
|
||||
#-INCLUDE response.500
|
||||
#
|
||||
|
||||
#-POST
|
||||
|
||||
#
|
||||
#-INCLUDE gbdates-post.370
|
||||
#-INCLUDE gbdates-post.500
|
||||
#
|
||||
#
|
||||
#-INCLUDE multisnd-post.370
|
||||
#-INCLUDE multisnd-post.500
|
||||
#
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
@@ -484,6 +610,6 @@ $(TARGETPFX)libnhmain.o : ../sys/libnh/libnhmain.c $(HACK_H)
|
||||
endif # WANT_LIBNH
|
||||
|
||||
#
|
||||
#-INCLUDE cross-post.370
|
||||
#-INCLUDE cross-post.500
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# NetHack 3.7 macOS.370 $NHDT-Date: 1693359574 2023/08/30 01:39:34 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.138 $
|
||||
# NetHack 5.0 macOS.500 $NHDT-Date: 1693359574 2023/08/30 01:39:34 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.138 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
@@ -17,24 +17,32 @@
|
||||
# macOS hints file
|
||||
#
|
||||
|
||||
# note: '#-INCLUDE' is not just a comment; multiw-1 contains sections 1 to 2
|
||||
#-INCLUDE multiw-1.370
|
||||
|
||||
HINTSVERSION := 370
|
||||
WHICH_OS=macOS
|
||||
HINTSVERSION := 500
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
LUA_VERSION=5.4.8
|
||||
ifeq ($(MAKELEVEL),0)
|
||||
PRECHECK+=checkmakefiles
|
||||
# all files included from this hints file get listed
|
||||
# in HINTSINCLNAMES (without suffix and without a path)
|
||||
HINTSINCLNAMES := compiler cross-pre1 cross-pre2 cross-post \
|
||||
HINTSINCLNAMES := dirs-perms \
|
||||
compiler cross-pre1 cross-pre2 cross-post \
|
||||
gbdates-pre gbdates-post \
|
||||
multiw-1 multiw-2 misc \
|
||||
multisnd1-pre multisnd2-pre multisnd-post
|
||||
multisnd1-pre multisnd2-pre multisnd-post \
|
||||
response
|
||||
HINTSINCLFILES := $(addsuffix .$(HINTSVERSION), $(HINTSINCLNAMES))
|
||||
endif
|
||||
endif
|
||||
|
||||
# note: '#-INCLUDE' is not just a comment; multiw-1 contains sections 1 to 2
|
||||
#-INCLUDE multiw-1.500
|
||||
|
||||
# note: '#-INCLUDE' is not just a comment
|
||||
# it pulls in the contents of dirs-perms.500
|
||||
#-INCLUDE dirs-perms.500
|
||||
|
||||
ifneq "$(USEMACPORTS)" "1"
|
||||
HAVE_HOMEBREW := $(shell expr `which -s brew; echo $$?` = 0)
|
||||
endif
|
||||
@@ -55,14 +63,14 @@ endif
|
||||
# you're reading this in Makefile augmented by hints, that may not be true).
|
||||
#
|
||||
|
||||
#-INCLUDE cross-pre1.370
|
||||
#-INCLUDE cross-pre1.500
|
||||
|
||||
#-INCLUDE multiw-2.370
|
||||
#-INCLUDE multiw-2.500
|
||||
|
||||
# compiler.370 contains compiler detection and adjustments common
|
||||
# compiler.500 contains compiler detection and adjustments common
|
||||
# to both linux and macOS
|
||||
|
||||
#-INCLUDE compiler.370
|
||||
#-INCLUDE compiler.500
|
||||
|
||||
ifdef WANT_WIN_QT
|
||||
ifeq "$(HAVE_HOMEBREW)" "1"
|
||||
@@ -94,10 +102,10 @@ CCXXFLAGS +=-Wno-c++20-attribute-extensions
|
||||
endif
|
||||
endif
|
||||
|
||||
# misc.370 must come after compiler.370
|
||||
# misc.500 must come after compiler.500
|
||||
# and after QTDIR is defined
|
||||
|
||||
#-INCLUDE misc.370
|
||||
#-INCLUDE misc.500
|
||||
|
||||
# manpages directory
|
||||
MANDIR=/usr/local/share/man/man6
|
||||
@@ -113,7 +121,8 @@ NHCFLAGS+=-DDLB
|
||||
NHCFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
|
||||
NHCFLAGS+=-DDEFAULT_WINDOW_SYS=\"$(WANT_DEFAULT)\"
|
||||
NHCFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
|
||||
#NHCFLAGS+=-DTIMED_DELAY
|
||||
#define this after X11 timed_delay fix
|
||||
NHCFLAGS+=-DTIMED_DELAY
|
||||
#NHCFLAGS+=-DDUMPLOG
|
||||
#NHCFLAGS+=-DCONFIG_ERROR_SECURE=FALSE
|
||||
NHCFLAGS+=-DGREPPATH=\"/usr/bin/grep\"
|
||||
@@ -176,8 +185,8 @@ HAVE_HOMEBREW_NCURSES := $(shell expr `brew ls --versions ncurses > /dev/null; e
|
||||
ifeq "$(HAVE_HOMEBREW_NCURSES)" "1"
|
||||
# Newer versions of ncurses are commonly installed via homebrew, but intentionally unlinked.
|
||||
HOMEBREW_LFLAGS := -L$(shell brew --prefix)/opt/ncurses/lib
|
||||
HOMEBREW_WINLIB := -I$(shell brew --prefix)/opt/ncurses/include
|
||||
HOMEBREW_CFLAGS =
|
||||
HOMEBREW_WINLIB :=
|
||||
HOMEBREW_CFLAGS = -I$(shell brew --prefix)/opt/ncurses/include
|
||||
endif #HAVE_HOMEBREW_NCURSES
|
||||
endif #HAVE_HOMEBREW
|
||||
ifeq "$(HAVE_MACPORTS)" "1"
|
||||
@@ -215,12 +224,27 @@ LFLAGS += -framework AVFoundation
|
||||
#endif
|
||||
endif
|
||||
|
||||
ifdef MAKEFILE_SRC
|
||||
ifndef NO_NHUUID
|
||||
# macOS doesn't need any extra prerequisite libraries
|
||||
# so do this unconditionally, unless NO_NHUUID=1 is
|
||||
# passed on the Make command line.
|
||||
WANT_NHUUID=1
|
||||
endif #NO_NHUUID
|
||||
|
||||
ifdef WANT_NHUUID
|
||||
CFLAGS += -DNHUUID
|
||||
UUIDOBJ = macuuid.o
|
||||
LFLAGS += -framework Foundation
|
||||
endif
|
||||
endif #MAKEFILE_SRC
|
||||
|
||||
#
|
||||
#-INCLUDE multisnd1-pre.370
|
||||
#-INCLUDE multisnd1-pre.500
|
||||
#
|
||||
|
||||
# although not currently doing anything for macOS, this is
|
||||
# kept in for consistency with layout of linux.370
|
||||
# kept in for consistency with layout of linux.500
|
||||
ifeq "$(CCISCLANG)" "1"
|
||||
# clang-specific starts
|
||||
# clang-specific ends
|
||||
@@ -230,15 +254,15 @@ else
|
||||
# gcc-specific ends
|
||||
endif
|
||||
|
||||
# WINCFLAGS set from multiw-2.370
|
||||
# SNDCFLAGS set from multisnd-pre.370
|
||||
# WINCFLAGS set from multiw-2.500
|
||||
# SNDCFLAGS set from multisnd-pre.500
|
||||
CFLAGS+= $(PKGCFLAGS) $(WINCFLAGS)
|
||||
CFLAGS+= $(SNDCFLAGS)
|
||||
CFLAGS+= $(NHCFLAGS)
|
||||
CFLAGS+= $(LIBCFLAGS)
|
||||
|
||||
# WINCFLAGS set from multiw-2.370
|
||||
# SNDCFLAGS set from multisnd-pre.370
|
||||
# WINCFLAGS set from multiw-2.500
|
||||
# SNDCFLAGS set from multisnd-pre.500
|
||||
CCXXFLAGS+= $(WINCFLAGS)
|
||||
CCXXFLAGS+= $(SNDCFLAGS)
|
||||
CCXXFLAGS+= $(NHCFLAGS)
|
||||
@@ -253,26 +277,43 @@ HINTOBJ=$(CHAINOBJ)
|
||||
endif # WANT_WIN_CHAIN
|
||||
|
||||
ifdef WANT_WIN_X11
|
||||
USE_XFT=1
|
||||
USE_XPM=1
|
||||
USE_PNG=1
|
||||
WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
|
||||
VARDATND0 += x11tiles NetHack.ad pet_mark.xbm pilemark.xbm
|
||||
ifndef CROSSCOMPILE
|
||||
GENTILEOFILE = $(SRCDIR)/tile.o
|
||||
endif
|
||||
# -x: if built without dodlb, some versions of mkfontdir think *.lev are fonts
|
||||
POSTINSTALL += bdftopcf win/X11/nh10.bdf > $(HACKDIR)/nh10.pcf; ( cd $(HACKDIR); mkfontdir -x .lev );
|
||||
# separate from CFLAGS so that we don't pass it to every file
|
||||
X11CFLAGS = -I/opt/X11/include
|
||||
# avoid repeated complaints about _X_NONNULL(args...) in <X11/Xfuncproto.h>
|
||||
X11CFLAGS += -Wno-variadic-macros
|
||||
ifdef USE_XFT
|
||||
CFLAGS += -DUSE_XFT
|
||||
X11CFLAGS += $(shell pkg-config --cflags xft fontconfig freetype2)
|
||||
WINX11LIB += $(shell pkg-config --libs xft fontconfig freetype2)
|
||||
endif
|
||||
ifdef USE_XPM
|
||||
CFLAGS += -DUSE_XPM
|
||||
WINX11LIB += -lXpm
|
||||
VARDATND0 += rip.xpm
|
||||
endif
|
||||
ifdef USE_PNG
|
||||
CFLAGS += -DUSE_PNG
|
||||
WINX11LIB += -lpng
|
||||
endif
|
||||
WINLIB += $(WINX11LIB)
|
||||
LFLAGS += -L/opt/X11/lib
|
||||
endif # WANT_WIN_X11
|
||||
|
||||
ifdef WANT_WIN_QT
|
||||
LINK = $(CXX)
|
||||
ifndef CROSSCOMPILE
|
||||
GENTILEOFILE = $(SRCDIR)/tile.o
|
||||
endif
|
||||
ifdef WANT_WIN_QT5
|
||||
# Qt5 requires C++11
|
||||
QTCXXFLAGS += $(sort $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig \
|
||||
@@ -298,8 +339,7 @@ else # !WANT_WIN_QT
|
||||
LINK=$(CC)
|
||||
endif # !WANT_WIN_QT
|
||||
|
||||
# prevent duplicate tile.o in WINOBJ
|
||||
WINOBJ = $(WINOBJ0) $(sort $(XTRAOBJ))
|
||||
WINOBJ = $(WINOBJ0)
|
||||
# prevent duplicates in VARDATND if both X11 and Qt are being supported
|
||||
VARDATND += $(sort $(VARDATND0))
|
||||
|
||||
@@ -330,6 +370,12 @@ LIBNHSYSOBJ = $(TARGETPFX)libnhmain.o $(TARGETPFX)ioctl.o \
|
||||
#without winshim
|
||||
override GAME=
|
||||
MOREALL += ( cd src ; $(MAKE) pregame ; $(MAKE) $(TARGETPFX)libnh.a )
|
||||
# With $(GAME) empty, the regular `recover: $(GAME)` chain no longer
|
||||
# triggers lua_support, but recover.c still pulls in hack.h -> nhlua.h
|
||||
# transitively. Make recover depend on lua_support explicitly.
|
||||
ifdef MAKEFILE_TOP
|
||||
recover: lua_support
|
||||
endif
|
||||
endif # WANT_LIBNH
|
||||
|
||||
# Lua
|
||||
@@ -347,31 +393,11 @@ override LUA2NHTOP = ../..
|
||||
override LUAMAKEFLAGS=$(LUAFLAGS)
|
||||
endif # GITSUBMODULES
|
||||
|
||||
ifdef WANT_SHARE_INSTALL
|
||||
ifdef WANT_SHARED_INSTALL
|
||||
|
||||
#ifdef MAKEFILE_SRC
|
||||
#$(info WANT_SOURCE_INSTALL = $(WANT_SOURCE_INSTALL), WANT_SHARE_INSTALL = $(WANT_SHARE_INSTALL))
|
||||
#$(info WANT_SOURCE_INSTALL = $(WANT_SOURCE_INSTALL), WANT_SHARED_INSTALL = $(WANT_SHARED_INSTALL))
|
||||
#endif
|
||||
# if $GAMEUID is root, we install into roughly proper Mac locations, otherwise
|
||||
# we install into ~/nethackdir
|
||||
ifeq ($(GAMEUID),root)
|
||||
PREFIX:=/Library/NetHack
|
||||
SHELLDIR=/usr/local/bin
|
||||
HACKDIR=$(PREFIX)/nethackdir
|
||||
CHOWN=chown
|
||||
CHGRP=chgrp
|
||||
# We run sgid so the game has access to both HACKDIR and user preferences.
|
||||
GAMEPERM = 02755
|
||||
else # ! root
|
||||
PREFIX:=/Users/$(GAMEUID)
|
||||
SHELLDIR=$(PREFIX)/bin
|
||||
HACKDIR=$(PREFIX)/Library/NetHack/nethackdir
|
||||
CHOWN=/usr/bin/true
|
||||
CHGRP=/usr/bin/true
|
||||
GAMEPERM = 0500
|
||||
endif # ! root
|
||||
VARFILEPERM = 0664
|
||||
VARDIRPERM = 0775
|
||||
ROOTCHECK= [[ `id -u` == 0 ]] || ( echo "Must run install with sudo."; exit 1)
|
||||
# XXX it's nice we don't write over sysconf, but we've already erased it
|
||||
# make sure we have group GAMEUID and group GAMEGRP
|
||||
@@ -388,17 +414,8 @@ PREINSTALL= . sys/unix/hints/macosx.sh user2 $(GAMEUID); \
|
||||
else ifdef WANT_SOURCE_INSTALL
|
||||
|
||||
#ifdef MAKEFILE_SRC
|
||||
#$(info WANT_SOURCE_INSTALL = $(WANT_SOURCE_INSTALL), WANT_SHARE_INSTALL = $(WANT_SHARE_INSTALL))
|
||||
#$(info WANT_SOURCE_INSTALL = $(WANT_SOURCE_INSTALL), WANT_SHARED_INSTALL = $(WANT_SHARED_INSTALL))
|
||||
#endif
|
||||
PREFIX=$(abspath $(NHSROOT))
|
||||
# suppress nethack.sh
|
||||
#SHELLDIR=
|
||||
HACKDIR=$(PREFIX)/playground
|
||||
CHOWN=/usr/bin/true
|
||||
CHGRP=/usr/bin/true
|
||||
GAMEPERM = 0700
|
||||
VARFILEPERM = 0600
|
||||
VARDIRPERM = 0700
|
||||
POSTINSTALL+= sys/unix/hints/macosx.sh editsysconf sys/unix/sysconf $(HACKDIR)/sysconf;
|
||||
|
||||
# We can use "make all" to build the whole thing - but it misses some things:
|
||||
@@ -408,17 +425,8 @@ CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
|
||||
else # !WANT_SOURCE_INSTALL
|
||||
|
||||
#ifdef MAKEFILE_SRC
|
||||
#$(info WANT_SOURCE_INSTALL = $(WANT_SOURCE_INSTALL), WANT_SHARE_INSTALL = $(WANT_SHARE_INSTALL))
|
||||
#$(info WANT_SOURCE_INSTALL = $(WANT_SOURCE_INSTALL), WANT_SHARED_INSTALL = $(WANT_SHARED_INSTALL))
|
||||
#endif
|
||||
PREFIX:=$(wildcard ~)
|
||||
SHELLDIR=$(PREFIX)/bin
|
||||
HACKDIR=$(PREFIX)/nethackdir
|
||||
CHOWN=/usr/bin/true
|
||||
CHGRP=/usr/bin/true
|
||||
GAMEPERM = 0700
|
||||
VARFILEPERM = 0600
|
||||
VARDIRPERM = 0700
|
||||
|
||||
ifdef ($(WANT_DEFAULT),X11)
|
||||
# install nethack.rc as ~/.nethackrc if no ~/.nethackrc exists
|
||||
PREINSTALL+= cp -n win/X11/nethack.rc ~/.nethackrc || true;
|
||||
@@ -430,10 +438,7 @@ POSTINSTALL+= sys/unix/hints/macosx.sh editsysconf sys/unix/sysconf $(HACKDIR)/s
|
||||
$(CHGRP) $(GAMEGRP) $(HACKDIR)/sysconf; \
|
||||
chmod $(VARFILEPERM) $(HACKDIR)/sysconf;
|
||||
|
||||
endif # !WANT_SHARE_INSTALL
|
||||
|
||||
INSTDIR=$(HACKDIR)
|
||||
VARDIR=$(HACKDIR)
|
||||
endif # !WANT_SHARED_INSTALL
|
||||
|
||||
SYSCONFCREATE = sys/unix/hints/macosx.sh editsysconf sys/unix/sysconf $(HACKDIR)/sysconf
|
||||
SYSCONFINSTALL = $(SYSCONFCREATE) && \
|
||||
@@ -453,16 +458,16 @@ SYSCONFENSURE = (if ! test -f $(INSTDIR)/sysconf ; then \
|
||||
# Install.Qt mentions a patch for macos - it's not there (it seems to be in the Qt binary
|
||||
# package under the docs directory).
|
||||
#
|
||||
#-INCLUDE cross-pre2.370
|
||||
#-INCLUDE cross-pre2.500
|
||||
#
|
||||
#
|
||||
#-INCLUDE gbdates-pre.370
|
||||
#-INCLUDE gbdates-pre.500
|
||||
#
|
||||
#
|
||||
#-INCLUDE multisnd2-pre.370
|
||||
#-INCLUDE multisnd2-pre.500
|
||||
#
|
||||
#
|
||||
#-INCLUDE response.370
|
||||
#-INCLUDE response.500
|
||||
#
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
@@ -532,10 +537,10 @@ endif # MAKEFILE_SRC
|
||||
#-POST
|
||||
|
||||
#
|
||||
#-INCLUDE gbdates-post.370
|
||||
#-INCLUDE gbdates-post.500
|
||||
#
|
||||
#
|
||||
#-INCLUDE multisnd-post.370
|
||||
#-INCLUDE multisnd-post.500
|
||||
#
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
@@ -547,9 +552,26 @@ checkmakefiles:
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef WANT_NHUUID
|
||||
$(TARGETPFX)macuuid.o: ../sys/unix/macuuid.m
|
||||
$(CC) $(CFLAGS) -c -o$@ $<
|
||||
endif
|
||||
|
||||
ifdef WANT_LIBNH
|
||||
$(TARGETPFX)libnh.a: $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua-$(LUA_VERSION).a
|
||||
$(AR) rcs $@ $(HOBJ) $(LIBNHSYSOBJ) ../lib/lua/liblua-$(LUA_VERSION).a
|
||||
# Build libnh.a by merging the engine objects, the shim windowport,
|
||||
# date.o (separate from $(HOBJ) per Makefile.src), hacklib.a, and Lua's
|
||||
# static archive. Use libtool -static rather than ar so hacklib.a and
|
||||
# liblua-$(LUA_VERSION).a have their members merged in -- ar would archive
|
||||
# them as opaque .a members and macOS ld can't dereference those.
|
||||
# Depending on $(LUALIB) triggers the lua_support build (which generates
|
||||
# include/nhlua.h); without it, $(HOBJ) won't compile.
|
||||
# filter-out drops $(SYSOBJ) (which carries unixmain.o) and $(WINOBJ) (the
|
||||
# tty windowport) from $(HOBJ); $(LIBNHSYSOBJ) supplies libnhmain.o and
|
||||
# winshim.o in their place.
|
||||
$(TARGETPFX)libnh.a: $(LUALIB) $(HOBJ) $(LIBNHSYSOBJ) $(DATE_O) $(TARGET_HACKLIB)
|
||||
libtool -static -o $@ \
|
||||
$(filter-out $(SYSOBJ) $(WINOBJ),$(HOBJ)) \
|
||||
$(LIBNHSYSOBJ) $(DATE_O) $(TARGET_HACKLIB) $(LUALIB)
|
||||
@echo "$@ built."
|
||||
$(TARGETPFX)libnhmain.o : ../sys/libnh/libnhmain.c $(HACK_H)
|
||||
$(CC) $(CFLAGS) -c -o$@ $<
|
||||
@@ -637,7 +659,7 @@ $(BUNDLE_INFOPLIST):
|
||||
@echo '<key>CFBundlePackageType</key>' >>$@
|
||||
@echo '<string>APPL</string>' >>$@
|
||||
@echo '<key>CFBundleGetInfoString</key>' >>$@
|
||||
@echo '<string>$(BUNDLE_GAMENAME) 3.7 for MacOS</string>' >>$@
|
||||
@echo '<string>$(BUNDLE_GAMENAME) 5.0 for MacOS</string>' >>$@
|
||||
@echo '<key>CFBundleIdentifier</key>' >>$@
|
||||
@echo '<string>org.nethack.macos</string>' >>$@
|
||||
@echo '<key>CFBundleExecutable</key>' >>$@
|
||||
@@ -649,11 +671,11 @@ $(BUNDLE_INFOPLIST):
|
||||
@echo '<key>CFBundleName</key>' >>$@
|
||||
@echo '<string>$(BUNDLE_NAME)</string>' >>$@
|
||||
@echo '<key>CFBundleVersion</key>' >>$@
|
||||
@echo '<string>3.7.0b73</string>' >>$@
|
||||
@echo '<string>NetHack 5.0.0b73</string>' >>$@
|
||||
@echo '<key>CFBundleShortVersionString</key>' >>$@
|
||||
@echo '<string>3.7.0</string>' >>$@
|
||||
@echo '<string>NetHack 5.0.0</string>' >>$@
|
||||
@echo '<key>NSHumanReadableCopyright</key>' >>$@
|
||||
@echo '<string>©By Stichting Mathematisch Centrum and M. Stephenson 1985-2023</string>' >>$@
|
||||
@echo '<string>©By Stichting Mathematisch Centrum and M. Stephenson 1985-2026</string>' >>$@
|
||||
@echo '<key>LSApplicationCategoryType</key>' >>$@
|
||||
@echo '<string>public.app-category.adventure-games</string>' >>$@
|
||||
@echo '</dict>' >>$@
|
||||
@@ -690,7 +712,7 @@ endif # WANT_BUNDLE
|
||||
# --- end of bundle ---
|
||||
#
|
||||
#
|
||||
#-INCLUDE cross-post.370
|
||||
#-INCLUDE cross-post.500
|
||||
#
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# NetHack 3.7 macosx.sh $NHDT-Date: 1597332920 2020/08/13 15:35:20 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.24 $
|
||||
# NetHack 5.0 macosx.sh $NHDT-Date: 1597332920 2020/08/13 15:35:20 $ $NHDT-Branch: NetHack-5.0 $:$NHDT-Revision: 1.24 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# NetHack 3.7 unix $NHDT-Date: 1596498426 2020/08/03 23:47:06 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $
|
||||
# NetHack 5.0 unix $NHDT-Date: 1596498426 2020/08/03 23:47:06 $ $NHDT-Branch: NetHack-5.0 $:$NHDT-Revision: 1.0 $
|
||||
# Copyright (c) Kevin Smolkowski "Snivik", Elgin Oregon 2019.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# NetHack 3.7 unix $NHDT-Date: 1596498427 2020/08/03 23:47:07 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $
|
||||
# NetHack 5.0 unix $NHDT-Date: 1596498427 2020/08/03 23:47:07 $ $NHDT-Branch: NetHack-5.0 $:$NHDT-Revision: 1.0 $
|
||||
# Copyright (c) Kevin Smolkowski "Snivik", Elgin Oregon 2019.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
|
||||
+230
-105
@@ -1,4 +1,4 @@
|
||||
# NetHack 3.7 linux.370 $NHDT-Date: 1693519390 2023/08/31 22:03:10 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.61 $
|
||||
# NetHack 5.0 linux.500 $NHDT-Date: 1693519390 2023/08/31 22:03:10 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.61 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
@@ -12,29 +12,41 @@
|
||||
# And let us know about it.
|
||||
#
|
||||
|
||||
#-PRE
|
||||
# linux.370 hints file provides a single-user build for Linux (such
|
||||
# as Ubuntu focal).
|
||||
#-PRE xxxx
|
||||
|
||||
# note: '#-INCLUDE' is not just a comment
|
||||
# multiw-1.370 contains sections 1 to 2
|
||||
#-INCLUDE multiw-1.370
|
||||
|
||||
HINTSVERSION := 370
|
||||
WHICH_OS=Linux
|
||||
HINTSVERSION := 500
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
LUA_VERSION=5.4.8
|
||||
ifeq ($(MAKELEVEL),0)
|
||||
PRECHECK+=checkmakefiles
|
||||
# all files included from this hints file get listed
|
||||
# in HINTSINCLNAMES (without suffix and without a path)
|
||||
HINTSINCLNAMES := compiler cross-pre1 cross-pre2 cross-post \
|
||||
HINTSINCLNAMES := dirs-perms \
|
||||
compiler cross-pre1 cross-pre2 cross-post \
|
||||
gbdates-pre gbdates-post \
|
||||
linuxdistro \
|
||||
multiw-1 multiw-2 misc \
|
||||
multisnd1-pre multisnd2-pre multisnd-post
|
||||
multisnd1-pre multisnd2-pre multisnd-post \
|
||||
response
|
||||
HINTSINCLFILES := $(addsuffix .$(HINTSVERSION), $(HINTSINCLNAMES))
|
||||
endif
|
||||
endif
|
||||
|
||||
# linux.500 hints file provides a single-user build for Linux (such
|
||||
# as Ubuntu focal).
|
||||
|
||||
# note: '#-INCLUDE' is not just a comment
|
||||
# multiw-1.500 contains sections 1 to 2
|
||||
#-INCLUDE multiw-1.500
|
||||
|
||||
# note: '#-INCLUDE' is not just a comment
|
||||
# it pulls in the contents of dirs-perms.500
|
||||
#-INCLUDE dirs-perms.500
|
||||
|
||||
#-INCLUDE linuxdistro.500
|
||||
|
||||
ifndef LIBXPM
|
||||
LIBXPM= -L/opt/X11/lib -lXpm
|
||||
endif
|
||||
@@ -52,7 +64,7 @@ USE_NOSTATICFN = 1
|
||||
#USE_NONOSTATICFN = 1
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#-INCLUDE cross-pre1.370
|
||||
#-INCLUDE cross-pre1.500
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -60,12 +72,123 @@ USE_NOSTATICFN = 1
|
||||
# you're reading this in Makefile augmented by hints, that may not be true).
|
||||
#
|
||||
|
||||
#-INCLUDE multiw-2.370
|
||||
#-INCLUDE multiw-2.500
|
||||
|
||||
# compiler.370 contains compiler detection and adjustments common
|
||||
#QT6 prior to compiler include
|
||||
ifdef WANT_WIN_QT6
|
||||
CPLUSPLUS_NEED20=1
|
||||
ADDITIONAL_NO_WARN_GPPCCX=-Wno-sfinae-incomplete
|
||||
ADDITIONAL_NO_WARN_CLANGCCX=-Wno-c++26-extensions
|
||||
endif # WANT_WIN_QT6
|
||||
|
||||
# compiler.500 contains compiler detection and adjustments common
|
||||
# to both linux and macOS
|
||||
|
||||
#-INCLUDE compiler.370
|
||||
#-INCLUDE compiler.500
|
||||
|
||||
ifdef WANT_SYSTEM_LUA
|
||||
ifndef LUA_VERSION
|
||||
LUA_VERSION := 5.4.8
|
||||
endif
|
||||
LUASUBDELIM := $(subst ., ,$(LUA_VERSION))
|
||||
LUASHVER := $(word 1, $(LUASUBDELIM)).$(word 2, $(LUASUBDELIM))
|
||||
|
||||
ifeq ($(LINUX_DISTRO),alpine)
|
||||
# prereq: doas apk add lua5.4-dev
|
||||
# doas apk add linux-headers
|
||||
# doas apk add musl-dev
|
||||
USE_SYSTEM_LUA=1
|
||||
SHELLPKG :=pkg-config
|
||||
LUAPKGNAME = lua-$(LUASHVER)
|
||||
CURSPKG = ncurses
|
||||
#
|
||||
else ifeq ($(LINUX_DISTRO),debian)
|
||||
# prereq: sudo apt install lua5.4 liblua5.4-dev
|
||||
USE_SYSTEM_LUA=1
|
||||
SHELLPKG :=pkg-config
|
||||
LUAPKGNAME = lua-$(LUASHVER)
|
||||
#
|
||||
else ifeq ($(LINUX_DISTRO),ubuntu)
|
||||
# prereq: sudo apt install lua5.4 liblua5.4-dev
|
||||
USE_SYSTEM_LUA=1
|
||||
SHELLPKG :=dpkg
|
||||
LUAPKGNAME = lua$(LUASHVER)
|
||||
#
|
||||
else ifeq ($(LINUX_DISTRO),fedora)
|
||||
# prereq: sudo dnf install lua lua-devel
|
||||
USE_SYSTEM_LUA=1
|
||||
SHELLPKG :=rpm
|
||||
LUAPKGNAME = lua-devel
|
||||
#
|
||||
else
|
||||
USE_SYSTEM_LUA=0
|
||||
SHELLPKG :=
|
||||
endif # LINUX_DISTRO
|
||||
|
||||
ifeq ($(USE_SYSTEM_LUA),1)
|
||||
ifneq "$(SHELLPKG)" ""
|
||||
#
|
||||
# Two requirements must now pass:
|
||||
# 1. We need to be able to check if Lua package
|
||||
# is installed. We do that here.
|
||||
# 2. The lua.h header file needs to be present
|
||||
# where expected. We set LUATESTTARGET here,
|
||||
# but the check is done later on in the top
|
||||
# Makefile.
|
||||
#
|
||||
# Try to confirm package presence
|
||||
ifeq ($(SHELLPKG),pkg-config)
|
||||
PKG_EXISTS := $(shell pkg-config --exists $(LUAPKGNAME) \
|
||||
&& echo yes || echo no)
|
||||
#
|
||||
else ifeq ($(SHELLPKG),dpkg)
|
||||
PKG_EXISTS := $(shell dpkg -s $(LUAPKGNAME) > /dev/null 2>&1 \
|
||||
&& echo yes || echo no)
|
||||
#
|
||||
else ifeq ($(SHELLPKG),rpm)
|
||||
PKG_EXISTS := $(shell rpm -q $(LUAPKGNAME) > /dev/null 2>&1 \
|
||||
&& echo yes || echo no)
|
||||
#
|
||||
else
|
||||
PKG_EXISTS=no
|
||||
$(info Existance of package $(LUAPKGNAME) could not be verified)
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_EXISTS),yes)
|
||||
$(info Existance of package $(LUAPKGNAME) verified)
|
||||
#
|
||||
ifeq ($(LINUX_DISTRO),fedora)
|
||||
LUACFLAGS := $(shell pkg-config --cflags lua-$(LUASHVER))
|
||||
LUALIBS := $(shell pkg-config --libs lua-$(LUASHVER))
|
||||
LUAHEADERS := /usr/include/lua$(LUASHVER)
|
||||
LUATESTTARGET := $(LUAHEADERS)/lua.h
|
||||
#
|
||||
else ifeq ($(LINUX_DISTRO),ubuntu)
|
||||
LUACFLAGS := -I/usr/include/lua$(LUASHVER)
|
||||
LUALIBS := -llua$(LUASHVER) -lm -ldl
|
||||
LUAHEADERS := /usr/include/lua$(LUASHVER)
|
||||
LUATESTTARGET := $(LUAHEADERS)/lua.h
|
||||
#
|
||||
else ifeq ($(SHELLPKG),pkg-config)
|
||||
LUACFLAGS := $(shell pkg-config --cflags lua-$(LUASHVER))
|
||||
LUALIBS := $(shell pkg-config --libs lua-$(LUASHVER))
|
||||
LUAHEADERS := /usr/include/lua$(LUASHVER)
|
||||
LUATESTTARGET := $(LUAHEADERS)/lua.h
|
||||
endif
|
||||
#
|
||||
LUAHPREFIX=
|
||||
#LUATOP=
|
||||
#LUAMAKEFLAGS=
|
||||
#LUA2NHTOP=
|
||||
#LUABASELIB=
|
||||
LUATOPLIB=
|
||||
LUALIBBUILT=
|
||||
LUALIB=
|
||||
CFLAGS += $(LUACFLAGS)
|
||||
endif # PKG_EXISTS?
|
||||
endif # SHELLPKG has a value
|
||||
endif # USE_SYSTEM_LUA
|
||||
endif # WANT_SYSTEM_LUA
|
||||
|
||||
ifdef WANT_WIN_QT
|
||||
ifdef WANT_WIN_QT5
|
||||
@@ -80,10 +203,10 @@ endif # g++ greater than or equal to 14
|
||||
endif # WANT_WIN_QT6
|
||||
endif # WANT_WIN_QT
|
||||
|
||||
# misc.370 must come after compiler.370
|
||||
# misc.500 must come after compiler.500
|
||||
# and after QTDIR is defined.
|
||||
#
|
||||
#-INCLUDE misc.370
|
||||
#-INCLUDE misc.500
|
||||
|
||||
ifeq "$(USE_ASAN)" "1"
|
||||
CFLAGS+=-fsanitize=address
|
||||
@@ -96,6 +219,7 @@ LFLAGS+=-fsanitize=undefined
|
||||
endif
|
||||
|
||||
ifeq "$(USE_CURSESLIB)" "1"
|
||||
CURSPKG ?= ncursesw
|
||||
# default
|
||||
CURSESLIB = -lncurses -ltinfo
|
||||
# If CURSES_UNICODE is defined, we need ncursesw.
|
||||
@@ -103,8 +227,8 @@ CURSESLIB = -lncurses -ltinfo
|
||||
# CURSESLIB = -lncurses -ltinfo
|
||||
ifdef MAKEFILE_SRC
|
||||
comma:=,
|
||||
NCURSES_LFLAGS = $(shell pkg-config ncursesw --libs)
|
||||
NCURSES_CFLAGS = $(shell pkg-config ncursesw --cflags)
|
||||
NCURSES_LFLAGS = $(shell pkg-config $(CURSPKG) --libs)
|
||||
NCURSES_CFLAGS = $(shell pkg-config $(CURSPKG) --cflags)
|
||||
ifeq (,$(findstring ncursesw, $(NCURSES_LFLAGS)))
|
||||
ifeq (,$(findstring ncurses, $(NCURSES_LFLAGS)))
|
||||
#this indicates that pkg-config itself was unavailable
|
||||
@@ -175,12 +299,11 @@ NHCFLAGS+=-DTTY_TILES_ESCCODES
|
||||
#NHCFLAGS+=-DTTY_SOUND_ESCCODES
|
||||
#NHCFLAGS+=-DNO_CHRONICLE
|
||||
#NHCFLAGS+=-DLIVELOG
|
||||
NHCFLAGS+=-DDUMPLOG
|
||||
#NHCFLAGS+=-DCHANGE_COLOR
|
||||
NHCFLAGS+=-DDUMPHTML
|
||||
NHCFLAGS+=-DUSE_GENERAL_ALTAR_COLORS
|
||||
#NHCFLAGS+=-DCHANGE_COLOR
|
||||
NHCFLAGS+=-DSELF_RECOVER
|
||||
ifdef WANT_WIN_CURSES
|
||||
ifeq "$(USE_CURSESLIB)" "1"
|
||||
NHCFLAGS+=$(NCURSES_CFLAGS)
|
||||
ifeq "$(HAVE_NCURSESW)" "1"
|
||||
NHCFLAGS+=-DCURSES_UNICODE
|
||||
@@ -189,10 +312,10 @@ ifdef MAKEFILE_SRC
|
||||
$(info Attention: CURSES_UNICODE is not being defined without ncursesw)
|
||||
endif #MAKEFILE_SRC
|
||||
endif #HAVE_NCURSESW
|
||||
endif #WANT_WIN_CURSES
|
||||
endif #USE_CURSESLIB
|
||||
|
||||
#
|
||||
#-INCLUDE multisnd1-pre.370
|
||||
#-INCLUDE multisnd1-pre.500
|
||||
#
|
||||
|
||||
ifeq "$(CCISCLANG)" "1"
|
||||
@@ -200,19 +323,22 @@ ifeq "$(CCISCLANG)" "1"
|
||||
# clang-specific ends
|
||||
else
|
||||
# gcc-specific starts
|
||||
ifndef MUSL
|
||||
# __sighandler_t does not exist in musl
|
||||
LIBCFLAGS+=-DSIG_RET_TYPE=__sighandler_t
|
||||
endif
|
||||
# gcc-specific ends
|
||||
endif
|
||||
|
||||
# WINCFLAGS set from multiw-2.370
|
||||
# SNDCFLAGS set from multisnd-pre.370
|
||||
# WINCFLAGS set from multiw-2.500
|
||||
# SNDCFLAGS set from multisnd-pre.500
|
||||
CFLAGS+= $(WINCFLAGS)
|
||||
CFLAGS+= $(SNDCFLAGS)
|
||||
CFLAGS+= $(NHCFLAGS)
|
||||
CFLAGS+= $(LIBCFLAGS)
|
||||
|
||||
# WINCFLAGS set from multiw-2.370
|
||||
# SNDCFLAGS set from multisnd-pre.370
|
||||
# WINCFLAGS set from multiw-2.500
|
||||
# SNDCFLAGS set from multisnd-pre.500
|
||||
CCXXFLAGS+= $(WINCFLAGS)
|
||||
CCXXFLAGS+= $(SNDCFLAGS)
|
||||
CCXXFLAGS+= $(NHCFLAGS)
|
||||
@@ -230,90 +356,106 @@ ifdef MAKEFILE_SRC
|
||||
ifdef CURSESLIB
|
||||
WINLIB += $(CURSESLIB)
|
||||
endif #CURSESLIB
|
||||
endif #MAKEFILE_SRC
|
||||
|
||||
ifneq "$(NO_NHUUID)" "1"
|
||||
UUID_LIB_CHECK := $(shell echo `/sbin/ldconfig -p | grep libuuid`)
|
||||
#$(info UUID_LIB_CHECK=$(UUID_LIB_CHECK))
|
||||
ifneq "$(UUID_LIB_CHECK)" ""
|
||||
UUID_LIB=1
|
||||
else
|
||||
UUID_LIB=0
|
||||
endif
|
||||
#$(info UUID_LIB=$(UUID_LIB))
|
||||
#
|
||||
# check for uuid development headers
|
||||
UUID_HEADERS_CHECK := $(wildcard /usr/include/uuid/uuid.h)
|
||||
#$(info UUID_HEADERS_CHECK=$(UUID_HEADERS_CHECK))
|
||||
ifneq "$(UUID_HEADERS_CHECK)" ""
|
||||
UUID_HEADERS = 1
|
||||
else
|
||||
UUID_HEADERS = 0
|
||||
endif
|
||||
#$(info UUID_HEADERS=$(UUID_HEADERS))
|
||||
|
||||
ifeq "$(UUID_LIB)" "1"
|
||||
ifeq "$(UUID_HEADERS)" "1"
|
||||
ifndef WANT_NHUUID
|
||||
WANT_NHUUID=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else # NO_NHUUID
|
||||
WANT_NHUUID=0
|
||||
endif # NO_NHUUID
|
||||
|
||||
ifeq "$(WANT_NHUUID)" "1"
|
||||
#$(info NHUUID support will be included)
|
||||
CFLAGS+= -DNHUUID
|
||||
LIBS+=-luuid
|
||||
else # WANT_NHUUID
|
||||
$(info Attention - No NHUUID support will be included)
|
||||
endif # WANT_NHUUID
|
||||
endif # MAKEFILE_SRC
|
||||
|
||||
ifdef WANT_WIN_X11
|
||||
USE_XPM=1
|
||||
USE_XFT=1
|
||||
USE_PNG=1
|
||||
WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
|
||||
VARDATND0 += x11tiles NetHack.ad pet_mark.xbm pilemark.xbm
|
||||
ifndef CROSSCOMPILE
|
||||
GENTILEOFILE = $(SRCDIR)/tile.o
|
||||
endif
|
||||
# -x: if built without dlb, some versions of mkfontdir think *.lev are fonts
|
||||
POSTINSTALL += bdftopcf win/X11/nh10.bdf > $(HACKDIR)/nh10.pcf; ( cd $(HACKDIR); mkfontdir -x .lev );
|
||||
# separate from CFLAGS so that we don't pass it to every file
|
||||
X11CFLAGS = -I/opt/X11/include
|
||||
# avoid repeated complaints about _X_NONNULL(args...) in <X11/Xfuncproto.h>
|
||||
X11CFLAGS += -Wno-variadic-macros
|
||||
ifdef USE_XFT
|
||||
CFLAGS += -DUSE_XFT
|
||||
X11CFLAGS += $(shell pkg-config --cflags xft fontconfig)
|
||||
WINX11LIB += $(shell pkg-config --libs xft fontconfig)
|
||||
endif
|
||||
ifdef USE_XPM
|
||||
CFLAGS += -DUSE_XPM
|
||||
WINX11LIB += -lXpm
|
||||
VARDATND0 += rip.xpm
|
||||
endif
|
||||
ifdef USE_PNG
|
||||
CFLAGS += -DUSE_PNG
|
||||
WINX11LIB += -lpng
|
||||
endif
|
||||
WINLIB += $(WINX11LIB)
|
||||
LFLAGS+=-L/opt/X11/lib
|
||||
endif # WANT_WIN_X11
|
||||
|
||||
ifdef WANT_WIN_QT
|
||||
LINK = $(CXX)
|
||||
ifndef CROSSCOMPILE
|
||||
GENTILEOFILE = $(SRCDIR)/tile.o
|
||||
endif
|
||||
# QT4
|
||||
ifdef WANT_WIN_QT4
|
||||
QTCXXFLAGS += $(sort $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config QtGui --cflags)) -DQT_NO_SOUND=1
|
||||
WINLIB += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config QtGui --libs)
|
||||
endif # WANT_WIN_QT4
|
||||
#QT5
|
||||
ifdef WANT_WIN_QT5
|
||||
QTCXXFLAGS += $(sort $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --cflags))
|
||||
WINLIB += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --libs)
|
||||
endif # WANT_WIN_QT5
|
||||
#QT6
|
||||
ifdef WANT_WIN_QT6
|
||||
ifdef QT6MANUAL
|
||||
# Try some likely spots for a self-built Qt6.
|
||||
# You'll have to change these manually before using the hints file
|
||||
# if they don't match the installed location on your system.
|
||||
ifneq "$(HOSTTYPE)" ""
|
||||
QTHOST=$(HOSTTYPE)
|
||||
else
|
||||
QTHOST=x86_64
|
||||
endif
|
||||
QTTOP=/usr/include/$(HOSTTYPE)-linux-gnu/qt6
|
||||
ifneq ($(wildcard $(QTTOP)/*),)
|
||||
#we don't set QTLOCATED=1 for this
|
||||
QTINCDIR=/usr/include/$(QTHOST)-linux-gnu/qt6
|
||||
QTLIBDIR=/usr/lib/$(QTHOST)-linux.gnu
|
||||
QTCXXFLAGS += -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB
|
||||
QTCXXFLAGS += -I$(QTINCDIR)/QtWidgets -I$(QTINCDIR) -I$(QTINCDIR)/QtMultimedia
|
||||
QTCXXFLAGS += -I$(QTINCDIR)/QtNetwork -I$(QTINCDIR)/QtGui -I$(QTINCDIR)/QtCore
|
||||
WINLIB += -L$(QTLIBDIR) -lQt6Widgets -lQt6Multimedia -lQt6Network -lQt6Gui -lQt6Core
|
||||
MOCPATH = /usr/lib/qt6/libexec/moc
|
||||
#/usr/lib/x86_64-linux-gnu/libQt6EglFSDeviceIntegration.so
|
||||
endif # QTTOP/*
|
||||
ifndef QTINCDIR
|
||||
ifneq ($(wildcard /usr/local/Qt6/*),)
|
||||
QTDIR=/usr/local/Qt6
|
||||
QTLOCATED=1
|
||||
endif # wildcard /usr/local/Qt6
|
||||
ifneq ($(wildcard /usr/local/qt6/*),)
|
||||
QTDIR=/usr/local/qt6
|
||||
QTLOCATED=1
|
||||
endif # wildcard /usr/local/qt6
|
||||
endif # !QTINCDIR
|
||||
ifdef QTLOCATED
|
||||
QTCXXFLAGS += -I$(QTDIR)/include/QtCore
|
||||
QTCXXFLAGS += -I$(QTDIR)/include/QtGui
|
||||
QTCXXFLAGS += -I$(QTDIR)/include/QtMultimedia
|
||||
QTCXXFLAGS += -I$(QTDIR)/include/QtWidgets
|
||||
MOCPATH = $(QTDIR)/libexec/moc
|
||||
WINLIB += -L$(QTDIR)/lib -lQt6Widgets -lQt6Multimedia -lQt6Network -lQt6Gui -lQt6Core
|
||||
endif # QTLOCATED
|
||||
else # !QT6MANUAL
|
||||
MOCDIR = $(shell pkg-config Qt6Gui --variable=libexecdir)
|
||||
ifneq ($(wildcard $(MOCDIR)/*),)
|
||||
MOCPATH = $(MOCDIR)/moc
|
||||
else
|
||||
MOCPATH = /usr/lib/qt6/libexec/moc
|
||||
endif # MOCDIR
|
||||
QTCXXFLAGS += $(sort $(shell pkg-config Qt6Gui Qt6Widgets Qt6Multimedia --cflags))
|
||||
WINLIB += $(shell pkg-config Qt6Gui Qt6Widgets Qt6Multimedia --libs)
|
||||
endif # QT6MANUAL
|
||||
QTCXXFLAGS += $(shell pkg-config --cflags Qt6Multimedia)
|
||||
WINLIB += $(shell pkg-config --libs Qt6Core Qt6Gui Qt6Widgets Qt6Multimedia)
|
||||
MOCPATH = $(shell pkg-config --variable=libexecdir Qt6Core)/moc
|
||||
endif # WANT_WIN_QT6
|
||||
|
||||
ifndef QTDIR
|
||||
ifndef WANT_WIN_QT6
|
||||
$(error QTDIR not defined in the environment or Makefile)
|
||||
endif # not WANT_WIN_QT6
|
||||
endif # QTDIR
|
||||
# XXX if /Developer/qt exists and QTDIR not set, use that
|
||||
# XXX make sure QTDIR points to something reasonable
|
||||
@@ -326,7 +468,7 @@ LINK = $(CC)
|
||||
endif # !WANT_WIN_QT
|
||||
|
||||
# prevent duplicate tile.o in WINOBJ
|
||||
WINOBJ = $(WINOBJ0) $(sort $(XTRAOBJ))
|
||||
WINOBJ = $(WINOBJ0)
|
||||
# prevent duplicates in VARDATND if both X11 and Qt are being supported
|
||||
VARDATND += $(sort $(VARDATND0))
|
||||
|
||||
@@ -372,27 +514,10 @@ SYSCONFENSURE = (if ! test -f $(INSTDIR)/sysconf ; then \
|
||||
chmod $(VARFILEPERM) $(INSTDIR)/sysconf; fi );
|
||||
|
||||
ifdef WANT_SOURCE_INSTALL
|
||||
PREFIX=$(abspath $(NHSROOT))
|
||||
#SHELLDIR=
|
||||
HACKDIR=$(PREFIX)/playground
|
||||
GAMEPERM = 0700
|
||||
VARFILEPERM = 0600
|
||||
VARDIRPERM = 0700
|
||||
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
|
||||
MOREALL=$(MAKE) install
|
||||
else #!WANT_SOURCE_INSTALL
|
||||
#PREFIX=/usr
|
||||
PREFIX=$(wildcard ~)/nh/install
|
||||
HACKDIR=$(PREFIX)/games/lib/nethackdir
|
||||
SHELLDIR = $(PREFIX)/games
|
||||
VARDIRPERM = 0755
|
||||
VARFILEPERM = 0600
|
||||
GAMEPERM = 0755
|
||||
endif #?WANT_SOURCE_INSTALL
|
||||
|
||||
INSTDIR=$(HACKDIR)
|
||||
VARDIR = $(HACKDIR)
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
TESTGDBPATH=/usr/bin/gdb
|
||||
POSTINSTALL+= test -f $(TESTGDBPATH) || \
|
||||
@@ -418,7 +543,7 @@ endif
|
||||
SYSCFLAGS=-DLUA_USE_LINUX
|
||||
ifdef GITSUBMODULES
|
||||
LUAFLAGS=CC='$(CC)' SYSCFLAGS='$(SYSCFLAGS)'
|
||||
ifneq "$(CCISCLANG)" ""
|
||||
ifeq "$(CCISCLANG)" "1"
|
||||
# clang
|
||||
LUAFLAGS +=CWARNGCC=''
|
||||
endif # clang
|
||||
@@ -433,7 +558,7 @@ LFLAGS+=-rdynamic
|
||||
|
||||
# if TTY_TILES_ESCCODES
|
||||
WINSRC += tile.c
|
||||
WINOBJ += tile.o
|
||||
GENTILEOFILE = $(SRCDIR)/tile.o
|
||||
# endif
|
||||
|
||||
CHOWN=true
|
||||
@@ -442,28 +567,28 @@ CHGRP=true
|
||||
# manpages directory
|
||||
MANDIR=/usr/share/man/man6
|
||||
#
|
||||
#-INCLUDE cross-pre2.370
|
||||
#-INCLUDE cross-pre2.500
|
||||
#
|
||||
|
||||
#
|
||||
#-INCLUDE gbdates-pre.370
|
||||
#-INCLUDE gbdates-pre.500
|
||||
#
|
||||
|
||||
#
|
||||
#-INCLUDE multisnd2-pre.370
|
||||
#-INCLUDE multisnd2-pre.500
|
||||
#
|
||||
|
||||
#
|
||||
#-INCLUDE response.370
|
||||
#-INCLUDE response.500
|
||||
#
|
||||
|
||||
#-POST
|
||||
|
||||
#
|
||||
#-INCLUDE gbdates-post.370
|
||||
#-INCLUDE gbdates-post.500
|
||||
#
|
||||
#
|
||||
#-INCLUDE multisnd-post.370
|
||||
#-INCLUDE multisnd-post.500
|
||||
#
|
||||
|
||||
ifdef MAKEFILE_TOP
|
||||
@@ -487,6 +612,6 @@ $(TARGETPFX)libnhmain.o : ../sys/libnh/libnhmain.c $(HACK_H)
|
||||
endif # WANT_LIBNH
|
||||
|
||||
#
|
||||
#-INCLUDE cross-post.370
|
||||
#-INCLUDE cross-post.500
|
||||
#
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# NetHack 3.7 unix $NHDT-Date: 1596498428 2020/08/03 23:47:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.14 $
|
||||
# NetHack 5.0 unix $NHDT-Date: 1596498428 2020/08/03 23:47:08 $ $NHDT-Branch: NetHack-5.0 $:$NHDT-Revision: 1.14 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user