home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c070 / 4.ddi / TOOLS.4 / TCTSRC1.EXE / BUILDLIB.BAT < prev    next >
Encoding:
DOS Batch File  |  1989-03-31  |  3.5 KB  |  139 lines

  1. : BUILDLIB.BAT    (C)Copyright Blaise Computing Inc.  1987, 1989
  2. :
  3. : This batch file can be used to reconstruct the Turbo C TOOLS
  4. : libraries.  It assumes that all source files are in the
  5. : current directory, that the necessary MAC files are in the
  6. : subdirectory MAC, and the Turbo C assembly language helper file,
  7. : rules.asi, is in the current directory.  Moreover, it is assumed
  8. : that the include files reside in a directory \turboc\include.
  9. : If this is not your configuration you should alter the batch
  10. : file accordingly.
  11. :
  12. : Furthermore, the Turbo C compiler (TCC), the Turbo Assembler (TASM),
  13. : and the Turbo Librarian (TLIB) must be in directories accessible
  14. : via the PATH environment variable.
  15. :
  16. : BUILDLIB is invoked with the command
  17. :
  18. :       buildlib model
  19. :
  20. : where model is either s, m, c, l, or    h (in lower case).  The
  21. : corresponding small, medium, compact, large, or huge memory model
  22. : library is constructed.
  23. :
  24. set saveprompt=%prompt%
  25. prompt .$h
  26.  
  27. if exist rules.asi goto check1
  28. pause The Turbo C file rules.asi must be in the current directory.
  29. goto end
  30.  
  31. :check1
  32. if exist mac\beginasm.mac goto check2
  33. pause The file beginasm.mac must be present in the subdirectory MAC.
  34. goto end
  35.  
  36. :check2
  37. if a%1==a goto fail3
  38.  
  39. if %1==s goto check4
  40. if %1==m goto check4
  41. if %1==c goto check4
  42. if %1==l goto check4
  43. if %1==h goto check4
  44. :fail3
  45. pause Either s(mall), m(edium), c(ompact), l(arge), or h(uge) must be specified.
  46. goto end
  47.  
  48. :check4
  49. if exist mac\comp_t2%1.mac goto check5
  50. pause The file comp_t2%1.mac must be present in the subdirectory MAC.
  51. goto end
  52.  
  53. :check5
  54. copy mac\beginasm.mac
  55. copy mac\comp_t2%1.mac compiler.mac
  56. erase *.obj
  57. if exist tct.lib erase tct.lib
  58.  
  59. tcc -c -w -O -m%1 -I\turboc\include ed*.c
  60. if errorlevel 1 goto comperror
  61.  
  62. tcc -c -w -O -m%1 -I\turboc\include fl*.c
  63. if errorlevel 1 goto comperror
  64.  
  65. tcc -c -w -O -m%1 -I\turboc\include hl*.c
  66. if errorlevel 1 goto comperror
  67.  
  68. tcc -c -w -O -m%1 -I\turboc\include is*.c
  69. if errorlevel 1 goto comperror
  70. tasm /mx /w+ is*.asm
  71. if errorlevel 1 goto asmerror
  72.  
  73. tcc -c -w -O -m%1 -I\turboc\include iv*.c
  74. if errorlevel 1 goto comperror
  75. tasm /mx /w+ ivctrl
  76. if errorlevel 1 goto asmerror
  77.  
  78. tcc -c -w -O -m%1 -I\turboc\include kb*.c
  79. if errorlevel 1 goto comperror
  80. tasm /mx /w+ kb*.asm
  81. if errorlevel 1 goto asmerror
  82.  
  83. tcc -c -w -O -m%1 -I\turboc\include mm*.c
  84. if errorlevel 1 goto comperror
  85.  
  86. tcc -c -w -O -m%1 -I\turboc\include mn*.c
  87. if errorlevel 1 goto comperror
  88.  
  89. tcc -c -w -O -m%1 -I\turboc\include mo*.c
  90. if errorlevel 1 goto comperror
  91. tasm /mx /w+ mocatch
  92. if errorlevel 1 goto asmerror
  93.  
  94. tcc -c -w -O -m%1 -I\turboc\include pr*.c
  95. if errorlevel 1 goto comperror
  96.  
  97. tcc -c -w -O -m%1 -I\turboc\include sc*.c
  98. if errorlevel 1 goto comperror
  99.  
  100. tcc -c -w -O -m%1 -I\turboc\include st*.c
  101. if errorlevel 1 goto comperror
  102.  
  103. tcc -c -w -O -m%1 -I\turboc\include ut*.c
  104. if errorlevel 1 goto comperror
  105. tasm /mx /w+ ut*.asm
  106. if errorlevel 1 goto asmerror
  107.  
  108. tcc -c -w -O -m%1 -I\turboc\include vi*.c
  109. if errorlevel 1 goto comperror
  110. tasm /mx /w+ vidirec0
  111. if errorlevel 1 goto asmerror
  112.  
  113. tcc -c -w -O -m%1 -I\turboc\include wn*.c
  114. if errorlevel 1 goto comperror
  115.  
  116. echo Compilation complete
  117.  
  118. tlib tct.lib /0 @libresp
  119. if errorlevel 1 goto liberror
  120. if not exist tct.lib goto liberror
  121. if exist tct_t2%1.lib erase tct_t2%1.lib
  122. rename tct.lib tct_t2%1.lib
  123. pause Library has been constructed
  124. goto end
  125.  
  126. :comperror
  127. pause Error in compilation
  128. goto end
  129.  
  130. :asmerror
  131. pause Error during assembly
  132. goto end
  133.  
  134. :liberror
  135. pause Error in library construction
  136.  
  137. :end
  138. set prompt=%saveprompt%
  139.