-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
executable file
·70 lines (53 loc) · 1.57 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
export PATH := tools:$(PATH)
NET_ADDRESS := 192.168.0.12
SRC := src/*.lua
NEARBY_FILES := $(SRC) bookmark.png banner.png \
external/gentium_regular.ttf external/gentium_italic.ttf
all: cia 3dsx
dist: build/drider.tar.gz build/drider.zip
cia: build/drider.cia
3dsx: $(NEARBY_FILES) build/drider.smdh
@mkdir -p build/3ds/drider
@mkdir -p build/books
cp -f $(NEARBY_FILES) build/3ds/drider/
cp -f build/drider.smdh build/3ds/drider/
cp -f external/lpp-3ds.3dsx build/3ds/drider/drider.3dsx
upload: cia
python tools/servefiles.py $(NET_ADDRESS) build/drider.cia
clean:
rm -rf build
.PHONY: all cia 3dsx upload clean
build/drider.tar.gz: build/drider.cia 3dsx
tar --create --file $@ \
build/drider.cia \
build/3ds
build/drider.zip: build/drider.cia 3dsx
rm -f build/drider.zip
cd build && zip -r drider.zip drider.cia 3ds
build/drider.bnr: banner.png jingle.wav
@mkdir -p $(@D)
bannertool makebanner --output $@ \
--image banner.png \
--audio jingle.wav
build/drider.smdh: icon.png
@mkdir -p $(@D)
bannertool makesmdh --output $@ \
--shorttitle "Drider" \
--longtitle "Drider epub reader" \
--publisher "ingolemo" \
--icon icon.png
build/romfs.bin: $(NEARBY_FILES)
@mkdir -p build/romfs
cp -f $^ build/romfs/
3dstool --file $@ \
--create --type romfs \
--romfs-dir build/romfs
build/drider.cia: build/romfs.bin build/drider.bnr drider.rsf build/drider.smdh
makerom -o $@ \
-f cia \
-elf external/lpp-3ds.elf \
-rsf drider.rsf \
-romfs build/romfs.bin \
-banner build/drider.bnr \
-icon build/drider.smdh \
-logo external/homebrew_logo.bcma.lz