1 |
745 |
jeremybenn |
/******************************************************************************/
|
2 |
|
|
/* */
|
3 |
|
|
/* ZLIB */
|
4 |
|
|
/* */
|
5 |
|
|
/* Compile sources into modules and link them into a service program. */
|
6 |
|
|
/* */
|
7 |
|
|
/******************************************************************************/
|
8 |
|
|
|
9 |
|
|
PGM
|
10 |
|
|
|
11 |
|
|
/* Configuration adjustable parameters. */
|
12 |
|
|
|
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. */
|
19 |
|
|
|
20 |
|
|
DCL VAR(&MODLIB) TYPE(*CHAR) LEN(10) +
|
21 |
|
|
VALUE('ZLIB') /* Module library. */
|
22 |
|
|
|
23 |
|
|
DCL VAR(&SRVLIB) TYPE(*CHAR) LEN(10) +
|
24 |
|
|
VALUE('LGPL') /* Service program library. */
|
25 |
|
|
|
26 |
|
|
DCL VAR(&CFLAGS) TYPE(*CHAR) +
|
27 |
|
|
VALUE('OPTIMIZE(40)') /* Compile options. */
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
/* Working storage. */
|
31 |
|
|
|
32 |
|
|
DCL VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300) /* Command length. */
|
33 |
|
|
DCL VAR(&CMD) TYPE(*CHAR) LEN(512)
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
/* Compile sources into modules. */
|
37 |
|
|
|
38 |
|
|
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
39 |
|
|
'/ADLER32) SRCFILE(' *TCAT +
|
40 |
|
|
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
41 |
|
|
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
42 |
|
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
43 |
|
|
|
44 |
|
|
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
45 |
|
|
'/COMPRESS) SRCFILE(' *TCAT +
|
46 |
|
|
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
47 |
|
|
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
48 |
|
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
49 |
|
|
|
50 |
|
|
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
51 |
|
|
'/CRC32) SRCFILE(' *TCAT +
|
52 |
|
|
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
53 |
|
|
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
54 |
|
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
55 |
|
|
|
56 |
|
|
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
57 |
|
|
'/DEFLATE) SRCFILE(' *TCAT +
|
58 |
|
|
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
59 |
|
|
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
60 |
|
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
61 |
|
|
|
62 |
|
|
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
63 |
|
|
'/GZIO) SRCFILE(' *TCAT +
|
64 |
|
|
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
65 |
|
|
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
66 |
|
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
67 |
|
|
|
68 |
|
|
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
69 |
|
|
'/INFBACK) SRCFILE(' *TCAT +
|
70 |
|
|
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
71 |
|
|
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
72 |
|
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
73 |
|
|
|
74 |
|
|
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
75 |
|
|
'/INFFAST) SRCFILE(' *TCAT +
|
76 |
|
|
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
77 |
|
|
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
78 |
|
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
79 |
|
|
|
80 |
|
|
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
81 |
|
|
'/INFLATE) SRCFILE(' *TCAT +
|
82 |
|
|
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
83 |
|
|
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
84 |
|
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
85 |
|
|
|
86 |
|
|
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
87 |
|
|
'/INFTREES) SRCFILE(' *TCAT +
|
88 |
|
|
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
89 |
|
|
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
90 |
|
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
91 |
|
|
|
92 |
|
|
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
93 |
|
|
'/TREES) SRCFILE(' *TCAT +
|
94 |
|
|
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
95 |
|
|
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
96 |
|
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
97 |
|
|
|
98 |
|
|
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
99 |
|
|
'/UNCOMPR) SRCFILE(' *TCAT +
|
100 |
|
|
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
101 |
|
|
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
102 |
|
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
103 |
|
|
|
104 |
|
|
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
105 |
|
|
'/ZUTIL) SRCFILE(' *TCAT +
|
106 |
|
|
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
107 |
|
|
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
108 |
|
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
/* Link modules into a service program. */
|
112 |
|
|
|
113 |
|
|
CRTSRVPGM SRVPGM(&SRVLIB/ZLIB) +
|
114 |
|
|
MODULE(&MODLIB/ADLER32 &MODLIB/COMPRESS +
|
115 |
|
|
&MODLIB/CRC32 &MODLIB/DEFLATE +
|
116 |
|
|
&MODLIB/GZIO &MODLIB/INFBACK +
|
117 |
|
|
&MODLIB/INFFAST &MODLIB/INFLATE +
|
118 |
|
|
&MODLIB/INFTREES &MODLIB/TREES +
|
119 |
|
|
&MODLIB/UNCOMPR &MODLIB/ZUTIL) +
|
120 |
|
|
SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) +
|
121 |
|
|
TEXT('ZLIB 1.2.3') TGTRLS(V4R4M0)
|
122 |
|
|
|
123 |
|
|
ENDPGM
|