A single, self-contained GNUmakefile for building
NetHack with GNU make,
designed to be placed into a full NetHack source tree.
- C compiler (GCC or Clang)
pkg-config- GNU make
- ncurses development package with Unicode support (e.g.
libncursesw*-devon Debian/Ubuntu,ncurses-develon Fedora/openSUSE,ncurseson Arch Linux) git(to fetch Lua automatically at build time)
- Copy the
GNUmakefileinto the root directory of a full NetHack source tree. - Run
make. make installinstalls tobuild/.- start nethack with
cd build ; ./nethack.
make # compiles src/nethack, util/recover, dat/nhdat, etc.
make install # installs to build/
make clean # removes build artifacts
make cleandeps # also removes dependency filesInstall dependencies via Homebrew:
brew install gmake pkg-config ncursesThe system ncurses lacks Unicode support; setting PKG_CONFIG_PATH tells
pkg-config where to find Homebrew's ncurses installation:
export PKG_CONFIG_PATH="$(brew --prefix ncurses)/lib/pkgconfig"
gmake
gmake installThis build system is licensed under the MIT license.