#!/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

$BIN2OBJ -sbin -lFONT TET.FNT tetfnt
$BIN2OBJ -sbin -lSPRITE TET.SPR tetspr
$BIN2OBJ -sbin -lWINNME WIN1.SPR
$BIN2OBJ -sbin -lWINSL WIN2.SPR
$BIN2OBJ -sbin -lWINEX WIN3.SPR
$BIN2OBJ -sbin -lPANEL TET.PAN tetpan

$ASSEMBLER -ltet.lst -otet.obj cl TETRIS.ASM

$ASSEMBLER -l li TETRIS tet.obj tetfnt.obj tetspr.obj WIN1.obj WIN2.obj WIN3.obj tetpan.obj

mkdir out
cp *.bin out/
cp *.lst out/

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