Subversion Repositories Shiroi

Rev

Rev 3 | Rev 9 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

# $Id: Makefile 8 2024-08-28 16:29:15Z nishi $

.PHONY: all clean
.SUFFIXES: .c .rel

OBJS = shiroi.rel basic.rel am9511.rel io.rel text.rel video.rel psg.rel char.rel

all: shiroi.rom

shiroi.rom: shiroi.bin font.bin
        cat shiroi.bin font.bin > shiroi.rom

shiroi.bin: Discard/shiroi.ihx
        makebin -s 22528 Discard/shiroi.ihx shiroi.bin

font.bin: Discard/font.ihx
        makebin -s 2048 Discard/font.ihx font.bin

Discard/shiroi.ihx: $(OBJS)
        mkdir -p Discard
        sdcc -mz80 -o $@ --data-loc 0x8000 --idata-loc 0x8000 --code-loc 0 --stack-loc 0x9000 --no-std-crt0 --nostdinc --nostdlib $(OBJS)

.c.rel:
        mkdir -p Discard
        sdcc -DONLY_VDP -c -mz80 -o $@ --no-std-crt0 --nostdinc --nostdlib $<
        rm -f "`echo $< | sed -E 's/\.c/.asm/g'`" "`echo $< | sed -E 's/\.c/.sym/g'`" "`echo $< | sed -E 's/\.c/.lst/g'`"

Discard/font.ihx: font.asm
        mkdir -p Discard
        sdasz80 -o Discard/font.rel font.asm
        sdldz80 -i $@ Discard/font.rel

clean:
        rm -rf Discard *.o *.bin *.rom *.rel