1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
|
#============================================================================
# Makefile for VMS Zip, ZipCloak, ZipNote and ZipSplit Greg Roelofs
# Version: 2.0 [for use with Todd Aven's MAKE/VMS 3.4] 25-JUN-1998
#============================================================================
# ChangeLog: 10-SEP-1993 08:53 by Hunter Goatley (add AXP support)
# 15-OCT-1995 22:40 by Chr. Spieler (Zip 2.1)
# 11-DEC-1995 12:09 by Chr. Spieler (AXP uses RELAXED_ANSI mode)
# 08-JAN-1996 19:08 by Chr. Spieler (updated header dependencies)
# 16-JAN-1996 19:08 by Chr. Spieler (crypt -> crypt & ttyio)
# 25-JUL-1997 22:25 by Chr. Spieler (syncronized with descrip.mms)
# 25-JUN-1998 23:53 by Chr. Spieler (removed bits.c source)
########################### USER CUSTOMIZATION ############################
# add any optional preprocessor flags (macros) to the following line
# for a custom version (do not forget a trailing comma##):
COMMON_DEFS =
######################## END OF USER CUSTOMIZATION ########################
#####################
# MACRO DEFINITIONS #
#####################
CFLAGS = /NOLIST/INCL=(SYS$DISK:[])
CC = cc
LIB =
# Define the macro __GNUC__ to use the GNU compiler (also add /undef=__STDC__
# to CFLAGS, and possibly replace /obj=$@ [below] with copy/rename/delete
# setup). NOT TESTED.
OPTFILE = sys$disk:[.vms]vaxcshr.opt
%IFDEF __ALPHA
CC = CC/STANDARD=RELAX/PREFIX=ALL/ANSI
E = .AXP_EXE
O = .AXP_OBJ
OPTFILE_LIST =
OPTIONS =
%ELSE
%IFDEF __DECC__
CC = CC/DECC/STANDARD=VAXC/PREFIX=ALL
E = .VAX_DECC_exe
O = .VAX_DECC_obj
OPTFILE_LIST =
OPTIONS =
%ELSE
%IFDEF __GNUC__
CC = gcc
E = .VAX_GNUC_exe
O = .VAX_GNUC_obj
LIB = gnu_cc:[000000]gcclib.olb/lib,
%ELSE
E = .VAX_VAXC_exe
O = .VAX_VAXC_obj
%ENDIF
OPTFILE_LIST = ,$(OPTFILE)
OPTIONS = ,$(OPTFILE)/OPTIONS
%ENDIF
%ENDIF
CFLAGS_ALL = $(CFLAGS) /def=($(COMMON_DEFS) VMS)
CFLAGS_CLI = $(CFLAGS) /def=($(COMMON_DEFS) VMSCLI, VMS)
CFLAGS_UTIL = $(CFLAGS) /def=($(COMMON_DEFS) UTIL, VMS)
LD = LINK
LDFLAGS = /NOTRACE
# object file lists
OBJM = zip$O, zipcli$O
OBJZ = crc32$O, crctab$O, crypt$O, ttyio$O,-
zipfile$O, zipup$O, fileio$O, globals$O, util$O
OBJV = vmszip$O, vms$O, vmsmunch$O
OBJI = deflate$O, trees$O
OBJU = zipfile_$O, fileio_$O, globals$O,-
util_$O, vms_$O, vmsmunch$O
OBJR = crctab$O, crypt_$O, ttyio$O
OBJC = zipcloak$O, $(OBJR), $(OBJU)
OBJN = zipnote$O, $(OBJU)
OBJS = zipsplit$O, $(OBJU)
ZIPX_UNX = zip
ZIPX_CLI = zip_cli
OBJSZIPLIB = $(OBJZ), $(OBJI), $(OBJV)
OBJSZIP = zip$O, $(OBJSZIPLIB)
OBJSCLI = zipcli$O, zip_cli$O, cmdline$O
OBJSZIP_CLI = $(OBJSCLI), $(OBJSZIPLIB)
ZIPHELP_UNX_RNH = [.vms]vms_zip.rnh
ZIPHELP_CLI_RNH = [.vms]zip_cli.rnh
ZIP_H = zip.h ziperr.h tailor.h [.vms]osdep.h
ZIPS = $(ZIPX_UNX)$E $(ZIPX_CLI)$E zipcloak$E zipnote$E zipsplit$E
ZIPHELPS = $(ZIPX_UNX).hlp $(ZIPX_CLI).hlp
###############################################
# BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES #
###############################################
default : $(ZIPS) $(ZIPHELPS)
# suffix rules
*$O: *.c # `*.c' necessary?
$(CC)$(CFLAGS_ALL)/OBJECT=$@ $<
*.hlp: *.rnh
runoff /out=$@ $<
# executables makerules (trailing `$' makes line a data line)
$(ZIPX_UNX)$E : $(OBJSZIP) $(OPTFILE_LIST)
$(LD) $(LDFLAGS)/EXEC=$(ZIPX_UNX)$E $(OBJSZIP) $(LIB) $(OPTIONS)
$(ZIPX_CLI)$E : $(OBJSZIP_CLI) $(OPTFILE_LIST)
$(LD) $(LDFLAGS)/EXEC=$(ZIPX_CLI)$E $(OBJSZIP_CLI) $(LIB) $(OPTIONS)
zipcloak$E : $(OBJC) $(OPTFILE_LIST)
$(LD) $(LDFLAGS)/EXEC=ZIPCLOAK$E $(OBJC) $(LIB) $(OPTIONS)
zipnote$E : $(OBJN) $(OPTFILE_LIST)
$(LD) $(LDFLAGS)/EXEC=ZIPNOTE$E $(OBJN) $(LIB) $(OPTIONS)
zipsplit$E : $(OBJS) $(OPTFILE_LIST)
$(LD) $(LDFLAGS)/EXEC=ZIPSPLIT$E $(OBJS) $(LIB) $(OPTIONS)
$(OPTFILE) :
open/write tmp $(OPTFILE)
write tmp "SYS$SHARE:VAXCRTL.EXE/SHARE"
close tmp
$(ZIPHELP_CLI_RNH) : [.vms]zip_cli.help
set default [.vms]
edit/tpu/nosection/nodisplay/command=cvthelp.tpu zip_cli.help
set default [-]
$(ZIPX_UNX).hlp : $(ZIPHELP_UNX_RNH)
runoff /out=$@ $<
$(ZIPX_CLI).hlp : $(ZIPHELP_CLI_RNH)
# dependencies for zip, zipnote, zipcloak, and zipsplit
vmszip$O : [.vms]vmszip.c [.vms]vmsmunch.h
$(CC)$(CFLAGS_ALL)/OBJECT=vmszip$O [.vms]vmszip.c
vms$O : [.vms]vms.c [.vms]vms_im.c [.vms]vms_pk.c \
[.vms]vms.h [.vms]vmsdefs.h
$(CC)$(CFLAGS_ALL)/OBJECT=vms$O [.vms]vms.c
vmsmunch$O : [.vms]vmsmunch.c [.vms]vmsmunch.h [.vms]vmsdefs.h
$(CC)$(CFLAGS_ALL)/OBJECT=vmsmunch$O [.vms]vmsmunch.c
zipcli$O : zip.c [.vms]vmsmunch.h
$(CC) $(CFLAGS_CLI) /OBJ=$(MMS$TARGET) $<
cmdline$O : [.vms]cmdline.c $(ZIP_H) crypt.h revision.h
$(CC) $(CFLAGS_CLI) /OBJ=$(MMS$TARGET) $<
zip_cli$O : [.vms]zip_cli.cld
crypt_$O : crypt.c crypt.h ttyio.h
$(CC)$(CFLAGS_UTIL)/OBJECT=crypt_$O crypt.c
zipfile_$O : zipfile.c [.vms]vmsmunch.h [.vms]vmsdefs.h
$(CC)$(CFLAGS_UTIL)/OBJECT=zipfile_$O zipfile.c
fileio_$O : fileio.c
$(CC)$(CFLAGS_UTIL)/OBJECT=fileio_$O fileio.c
util_$O : util.c
$(CC)$(CFLAGS_UTIL)/OBJECT=util_$O util.c
vms_$O : [.vms]vms.c [.vms]vms_im.c [.vms]vms_pk.c \
[.vms]vms.h [.vms]vmsdefs.h
$(CC)$(CFLAGS_UTIL)/OBJECT=vms_$O [.vms]vms.c
$(OBJM) zipcloak$O zipnote$O zipsplit$O zipup$O : revision.h
$(OBJM) zipcloak$O zipup$O crypt$O ttyio$O : crypt.h
$(OBJM) zipcloak$O crypt$O ttyio$O : ttyio.h
zipup$O : [.vms]zipup.h
zipfile$O : [.vms]vmsmunch.h [.vms]vmsdefs.h
zip$O : [.vms]vmsmunch.h
$(OBJM) : $(ZIP_H)
$(OBJZ) : $(ZIP_H)
$(OBJI) : $(ZIP_H)
$(OBJN) : $(ZIP_H)
$(OBJS) : $(ZIP_H)
$(OBJC) : $(ZIP_H)
clean.com :
@ open/write tmp $@
@ write tmp "$!"
@ write tmp "$! Clean.com -- procedure to delete files. It always returns success"
@ write tmp "$! status despite any error or warnings. Also it extracts"
@ write tmp "$! filename from MMS ""module=file"" format."
@ write tmp "$!"
@ write tmp "$ on control_y then goto ctly"
@ write tmp "$ if p1.eqs."""" then exit 1"
@ write tmp "$ i = -1"
@ write tmp "$scan_list:"
@ write tmp "$ i = i+1"
@ write tmp "$ item = f$elem(i,"","",p1)"
@ write tmp "$ if item.eqs."""" then goto scan_list"
@ write tmp "$ if item.eqs."","" then goto done ! End of list"
@ write tmp "$ item = f$edit(item,""trim"") ! Clean of blanks"
@ write tmp "$ wild = f$elem(1,""="",item)"
@ write tmp "$ show sym wild"
@ write tmp "$ if wild.eqs.""="" then wild = f$elem(0,""="",item)"
@ write tmp "$ vers = f$parse(wild,,,""version"",""syntax_only"")"
@ write tmp "$ if vers.eqs."";"" then wild = wild - "";"" + "";*"""
@ write tmp "$scan:"
@ write tmp "$ f = f$search(wild)"
@ write tmp "$ if f.eqs."""" then goto scan_list"
@ write tmp "$ on error then goto err"
@ write tmp "$ on warning then goto warn"
@ write tmp "$ delete/log 'f'"
@ write tmp "$warn:"
@ write tmp "$err:"
@ write tmp "$ goto scan"
@ write tmp "$done:"
@ write tmp "$ctly:"
@ write tmp "$ exit 1"
@ close tmp
clean : clean.com
@clean "$(OBJM)"
@clean "$(OBJZ)"
@clean "$(OBJI)"
@clean "$(OBJV)"
@clean "$(OBJU)"
@clean "$(OBJR)"
@clean "$(OBJN)"
@clean "$(OBJS)"
@clean "$(OBJC)"
@clean "$(ZIPS)"
@clean "$(ZIPHELP_CLI_RNH)"
@clean "$(ZIPHELPS)"
- delete/noconfirm/nolog clean.com;*
# the backslash '\' is the continuation character if it occurs as
# the last non-white character on the line.
# the hyphen '-' is the DCL continuation character, so if it occurs
# as the last non-white character on the line, the next line will
# not have the dollar sign '$' prepended.
################################
# INDIVIDUAL MACHINE MAKERULES #
################################
generic : default # first try if unknown
generic2 : default # second try if unknown
vax : default
vms : default
all : $(ZIPS)
zip : zip$E
zipcloak : zipcloak$E
zipnote : zipnote$E
zipsplit : zipsplit$E
|