compile.clp 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. /* Working storage. */
  23. DCL VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300) /* Command length. */
  24. DCL VAR(&CMD) TYPE(*CHAR) LEN(512)
  25. /* Compile sources into modules. */
  26. CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
  27. '/ADLER32) SRCFILE(' *TCAT +
  28. &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
  29. ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
  30. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  31. CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
  32. '/COMPRESS) SRCFILE(' *TCAT +
  33. &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
  34. ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
  35. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  36. CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
  37. '/CRC32) SRCFILE(' *TCAT +
  38. &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
  39. ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
  40. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  41. CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
  42. '/DEFLATE) SRCFILE(' *TCAT +
  43. &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
  44. ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
  45. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  46. CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
  47. '/GZIO) SRCFILE(' *TCAT +
  48. &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
  49. ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
  50. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  51. CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
  52. '/INFBACK) SRCFILE(' *TCAT +
  53. &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
  54. ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
  55. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  56. CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
  57. '/INFFAST) SRCFILE(' *TCAT +
  58. &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
  59. ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
  60. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  61. CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
  62. '/INFLATE) SRCFILE(' *TCAT +
  63. &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
  64. ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
  65. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  66. CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
  67. '/INFTREES) SRCFILE(' *TCAT +
  68. &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
  69. ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
  70. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  71. CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
  72. '/TREES) SRCFILE(' *TCAT +
  73. &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
  74. ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
  75. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  76. CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
  77. '/UNCOMPR) SRCFILE(' *TCAT +
  78. &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
  79. ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
  80. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  81. CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
  82. '/ZUTIL) SRCFILE(' *TCAT +
  83. &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
  84. ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
  85. CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
  86. /* Link modules into a service program. */
  87. CRTSRVPGM SRVPGM(&SRVLIB/ZLIB) +
  88. MODULE(&MODLIB/ADLER32 &MODLIB/COMPRESS +
  89. &MODLIB/CRC32 &MODLIB/DEFLATE +
  90. &MODLIB/GZIO &MODLIB/INFBACK +
  91. &MODLIB/INFFAST &MODLIB/INFLATE +
  92. &MODLIB/INFTREES &MODLIB/TREES +
  93. &MODLIB/UNCOMPR &MODLIB/ZUTIL) +
  94. SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) +
  95. TEXT('ZLIB 1.2.3') TGTRLS(V4R4M0)
  96. ENDPGM