1 /******************************************************************************/
5 /* Compile sources into modules
and link them into a service program.
*/
7 /******************************************************************************/
11 /* Configuration adjustable parameters.
*/
13 DCL VAR
(&SRCLIB
) TYPE(*CHAR
) LEN
(10) +
14 VALUE
('ZLIB'
) /* Source library.
*/
15 DCL VAR
(&SRCFILE
) TYPE(*CHAR
) LEN
(10) +
16 VALUE
('SOURCES'
) /* Source
member file.
*/
17 DCL VAR
(&CTLFILE
) TYPE(*CHAR
) LEN
(10) +
18 VALUE
('TOOLS'
) /* Control
member file.
*/
20 DCL VAR
(&MODLIB
) TYPE(*CHAR
) LEN
(10) +
21 VALUE
('ZLIB'
) /* Module library.
*/
23 DCL VAR
(&SRVLIB
) TYPE(*CHAR
) LEN
(10) +
24 VALUE
('LGPL'
) /* Service program library.
*/
26 DCL VAR
(&CFLAGS
) TYPE(*CHAR
) +
27 VALUE
('OPTIMIZE
(40)'
) /* Compile options.
*/
29 DCL VAR
(&TGTRLS
) TYPE(*CHAR
) +
30 VALUE
('V5R3M0'
) /* Target release.
*/
33 /* Working storage.
*/
35 DCL VAR
(&CMDLEN
) TYPE(*DEC
) LEN
(15 5) VALUE
(300) /* Command
length.
*/
36 DCL VAR
(&CMD
) TYPE(*CHAR
) LEN
(512)
37 DCL VAR
(&FIXDCMD
) TYPE(*CHAR
) LEN
(512)
40 /* Compile sources into modules.
*/
42 CHGVAR VAR
(&FIXDCMD
) VALUE
('CRTCMOD'
*BCAT
&CFLAGS
*BCAT
+
43 'SYSIFCOPT
(*IFS64IO
)'
*BCAT
+
44 'DEFINE
(''_LARGEFILE64_SOURCE'''
*BCAT
+
45 '''_LFS64_LARGEFILE
=1''
) TGTRLS
('
*TCAT
&TGTRLS
*TCAT
+
46 '
) SRCFILE
('
*TCAT
&SRCLIB
*TCAT '
/'
*TCAT
+
47 &SRCFILE
*TCAT '
) MODULE
('
*TCAT
&MODLIB
*TCAT '
/'
)
50 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'ADLER32
)'
)
51 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
53 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'COMPRESS
)'
)
54 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
56 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'CRC32
)'
)
57 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
59 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'DEFLATE
)'
)
60 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
62 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'GZCLOSE
)'
)
63 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
65 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'GZLIB
)'
)
66 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
68 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'GZREAD
)'
)
69 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
71 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'GZWRITE
)'
)
72 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
74 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'INFBACK
)'
)
75 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
77 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'INFFAST
)'
)
78 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
80 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'INFLATE
)'
)
81 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
83 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'INFTREES
)'
)
84 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
86 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'TREES
)'
)
87 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
89 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'UNCOMPR
)'
)
90 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
92 CHGVAR VAR
(&CMD
) VALUE
(&FIXDCMD
*TCAT 'ZUTIL
)'
)
93 CALL PGM
(QCMDEXC
) PARM
(&CMD
&CMDLEN
)
96 /* Link modules into a service program.
*/
98 CRTSRVPGM SRVPGM
(&SRVLIB
/ZLIB
) +
99 MODULE
(&MODLIB
/ADLER32
&MODLIB
/COMPRESS
+
100 &MODLIB
/CRC32
&MODLIB
/DEFLATE
+
101 &MODLIB
/GZCLOSE
&MODLIB
/GZLIB
+
102 &MODLIB
/GZREAD
&MODLIB
/GZWRITE
+
103 &MODLIB
/INFBACK
&MODLIB
/INFFAST
+
104 &MODLIB
/INFLATE
&MODLIB
/INFTREES
+
105 &MODLIB
/TREES
&MODLIB
/UNCOMPR
+
107 SRCFILE
(&SRCLIB
/&CTLFILE
) SRCMBR
(BNDSRC
) +
108 TEXT
('ZLIB
1.2.8'
) TGTRLS
(&TGTRLS
)