@echo off
:: --------------------------------------------------------------------
:: (C) Copyright 1990-1994 by Autodesk, Inc.
:: Permission to use, copy, modify, and distribute this software and its
:: documentation for any purpose and without fee is hereby granted.   
:: THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. 
:: ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF 
:: MERCHANTABILITY ARE HEREBY DISCLAIMED.                                 
:: --------------------------------------------------------------------
::
::            Sample batch file to create an R13 ADS
::            program using Watcom C/C++ version 10.0
::
:: This batch file demonstrates how to build an R13 ADS program using the 
:: Watcom compiler. You will need a copy of Watcom C/C++ 10.0.

:: check to be sure filename is first parameter
if (%1) == () goto noname

:: Location of the root directory of the Watcom 10.0 compiler
set WATCOM=\watcom10

:: Tell compiler where to look for include files
set INCLUDE=%WATCOM%\h;\acad\ads

:: Tell linker where to look for library and object files
set LIB=%WATCOM%\lib386\dos;%WATCOM%\lib386;\acad\ads

:: Save the current path so it can be restored later
set WCPATH=%PATH%

:: Add Watcom executable directories to the path
set PATH=%WATCOM%;%WATCOM%\bin;%WATCOM%\binb;%PATH%

:: compile the source
wcc386 /d2 /fpi87 /3s %1.c /fo=%1.obj
:: Note: to compile C++ code replace "wcc386" with "wpp386" above

:: link to a .EXP
wlink SYS ads D ALL L wcads100 f %1.obj n %1.exp

:: clean up the DOS environment
set PATH=%WCPATH%
set WCPATH=
set INCLUDE=
set LIB=
set WATCOM=

goto end

:noname
@echo Syntax: MKWC100 [FILENAME with no extension]

:end


