set CA_DIR=%~dp0..\
set CA_COM="BKTurbo8.exe"
set CA_B2O="BKbin2obj.exe"

set ASSEMBLER=%CA_DIR%%CA_COM%
set BIN2OBJ=%CA_DIR%%CA_B2O%

%ASSEMBLER% -l co LOADER.ASM

%BIN2OBJ% -sbin -lmusic sc2intro.snd
%BIN2OBJ% -sbin -lpanel panel.crn
%BIN2OBJ% -sbin -lbutton buttons.spr
%BIN2OBJ% -sbin -ltrees trees.spr
%BIN2OBJ% -sbin -lammun ammun.spr
%BIN2OBJ% -sbin -lmotocy moto.spr
%BIN2OBJ% -sbin -lmotexp motexpl.spr
%BIN2OBJ% -sbin -lhelic helic.spr
%BIN2OBJ% -sbin -lhelexp helexpl.spr
%ASSEMBLER% -l -o cl RP2.ASM
%ASSEMBLER% -l li RACEPLAY RP2.obj sc2intro.obj panel.obj buttons.obj trees.obj ammun.obj moto.obj motexpl.obj helic.obj helexpl.obj

%BIN2OBJ% -sbin -lmusic rally.snd
%BIN2OBJ% -sbin -ltm tm.pck
%BIN2OBJ% -sbin -lfon fon.pck
%BIN2OBJ% -sbin -lmobil mobil.pck
%ASSEMBLER% -l -o cl SCRPLY.ASM
%ASSEMBLER% -l li SCRNPLAY SCRPLY.obj rally.obj tm.obj fon.obj mobil.obj

ren RACEPLAY.bin RACEPLAY.OVL.bin
ren SCRNPLAY.bin SCRNPLAY.OVL.bin

md out
copy *.bin out\*
copy *.lst out\*

del *.bin
del *.obj
del *.lst
