@if not "%1" == ""  goto MARKE1:
@ECHO    /****************************************************************/
@ECHO    /**                       C L I N K                            **/
@ECHO    /**                                                            **/
@ECHO    /** CLINK links programs using the DISLIN C-library.           **/
@ECHO    /**                                                            **/
@ECHO    /** Command:  CLINK   [option]  main                           **/
@ECHO    /**                                                            **/
@ECHO    /** option    is an optional qualifier that may have one of    **/
@ECHO    /**           the following values:                            **/
@ECHO    /**      -c   to compile programs before linking               **/
@ECHO    /**      -r   to run programs after linking                    **/
@ECHO    /**      -a   to compile, link and run programs.               **/
@ECHO    /**                                                            **/
@ECHO    /** main      is the name of the main program.                 **/
@ECHO    /**           If the the compile option is not used, the name  **/
@ECHO    /**           may also have the form  main+obj,,lib  where obj **/
@ECHO    /**           is a field of object and lib a field of library  **/
@ECHO    /**           files.                                           **/
@ECHO    /**                                                            **/
@ECHO    /** Example:  CLINK  -a   TEST                                 **/
@ECHO    /** Version:  Borland C++ 5.5                                **/
@ECHO    /****************************************************************/
@goto ENDE
:MARKE1
@if "%DISLIN%" == "" set DISLIN=c:\dislin
@if %1 ==  -c	goto COMPILE
@if %1 ==  -C	goto COMPILE
@if %1 ==  -a	goto COMPILE
@if %1 ==  -A	goto COMPILE
@if %1 ==  -r	goto MARKE2
@if %1 ==  -R	goto MARKE2
@goto  LINK
:COMPILE
bcc32 /c /I%DISLIN% %2.c
@if not errorlevel 1 goto MARKE2
@goto ENDE
:MARKE2
bcc32 %2.obj %3 %4 %5 %6 %7 %8 %9 %DISLIN%\disbcc.lib
@if %1 ==  -a	goto RUN
@if %1 ==  -A	goto RUN
@if %1 ==  -r	goto RUN
@if %1 ==  -R	goto RUN
@goto ENDE
:LINK
bcc32 %1.obj %2 %3 %4 %5 %6 %7 %8 %DISLIN%\disbcc.lib
@GOTO ENDE
:RUN
@if not errorlevel 1 goto MARKE3
@goto ENDE
:MARKE3
%2
:ENDE
