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 CLIB library file from
- echo the object files contained in the 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: clibrlib model
- echo
- echo Examples: clibrlib ALL
- echo clibrlib LARGE
- echo
- goto DONE
-
- :DOsm
- echo *** Building SMALL & TINY memory model libraries
- if exist cs.lib del cs.lib
- if exist oldstrms.lib del oldstrms.lib
- cd small
- tlib /0 ..\cs @..\clib.rsp
- tlib /0 ..\oldstrms @..\oldstrm.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 cm.lib del cm.lib
- if exist oldstrmm.lib del oldstrmm.lib
- cd medium
- tlib /0 ..\cm @..\clib.rsp
- tlib /0 ..\oldstrmm @..\oldstrm.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 cc.lib del cc.lib
- if exist oldstrmc.lib del oldstrmc.lib
- cd compact
- tlib /0 ..\cc @..\clib.rsp
- tlib /0 ..\oldstrmc @..\oldstrm.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 cl.lib del cl.lib
- if exist oldstrml.lib del oldstrml.lib
- cd large
- tlib /0 ..\cl @..\clib.rsp
- tlib /0 ..\oldstrml @..\oldstrm.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 ch.lib del ch.lib
- if exist oldstrmh.lib del oldstrmh.lib
- cd huge
- tlib /0 ..\ch @..\clib.rsp
- tlib /0 ..\oldstrmh @..\oldstrm.rsp
- cd ..
- if errorlevel 1 goto ERROR
- goto DONE
-
- :ERROR
- cd ..
- echo ********************************************************************
- echo Librarian errors !!
- echo ********************************************************************
-
- :DONE
-