call \msvc\bin\msvcvars.bat

if exist ..\..\..\build\common\com\mcom.lib del ..\..\..\build\common\com\mcom.lib
if exist ..\..\..\build\common\com\mcom.lib goto checkout
if exist ..\..\..\build\common\com\lcom.lib del ..\..\..\build\common\com\lcom.lib
if exist ..\..\..\build\common\com\lcom.lib goto checkout
if exist ..\..\..\build\common\com\mdigicom.lib del ..\..\..\build\common\com\mdigicom.lib
if exist ..\..\..\build\common\com\mdigicom.lib goto checkout
if exist ..\..\..\build\common\com\ldigicom.lib del ..\..\..\build\common\com\ldigicom.lib
if exist ..\..\..\build\common\com\ldigicom.lib goto checkout

if exist mcom.lib del mcom.lib
if exist mcom.lib goto checkout
\msvc\bin\nmake mcom.mak
if exist lcom.lib del lcom.lib
if exist lcom.lib goto checkout
\msvc\bin\nmake lcom.mak
if exist mdigicom.lib del mdigicom.lib
if exist mdigicom.lib goto checkout
\msvc\bin\nmake mdigicom.mak
if exist ldigicom.lib del ldigicom.lib
if exist ldigicom.lib goto checkout
\msvc\bin\nmake ldigicom.mak

move *.lib ..\..\..\build\common\com

goto end

:checkout
echo Check out libs before running make.bat
:end