Subversion Repositories Shiroi

Rev

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

Rev Author Line No. Line
1 nishi 1
# $Id: Makefile 8 2024-08-28 16:29:15Z nishi $
2
 
3
.PHONY: all clean
8 nishi 4
.SUFFIXES: .c .rel
1 nishi 5
 
8 nishi 6
OBJS = shiroi.rel basic.rel am9511.rel io.rel text.rel video.rel psg.rel char.rel
7
 
1 nishi 8
all: shiroi.rom
9
 
10
shiroi.rom: shiroi.bin font.bin
11
	cat shiroi.bin font.bin > shiroi.rom
12
 
13
shiroi.bin: Discard/shiroi.ihx
3 nishi 14
	makebin -s 22528 Discard/shiroi.ihx shiroi.bin
1 nishi 15
 
16
font.bin: Discard/font.ihx
3 nishi 17
	makebin -s 2048 Discard/font.ihx font.bin
1 nishi 18
 
8 nishi 19
Discard/shiroi.ihx: $(OBJS)
1 nishi 20
	mkdir -p Discard
8 nishi 21
	sdcc -mz80 -o $@ --data-loc 0x8000 --idata-loc 0x8000 --code-loc 0 --stack-loc 0x9000 --no-std-crt0 --nostdinc --nostdlib $(OBJS)
1 nishi 22
 
8 nishi 23
.c.rel:
24
	mkdir -p Discard
25
	sdcc -DONLY_VDP -c -mz80 -o $@ --no-std-crt0 --nostdinc --nostdlib $<
26
	rm -f "`echo $< | sed -E 's/\.c/.asm/g'`" "`echo $< | sed -E 's/\.c/.sym/g'`" "`echo $< | sed -E 's/\.c/.lst/g'`"
27
 
1 nishi 28
Discard/font.ihx: font.asm
29
	mkdir -p Discard
30
	sdasz80 -o Discard/font.rel font.asm
31
	sdldz80 -i $@ Discard/font.rel
32
 
33
clean:
8 nishi 34
	rm -rf Discard *.o *.bin *.rom *.rel