@echo off

rem This uses Digital Mars' C++ compiler to compile our new Go!.exe.

rem This commented-out section uses Borland C++ 5.5's brc32 to compile res.rc to res.res. You'd need to change the path. You don't need to uncomment this unless you change the icon for Go or something.
rem mode con: cols=80 lines=50
rem set path=c:\rich\borland\bcc55\bin;c:\windows\system32;c:\windows;c:\windows\command
rem brc32 -fores.res -32 res.rc
rem del *.$$$

set path=c:\dm\bin;c:\windows\system32;c:\windows;c:\windows\command
set lib=c:\dm\lib
set include=c:\dm\include

cls

del SyncStarmap.exe
cls
echo Compiling SyncStarmap...
rem dmc.exe -oTriceratops.exe -D -g -DWINDOWS -DMULTI triceratops.cpp triceratops.def -mn -5 | more
dmc.exe -oSyncStarmap.exe urlmon.lib -D -g -DWINDOWS -DMULTI SyncSm.cpp genalg.cpp randalg.cpp SyncSm.def -mn -5 -L/DELEXECUTABLE | more

rem -D -g for debug
if exist "SyncStarmap.exe" goto createinbox3
goto x

:createinbox3
del CreateInbox3.exe
cls
echo Compiling CreateInbox3...
rem dmc.exe -oTriceratops.exe -D -g -DWINDOWS -DMULTI triceratops.cpp triceratops.def -mn -5 | more
dmc.exe -oCreateInbox3.exe -D -g -DWINDOWS -DCREATEINBOX3 -DMULTI genalg.cpp randalg.cpp SyncSm.cpp SyncSm.def urlmon.lib -mn -5 -L/DELEXECUTABLE | more
rem -D -g for debug
if exist "CreateInbox3.exe" goto protoceratops
goto x

:protoceratops
del Protoceratops.exe
cls
echo Compiling Protoceratops...
rem dmc.exe -oTriceratops.exe -D -g -DWINDOWS -DMULTI triceratops.cpp triceratops.def -mn -5 | more
dmc.exe -oProtoceratops.exe -D -g -DWINDOWS -DPROTOCERATOPS -DMULTI genalg.cpp randalg.cpp SyncSm.cpp SyncSm.def urlmon.lib -mn -5 -L/DELEXECUTABLE | more
rem -D -g for debug
if exist "Protoceratops.exe" goto good
goto x

:unicorn
rem No such thing :P
del Unicorn.exe
cls
echo Compiling Unicorn...
rem dmc.exe -oTriceratops.exe -D -g -DWINDOWS -DMULTI triceratops.cpp triceratops.def -mn -5 | more
dmc.exe -oUnicorn.exe -D -g -DWINDOWS -DUNICORN -DMULTI genalg.cpp randalg.cpp SyncSm.cpp SyncSm.def urlmon.lib -mn -5 -L/DELEXECUTABLE | more
rem -D -g for debug
if exist "Unicorn.exe" goto good
goto x

:good
copy SyncStarmap.exe /y "..\SyncStarmap.exe"
copy CreateInbox3.exe /y "..\CreateInbox3.exe"

:x
del *.obj
del SyncStarmap.exe
del CreateInbox3.exe
pause