From: PatR Date: Sat, 5 Sep 2020 20:28:46 +0000 (-0700) Subject: update unix Makefile hints X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b48ebbfe15a2694b67062bb82484345c5071ae71;p=nethack update unix Makefile hints --- diff --git a/sys/unix/NewInstall.unx b/sys/unix/NewInstall.unx index d6dbdd1eb..f0064c78a 100644 --- a/sys/unix/NewInstall.unx +++ b/sys/unix/NewInstall.unx @@ -65,10 +65,10 @@ the following build command: make WANT_WIN_TTY=1 WANT_WIN_CURSES=1 WANT_WIN_X11=1 install To build a binary with tty + curses + X11 + Qt support (that is, all the -interfaces that are available), you can use the following shorthand build -command: - make WANT_WIN_ALL all - make WANT_WIN_ALL install +interfaces that are available for unix), you can use the following shorthand +build command: + make WANT_WIN_ALL=1 all + make WANT_WIN_ALL=1 install Alternatively, you can set the variables in the environment first, prior to issuing your make commands: @@ -146,6 +146,6 @@ additional interfaces. See below. | --remove-section=.note.ABI-tag/usr/lib/x86_64-linux-gnu/libQt5Core.so.5 | +----------+---------+-----------------+-------------------------------------+ -# NetHack 3.7 NewInstall.unx $NHDT-Date: 1597340908 2020/08/13 17:48:28 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ +# NetHack 3.7 NewInstall.unx $NHDT-Date: 1599337707 2020/09/05 20:28:27 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.10 $ # Copyright (c) 2009 by Kenneth Lorber, Kensington, Maryland # NetHack may be freely redistributed. See license for details. diff --git a/sys/unix/hints/include/multiw-2.2020 b/sys/unix/hints/include/multiw-2.2020 index ad4028aed..b96266ed8 100644 --- a/sys/unix/hints/include/multiw-2.2020 +++ b/sys/unix/hints/include/multiw-2.2020 @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# NetHack 3.7 multiw-2.2020 $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-3.7 $ +# NetHack 3.7 multiw-2.2020 $NHDT-Date: 1599337709 2020/09/05 20:28:29 $ $NHDT-Branch: NetHack-3.7 $ # # Sorts out support for multiple window ports (interfaces) to included in the build. # @@ -29,12 +29,17 @@ # something other than tty as the default interface. # +ifdef WANT_WIN_ALL +WANT_WIN_TTY=1 +WANT_WIN_CURSES=1 +WANT_WIN_X11=1 +WANT_WIN_QT=1 +else # Make sure that at least one interface is enabled. -ifndef WANT_WIN_ALL -ifndef WANT_WIN_TTY -ifndef WANT_WIN_CURSES -ifndef WANT_WIN_X11 -ifndef WANT_WIN_QT +ifndef WANT_WIN_TTY +ifndef WANT_WIN_CURSES +ifndef WANT_WIN_X11 +ifndef WANT_WIN_QT WANT_WIN_TTY=1 endif endif @@ -42,14 +47,6 @@ endif endif endif -ifdef WANT_WIN_ALL -WANT_WIN_TTY=1 -WANT_WIN_CURSES=1 -WANT_WIN_X11=1 -WANT_WIN_QT=1 -endif - - # Make sure that a default interface is specified; this doesn't guarantee # sanity for something like 'make WANT_WIN_CURSES=1 WANT_DEFAULT=X11' but # 'makedefs -v' would notice, complain, and quit causing 'make' to quit. diff --git a/sys/unix/hints/linux.2020 b/sys/unix/hints/linux.2020 index 3a785a530..4de9a0957 100755 --- a/sys/unix/hints/linux.2020 +++ b/sys/unix/hints/linux.2020 @@ -1,4 +1,4 @@ -# NetHack 3.7 linux.2020 $NHDT-Date: 1597704792 2020/08/17 22:53:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.7 $ +# NetHack 3.7 linux.2020 $NHDT-Date: 1599337708 2020/09/05 20:28:28 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # @@ -16,6 +16,14 @@ # linux.2020 hints file provides a single-user build for Linux (such # as Ubuntu focal). +# compiler flags: various -I, -D, and -W get appended below; +# these are the settings of most interest for an end-user build +# (clang doesn't support '-Og', gcc needs 4.x or later) +CFLAGS = -g +#CFLAGS = -g -Og +#CFLAGS = -O2 + +# note: '#-INCLUDE' is not just a comment; multiw-1 contains sections 1 to 3 #-INCLUDE multiw-1.2020 # 4. If you set WANT_WIN_QT, you need to @@ -45,8 +53,7 @@ GAMEGRP = games #-INCLUDE multiw-2.2020 -# XXX -g vs -O should go here, -I../include goes in the makefile -CFLAGS=-g -O -I../include -DNOTPARMDECL +CFLAGS+=-I../include -DNOTPARMDECL ifeq "$(CCISCLANG)" "" # get the version of gcc GCCGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9) @@ -134,7 +141,7 @@ ifeq "$(GPPGTEQ9)" "1" QTCXXFLAGS+= -Wno-format-truncation endif #g++ version greater than or equal to 9 endif #not clang -QTCXXFLAGS += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --cflags) +QTCXXFLAGS += $(sort $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --cflags)) QTCXXFLAGS += -fPIC WINLIB += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --libs) VARDATND0 += nhtiles.bmp rip.xpm nhsplash.xpm diff --git a/sys/unix/hints/macOS.2020 b/sys/unix/hints/macOS.2020 index 1a81d97ad..a5777a0f8 100755 --- a/sys/unix/hints/macOS.2020 +++ b/sys/unix/hints/macOS.2020 @@ -1,4 +1,4 @@ -# NetHack 3.7 macOS.2020 $NHDT-Date: 1597704793 2020/08/17 22:53:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.69 $ +# NetHack 3.7 macOS.2020 $NHDT-Date: 1599337708 2020/09/05 20:28:28 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.71 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. # NetHack may be freely redistributed. See license for details. # @@ -16,6 +16,14 @@ # macOS X hints file # +# compiler flags: various -I, -D, and -W get appended below; +# these are the settings of most interest for an end-user build +# (clang doesn't support '-Og', gcc needs 4.x or later) +CFLAGS = -g +#CFLAGS = -g -Og +#CFLAGS = -O2 + +# note: '#-INCLUDE' is not just a comment; multiw-1 contains sections 1 to 3 #-INCLUDE multiw-1.2020 # 4. If you set WANT_WIN_QT, you need to @@ -47,8 +55,7 @@ endif #-INCLUDE multiw-2.2020 -# XXX -g vs -O should go here, -I../include goes in the makefile -CFLAGS+=-g -I../include -DNOTPARMDECL +CFLAGS+=-I../include -DNOTPARMDECL ifndef WANT_WIN_QT # these are normally used when compiling nethack's core CFLAGS+=-ansi -pedantic -Wno-long-long @@ -139,7 +146,7 @@ ifeq "$(GPPGTEQ9)" "1" QTCXXFLAGS+= -Wno-format-truncation endif #g++ version greater than or equal to 9 endif #not clang -QTCXXFLAGS += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --cflags) +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) WINSRC += $(WINQTSRC) WINOBJ0 += $(WINQTOBJ)