1
$ save_verify='f$verify(0)
4
$! Compile and link for xdino
7
$! @make [debug clobber clean]
8
$! debug : compile with debugger switch
9
$! clean : clean all except executable
10
$! clobber : clean all
13
$! XVMSUTILS library (VMS6.2 or lower)
15
$! insert the correct directory instead of X11:
16
$ xvmsutilsf="X11:XVMSUTILS.OLB"
17
$ xpmf="SYS$LIBRARY:LIBXPM.OLB"
19
$! Already assumes DEC C on Alpha.
20
$! Assume VAX C on VAX.
22
$! Assume DEC C on VAX.
26
$ QUOTE = QUOTE + QUOTE + QUOTE
27
$ scorepath = "SCOREPATH=" + QUOTE + "[]" + QUOTE
28
$ scorefile = "SCOREFILE=" + QUOTE + "dino.scores" + QUOTE
29
$ logpath = "LOGPATH=" + QUOTE + "[]" + QUOTE
30
$ logfile = "LOGFILE=" + QUOTE + "dino.log" + QUOTE
31
$ defscore=="''scorepath',''scorefile'"
32
$ deflog=="''logpath',''logfile'"
34
$! NOTHING SHOULD BE MODIFIED BELOW
36
$ if p1 .eqs. "CLEAN" then goto Clean
37
$ if p1 .eqs. "CLOBBER" then goto Clobber
39
$ axp=f$getsyi("HW_MODEL") .ge. 1024
40
$ sys_ver=f$edit(f$getsyi("version"),"compress")
41
$ if f$extract(0,1,sys_ver) .nes. "V"
44
This script will assume that the operating system version is at least V7.0.
48
$ sys_maj=0+f$extract(1,1,sys_ver)
51
$ xvmsutils=f$search("''xvmsutilsf'") .nes. ""
53
$ xpm=f$search("''xpmf'") .nes. ""
58
$ open/write optf xdino.opt
61
$ defs=="''defs',HAVE_MOTIF"
62
$ if xpm then defs=="''defs',HAVE_XPM"
65
$ if xvmsutils then defs=="''defs',USE_XVMSUTILS"
67
$ defs=="''defs',SRAND=srand48,LRAND=lrand48,MAXRAND=2147483648.0"
69
$ defs=="''defscore',''deflog',''defs'"
72
$! Establish the Compiling Environment
74
$! Set compiler command
77
$ cc=="cc/standard=vaxc/define=(''defs')"
81
$ cc=="cc/decc/standard=vaxc/define=(''defs')"
83
$ cc=="cc/define=(''defs')"
86
$ if p1 .eqs. "DEBUG" .or. p2 .eqs. "DEBUG" .or. p3 .eqs. "DEBUG"
90
$ cc=="cc/deb/noopt/standard=vaxc/define=(''defs')/list"
94
$ cc=="cc/deb/noopt/decc/standard=vaxc/define=(''defs')/list"
96
$ cc=="cc/deb/noopt/define=(''defs')/list"
102
$ if axp .or. .not. decc
104
$ define/nolog sys sys$library
107
$ write sys$output "Compiling xdino with ''defs'"
108
$ call make Dino.obj "cc Dino.c" Dino.c DinoP.h Dino.h
109
$ call make Dino2d.obj "cc Dino2d.c" Dino2d.c DinoP.h Dino.h Dino2dP.h Dino2d.h
110
$ call make Dino3d.obj "cc Dino3d.c" Dino3d.c DinoP.h Dino.h Dino3dP.h Dino3d.h
111
$ call make DinoU.obj "cc DinoU.c" DinoU.c DinoP.h Dino.h
112
$ call make rngs.obj "cc rngs.c" rngs.c
113
$ call make xdino.obj "cc xdino.c" xdino.c Dino.h
116
$ if xpm then write optf "''xpmf'/lib"
119
$ if xvmsutils then write optf "''xvmsutilsf'/lib"
121
$! if .not. axp then write optf "sys$library:vaxcrtl/lib"
122
$ write optf "sys$library:vaxcrtl/lib"
123
$ if axp then write optf "sys$library:ucx$ipc_shr/share"
124
$ if axp then write optf "sys$share:decw$xextlibshr/share"
125
$ if axp then write optf "sys$share:decw$xtlibshrr5/share"
126
$ if .not. axp then write optf "sys$library:ucx$ipc/lib"
127
$! write optf "sys$share:decw$dxmlibshr/share"
128
$ write optf "sys$share:decw$xmlibshr12/share"
129
$ write optf "sys$share:decw$xlibshr/share"
133
$ write sys$output "Linking xdino"
139
$Clobber: ! Delete executables, Purge directory and clean up object files
141
$ delete/noconfirm/log xdino.exe;*
143
$Clean: ! Purge directory, clean up object files and listings
146
$ delete/noconfirm/log *.lis;*
147
$ delete/noconfirm/log *.obj;*
148
$ delete/noconfirm/log *.opt;*
149
$ delete/noconfirm/log *.map;*
153
! SUBROUTINE TO CHECK DEPENDENCIES
156
$! p1 What we are trying to make
157
$! p2 Command to make it
158
$! p3 - p8 What it depends on
160
$ if (f$extract(0,3,p2) .eqs. "cc ") then write optf "''p1'"
161
$ if (f$extract(0,3,p2) .eqs. "CC ") then write optf "''p1'"
163
$ if f$search(p1) .eqs. "" then goto MakeIt
164
$ time=f$cvtime(f$file(p1,"RDT"))
168
$ if argument .eqs. "" then goto Exit
171
$ file=f$element(el," ",argument)
172
$ if file .eqs. " " then goto Endl
176
$ afile=f$search(file)
177
$ if afile .eqs. "" .or. afile .eqs. ofile then goto NextEl
178
$ if f$cvtime(f$file(afile,"RDT")) .gts. time then goto MakeIt
185
$ if arg .le. 8 then goto Loop
193
$ if v then set verify