Subversion Repositories Shiroi

Rev

Rev 22 | Rev 31 | 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 26 2024-08-31 12:31:25Z 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
 
22 nishi 24
io.rel: io.asm
25
	mkdir -p Discard
26
	sdasz80 -o io.rel io.asm
27
	rm -f "`echo $< | sed -E 's/\.asm$$/.sym/g'`" "`echo $< | sed -E 's/\.asm$$/.lst/g'`"
28
 
8 nishi 29
.c.rel:
30
	mkdir -p Discard
26 nishi 31
	sdcc -DONLY_VDP -c -mz80 -o $@ --no-std-crt0 --nostdinc --nostdlib $<
18 nishi 32
	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 33
 
1 nishi 34
Discard/font.ihx: font.asm
35
	mkdir -p Discard
36
	sdasz80 -o Discard/font.rel font.asm
37
	sdldz80 -i $@ Discard/font.rel
38
 
39
clean:
18 nishi 40
	rm -rf Discard *.o *.bin *.rom *.rel */*.rel