-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
52 lines (43 loc) · 1.08 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
PROJECT = clip
BMP2CHR = ../../tools/bmp2chr/bmp2chr
MAKEROM = ../../tools/makerom/makerom
MAKEPKG = ../../tools/makepkg/makepkg
SDCC_FLAGS = -mz80
SDCC_FLAGS += --opt-code-size
SDCC_FLAGS += --code-loc 0x100
SDCC_FLAGS += --xram-loc 0xC000
SDCC_FLAGS += --xram-size 0x4000
SDCC_FLAGS += --no-std-crt0
SDCC_FLAGS += -Wl../../lib/sdcc/vgs0.lib
all: build
cd ../../src/sdl2 && make
../../src/sdl2/vgs0 game.pkg
build: tools game.pkg
clean:
rm -f *.rel
rm -f *.chr
rm -f *.lst
rm -f *.sym
rm -f *.asm
rm -f *.ihx
rm -f *.map
rm -f *.bin
rm -f *.lk
rm -f *.noi
rm -f ${PROJECT}.rom
rm -f bgm.dat
rm -f se.dat
rm -f game.pkg
tools:
cd ../../tools && make
game.pkg: ${PROJECT}.rom
${MAKEPKG} -o game.pkg -r ${PROJECT}.rom
${PROJECT}.rom: sprite.chr font.chr program.bin
${MAKEROM} ${PROJECT}.rom program.bin font.chr sprite.chr
font.chr: font.bmp
${BMP2CHR} font.bmp font.chr
sprite.chr: sprite.bmp
${BMP2CHR} sprite.bmp sprite.chr
program.bin: program.c ../../lib/sdcc/vgs0.lib ../../lib/sdcc/vgs0lib.h
sdcc ${SDCC_FLAGS} program.c
makebin -s 16384 program.ihx program.bin