Subversion Repositories Shiroi

Rev

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