1. remove all window interface bits from compiler.370, and have the preceding include files set some variables to control the behavior of compiler.370 when it comes to c++. 2. some more common Makefile lines into sys/unix/hints/include/multiw-3.370. 3. make it so you can pass cppregex=1 on the Make command line to build with sys/share/cppregex.cpp instead of posixregex.c 4. fix sys/share/cppregex.cpp so that it will build with clang compiler (required an additional header include). I don't know if it would have worked with g++ without that change. The include can be placed into an #ifdef block if there's an issue with the change on other compilers. 5. Anything that needs to compile using c++ (Qt, sys/share/cppregex.cpp) can just ensure that CPLUSPLUS_NEEDED Makefile variable is set above the lines in compiler.370 to ensure that things get set up for c++. It no longer checks specifically for Qt. That is what sys/unix/hints/include/multiw-2.370 does now.
71 lines
1.7 KiB
Plaintext
71 lines
1.7 KiB
Plaintext
#------------------------------------------------------------------------------
|
|
# NetHack 3.7 multiw-3.370 $NHDT-Date: 1668359836 2022/11/13 17:17:16 $ $NHDT-Branch: NetHack-3.7 $
|
|
#
|
|
# Further set-up for multiple window ports (interfaces) that comes after compiler.370.
|
|
#
|
|
# Included from:
|
|
# hints/linux.370
|
|
# hints/macOS.370
|
|
#
|
|
|
|
# This ensures that .moc files are compatible with the version of Qt chosen.
|
|
#
|
|
ifdef MAKEFILE_SRC
|
|
ifdef WANT_WIN_QT
|
|
# when switching from Qt5 to Qt6 or vice versa, any old .moc files will be
|
|
# incompatible; get rid of them in case user hasn't run 'make spotless';
|
|
# object files are incompatable with Qt library, so get rid of them too;
|
|
# Qt*.h-t are empty timestamp files and at most one should exist
|
|
QTany_H = Qt*.h-t
|
|
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
|
|
QTn_H = Qt5.h-t
|
|
endif
|
|
$(QTn_H) ::
|
|
@if test ! -f $@; then ( rm -f $(QTany_H) *.moc qt_*.o; touch $@ ); fi;
|
|
endif #WANT_WIN_QT
|
|
endif #MAKFILE_SRC
|
|
|
|
ifdef WANT_WIN_TTY
|
|
USE_CURSESLIB=1
|
|
endif
|
|
|
|
ifdef WANT_WIN_CURSES
|
|
ifneq "$(USE_CURSESLIB)" "1"
|
|
USE_CURSESLIB=1
|
|
endif
|
|
endif
|
|
|
|
ifeq "$(GIT)" "1"
|
|
ifndef GITSUBMODULES
|
|
GITSUBMODULES=1
|
|
endif
|
|
endif
|
|
|
|
ifeq "$(git)" "1"
|
|
ifndef GITSUBMODULES
|
|
GITSUBMODULES=1
|
|
endif
|
|
endif
|
|
|
|
ifeq "$(CPPREGEX)" "1"
|
|
REGEXOBJ=$(TARGETPFX)cppregex.o
|
|
ifndef CPLUSPLUS_NEEDED
|
|
CPLUSPLUS_NEEDED = 1
|
|
endif
|
|
endif
|
|
|
|
ifeq "$(cppregex)" "1"
|
|
REGEXOBJ=$(TARGETPFX)cppregex.o
|
|
ifndef CPLUSPLUS_NEEDED
|
|
CPLUSPLUS_NEEDED = 1
|
|
endif
|
|
endif
|
|
|
|
#end of hints/include/multiw-3.370
|
|
#------------------------------------------------------------------------------
|
|
|