kusano fc6ab3
/******************************************************************************/
kusano fc6ab3
/*                                                                            */
kusano fc6ab3
/*  ZLIB                                                                      */
kusano fc6ab3
/*                                                                            */
kusano fc6ab3
/*    Compile sources into modules and link them into a service program.      */
kusano fc6ab3
/*                                                                            */
kusano fc6ab3
/******************************************************************************/
kusano fc6ab3
kusano fc6ab3
             PGM
kusano fc6ab3
kusano fc6ab3
/*      Configuration adjustable parameters.                                  */
kusano fc6ab3
kusano fc6ab3
             DCL        VAR(&SRCLIB) TYPE(*CHAR) LEN(10) +
kusano fc6ab3
                          VALUE('ZLIB')                         /* Source library. */
kusano fc6ab3
             DCL        VAR(&SRCFILE) TYPE(*CHAR) LEN(10) +
kusano fc6ab3
                          VALUE('SOURCES')                      /* Source member file. */
kusano fc6ab3
             DCL        VAR(&CTLFILE) TYPE(*CHAR) LEN(10) +
kusano fc6ab3
                          VALUE('TOOLS')                        /* Control member file. */
kusano fc6ab3
kusano fc6ab3
             DCL        VAR(&MODLIB) TYPE(*CHAR) LEN(10) +
kusano fc6ab3
                          VALUE('ZLIB')                         /* Module library. */
kusano fc6ab3
kusano fc6ab3
             DCL        VAR(&SRVLIB) TYPE(*CHAR) LEN(10) +
kusano fc6ab3
                          VALUE('LGPL')                         /* Service program library. */
kusano fc6ab3
kusano fc6ab3
             DCL        VAR(&CFLAGS) TYPE(*CHAR) +
kusano fc6ab3
                          VALUE('OPTIMIZE(40)')                 /* Compile options. */
kusano fc6ab3
kusano fc6ab3
             DCL        VAR(&TGTRLS) TYPE(*CHAR) +
kusano fc6ab3
                          VALUE('V5R3M0')                       /* Target release. */
kusano fc6ab3
kusano fc6ab3
kusano fc6ab3
/*      Working storage.                                                      */
kusano fc6ab3
kusano fc6ab3
             DCL        VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300)    /* Command length. */
kusano fc6ab3
             DCL        VAR(&CMD) TYPE(*CHAR) LEN(512)
kusano fc6ab3
             DCL        VAR(&FIXDCMD) TYPE(*CHAR) LEN(512)
kusano fc6ab3
kusano fc6ab3
kusano fc6ab3
/*      Compile sources into modules.                                         */
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&FIXDCMD) VALUE('CRTCMOD' *BCAT &CFLAGS *BCAT      +
kusano fc6ab3
                        'SYSIFCOPT(*IFS64IO)' *BCAT                            +
kusano fc6ab3
                        'DEFINE(''_LARGEFILE64_SOURCE''' *BCAT                 +
kusano fc6ab3
                        '''_LFS64_LARGEFILE=1'') TGTRLS(' *TCAT &TGTRLS *TCAT  +
kusano fc6ab3
                        ') SRCFILE(' *TCAT &SRCLIB *TCAT '/' *TCAT             +
kusano fc6ab3
                        &SRCFILE *TCAT ') MODULE(' *TCAT &MODLIB *TCAT '/')
kusano fc6ab3
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'ADLER32)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'COMPRESS)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'CRC32)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'DEFLATE)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZCLOSE)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZLIB)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZREAD)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZWRITE)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFBACK)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFFAST)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFLATE)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFTREES)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'TREES)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'UNCOMPR)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
             CHGVAR     VAR(&CMD) VALUE(&FIXDCMD *TCAT 'ZUTIL)')
kusano fc6ab3
             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
kusano fc6ab3
kusano fc6ab3
kusano fc6ab3
/*      Link modules into a service program.                                  */
kusano fc6ab3
kusano fc6ab3
             CRTSRVPGM  SRVPGM(&SRVLIB/ZLIB) +
kusano fc6ab3
                          MODULE(&MODLIB/ADLER32     &MODLIB/COMPRESS    +
kusano fc6ab3
                                 &MODLIB/CRC32       &MODLIB/DEFLATE     +
kusano fc6ab3
                                 &MODLIB/GZCLOSE     &MODLIB/GZLIB       +
kusano fc6ab3
                                 &MODLIB/GZREAD      &MODLIB/GZWRITE     +
kusano fc6ab3
                                 &MODLIB/INFBACK     &MODLIB/INFFAST     +
kusano fc6ab3
                                 &MODLIB/INFLATE     &MODLIB/INFTREES    +
kusano fc6ab3
                                 &MODLIB/TREES       &MODLIB/UNCOMPR     +
kusano fc6ab3
                                 &MODLIB/ZUTIL)                          +
kusano fc6ab3
                          SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC)       +
kusano fc6ab3
                          TEXT('ZLIB 1.2.8') TGTRLS(&TGTRLS)
kusano fc6ab3
kusano fc6ab3
             ENDPGM