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

« back to all changes in this revision

Viewing changes to xmball/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 xmball
 
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 + "mball.scores" + QUOTE
 
29
$ logpath = "LOGPATH=" + QUOTE + "[]" + QUOTE
 
30
$ logfile = "LOGFILE=" + QUOTE + "mball.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 xmball.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 xmball with ''defs'"
 
108
$ call make Mball.obj   "cc Mball.c"   Mball.c MballP.h Mball.h
 
109
$ call make MballU.obj  "cc MballU.c"  MballU.c MballP.h Mball.h
 
110
$ call make rngs.obj    "cc rngs.c"    rngs.c
 
111
$ call make xmball.obj  "cc xmball.c"  xmball.c Mball.h
 
112
$!
 
113
$! Get libraries
 
114
$ if xpm then write optf "''xpmf'/lib"
 
115
$ if sys_maj .lt. 7
 
116
$ then
 
117
$   if xvmsutils then write optf "''xvmsutilsf'/lib"
 
118
$ endif
 
119
$! if .not. axp then write optf "sys$library:vaxcrtl/lib"
 
120
$ write optf "sys$library:vaxcrtl/lib"
 
121
$ if axp then write optf "sys$library:ucx$ipc_shr/share"
 
122
$ if axp then write optf "sys$share:decw$xextlibshr/share"
 
123
$ if axp then write optf "sys$share:decw$xtlibshrr5/share"
 
124
$ if .not. axp then write optf "sys$library:ucx$ipc/lib"
 
125
$! write optf "sys$share:decw$dxmlibshr/share"
 
126
$ write optf "sys$share:decw$xmlibshr12/share"
 
127
$ write optf "sys$share:decw$xlibshr/share"
 
128
$ close optf
 
129
$!
 
130
$! LINK
 
131
$ write sys$output "Linking xmball"
 
132
$ link/map xmball/opt
 
133
$!
 
134
$ set noverify
 
135
$ exit
 
136
$!
 
137
$Clobber:      ! Delete executables, Purge directory and clean up object files
 
138
$!                and listings
 
139
$ delete/noconfirm/log xmball.exe;*
 
140
$!
 
141
$Clean:        ! Purge directory, clean up object files and listings
 
142
$ close/nolog optf
 
143
$ purge
 
144
$ delete/noconfirm/log *.lis;*
 
145
$ delete/noconfirm/log *.obj;*
 
146
$ delete/noconfirm/log *.opt;*
 
147
$ delete/noconfirm/log *.map;*
 
148
$!
 
149
$ exit
 
150
$!
 
151
! SUBROUTINE TO CHECK DEPENDENCIES
 
152
$ make: subroutine
 
153
$   v='f$verify(0)
 
154
$!   p1       What we are trying to make
 
155
$!   p2       Command to make it
 
156
$!   p3 - p8  What it depends on
 
157
$
 
158
$   if (f$extract(0,3,p2) .eqs. "cc ") then write optf "''p1'"
 
159
$   if (f$extract(0,3,p2) .eqs. "CC ") then write optf "''p1'"
 
160
$
 
161
$   if f$search(p1) .eqs. "" then goto MakeIt
 
162
$   time=f$cvtime(f$file(p1,"RDT"))
 
163
$   arg=3
 
164
$Loop:
 
165
$   argument=p'arg
 
166
$   if argument .eqs. "" then goto Exit
 
167
$   el=0
 
168
$Loop2:
 
169
$   file=f$element(el," ",argument)
 
170
$   if file .eqs. " " then goto Endl
 
171
$   afile=""
 
172
$Loop3:
 
173
$   ofile=afile
 
174
$   afile=f$search(file)
 
175
$   if afile .eqs. "" .or. afile .eqs. ofile then goto NextEl
 
176
$   if f$cvtime(f$file(afile,"RDT")) .gts. time then goto MakeIt
 
177
$   goto Loop3
 
178
$NextEL:
 
179
$   el=el+1
 
180
$   goto Loop2
 
181
$EndL:
 
182
$   arg=arg+1
 
183
$   if arg .le. 8 then goto Loop
 
184
$   goto Exit
 
185
$
 
186
$MakeIt:
 
187
$   set verify
 
188
$   'p2
 
189
$   vv='f$verify(0)
 
190
$Exit:
 
191
$   if v then set verify
 
192
$ endsubroutine