Avoid the warning that tmpname should be replaced by mkstemp by replacing tmpname with mkstemp. lua has code to do that but it isn't trivial to activate while leaving the lua distribution unmodified. [I've no idea whether nethack's usage even results in liblua ever creating any temporary files.] Using nethack's hints to pass -DLUA_USE_POSIX from top Makefile to lib/lua-$(LUA_VERSION)/Makefile has been tested, building liblua.a on linux with that has not.
58 lines
1.7 KiB
Plaintext
58 lines
1.7 KiB
Plaintext
#
|
|
# NetHack 3.6 linux-qt5 $NHDT-Date: 1589828480 2020/05/18 19:01:20 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.29 $
|
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
|
# NetHack may be freely redistributed. See license for details.
|
|
#
|
|
#-PRE
|
|
# Linux hints file
|
|
# This hints file provides a single-user Qt5 build for Linux, specifically
|
|
# for Fedora 26.
|
|
|
|
|
|
#PREFIX=/usr
|
|
PREFIX=$(wildcard ~)/nh/install
|
|
HACKDIR=$(PREFIX)/games/lib/$(GAME)dir
|
|
SHELLDIR = $(PREFIX)/games
|
|
INSTDIR=$(HACKDIR)
|
|
VARDIR = $(HACKDIR)
|
|
|
|
|
|
POSTINSTALL= cp -n sys/unix/sysconf $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf;
|
|
POSTINSTALL+= bdftopcf win/X11/nh10.bdf > $(INSTDIR)/nh10.pcf; ( cd $(INSTDIR); mkfontdir -x .lev );
|
|
|
|
CFLAGS=-g -O -I../include -DNOTPARMDECL
|
|
CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
|
|
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\"
|
|
CFLAGS+=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
|
|
CFLAGS+=-DTIMED_DELAY
|
|
CFLAGS+=-DDUMPLOG
|
|
CFLAGS+=-DCONFIG_ERROR_SECURE=FALSE
|
|
CFLAGS+=-DQT_GRAPHICS -DDEFAULT_WINDOW_SYS=\"Qt\" -DNOTTYGRAPHICS
|
|
CFLAGS+=`pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --cflags` -fPIC
|
|
|
|
# when building liblua.a, avoid warning that use of tmpnam() should be
|
|
# replaced by mkstemp(); the lua code doesn't use nethack's config.h so
|
|
# this needs to be passed via make rather than defined in unixconf.h
|
|
SYSCFLAGS=-DLUA_USE_POSIX
|
|
|
|
LINK=g++
|
|
CXX=g++ -std=gnu++11
|
|
|
|
WINSRC = $(WINQTSRC)
|
|
WINOBJ = $(WINQTOBJ)
|
|
WINLIB = $(WINQT5LIB)
|
|
#MOC = moc
|
|
MOC = moc-qt5
|
|
|
|
VARDATND = nhtiles.bmp rip.xpm nhsplash.xpm pet_mark.xbm pilemark.xbm
|
|
|
|
QTDIR=/usr
|
|
|
|
CHOWN=true
|
|
CHGRP=true
|
|
VARDIRPERM = 0755
|
|
VARFILEPERM = 0600
|
|
GAMEPERM = 0755
|
|
|
|
# note: needs libxt-dev libxaw7-dev libx11-dev bdftopcf
|