2 # NetHack 3.6 macosx $ANH-Date: 1447844580 2015/11/18 11:03:00 $ $ANH-Branch: master $:$ANH-Revision: 1.18 $
3 # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
4 # NetHack may be freely redistributed. See license for details.
7 # Mac OS X (Darwin) hints file
8 # This is for Mac OS X 10.4.10 (Darwin 8.10). If this doesn't work for some
9 # other version of either Darwin or Mac OS X, make a new file for that OS,
10 # don't change this one. And let us know about it.
11 # Useful info: http://www.opensource.apple.com/darwinsource/index.html
13 # This hints file can build several different types of installations.
14 # Edit the next section to match the type of build you need.
16 # 1. Which window system(s) should be included in this binary?
21 # 1a. What is the default window system?
26 # 1b. If you set WANT_WIN_QT, you need to
27 # A) set QTDIR either here or in the environment to point to the Qt2 or Qt3
28 # library installation root. (Qt4 will not work; Qt3 does not presently
29 # compile under Leopard (MacOSX 10.5) out-of-the-box.)
30 # B) set XPMLIB to point to the Xpm library
33 LIBXPM= -L/Developer/SDKs/MacOSX10.3.9.sdk/usr/X11R6/lib -lXpm
36 # 2. Is this a build for a binary that will be shared among different users
37 # or will it be private to you?
39 # - it will be owned by the user and group listed
40 # - you MUST create the user using System Preferences (this will also
41 # create the group if it is the same as the user)
42 # - 'make install' must be run as "sudo make install"
48 #CC=gcc -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -DGCC_WARN
49 CC=gcc -Wall -Wextra -Wno-missing-field-initializers -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings -DGCC_WARN
52 # You shouldn't need to change anything below here.
55 # XXX -g vs -O should go here, -I../include goes in the makefile
56 CFLAGS=-g -I../include
57 CFLAGS+=-DNOCLIPPING -DNOMAIL -DNOTPARMDECL -DHACKDIR=\"$(HACKDIR)\"
58 CFLAGS+= -DDEFAULT_WINDOW_SYS=\"$(WANT_DEFAULT)\" -DDLB
66 CFLAGS += -DNOTTYGRAPHICS
70 WINSRC += $(WINX11SRC)
71 WINOBJ += $(WINX11OBJ)
72 WINLIB += $(WINX11LIB)
73 LFLAGS=-L/usr/X11R6/lib
74 VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xbm
75 POSTINSTALL= bdftopcf win/X11/nh10.bdf > $(INSTDIR)/nh10.pcf; (cd $(INSTDIR); mkfontdir)
76 CFLAGS += -DX11_GRAPHICS
80 CFLAGS += -DQT_GRAPHICS -DNOUSER_SOUNDS
81 CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
84 WINLIB += $(WINQTLIB) $(LIBXPM)
85 WINLIB += -framework Carbon -framework QuickTime -lz -framework OpenGL
86 WINLIB += -framework AGL
88 # prevent duplicate tile.o in WINOBJ
89 WINOBJ = $(sort $(WINQTOBJ) $(WINX11OBJ))
91 WINOBJ += $(WINTTYOBJ)
96 # XXX if /Developer/qt exists and QTDIR not set, use that
98 $(error QTDIR not defined in the environment or Makefile)
100 # XXX make sure QTDIR points to something reasonable
105 ifdef WANT_SHARE_INSTALL
106 # NB: do NOT use $(wildcard ~$(GAMEUID)) since the user may not exist yet.
107 PREFIX:=/Users/$(GAMEUID)
108 SHELLDIR=$(PREFIX)/bin
109 HACKDIR=$(PREFIX)/nethackdir
114 # We run sgid so the game has access to both HACKDIR and user preferences.
118 ROOTCHECK= [[ `id -u` == 0 ]] || ( echo "Must run install with sudo."; exit 1)
119 # make sure we have group GAMEUID and group GAMEGRP
120 PREINSTALL= . sys/unix/hints/macosx.sh user $(GAMEUID); . sys/unix/hints/macosx.sh group $(GAMEGRP); mkdir $(SHELLDIR); chown $(GAMEUID) $(SHELLDIR)
121 POSTINSTALL= touch $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf
122 CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
124 PREFIX:=$(wildcard ~)
125 SHELLDIR=$(PREFIX)/bin
126 HACKDIR=$(PREFIX)/nethackdir
135 # XXX install nethack.rc as ~/.nethackrc if no ~/.nethackrc exists
140 # ~/Library/Preferences/NetHack Defaults
141 # OPTIONS=name:player,number_pad,menustyle:partial,!time,showexp
142 # OPTIONS=hilite_pet,toptenwin,msghistory:200,windowtype:Qt
144 # Install.Qt mentions a patch for macos - it's not there (it seems to be in the Qt binary
145 # package under the docs directory).