#
# NetHack 3.5  linux $NHDT-Date: 1524684267 2018/04/25 19:24:27 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.1 $
# NetHack 3.5  linux $Date: 2010/01/15 19:54:37 $  $Revision: 1.8 $
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
# NetHack may be freely redistributed.  See license for details. 
#
#-PRE
# Linux hints file
# This hints file provides a chrooted build for Linux, specifically
# for Ubuntu dapper.
# Does not copy required libraries or termcap files into the chroot.

COMPILEREVISION?=1

# this is the chroot dir
PREFIX=$(wildcard ~)/nh/install

# this is the dir where NetHack is inside the chroot
HACKDIR=/nh.$(shell date +%Y%m%d)-$(COMPILEREVISION)
INSTDIR=$(PREFIX)$(HACKDIR)
SHELLDIR=$(PREFIX)/games
VARDIR=$(INSTDIR)/var


POSTINSTALL=cp -n sys/unix/sysconf $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf;

CFLAGS1=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
CFLAGS=-g -O -I../include -DNOTPARMDECL $(CFLAGS1) -DDLB
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
CFLAGS+=-DTIMED_DELAY
CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
CFLAGS+=-DVAR_PLAYGROUND=\"$(HACKDIR)/var\"

LINK=$(CC)
# Only needed for GLIBC stack trace:
LFLAGS=-rdynamic

WINSRC = $(WINTTYSRC)
WINOBJ = $(WINTTYOBJ)
WINLIB = $(WINTTYLIB)

WINTTYLIB=-lcurses

CHOWN=true
CHGRP=true

VARDIRPERM = 0755
VARFILEPERM = 0600
GAMEPERM = 0755
