Files
nethack/sys/unix/README-hints
nhmall 349fbe93b1 less verbose compiler command lines during build
If using hints file sys/unix/hints/linux.370 or sys/unix/hints/macOS.370
allow the majority of the boilerplate compile switches to reside in a
compiler response file, instead of on the command line.

Include one of the following on your make command line:

make response=1
  or
make resp=1

It can be combined with other make command line options. See
sys/unix/README-hints for further information about those.

The response files that it uses are:
    CC   (clang or gcc)    src/nethack_cc.rsp
    CXx  (clang++ or g++)  src/nethack_cxx.rsp

Note: I think the reduced clutter should actually become the default,
and the override should be noresponse=1 to NOT use it, but I'm
not sure how others feel, so for now, it requires
    make resp=1
Feedback on whether that should become the default or not
is welcome.

Tested on Linux with gcc-15 and on Linux with clang-20.

I haven't had a chance to test it on macOS yet.
2025-09-07 12:50:54 -04:00

84 lines
4.1 KiB
Plaintext

The sys/unix/hints subfolder contains Makefile content building blocks
for various platforms and purposes.
The sys/unix/hints/include subfolder contains Makefile content that
is included in the distributed Makefiles.
[.370 hints]
There are two .370 series hints files provided with NetHack:
linux.370 for use on Linux
macOS.370 for use on macOS
Those will also pull in content from sys/unix/hints/include/*.370,
that is shared between the linux.370 and macOS.370 hints files.
[.370 make build options]
Here are some options that can be specified on the make command
line to trigger specific build behavior. These are not mutually
exclusive and multiple build options can be specified in many
cases to include support for multiple features. Some of the options
require prerequisite packages to be available on your build machine.
make WANT_WIN_TTY=1 Include support for the TTY interface (default).
make WANT_WIN_CURSES=1 Include support for the curses interface.
make WANT_WIN_X11=1 Include support for the X11 interface.
make WANT_WIN_Qt=1 Include support for Qt interface, defaults to Qt5.
make WANT_WIN_QT5=1 Include support for Qt5 interface.
make WANT_WIN_QT6=1 Include support for Qt6 interface. Only one Qtx
option can be specified.
make WANT_WIN_ALL=1 Include support for TTY,curses,X11, and Qt.
make WANT_WINCHAIN=1 Include support for WINCHAIN.
make WANT_LIBNH=1 Include support for libnh NetHack library.
make WANT_DEFAULT=tty Make tty the default interface if multiple window
interfaces were specified.
make WANT_DEFAULT=curses Make curses the default interface if multiple window
interfaces were specified.
make WANT_DEFAULT=X11 Make X11 the default interface if multiple window
interfaces were specified.
make WANT_DEFAULT=Qt Make Qt the default interface if multiple window
interfaces were specified.
make musl=1 Build with settings appropriate for linking with
musl libc, instead of glibc. This causes
NOCRASHREPORT to be defined, and avoids the use
of 'col' during the build.
make resp=1 Place the majority of the compiler switches into
a response file to de-clutter the build compiler
command lines and eliminate some of the
unsightly wrapping that occurs.
make CROSS_TO_MSDOS=1 package Cross-compile for an MSDOS target package.
make CROSS_TO_WASM=1 Cross-compile for a WASM target.
make CROSS_TO_MIPS=1 Cross-compile for a mips target.
make WANT_BUNDLE=1 For macOS.370 only, place the build results into
a macOS bundle layout.
make WANT_MACSOUND=1 For macOS.370, include support for built-in macOS
sound libraries.
make WANT_SPEECH=1 If one of the sound libraries was included, also
include speech synthesis support (Recent macOS
build that also includes WANT_MACSOUND=1).
make WANT_ASAN=1 Include support for the address sanitizer in the
build.
make WANT_UBSAN=1 Include support for the undefined behaviour
sanitizer in the build.
make WANT_SHARE_INSTALL=1 Place the results of the install/update portion
of the build into a shared area on a multiuser
system.
make WANT_SOURCE_INSTALL=1 Place the results of the install/update portion
of the build into a subfolder of the source
tree, rather than in a system-wide shared area.
make VIEWDEPRECATIONS=1 Turn off the suppression of -Wdeprecated and
-Wdeprecated-declarations warnings