forked from Rangi42/polishedcrystal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (52 loc) · 1.32 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
PYTHON := python
MD5 := md5sum -c --quiet
NAME = polishedcrystal
FNAME = polishedcrystalf
FAITHFUL =
.SUFFIXES:
.PHONY: all clean crystal
.SECONDEXPANSION:
.PRECIOUS: %.2bpp %.1bpp
gfx := $(PYTHON) gfx.py
includes := $(PYTHON) utils/scan_includes.py
crystal_obj := \
wram.o \
main.o \
lib/mobile/main.o \
home.o \
audio.o \
maps.o \
engine/events.o \
engine/credits.o \
data/egg_moves.o \
data/evos_attacks.o \
data/pokedex/entries.o \
misc/crystal_misc.o \
text/common_text.o \
gfx/pics.o
roms := $(NAME).gbc $(FNAME).gbc
all: crystal
crystal: $(NAME).gbc
faithful: FAITHFUL += -DFAITHFUL
faithful: $(FNAME).gbc
clean:
rm -f $(roms) $(crystal_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym)
%.asm: ;
%.o: dep = $(shell $(includes) $(@D)/$*.asm)
%.o: %.asm $$(dep)
rgbasm $(FAITHFUL) -o $@ $<
$(NAME).gbc: $(crystal_obj)
rgblink -n $(NAME).sym -m $(NAME).map -o $@ $^
rgbfix -Cjv -t PKPCRYSTAL -i PKPC -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 $@
$(FNAME).gbc: $(crystal_obj)
rgblink -n $(FNAME).sym -m $(FNAME).map -o $@ $^
rgbfix -Cjv -t PKPCRYSTAL -i PKPC -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 $@
%.png: ;
%.2bpp: %.png ; $(gfx) 2bpp $<
%.1bpp: %.png ; $(gfx) 1bpp $<
%.lz: % ; $(gfx) lz $<
%.pal: %.2bpp ;
gfx/pics/%/normal.pal gfx/pics/%/bitmask.asm gfx/pics/%/frames.asm: gfx/pics/%/front.2bpp ;
%.bin: ;
%.blk: ;
%.tilemap: ;