summaryrefslogtreecommitdiff
path: root/cmsmvs/cczip.exec
blob: 86edb590c4c27e70661d56c0576ca576e5e398cb (plain)
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
/* CCZIP    EXEC   Compile zip for VM/CMS                           */
/*                 Author: George Petrov, 11 Apr 1995 (VMCOMPIL EXEC) */
/* Modified for IBM C V3R1 by Ian E. Gorman, 2 Nov 1998
   Facilities for compiling and testing were provided by
      OmniMark Technologies Corporation, Ottawa, Canada
*/
Address Command
Signal On Error

/* Allow longnames, compile re-entrant code.
   globals.c and cmsmvs.c require EXTENDED features */
CCopts = 'LONGNAME RENT LANGLVL(EXTENDED) NOEXECOPS'

/* ZIP options -- VM_CMS, REENTRANT */
CCopts = CCopts 'DEFINE(VM_CMS,REENTRANT)'

/* Link the load module to run in more or less than 16MB memory */
LINKopts = 'AMODE ANY RMODE ANY RLDSAVE'

/* resources needed to build */
'GLOBAL TXTLIB  SCEELKED CMSLIB'
'GLOBAL LOADLIB SCEERUN'

/* produce the TEXT (object) files */
linklist=''
modname='ZIP'
Say 'Building' modname 'MODULE...'
Call Compile 'ZIP'
Call Compile 'CRC32'
Call Compile 'CRYPT'
Call Compile 'DEFLATE'
Call Compile 'FILEIO'
Call Compile 'GLOBALS'
Call Compile 'TREES'
Call Compile 'TTYIO'
Call Compile 'UTIL'
Call Compile 'ZIPUP'
Call Compile 'ZIPFILE'
Call Compile 'CMSMVS'
Call Compile 'CMS'

Say 'Linking...'
'EXEC CMOD' linklist '(MODNAME' modname LINKopts
Say modname 'built successfully.'


/*---------------------------------------------------------------------*/
/* Build utility programs                                              */
/*---------------------------------------------------------------------*/
CCopts = CCopts 'DEFINE(UTIL)'


linklist=''
modname='ZIPNOTE'
Say
Say 'Building' modname 'MODULE...'
Call Compile 'ZIPNOTE'
Call Compile 'ZIPFILE'
Call Compile 'FILEIO'
Call Compile 'UTIL'
Call Compile 'GLOBALS'
Call Compile 'CMSMVS'

Say 'Linking...'
'EXEC CMOD' linklist '(MODNAME' modname LINKopts
Say modname 'built successfully.'


linklist=''
modname='ZIPSPLIT'
Say
Say 'Building' modname 'MODULE...'
Call Compile 'ZIPSPLIT'
Call Compile 'ZIPFILE'
Call Compile 'FILEIO'
Call Compile 'UTIL'
Call Compile 'GLOBALS'
Call Compile 'CMSMVS'

Say 'Linking...'
'EXEC CMOD' linklist '(MODNAME' modname LINKopts
Say modname 'built successfully.'


linklist=''
modname='ZIPCLOAK'
Say
Say 'Building' modname 'MODULE...'
Call Compile 'ZIPCLOAK'
Call Compile 'ZIPFILE'
Call Compile 'FILEIO'
Call Compile 'UTIL'
Call Compile 'GLOBALS'
Call Compile 'CRC32'
Call Compile 'CRYPT'
Call Compile 'TTYIO'
Call Compile 'CMSMVS'

Say 'Linking...'
'EXEC CMOD' linklist '(MODNAME' modname LINKopts
Say modname 'built successfully.'
Say 'Done.'

Exit rc



error:
    Say 'Error' rc 'during compilation!'
    Say 'Error in line' sigl':'
    Say '   'Sourceline(sigl)
    Exit rc



Compile:  Procedure Expose CCopts LINKopts linklist
    Parse arg filename filetype filemode .
    If filetype='' Then filetype='C'
    linklist = linklist filename

    Say 'Compiling' filename filetype filemode '...'
    'EXEC CC' filename filetype filemode '('CCopts
    Return rc