more macOS.370 ncurses tinkering
This commit is contained in:
+34
-35
@@ -62,8 +62,6 @@ endif # WANT_WIN_QT5
|
|||||||
ifdef WANT_WIN_QT6
|
ifdef WANT_WIN_QT6
|
||||||
QTDIR :=$(shell brew --prefix)/opt/qt@6
|
QTDIR :=$(shell brew --prefix)/opt/qt@6
|
||||||
endif # WANT_WIN_QT6
|
endif # WANT_WIN_QT6
|
||||||
else
|
|
||||||
$(info forcing use of macports)
|
|
||||||
endif # HAVE_HOMEBREW
|
endif # HAVE_HOMEBREW
|
||||||
ifeq "$(HAVE_MACPORTS)" "1"
|
ifeq "$(HAVE_MACPORTS)" "1"
|
||||||
ifdef WANT_WIN_QT5
|
ifdef WANT_WIN_QT5
|
||||||
@@ -115,29 +113,6 @@ USE_CURSESLIB=1
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq "$(USE_CURSESLIB)" "1"
|
|
||||||
# default
|
|
||||||
CURSESLIB = -lncurses
|
|
||||||
# If CURSES_UNICODE is defined, we need ncursesw.
|
|
||||||
# Without CURSES_UNICODE the following simpler setting works.
|
|
||||||
# CURSESLIB = -lncurses -ltinfo
|
|
||||||
ifdef MAKEFILE_SRC
|
|
||||||
comma:=,
|
|
||||||
NCURSES_LFLAGS = $(shell pkg-config ncursesw --libs)
|
|
||||||
ifneq (,$(findstring ncurses, $(NCURSES_LFLAGS)))
|
|
||||||
HAVE_NCURSESW=1
|
|
||||||
else
|
|
||||||
HAVE_NCURSESW=0
|
|
||||||
endif
|
|
||||||
#$(info $(NCURSES_LFLAGS))
|
|
||||||
#$(info HAVE_NCURSESW=$(HAVE_NCURSESW))
|
|
||||||
ifeq "$(HAVE_NCURSESW)" "1"
|
|
||||||
CURSESLIB = $(NCURSES_LFLAGS)
|
|
||||||
#$(info $(CURSESLIB))
|
|
||||||
endif #HAVE_NCURSESW
|
|
||||||
endif #MAKEFILE_SRC
|
|
||||||
endif #USE_CURSESLIB
|
|
||||||
|
|
||||||
# NetHack sources control
|
# NetHack sources control
|
||||||
NHCFLAGS+=-DDLB
|
NHCFLAGS+=-DDLB
|
||||||
NHCFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
|
NHCFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
|
||||||
@@ -157,17 +132,38 @@ NHCFLAGS+=-DNOMAIL
|
|||||||
#NHCFLAGS+=-DTTY_SOUND_ESCCODES
|
#NHCFLAGS+=-DTTY_SOUND_ESCCODES
|
||||||
#NHCFLAGS+=-DNO_CHRONICLE
|
#NHCFLAGS+=-DNO_CHRONICLE
|
||||||
#NHCFLAGS+=-DLIVELOG
|
#NHCFLAGS+=-DLIVELOG
|
||||||
ifdef WANT_WIN_CURSES
|
|
||||||
ifeq "$(HAVE_NCURSESW)" "1"
|
|
||||||
NHCFLAGS+=-DCURSES_UNICODE
|
|
||||||
else
|
|
||||||
ifdef MAKEFILE_SRC
|
|
||||||
$(info Attention: CURSES_UNICODE is not being defined without ncursesw)
|
|
||||||
endif #MAKEFILE_SRC
|
|
||||||
endif #HAVE_NCURSESW
|
|
||||||
endif #WANT_WIN_CURSES
|
|
||||||
|
|
||||||
ifdef MAKEFILE_SRC
|
ifdef MAKEFILE_SRC
|
||||||
|
ifeq "$(USE_CURSESLIB)" "1"
|
||||||
|
# default
|
||||||
|
CURSESLIB = -lncurses
|
||||||
|
ifeq "$(CURSES_UNICODE)" "sys"
|
||||||
|
NHCFLAGS+=-DCURSES_UNICODE
|
||||||
|
else
|
||||||
|
# If CURSES_UNICODE is defined, we need ncursesw.
|
||||||
|
# Without CURSES_UNICODE the following simpler setting works.
|
||||||
|
# CURSESLIB = -lncurses -ltinfo
|
||||||
|
comma:=,
|
||||||
|
NCURSES_LFLAGS = $(shell pkg-config ncursesw --libs)
|
||||||
|
ifneq (,$(findstring ncurses, $(NCURSES_LFLAGS)))
|
||||||
|
HAVE_NCURSESW=1
|
||||||
|
else
|
||||||
|
HAVE_NCURSESW=0
|
||||||
|
endif
|
||||||
|
ifneq "$(CURSES_UNICODE)" "0"
|
||||||
|
ifeq "$(HAVE_NCURSESW)" "1"
|
||||||
|
CURSESLIB = $(NCURSES_LFLAGS)
|
||||||
|
NHCFLAGS+=-DCURSES_UNICODE
|
||||||
|
else
|
||||||
|
$(info Attention: CURSES_UNICODE is not being defined without ncursesw)
|
||||||
|
endif #HAVE_NCURSESW
|
||||||
|
endif #not CURSES_UNICODE=0
|
||||||
|
endif #not CURSES_UNICODE=sys
|
||||||
|
endif #USE_CURSESLIB
|
||||||
|
endif #MAKEFILE_SRC
|
||||||
|
|
||||||
|
ifdef MAKEFILE_SRC
|
||||||
|
ifneq "$(CURSES_UNICODE)" "0"
|
||||||
ifdef CURSESLIB
|
ifdef CURSESLIB
|
||||||
PKGCFLAGS=
|
PKGCFLAGS=
|
||||||
ifeq "$(HAVE_HOMEBREW)" "1"
|
ifeq "$(HAVE_HOMEBREW)" "1"
|
||||||
@@ -194,6 +190,9 @@ LFLAGS += $(HOMEBREW_LFLAGS) $(MACPORTS_LFLAGS)
|
|||||||
WINLIB += $(HOMEBREW_WINLIB) $(MACPORTS_WINLIB) $(CURSESLIB)
|
WINLIB += $(HOMEBREW_WINLIB) $(MACPORTS_WINLIB) $(CURSESLIB)
|
||||||
PKGCFLAGS += $(HOMEBREW_CFLAGS) $(MACPORTS_CFLAGS)
|
PKGCFLAGS += $(HOMEBREW_CFLAGS) $(MACPORTS_CFLAGS)
|
||||||
endif #CURSESLIB
|
endif #CURSESLIB
|
||||||
|
else # CURSES_UNICODE
|
||||||
|
WINLIB += $(CURSESLIB)
|
||||||
|
endif #not CURSES_UNICODE=0
|
||||||
endif #MAKEFILE_SRC
|
endif #MAKEFILE_SRC
|
||||||
|
|
||||||
CFLAGS+= $(PKGCFLAGS) $(WINCFLAGS) #WINCFLAGS set from multiw-2.370
|
CFLAGS+= $(PKGCFLAGS) $(WINCFLAGS) #WINCFLAGS set from multiw-2.370
|
||||||
@@ -214,7 +213,7 @@ ifdef WANT_WIN_X11
|
|||||||
USE_XPM=1
|
USE_XPM=1
|
||||||
WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
|
WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
|
||||||
VARDATND0 += x11tiles NetHack.ad pet_mark.xbm pilemark.xbm
|
VARDATND0 += x11tiles NetHack.ad pet_mark.xbm pilemark.xbm
|
||||||
# -x: if built without dlb, some versions of mkfontdir think *.lev are fonts
|
# -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 );
|
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
|
# separate from CFLAGS so that we don't pass it to every file
|
||||||
X11CFLAGS = -I/opt/X11/include
|
X11CFLAGS = -I/opt/X11/include
|
||||||
|
|||||||
Reference in New Issue
Block a user