#!/bin/bash

CA_DIR=`pwd`/../
CA_COM="BKTurbo8"
CA_B2O="BKbin2obj"
CA_BTL="BKTools"

ASSEMBLER=$CA_DIR$CA_COM
BIN2OBJ=$CA_DIR$CA_B2O
TOOLS=$CA_DIR$CA_BTL

$ASSEMBLER -l -o co rm3_1_main.asm 
$ASSEMBLER -l -o co rm3_2_ovl.asm
$ASSEMBLER -l -o li rm3 rm3_1_main.obj rm3_2_ovl.obj  
$ASSEMBLER -l co rm3_3_patcher.asm

$TOOLS -tBKPACK rm3.bin
mv rm3.bkp rm3.bkp.bin

mkdir out
cp rm3.bkp.bin out/
cp rm3_3_patcher.bin out/
cp *.lst out/

rm *.bin
rm *.obj
rm *.lst
