home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c065 / 2.ddi / MATH.ZIP / MATHRLIB.BAT < prev    next >
Encoding:
DOS Batch File  |  1990-06-07  |  2.1 KB  |  92 lines

  1. echo off
  2. if /%1==/ goto HELP
  3.  
  4. if %1==ALL      goto DOsm
  5. if %1==all      goto DOsm
  6. if %1==SMALL    goto DOsm
  7. if %1==small    goto DOsm
  8. if %1==MEDIUM   goto DOmd
  9. if %1==medium   goto DOmd
  10. if %1==COMPACT  goto DOcp
  11. if %1==compact  goto DOcp
  12. if %1==LARGE    goto DOlg
  13. if %1==large    goto DOlg
  14. if %1==HUGE     goto DOhg
  15. if %1==huge     goto DOhg
  16.  
  17. :HELP
  18. echo 
  19. echo This batch file rebuilds the specified MATH library file from
  20. echo the object files contained in the OBJ and SMALL, COMPACT, MEDIUM,
  21. echo LARGE, or HUGE subdirectories.
  22. echo 
  23. echo The "model" parameter specifies which memory model library file
  24. echo should be rebuilt. When ALL is specified, all five library files
  25. echo will be rebuilt.
  26. echo 
  27. echo Usage:     mathrlib   model
  28. echo 
  29. echo Examples:  mathrlib   ALL
  30. echo            mathrlib   LARGE
  31. echo 
  32. goto DONE
  33.  
  34. :DOsm
  35. echo *** Building SMALL & TINY memory model libraries
  36. if exist maths.lib del maths.lib
  37. cd small
  38. tlib /E /0 ..\maths @..\math.rsp
  39. cd ..
  40. if errorlevel 1 goto ERROR
  41. if %1==SMALL    goto DONE
  42. if %1==small    goto DONE
  43.  
  44. :DOmd
  45. echo *** Building MEDIUM memory model library
  46. if exist mathm.lib del mathm.lib
  47. cd medium
  48. tlib /E /0 ..\mathm @..\math.rsp
  49. cd ..
  50. if errorlevel 1 goto ERROR
  51. if %1==MEDIUM   goto DONE
  52. if %1==medium   goto DONE
  53.  
  54. :DOcp 
  55. echo *** Building COMPACT memory model library
  56. if exist mathc.lib del mathc.lib
  57. cd compact
  58. tlib /E /0 ..\mathc @..\math.rsp
  59. cd ..
  60. if errorlevel 1 goto ERROR
  61. if %1==COMPACT  goto DONE
  62. if %1==compact  goto DONE
  63.  
  64. :DOlg
  65. echo *** Building LARGE memory model library
  66. if exist mathl.lib del mathl.lib
  67. cd large
  68. tlib /E /0 ..\mathl @..\math.rsp
  69. cd ..
  70. if errorlevel 1 goto ERROR
  71. if %1==LARGE    goto DONE
  72. if %1==large    goto DONE
  73.  
  74. :DOhg
  75. echo *** Building HUGE memory model library
  76. if exist mathh.lib del mathh.lib
  77. cd huge
  78. tlib /E /0 ..\mathh @..\math.rsp
  79. cd ..
  80. if errorlevel 1 goto ERROR
  81. tlib /E /0 mathh -FLAGS87
  82. if errorlevel 1 goto ERROR
  83. goto DONE
  84.  
  85. :ERROR
  86. cd ..
  87. echo ********************************************************************
  88. echo Librarian errors !!
  89. echo ********************************************************************
  90.  
  91. :DONE
  92.