# NetHack Makefile (VMS) - for building nethack itself.
-# NetHack 3.6 Makefile.src $NHDT-Date: 1549835645 2019/02/10 21:54:05 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.33 $
+# NetHack 3.6 Makefile.src $NHDT-Date: 1550360058 2019/02/16 23:34:18 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.34 $
# Copyright (c) 2011 by Robert Patrick Rankin
# NetHack may be freely redistributed. See license for details.
SYSSHR = [-.sys.share]
SRC = [-.src]
TTY = [-.win.tty]
+CURSES = [-.win.curses]
UTL = [-.util]
VMS = [-.sys.vms]
WINSHR = [-.win.share]
$(TERMCAPSRC)
WINTTYOBJ = getline.obj,termcap.obj,topl.obj,wintty.obj $(TERMCAPOBJ)
#
+# curses; doesn't use termcap; may or may not support TERMTABLE for non-DEC tty
+WINCURSESSRC = $(CURSES)cursdial.c $(CURSES)cursmesg.c $(CURSES)cursinit.c \
+ $(CURSES)cursmisc.c $(CURSES)cursinvt.c $(CURSES)cursstat.c \
+ $(CURSES)cursmain.c $(CURSES)curswins.c
+WINCURSESOBJ = cursdial.obj,cursmesg.obj,cursinit.obj,cursmisc.obj, \
+ cursinvt.obj,cursstat.obj,cursmain.obj,curswins.obj
+#
# an X11 port (not supported under DECwindows)
WINX11SRC = $(X11)Window.c $(X11)dialogs.c $(X11)winX.c $(X11)winmap.c \
$(X11)winmenu.c $(X11)winmesg.c $(X11)winmisc.c $(X11)winstat.c \
winmesg.obj,winmisc.obj,winstat.obj,wintext.obj,winval.obj,tile.obj
#
#
+# make sure both WANT_WIN_TTY and WANT_WIN_CURSES have a value
+.ifndef WANT_WIN_CURSES
+WANT_WIN_CURSES=0
+.endif
+.ifndef WANT_WIN_TTY
+.if WANT_WIN_CURSES
+WANT_WIN_TTY=0
+.else
+WANT_WIN_TTY=1
+.endif
+.endif
+
+.if WANT_WIN_TTY
WINSRC = $(WINTTYSRC)
WINOBJ = $(WINTTYOBJ)
+.if WANT_WIN_CURSES
+WINSRC +=,$(WINCURSESSRC)
+WINOBJ += $(WINCURSESOBJ)
+.endif
+.else
+.if WANT_WIN_CURSES
+WINSRC = $(WINCURSESSRC)
+WINOBJ = $(WINCURSESOBJ)
+.else
+# Neither WANT_WIN_TTY nor WANT_WIN_CURSES?
+.endif
+.endif
# make NetHack for VMS
SYSTEM = SysVMS.timestamp;
vmsmail.obj : $(VMS)vmsmail.c $(CONFIG_H) $(INC)mail.h \
$(INC)wintype.h $(INC)winprocs.h
# conditionally used code -- VMS always wants these
-isaac64.obj : isaac64.c
+isaac64.obj : isaac64.c $(CONFIG_H) $(INC)isaac64.h
random.obj : random.c $(HACK_H)
random.c : $(SYSSHR)random.c
copy $(SYSSHR)random.c random.c
$ ! vms/vmsbuild.com -- compile and link NetHack 3.6.* [pr]
$ version_number = "3.6.2"
-$ ! $NHDT-Date: 1549835647 2019/02/10 21:54:07 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.21 $
+$ ! $NHDT-Date: 1550360057 2019/02/16 23:34:17 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.22 $
$ ! Copyright (c) 2018 by Robert Patrick Rankin
$ ! NetHack may be freely redistributed. See license for details.
$ !
$ ! usage:
$ ! $ set default [.src] !or [-.-.src] if starting from [.sys.vms]
-$ ! $ @[-.sys.vms]vmsbuild [compiler-option] [link-option] [cc-switches]
+$ ! $ @[-.sys.vms]vmsbuild [compiler-option] [link-option] [cc-switches] -
+$ ! [linker-switches] [interface]
$ ! options:
$ ! compiler-option : either "VAXC", "DECC" or "GNUC" or "" !default VAXC
$ ! link-option : either "SHARE[able]" or "LIB[rary]" !default SHARE
$ ! cc-switches : optional qualifiers for CC (such as "/noOpt/Debug")
+$ ! linker-switches : optional qualifers for LINK (/Debug or /noTraceback)
+$ ! interface : "TTY" or "CURSES" or "TTY+CURSES" or "CURSES+TTY"
$ ! notes:
-$ ! If the symbol "CC" is defined, compiler-option is not used.
+$ ! If the symbol "CC" is defined, compiler-option is not used (unless it
+$ ! is "LINK").
$ ! The link-option refers to VAXCRTL (C Run-Time Library) handling;
$ ! to specify it while letting compiler-option default, use "" as
$ ! the compiler-option.
$ ! To re-link without compiling, use "LINK" as special 'compiler-option';
$ ! to re-link with GNUC library, 'CC' must begin with "G" (or "g").
-$ ! Default wizard definition moved to include/vmsconf.h.
+$ ! All options are positional; to specify a later one without an earlier
+$ ! one, use "" in the earlier one's position, such as
+$ ! $ @[-.sys.vms]vmsbuild "" "" "" "" "TTY+CURSES"
$
$ decc_dflt = f$trnlnm("DECC$CC_DEFAULT")
$ j = (decc_dflt.nes."") .and. 1
$ if f$search("tclib.c") .eqs."" then copy [-.sys.share]tclib.c []*.*
$ if f$search("[-.util]lev_yacc.c").eqs."" then @[-.sys.vms]spec_lev.com
$!
+$ p5 := 'p5'
+$ ttysrc = "[-.win.tty]getline,[-.win.tty]termcap" -
+ + ",[-.win.tty]topl,[-.win.tty]wintty"
+$ cursessrc = "[-.win.curses]cursdial,[-.win/curses]cursmesg" -
+ + ",[-.win.curses]cursinit,[-.win.curses]cursmisc" -
+ + ",[-.win.curses]cursinvt,[-.win.curses]cursstat" -
+ + ",[-.win.curses]cursmain,[-.win.curses]curswins"
+$ interface = ttysrc !default
+$ if p5.eqs."CURSES" then interface = cursessrc
+$ if p5.eqs."TTY+CURSES" then interface = ttysrc + "," + cursessrc
+$ if p5.eqs."CURSES+TTY" then interface = cursessrc + "," + ttysrc
+$!
$! create object library
$!
$ if c_opt.ne.o_SPCL .or. f$search(nethacklib).eqs."" then -
+ ",[]isaac64" - !already in [.src]
+ ",[]random,[]tclib,[]pmatchregex" !copied from [-.sys.share]
$ gosub compile_list
-$ c_list = "[-.win.tty]getline,[-.win.tty]termcap" -
- + ",[-.win.tty]topl,[-.win.tty]wintty"
+$ c_list = interface !ttysrc or cursessrc or both
$ gosub compile_list
$ c_list = "allmain,apply,artifact,attrib,ball,bones,botl,cmd,dbridge,detect" -
+ ",dig,display,do,do_name,do_wear,dog,dogmove,dokick,dothrow,drawing" -