~ubuntu-branches/ubuntu/karmic/xpuzzles/karmic

« back to all changes in this revision

Viewing changes to xdino/vms/make.com

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-22 16:29:42 UTC
  • mfrom: (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050822162942-tdtf178zkpd3xxdg
Tags: 7.1.3-1ubuntu1
Update {build-,}depends for xorg -> mesa transition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
$ save_verify='f$verify(0)
 
2
$! set ver
 
3
$!
 
4
$!      Compile and link for xdino
 
5
$!
 
6
$! USAGE:
 
7
$! @make [debug clobber clean]
 
8
$!       debug : compile with debugger switch
 
9
$!       clean : clean all except executable
 
10
$!       clobber : clean all
 
11
$!
 
12
$! If you have
 
13
$!              XVMSUTILS library (VMS6.2 or lower)
 
14
$!              XPM library
 
15
$! insert the correct directory instead of X11:
 
16
$ xvmsutilsf="X11:XVMSUTILS.OLB"
 
17
$ xpmf="SYS$LIBRARY:LIBXPM.OLB"
 
18
$!
 
19
$! Already assumes DEC C on Alpha.
 
20
$! Assume VAX C on VAX.
 
21
$ decc=0
 
22
$! Assume DEC C on VAX.
 
23
$! decc=1
 
24
$!
 
25
$ QUOTE = """""""""
 
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'"
 
33
$!
 
34
$! NOTHING SHOULD BE MODIFIED BELOW
 
35
$!
 
36
$ if p1 .eqs. "CLEAN" then goto Clean
 
37
$ if p1 .eqs. "CLOBBER" then goto Clobber
 
38
$!
 
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"
 
42
$ then
 
43
$   type sys$input
 
44
This script will assume that the operating system version is at least V7.0.
 
45
$!
 
46
$   sys_ver="V7.0"
 
47
$ endif
 
48
$ sys_maj=0+f$extract(1,1,sys_ver)
 
49
$ if sys_maj .lt. 7
 
50
$ then
 
51
$   xvmsutils=f$search("''xvmsutilsf'") .nes. ""
 
52
$ endif
 
53
$ xpm=f$search("''xpmf'") .nes. ""
 
54
$!
 
55
$!
 
56
$! Create .opt file
 
57
$ close/nolog optf
 
58
$ open/write optf xdino.opt
 
59
$!
 
60
$ defs=="VMS"
 
61
$ defs=="''defs',HAVE_MOTIF"
 
62
$ if xpm then defs=="''defs',HAVE_XPM"
 
63
$ if sys_maj .lt. 7
 
64
$ then
 
65
$   if xvmsutils then defs=="''defs',USE_XVMSUTILS"
 
66
$ else
 
67
$   defs=="''defs',SRAND=srand48,LRAND=lrand48,MAXRAND=2147483648.0"
 
68
$ endif
 
69
$ defs=="''defscore',''deflog',''defs'"
 
70
$!
 
71
$!
 
72
$! Establish the Compiling Environment
 
73
$!
 
74
$! Set compiler command
 
75
$ if axp
 
76
$ then
 
77
$   cc=="cc/standard=vaxc/define=(''defs')"
 
78
$ else
 
79
$   if decc
 
80
$   then
 
81
$     cc=="cc/decc/standard=vaxc/define=(''defs')"
 
82
$   else ! VAX C
 
83
$     cc=="cc/define=(''defs')"
 
84
$   endif
 
85
$ endif
 
86
$ if p1 .eqs. "DEBUG" .or. p2 .eqs. "DEBUG" .or. p3 .eqs. "DEBUG"
 
87
$ then
 
88
$   if axp
 
89
$   then
 
90
$     cc=="cc/deb/noopt/standard=vaxc/define=(''defs')/list"
 
91
$   else
 
92
$     if decc
 
93
$     then
 
94
$       cc=="cc/deb/noopt/decc/standard=vaxc/define=(''defs')/list"
 
95
$     else ! VAX C
 
96
$       cc=="cc/deb/noopt/define=(''defs')/list"
 
97
$     endif
 
98
$   endif
 
99
$   link=="link/deb"
 
100
$ endif
 
101
$!
 
102
$ if axp .or. .not. decc
 
103
$ then
 
104
$   define/nolog sys sys$library
 
105
$ endif
 
106
$!
 
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
 
114
$!
 
115
$! Get libraries
 
116
$ if xpm then write optf "''xpmf'/lib"
 
117
$ if sys_maj .lt. 7
 
118
$ then
 
119
$   if xvmsutils then write optf "''xvmsutilsf'/lib"
 
120
$ endif
 
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"
 
130
$ close optf
 
131
$!
 
132
$! LINK
 
133
$ write sys$output "Linking xdino"
 
134
$ link/map xdino/opt
 
135
$!
 
136
$ set noverify
 
137
$ exit
 
138
$!
 
139
$Clobber:      ! Delete executables, Purge directory and clean up object files
 
140
$!                and listings
 
141
$ delete/noconfirm/log xdino.exe;*
 
142
$!
 
143
$Clean:        ! Purge directory, clean up object files and listings
 
144
$ close/nolog optf
 
145
$ purge
 
146
$ delete/noconfirm/log *.lis;*
 
147
$ delete/noconfirm/log *.obj;*
 
148
$ delete/noconfirm/log *.opt;*
 
149
$ delete/noconfirm/log *.map;*
 
150
$!
 
151
$ exit
 
152
$!
 
153
! SUBROUTINE TO CHECK DEPENDENCIES
 
154
$ make: subroutine
 
155
$   v='f$verify(0)
 
156
$!   p1       What we are trying to make
 
157
$!   p2       Command to make it
 
158
$!   p3 - p8  What it depends on
 
159
$
 
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'"
 
162
$
 
163
$   if f$search(p1) .eqs. "" then goto MakeIt
 
164
$   time=f$cvtime(f$file(p1,"RDT"))
 
165
$   arg=3
 
166
$Loop:
 
167
$   argument=p'arg
 
168
$   if argument .eqs. "" then goto Exit
 
169
$   el=0
 
170
$Loop2:
 
171
$   file=f$element(el," ",argument)
 
172
$   if file .eqs. " " then goto Endl
 
173
$   afile=""
 
174
$Loop3:
 
175
$   ofile=afile
 
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
 
179
$   goto Loop3
 
180
$NextEL:
 
181
$   el=el+1
 
182
$   goto Loop2
 
183
$EndL:
 
184
$   arg=arg+1
 
185
$   if arg .le. 8 then goto Loop
 
186
$   goto Exit
 
187
$
 
188
$MakeIt:
 
189
$   set verify
 
190
$   'p2
 
191
$   vv='f$verify(0)
 
192
$Exit:
 
193
$   if v then set verify
 
194
$ endsubroutine