.KEY INPUTFILE/A,MEDIA/A,NAME/A,SYMBOL1/A
.BRA {
.KET }
; Copy input file to BIN.C
COPY >>ReDMCSB:BUILD/MKAA.LOG {INPUTFILE} TO ReDMCSB:SOURCE/BIN.C
ECHO "----- A20E\MKBIN Compile MKBIN.C including {INPUTFILE}"
ECHO >>ReDMCSB:BUILD/MKAA.LOG "----- A20E\MKBIN Compile MKBIN.C including {INPUTFILE}"
CC >>ReDMCSB:BUILD/MKAA.LOG -L1000 -E170 -IReDMCSB:AztecC/include -at MKBIN.C {SYMBOL1} -O ReDMCSB:OBJECT/{MEDIA}/{NAME}/MKBIN.ASM
ECHO "----- A20E\MKBIN Assemble MKBIN.ASM (without optimizations)"
ECHO >>ReDMCSB:BUILD/MKAA.LOG "----- A20E\MKBIN Assemble MKBIN.ASM (without optimizations)"
AS >>ReDMCSB:BUILD/MKAA.LOG -N ReDMCSB:OBJECT/{MEDIA}/{NAME}/MKBIN.ASM -O ReDMCSB:OBJECT/{MEDIA}/{NAME}/MKBIN.O
ECHO "----- A20E\MKBIN Link"
ECHO >>ReDMCSB:BUILD/MKAA.LOG "----- A20E\MKBIN Link"
LN >>ReDMCSB:BUILD/MKAA.LOG -v ReDMCSB:OBJECT/{MEDIA}/{NAME}/MKBIN.O ReDMCSB:AztecC/lib/c.lib -o ReDMCSB:OBJECT/{MEDIA}/{NAME}/MKBIN
ECHO "----- A20E\MKBIN Run executable MKBIN to extract BIN.BIN"
ECHO >>ReDMCSB:BUILD/MKAA.LOG "----- A20E\MKBIN Run executable MKBIN to extract BIN.BIN"
CD ReDMCSB:BUILD/{MEDIA}
ReDMCSB:OBJECT/{MEDIA}/{NAME}/MKBIN
; Rename output file (copy/delete)
COPY >>ReDMCSB:BUILD/MKAA.LOG BIN.BIN TO {NAME}
DELETE >>ReDMCSB:BUILD/MKAA.LOG BIN.BIN
CD ReDMCSB:SOURCE
; Cleanup temporary files
DELETE >>ReDMCSB:BUILD/MKAA.LOG ReDMCSB:SOURCE/BIN.C
