source: Vago/zlib-1.2.8/as400/compile.clp@ 1070

Last change on this file since 1070 was 1049, checked in by s10k, 8 years ago
File size: 5.2 KB
Line 
1/******************************************************************************/
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 DCL VAR(&TGTRLS) TYPE(*CHAR) +
30 VALUE('V5R3M0') /* Target release. */
31
32
33/* Working storage. */
34
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)
38
39
40/* Compile sources into modules. */
41
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 '/')
48
49
50 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'ADLER32)')
51 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
52
53 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'COMPRESS)')
54 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
55
56 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'CRC32)')
57 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
58
59 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'DEFLATE)')
60 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
61
62 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZCLOSE)')
63 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
64
65 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZLIB)')
66 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
67
68 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZREAD)')
69 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
70
71 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZWRITE)')
72 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
73
74 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFBACK)')
75 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
76
77 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFFAST)')
78 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
79
80 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFLATE)')
81 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
82
83 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFTREES)')
84 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
85
86 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'TREES)')
87 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
88
89 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'UNCOMPR)')
90 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
91
92 CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'ZUTIL)')
93 CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
94
95
96/* Link modules into a service program. */
97
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 +
106 &MODLIB/ZUTIL) +
107 SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) +
108 TEXT('ZLIB 1.2.8') TGTRLS(&TGTRLS)
109
110 ENDPGM
Note: See TracBrowser for help on using the repository browser.