compile.clp 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /******************************************************************************/
  2. /* */
  3. /* ZLIB */
  4. /* */
  5. /* Compile sources into modules and link them into a service program. */
  6. /* */
  7. /******************************************************************************/
  8. PGM
  9. /* Configuration adjustable parameters. */
  10. DCL VAR(&SRCLIB) TYPE(*CHAR) LEN(10) +
  11. VALUE('ZLIB') /* Source library. */
  12. DCL VAR(&SRCFILE) TYPE(*CHAR) LEN(10) +
  13. VALUE('SOURCES') /* Source member file. */
  14. DCL VAR(&CTLFILE) TYPE(*CHAR) LEN(10) +
  15. VALUE('TOOLS') /* Control member file. */
  16. DCL VAR(&MODLIB) TYPE(*CHAR) LEN(10) +
  17. VALUE('ZLIB') /* Module library. */
  18. DCL VAR(&SRVLIB) TYPE(*CHAR) LEN(10) +
  19. VALUE('LGPL') /* Service program library. */
  20. DCL VAR(&CFLAGS) TYPE(*CHAR) +
  21. VALUE('OPTIMIZE(40)') /* Compile options. */
  22. DCL VAR(&TGTRLS) TYPE(*CHAR) +
  23. VALUE('V5R3M0') /* Target release. */
  24. /* Working storage. */
  25. DCL VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300) /* Command length. */
  26. DCL VAR(&CMD) TYPE(*CHAR) LEN(512)
  27. DCL VAR(&FIXDCMD) TYPE(*CHAR) LEN(512)
  28. /* Compile sources into modules. */
  29. CHGVAR VAR(&FIXDCMD) VALUE('CRTCMOD' *BCAT &CFLAGS *BCAT +
  30. 'SYSIFCOPT(*IFS64IO)' *BCAT +
  31. 'DEFINE(''_LARGEFILE64_SOURCE''' *BCAT +
  32. '''_LFS64_LARGEFILE=1'') TGTRLS(' *TCAT &TGTRLS *TCAT +
  33. ') SRCFILE(' *TCAT &SRCLIB *TCAT '/' *TCAT +
  34. &SRCFILE *TCAT ') MODULE(' *TCAT &MODLIB *TCAT '/')
  35. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'ADLER32)')
  36. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  37. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'COMPRESS)')
  38. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  39. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'CRC32)')
  40. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  41. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'DEFLATE)')
  42. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  43. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZCLOSE)')
  44. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  45. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZLIB)')
  46. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  47. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZREAD)')
  48. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  49. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZWRITE)')
  50. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  51. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFBACK)')
  52. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  53. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFFAST)')
  54. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  55. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFLATE)')
  56. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  57. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFTREES)')
  58. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  59. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'TREES)')
  60. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  61. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'UNCOMPR)')
  62. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  63. CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'ZUTIL)')
  64. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  65. /* Link modules into a service program. */
  66. CRTSRVPGM SRVPGM(&SRVLIB/ZLIB) +
  67. MODULE(&MODLIB/ADLER32 &MODLIB/COMPRESS +
  68. &MODLIB/CRC32 &MODLIB/DEFLATE +
  69. &MODLIB/GZCLOSE &MODLIB/GZLIB +
  70. &MODLIB/GZREAD &MODLIB/GZWRITE +
  71. &MODLIB/INFBACK &MODLIB/INFFAST +
  72. &MODLIB/INFLATE &MODLIB/INFTREES +
  73. &MODLIB/TREES &MODLIB/UNCOMPR +
  74. &MODLIB/ZUTIL) +
  75. SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) +
  76. TEXT('ZLIB 1.2.7') TGTRLS(&TGTRLS)
  77. ENDPGM