home *** CD-ROM | disk | FTP | other *** search
- echo off
- cls
-
- echo Compiling %1.c using Watcom V7.0
-
- rem ******************************************
- rem Watcom V7.0 Compile and Link batch file
- rem ******************************************
- rem Source file currently being compiled = %1
- rem Name of EXE file placed in EXE 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 source file in large model
- wcc %1.c >%4 /ml /zp2 /w0 /oilt /dANSI /dMSDOS /i%3 /i%5
-
- rem If errors occurred, copy them from the Watcom error file to ours
- if exist %3.err copy %3.err %4
-
- rem If an error occurs, abort...
- if errorlevel 1 goto done
-
- rem Compiled without error so delete the empty error file
- del %4
-
- rem Link the resulting object file to produce the executable
- wlink name %2 file %2 library %3\supwat70 option stack=8192
-
- rem If errors occurred, copy them from the Watcom error file to ours
- if exist %3.err copy %3.err %4
-
- rem If an error occurs, abort...
- if errorlevel 1 goto done
-
- rem Delete the object file left behind
- del %2.obj
-
- :done
-