-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
130 lines (98 loc) · 10.2 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
OBJECTS = build/main.o build/soundbank.o build/sprs.o build/bgtwo.o build/rotostuff.o build/shrink1.o build/shrink2.o build/shrink3.o build/shrink4.o build/shrink5.o build/shrink6.o build/shrink8.o build/shrink7.o build/shrink9.o build/shrinka.o build/ach00.o build/ach01.o build/ach02.o build/ach03.o build/ach04.o build/ach05.o build/ach06.o build/ach07.o build/ach08.o build/ach09.o build/ach0a.o build/ach0b.o build/ach0c.o build/ach0d.o build/ach0e.o build/ach0f.o build/ach10.o build/ach11.o build/ach12.o build/ach13.o
LZFILES = build/l1.lz build/l2.lz build/l3.lz build/l4.lz build/l5.lz build/l6.lz build/l7.lz build/l8.lz build/l9.lz build/l10.lz build/l11.lz build/l12.lz build/l13.lz build/l14.lz build/l15.lz build/l16.lz build/l17.lz build/l19.lz build/l20.lz build/l21.lz build/l22.lz build/l23.lz build/l24.lz build/l25.lz build/l26.lz build/l27.lz build/l28.lz build/l29.lz build/l30.lz build/l31.lz build/l32.lz build/l33.lz build/l34.lz build/l35.lz build/l36.lz build/l37.lz build/l38.lz build/l39.lz build/l40.lz build/l41.lz build/l42.lz build/l43.lz build/l44.lz build/l45.lz build/l46.lz build/l47.lz build/l48.lz build/l49.lz build/l50.lz build/l51.lz build/l52.lz build/l53.lz build/l54.lz build/l55.lz build/l56.lz build/l57.lz build/l58.lz build/l59.lz build/l60.lz build/l61.lz build/l62.lz build/l63.lz build/l64.lz build/l65.lz build/l66.lz build/l67.lz build/l68.lz build/l69.lz build/l70.lz build/l71.lz build/l72.lz build/l73.lz build/l74.lz build/l75.lz build/l76.lz build/l77.lz build/l78.lz build/l79.lz build/l80.lz build/l81.lz build/l82.lz build/l83.lz build/l84.lz build/l85.lz build/l86.lz build/l87.lz build/l88.lz build/l89.lz build/l90.lz build/l91.lz build/l92.lz build/l93.lz build/l94.lz build/l95.lz build/l96.lz build/l97.lz build/l98.lz build/l99.lz build/l100.lz build/l101.lz build/l102.lz build/l103.lz build/l104.lz build/l105.lz build/l106.lz build/l107.lz build/l108.lz build/l109.lz build/l110.lz build/l111.lz build/l112.lz build/l113.lz build/l114.lz build/l115.lz build/l116.lz build/l117.lz build/l118.lz build/l119.lz build/l120.lz build/l121.lz build/l122.lz build/l123.lz build/l124.lz build/l103b.lz build/l85b.lz build/titlescreen.lz build/end.lz build/ende.lz build/bg.img.lz build/bg.pal.lz build/black_final.img.lz build/black_final.pal.lz build/bsod.img.lz build/bsod.pal.lz build/controlspage1.img.lz build/controlspage1.pal.lz build/controlspage2.img.lz build/controlspage2.pal.lz build/discliamer.img.lz build/discliamer.pal.lz build/erase.img.lz build/erase.pal.lz build/gbadev.img.lz build/gbadev.pal.lz build/imadog.img.lz build/imadog.pal.lz build/killscreen.img.lz build/killscreen.pal.lz build/load.img.lz build/load.pal.lz build/pause.img.lz build/pause.pal.lz build/save.img.lz build/save.pal.lz build/scratch.img.lz build/scratch.pal.lz build/slyangel.img.lz build/slyangel.pal.lz build/sramc.img.lz build/sramc.pal.lz build/srame.img.lz build/srame.pal.lz build/sramm.img.lz build/sramm.pal.lz build/stat1.img.lz build/stat1.pal.lz build/stat2.img.lz build/stat2.pal.lz build/thx.img.lz build/thx.pal.lz build/l125.lz build/l126.lz build/l127.lz build/l128.lz build/l129.lz build/l130.lz build/l131.lz build/l132.lz build/l133.lz build/l134.lz build/l135.lz build/l136.lz build/l18.lz build/achievements.img.lz build/achievements.pal.lz build/l137.lz build/l138.lz build/l139.lz build/l140.lz build/l141.lz build/l142.lz build/l143.lz build/l144.lz build/l145.lz build/pauses.img.lz build/pauses.pal.lz build/l146.lz build/l147.lz build/l148.lz
LEVELS = build/l1.bin build/l2.bin build/l3.bin build/l4.bin build/l5.bin build/l6.bin build/l7.bin build/l8.bin build/l9.bin build/l10.bin build/l11.bin build/l12.bin build/l13.bin build/l14.bin build/l15.bin build/l16.bin build/l17.bin build/l19.bin build/l20.bin build/l21.bin build/l22.bin build/l23.bin build/l24.bin build/l25.bin build/l26.bin build/l27.bin build/l28.bin build/l29.bin build/l30.bin build/l31.bin build/l32.bin build/l33.bin build/l34.bin build/l35.bin build/l36.bin build/l37.bin build/l38.bin build/l39.bin build/l40.bin build/l41.bin build/l42.bin build/l43.bin build/l44.bin build/l45.bin build/l46.bin build/l47.bin build/l48.bin build/l49.bin build/l50.bin build/l51.bin build/l52.bin build/l53.bin build/l54.bin build/l55.bin build/l56.bin build/l57.bin build/l58.bin build/l59.bin build/l60.bin build/l61.bin build/l62.bin build/l63.bin build/l64.bin build/l65.bin build/l66.bin build/l67.bin build/l68.bin build/l69.bin build/l70.bin build/l71.bin build/l72.bin build/l73.bin build/l74.bin build/l75.bin build/l76.bin build/l77.bin build/l78.bin build/l79.bin build/l80.bin build/l81.bin build/l82.bin build/l83.bin build/l84.bin build/l85.bin build/l86.bin build/l87.bin build/l88.bin build/l89.bin build/l90.bin build/l91.bin build/l92.bin build/l93.bin build/l94.bin build/l95.bin build/l96.bin build/l97.bin build/l98.bin build/l99.bin build/l100.bin build/l101.bin build/l102.bin build/l103.bin build/l104.bin build/l105.bin build/l106.bin build/l107.bin build/l108.bin build/l109.bin build/l110.bin build/l111.bin build/l112.bin build/l113.bin build/l114.bin build/l115.bin build/l116.bin build/l117.bin build/l118.bin build/l119.bin build/l120.bin build/l121.bin build/l122.bin build/l123.bin build/l124.bin build/l103b.bin build/l85b.bin build/titlescreen.bin build/end.bin build/ende.bin build/l125.bin build/l126.bin build/l127.bin build/l128.bin build/l129.bin build/l130.bin build/l131.bin build/l132.bin build/l133.bin build/l134.bin build/l135.bin build/l136.bin build/l18.bin build/l137.bin build/l138.bin build/l139.bin build/l140.bin build/l141.bin build/l142.bin build/l143.bin build/l144.bin build/l145.bin build/l146.bin build/l147.bin build/l148.bin
BGS = build/bg.img.bin build/black_final.img.bin build/bsod.img.bin build/controlspage1.img.bin build/controlspage2.img.bin build/discliamer.img.bin build/erase.img.bin build/gbadev.img.bin build/imadog.img.bin build/killscreen.img.bin build/load.img.bin build/pause.img.bin build/save.img.bin build/scratch.img.bin build/slyangel.img.bin build/sramc.img.bin build/srame.img.bin build/sramm.img.bin build/stat1.img.bin build/stat2.img.bin build/thx.img.bin build/achievements.img.bin build/pauses.img.bin
SOURCES = src/main.c src/rotostuff.c src/sprs.c src/bgtwo.c src/shrink1.c src/shrink2.c src/shrink3.c src/shrink4.c src/shrink5.c src/shrink6.c src/shrink7.c src/shrink8.c src/shrink9.c src/shrinka.c src/ach00.c src/ach01.c src/ach02.c src/ach03.c src/ach04.c src/ach05.c src/ach06.c src/ach07.c src/ach08.c src/ach09.c src/ach0a.c src/ach0b.c src/ach0c.c src/ach0d.c src/ach0e.c src/ach0f.c src/ach10.c src/ach11.c src/ach12.c src/ach13.c
ELFS = build/main.elf
ASM = src/soundbank.s
CFLAGS = -DHRT_WITH_LIBHEART -Wall -Wextra -O3 -ffast-math -mlong-calls -mcpu=arm7tdmi -mtune=arm7tdmi -marm -faggressive-loop-optimizations -fverbose-asm
ARCH = -mthumb -mthumb-interwork -LC:\devkitPro\devkitARM\lib
LIBS = -lheart -lm
SPECS = -specs=gba.specs
PREFIX = $(DEVKITARM)/bin/arm-none-eabi-
default: sbj.gba
lvls: $(LEVELS)
lzs: $(LZFILES)
bgs: $(BGS)
data: build/data.gbadata
build/%.bin: data/%.bmp
bmp2bin -g $< $@
build/%.lz: build/%.bin
gbalzss --vram e $< $@
build/data.sbj:
$(MAKE) bgs
$(MAKE) lvls
$(MAKE) lzs
gbfs build/data.gbadata build/*.lz
build/%.o: src/%.c
$(PREFIX)gcc $(CFLAGS) $(ARCH) -c $< -o $@
build/%.o: src/%.s
$(PREFIX)gcc $(CFLAGS) $(ARCH) -c $< -o $@
build/%.o: data/%.c
$(PREFIX)gcc $(CFLAGS) $(ARCH) -c $< -o $@
build/main.elf: $(OBJECTS)
$(PREFIX)gcc $(SPECS) $(ARCH) $(OBJECTS) $(LIBS) -o build/main.elf
sbj.gba: $(ELFS) build/data.sbj
-rm -f build/*.h
$(PREFIX)objcopy -O binary $(ELFS) main.gba
padbin 256 main.gba
cat main.gba build/data.gbadata>main2.gba
cat main2.gba data/ee.dat>sbj.gba
rm main2.gba main.gba
gbafix sbj.gba -tSupaBlokJump -cSBJU -v1
clean:
-rm -f build/*.o
-rm -f build/data.gbadata
-rm -f build/main.elf
-rm -f build/*.lz
-rm -f build/*.bin
-rm -f *.gba
-rm -f build/*.h
asm:
$(PREFIX)gcc $(CFLAGS) $(ARCH) -S src\main.c
build/bg.img.bin: data/m4/bg.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/black_final.img.bin: data/m4/black_final.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/bsod.img.bin: data/m4/bsod.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/controlspage1.img.bin: data/m4/controlspage1.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/controlspage2.img.bin: data/m4/controlspage2.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/achievements.img.bin: data/m4/achievements.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/discliamer.img.bin: data/m4/discliamer.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/erase.img.bin: data/m4/erase.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/gbadev.img.bin: data/m4/gbadev.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/imadog.img.bin: data/m4/imadog.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/killscreen.img.bin: data/m4/killscreen.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/load.img.bin: data/m4/load.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/pause.img.bin: data/m4/pause.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/save.img.bin: data/m4/save.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/scratch.img.bin: data/m4/scratch.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/slyangel.img.bin: data/m4/slyangel.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/sramc.img.bin: data/m4/sramc.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/srame.img.bin: data/m4/srame.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/sramm.img.bin: data/m4/sramm.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/stat1.img.bin: data/m4/stat1.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/stat2.img.bin: data/m4/stat2.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/thx.img.bin: data/m4/thx.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@
build/pauses.img.bin: data/m4/pauses.bmp
grit $< -W3 -ftb -m! -gB8 -p -g -gu8 -pu8 -gb -h! -o$@