Subversion Repositories Shiroi

Rev

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