BU6502DIR = ${PSMLDIR}/6502 AR = $(BU6502DIR)/ext/install/bin/ar65 AS = $(BU6502DIR)/ext/install/bin/ca65 BU6502OBJS = bu6502interrupt.o crt0.o ctype.o cputc.o cgetc.o oserror.o all: bu6502.lib .PHONY: all # build a base library from the cc65 sources bu6502.lib: $(BU6502DIR)/cc65lib/lib/none.lib $(BU6502OBJS) cp $(BU6502DIR)/cc65lib/lib/none.lib bu6502.lib $(AR) a $@ $(BU6502OBJS) $(BU6502DIR)/cc65lib/lib/none.lib: make -C $(BU6502DIR)/cc65lib all ###### bu6502interrupt.o: $(AS) --cpu 6502 bu6502interrupt.s -l bu6502interrupt.lst vectors.o: $(AS) --cpu 6502 vectors.s -l vectors.lst crt0.o: $(AS) --cpu 6502 crt0.s -l crt0.lst ctype.o: $(AS) --cpu 6502 ctype.s -l ctype.lst cputc.o: cputc.s $(AS) --cpu 6502 cputc.s -l cputc.lst cgetc.o: cgetc.s $(AS) --cpu 6502 cgetc.s -l cgetc.lst oserror.o: oserror.s $(AS) --cpu 6502 oserror.s -l oserror.lst ###### clean: -rm -rf bu6502.lib *.o *.lst *~