cczip.exec 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /* CCZIP EXEC Compile zip for VM/CMS */
  2. /* Author: George Petrov, 11 Apr 1995 (VMCOMPIL EXEC) */
  3. /* Modified for IBM C V3R1 by Ian E. Gorman, 2 Nov 1998
  4. Facilities for compiling and testing were provided by
  5. OmniMark Technologies Corporation, Ottawa, Canada
  6. */
  7. Address Command
  8. Signal On Error
  9. /* Allow longnames, compile re-entrant code.
  10. globals.c and cmsmvs.c require EXTENDED features */
  11. CCopts = 'LONGNAME RENT LANGLVL(EXTENDED) NOEXECOPS'
  12. /* ZIP options -- VM_CMS, REENTRANT */
  13. CCopts = CCopts 'DEFINE(VM_CMS,REENTRANT)'
  14. /* Link the load module to run in more or less than 16MB memory */
  15. LINKopts = 'AMODE ANY RMODE ANY RLDSAVE'
  16. /* resources needed to build */
  17. 'GLOBAL TXTLIB SCEELKED CMSLIB'
  18. 'GLOBAL LOADLIB SCEERUN'
  19. /* produce the TEXT (object) files */
  20. linklist=''
  21. modname='ZIP'
  22. Say 'Building' modname 'MODULE...'
  23. Call Compile 'ZIP'
  24. Call Compile 'CRC32'
  25. Call Compile 'CRYPT'
  26. Call Compile 'DEFLATE'
  27. Call Compile 'FILEIO'
  28. Call Compile 'GLOBALS'
  29. Call Compile 'TREES'
  30. Call Compile 'TTYIO'
  31. Call Compile 'UTIL'
  32. Call Compile 'ZIPUP'
  33. Call Compile 'ZIPFILE'
  34. Call Compile 'CMSMVS'
  35. Call Compile 'CMS'
  36. Say 'Linking...'
  37. 'EXEC CMOD' linklist '(MODNAME' modname LINKopts
  38. Say modname 'built successfully.'
  39. /*---------------------------------------------------------------------*/
  40. /* Build utility programs */
  41. /*---------------------------------------------------------------------*/
  42. CCopts = CCopts 'DEFINE(UTIL)'
  43. linklist=''
  44. modname='ZIPNOTE'
  45. Say
  46. Say 'Building' modname 'MODULE...'
  47. Call Compile 'ZIPNOTE'
  48. Call Compile 'ZIPFILE'
  49. Call Compile 'FILEIO'
  50. Call Compile 'UTIL'
  51. Call Compile 'GLOBALS'
  52. Call Compile 'CMSMVS'
  53. Say 'Linking...'
  54. 'EXEC CMOD' linklist '(MODNAME' modname LINKopts
  55. Say modname 'built successfully.'
  56. linklist=''
  57. modname='ZIPSPLIT'
  58. Say
  59. Say 'Building' modname 'MODULE...'
  60. Call Compile 'ZIPSPLIT'
  61. Call Compile 'ZIPFILE'
  62. Call Compile 'FILEIO'
  63. Call Compile 'UTIL'
  64. Call Compile 'GLOBALS'
  65. Call Compile 'CMSMVS'
  66. Say 'Linking...'
  67. 'EXEC CMOD' linklist '(MODNAME' modname LINKopts
  68. Say modname 'built successfully.'
  69. linklist=''
  70. modname='ZIPCLOAK'
  71. Say
  72. Say 'Building' modname 'MODULE...'
  73. Call Compile 'ZIPCLOAK'
  74. Call Compile 'ZIPFILE'
  75. Call Compile 'FILEIO'
  76. Call Compile 'UTIL'
  77. Call Compile 'GLOBALS'
  78. Call Compile 'CRC32'
  79. Call Compile 'CRYPT'
  80. Call Compile 'TTYIO'
  81. Call Compile 'CMSMVS'
  82. Say 'Linking...'
  83. 'EXEC CMOD' linklist '(MODNAME' modname LINKopts
  84. Say modname 'built successfully.'
  85. Say 'Done.'
  86. Exit rc
  87. error:
  88. Say 'Error' rc 'during compilation!'
  89. Say 'Error in line' sigl':'
  90. Say ' 'Sourceline(sigl)
  91. Exit rc
  92. Compile: Procedure Expose CCopts LINKopts linklist
  93. Parse arg filename filetype filemode .
  94. If filetype='' Then filetype='C'
  95. linklist = linklist filename
  96. Say 'Compiling' filename filetype filemode '...'
  97. 'EXEC CC' filename filetype filemode '('CCopts
  98. Return rc