summaryrefslogtreecommitdiff
path: root/zlib/old/as400/compile.clp
blob: 85549515006281b6ccc305d7bddccfeb84dcb529 (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
/******************************************************************************/
/*                                                                            */
/*  ZLIB                                                                      */
/*                                                                            */
/*    Compile sources into modules and link them into a service program.      */
/*                                                                            */
/******************************************************************************/

             PGM

/*      Configuration adjustable parameters.                                  */

             DCL        VAR(&SRCLIB) TYPE(*CHAR) LEN(10) +
                          VALUE('ZLIB')                         /* Source library. */
             DCL        VAR(&SRCFILE) TYPE(*CHAR) LEN(10) +
                          VALUE('SOURCES')                      /* Source member file. */
             DCL        VAR(&CTLFILE) TYPE(*CHAR) LEN(10) +
                          VALUE('TOOLS')                        /* Control member file. */

             DCL        VAR(&MODLIB) TYPE(*CHAR) LEN(10) +
                          VALUE('ZLIB')                         /* Module library. */

             DCL        VAR(&SRVLIB) TYPE(*CHAR) LEN(10) +
                          VALUE('LGPL')                         /* Service program library. */

             DCL        VAR(&CFLAGS) TYPE(*CHAR) +
                          VALUE('OPTIMIZE(40)')                 /* Compile options. */


/*      Working storage.                                                      */

             DCL        VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300)    /* Command length. */
             DCL        VAR(&CMD) TYPE(*CHAR) LEN(512)


/*      Compile sources into modules.                                         */

             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
                        '/ADLER32)               SRCFILE(' *TCAT               +
                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)

             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
                        '/COMPRESS)              SRCFILE(' *TCAT               +
                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)

             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
                        '/CRC32)                 SRCFILE(' *TCAT               +
                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)

             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
                        '/DEFLATE)               SRCFILE(' *TCAT               +
                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)

             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
                        '/GZIO)                  SRCFILE(' *TCAT               +
                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)

             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
                        '/INFBACK)               SRCFILE(' *TCAT               +
                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)

             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
                        '/INFFAST)               SRCFILE(' *TCAT               +
                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)

             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
                        '/INFLATE)               SRCFILE(' *TCAT               +
                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)

             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
                        '/INFTREES)              SRCFILE(' *TCAT               +
                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)

             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
                        '/TREES)                 SRCFILE(' *TCAT               +
                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)

             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
                        '/UNCOMPR)               SRCFILE(' *TCAT               +
                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)

             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
                        '/ZUTIL)                 SRCFILE(' *TCAT               +
                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)


/*      Link modules into a service program.                                  */

             CRTSRVPGM  SRVPGM(&SRVLIB/ZLIB) +
                          MODULE(&MODLIB/ADLER32     &MODLIB/COMPRESS    +
                                 &MODLIB/CRC32       &MODLIB/DEFLATE     +
                                 &MODLIB/GZIO        &MODLIB/INFBACK     +
                                 &MODLIB/INFFAST     &MODLIB/INFLATE     +
                                 &MODLIB/INFTREES    &MODLIB/TREES       +
                                 &MODLIB/UNCOMPR     &MODLIB/ZUTIL)      +
                          SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) +
                          TEXT('ZLIB 1.2.3') TGTRLS(V4R4M0)

             ENDPGM