OSDN Git Service

import nethack-3.6.0
[jnethack/source.git] / sys / unix / hints / linux-chroot
1 #
2 # NetHack 3.5  linux $NHDT-Date$  $NHDT-Branch$:$NHDT-Revision$
3 # NetHack 3.5  linux $Date: 2010/01/15 19:54:37 $  $Revision: 1.8 $
4 # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
5 # NetHack may be freely redistributed.  See license for details. 
6 #
7 #-PRE
8 # Linux hints file
9 # This hints file provides a chrooted build for Linux, specifically
10 # for Ubuntu dapper.
11 # Does not copy required libraries or termcap files into the chroot.
12
13 COMPILEREVISION?=1
14
15 # this is the chroot dir
16 PREFIX=$(wildcard ~)/nh/install
17
18 # this is the dir where NetHack is inside the chroot
19 HACKDIR=/nh.$(shell date +%Y%m%d)-$(COMPILEREVISION)
20 INSTDIR=$(PREFIX)$(HACKDIR)
21 SHELLDIR=$(PREFIX)/games
22 VARDIR=$(INSTDIR)/var
23
24
25 POSTINSTALL=cp -n sys/unix/sysconf $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf;
26
27 CFLAGS1=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
28 CFLAGS=-g -O -I../include -DNOTPARMDECL $(CFLAGS1) -DDLB
29 CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
30 CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
31 CFLAGS+=-DVAR_PLAYGROUND=\"$(HACKDIR)/var\"
32
33 LINK=$(CC)
34 # Only needed for GLIBC stack trace:
35 LFLAGS=-rdynamic
36
37 WINSRC = $(WINTTYSRC)
38 WINOBJ = $(WINTTYOBJ)
39 WINLIB = $(WINTTYLIB)
40
41 WINTTYLIB=-lcurses
42
43 CHOWN=true
44 CHGRP=true
45
46 VARDIRPERM = 0755
47 VARFILEPERM = 0600
48 GAMEPERM = 0755