home *** CD-ROM | disk | FTP | other *** search
- echo off
- if /%1==/ goto HELP
-
- if %1==ALL goto DOsm
- if %1==all goto DOsm
- if %1==SMALL goto DOsm
- if %1==small goto DOsm
- if %1==MEDIUM goto DOmd
- if %1==medium goto DOmd
- if %1==COMPACT goto DOcp
- if %1==compact goto DOcp
- if %1==LARGE goto DOlg
- if %1==large goto DOlg
- if %1==HUGE goto DOhg
- if %1==huge goto DOhg
-
- :HELP
- echo
- echo This batch file rebuilds the specified MATH library file from
- echo the object files contained in the OBJ and SMALL, COMPACT, MEDIUM,
- echo LARGE, or HUGE subdirectories.
- echo
- echo The "model" parameter specifies which memory model library file
- echo should be rebuilt. When ALL is specified, all five library files
- echo will be rebuilt.
- echo
- echo Usage: mathrlib model
- echo
- echo Examples: mathrlib ALL
- echo mathrlib LARGE
- echo
- goto DONE
-
- :DOsm
- echo *** Building SMALL & TINY memory model libraries
- if exist maths.lib del maths.lib
- cd small
- tlib /E /0 ..\maths @..\math.rsp
- cd ..
- if errorlevel 1 goto ERROR
- if %1==SMALL goto DONE
- if %1==small goto DONE
-
- :DOmd
- echo *** Building MEDIUM memory model library
- if exist mathm.lib del mathm.lib
- cd medium
- tlib /E /0 ..\mathm @..\math.rsp
- cd ..
- if errorlevel 1 goto ERROR
- if %1==MEDIUM goto DONE
- if %1==medium goto DONE
-
- :DOcp
- echo *** Building COMPACT memory model library
- if exist mathc.lib del mathc.lib
- cd compact
- tlib /E /0 ..\mathc @..\math.rsp
- cd ..
- if errorlevel 1 goto ERROR
- if %1==COMPACT goto DONE
- if %1==compact goto DONE
-
- :DOlg
- echo *** Building LARGE memory model library
- if exist mathl.lib del mathl.lib
- cd large
- tlib /E /0 ..\mathl @..\math.rsp
- cd ..
- if errorlevel 1 goto ERROR
- if %1==LARGE goto DONE
- if %1==large goto DONE
-
- :DOhg
- echo *** Building HUGE memory model library
- if exist mathh.lib del mathh.lib
- cd huge
- tlib /E /0 ..\mathh @..\math.rsp
- cd ..
- if errorlevel 1 goto ERROR
- tlib /E /0 mathh -FLAGS87
- if errorlevel 1 goto ERROR
- goto DONE
-
- :ERROR
- cd ..
- echo ********************************************************************
- echo Librarian errors !!
- echo ********************************************************************
-
- :DONE
-