2021-12-21 07:26:30 +00:00
|
|
|
AS=/home/dolbeau/Retro68/build/toolchain/bin/m68k-apple-macos-as
|
2022-02-05 14:32:44 +00:00
|
|
|
CC=/home/dolbeau/Retro68/build/toolchain/bin/m68k-apple-macos-gcc
|
2021-12-21 07:26:30 +00:00
|
|
|
OBJCOPY=/home/dolbeau/Retro68/build/toolchain/bin/m68k-apple-macos-objcopy
|
|
|
|
|
|
|
|
NS816DECLROMDIR=/home/dolbeau/ns816-declrom
|
|
|
|
NUBUS_CHECKSUM=${NS816DECLROMDIR}/nubus_checksum
|
|
|
|
PROCESS_ROM=${NS816DECLROMDIR}/process_rom
|
|
|
|
|
|
|
|
APPLEINCS=${NS816DECLROMDIR}/atrap.inc ${NS816DECLROMDIR}/declrom.inc ${NS816DECLROMDIR}/globals.inc
|
|
|
|
|
2022-02-05 14:32:44 +00:00
|
|
|
HRES=1152
|
|
|
|
VRES=870
|
|
|
|
|
|
|
|
CSRC=NuBusFPGADrvr_OpenClose.c NuBusFPGADrvr_Ctrl.c NuBusFPGADrvr_Status.c
|
|
|
|
CSRC_ASM=${CSRC:.c=.s}
|
|
|
|
|
2021-12-21 07:26:30 +00:00
|
|
|
all: vid_decl_rom.bin vid_decl_rom.srec
|
|
|
|
|
2022-02-05 14:32:44 +00:00
|
|
|
vid_decl_rom.o: vid_decl_rom.s NuBusFPGAPrimaryInit.s NuBusFPGADrvr.s ${APPLEINCS} ${CSRC_ASM} DepVideo.inc
|
|
|
|
rm -f res.inc
|
|
|
|
echo -e "HRES=${HRES}\nVRES=${VRES}\n" | tee res.inc
|
2021-12-21 07:26:30 +00:00
|
|
|
${AS} -march=68020 -mcpu=68020 -I${NS816DECLROMDIR} $< -o $@ -a > vid_decl_rom.l
|
|
|
|
|
2022-02-05 14:32:44 +00:00
|
|
|
NuBusFPGADrvr_OpenClose.s: NuBusFPGADrvr_OpenClose.c NuBusFPGADrvr.h
|
|
|
|
${CC} -march=68020 -mcpu=68020 -O2 $< -S -o $@ -DHRES=${HRES} -DVRES=${VRES}
|
|
|
|
sed -i -e 's/^\([^a-zA-Z0-9_]*\.globl.*\)/# --- \1/' $@
|
|
|
|
sed -i -e 's/\.\(L[0-9][0-9]*\)/.OpenClose_\1/g' $@
|
|
|
|
|
|
|
|
NuBusFPGADrvr_Ctrl.s: NuBusFPGADrvr_Ctrl.c NuBusFPGADrvr.h
|
|
|
|
${CC} -march=68020 -mcpu=68020 -O2 $< -S -o $@ -DHRES=${HRES} -DVRES=${VRES}
|
|
|
|
sed -i -e 's/^\([^a-zA-Z0-9_]*\.globl.*\)/# --- \1/' $@
|
|
|
|
sed -i -e 's/\.\(L[0-9][0-9]*\)/.Ctrl_\1/g' $@
|
|
|
|
|
|
|
|
NuBusFPGADrvr_Status.s: NuBusFPGADrvr_Status.c NuBusFPGADrvr.h
|
|
|
|
${CC} -march=68020 -mcpu=68020 -O2 $< -S -o $@ -DHRES=${HRES} -DVRES=${VRES}
|
|
|
|
sed -i -e 's/^\([^a-zA-Z0-9_]*\.globl.*\)/# --- \1/' $@
|
|
|
|
sed -i -e 's/\.\(L[0-9][0-9]*\)/.Status_\1/g' $@
|
|
|
|
|
2021-12-21 07:26:30 +00:00
|
|
|
vid_decl_rom.srec: vid_decl_rom.o
|
2022-02-05 14:32:44 +00:00
|
|
|
${OBJCOPY} $^ $@ --input-target=elf32-m68k --output-target=srec
|
2021-12-21 07:26:30 +00:00
|
|
|
|
|
|
|
vid_decl_rom.raw: vid_decl_rom.o
|
2022-02-05 14:32:44 +00:00
|
|
|
${OBJCOPY} $^ $@ --input-target=elf32-m68k --output-target=binary
|
2021-12-21 07:26:30 +00:00
|
|
|
|
|
|
|
vid_decl_rom.bin: vid_decl_rom.raw
|
2022-02-05 14:32:44 +00:00
|
|
|
${NUBUS_CHECKSUM} --input_file $< --output_file $@ --output_size 32768
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f res.inc ${CSRC_ASM} *.o vid_decl_rom.srec vid_decl_rom.raw vid_decl_rom.l
|
|
|
|
|