Subversion Repositories Shiroi

Rev

Rev 9 | Rev 18 | 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 12 2024-08-29 04:19:08Z nishi $
2
 
3
.PHONY: all clean
8 nishi 4
.SUFFIXES: .c .rel
1 nishi 5
 
12 nishi 6
OBJS = shiroi.rel basic.rel io.rel char.rel math.rel text.rel video.rel sound.rel debug.rel
8 nishi 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