home *** CD-ROM | disk | FTP | other *** search
- echo off
- cls
-
- echo Compiling %1.c using Turbo C 2.0
-
- rem *************************************************
- rem Borland Turbo C V2.0 Compile and Link batch file
- rem *************************************************
- rem Source file currently being compiled = %1
- rem Located in EXE sub-directory = %2
- rem Directory where the compiler/linker will find the Workbench
- rem library Include files and compiler batch files = %3
- rem Compiler error file = %4
- rem Alternate Include directory = %5
-
- rem Compile the file in large model
- tcc -O -G -c -a -ml -w- -DMOUSE -I\tc\include -I%3 -I%5 %1 >%4
-
- rem If an error occurs, abort...
- if errorlevel 1 goto error
-
- rem Compiled without error so delete the empty error file
- del %4
-
- rem Link the object file to produce an executable
- tlink /n \tc\lib\c0l %2,%2,nul,\tc\lib\emu \tc\lib\mathl \tc\lib\cl %3\suptur20
- rem line may be too long for error file as well
- rem >%4
-
- rem type %4
-
- rem If an error occurs, abort...
- if errorlevel 1 goto error
-
- rem Delete the object file left behind
- del %2.obj
- goto done
-
- rem Delete the executable, since tlink does not do this
- :error
- del %2.exe
-
- :done
-