Subversion Repositories Shiroi

Rev

Rev 12 | Rev 21 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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