-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (40 loc) · 1.49 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
TITLE_ID = VSDK00001
TITLE_ID = LUAMANGAS
TARGET = MangaDownloader
OBJS = src/main.o
LIBS = -lGeneralGood -lvita2d -lSceAppUtil_stub -lSceNet_stub -lSceHttp_stub -lSceNetCtl_stub \
-lSceDisplay_stub -lSceGxm_stub -lSceSysmodule_stub -lSceCtrl_stub \
-lSceCommonDialog_stub -lfreetype -lpng -ljpeg -lz -lm -lc -llua \
-lm -lcurl -lssl -lcrypto -lz -lpthread
PREFIX = arm-vita-eabi
CC = $(PREFIX)-gcc
CXX = $(PREFIX)-g++
CFLAGS = -Wl,-q -Wall -O3 -g -Llib/Vita -IInclude
CXXFLAGS = $(CFLAGS)
ASFLAGS = $(CFLAGS)
all: $(TARGET).vpk
%.vpk: eboot.bin
vita-mksfoex -s TITLE_ID=$(TITLE_ID) "Manga Downloader" param.sfo
vita-pack-vpk -s param.sfo -b eboot.bin \
--add VpkContents/sce_sys/icon0.png=sce_sys/icon0.png \
--add VpkContents/sce_sys/livearea/contents/bg.png=sce_sys/livearea/contents/bg.png \
--add VpkContents/sce_sys/livearea/contents/startup.png=sce_sys/livearea/contents/startup.png \
--add VpkContents/sce_sys/livearea/contents/template.xml=sce_sys/livearea/contents/template.xml \
MangaDownloader.vpk
eboot.bin: $(TARGET).velf
vita-make-fself -s $< $@
%.velf: %.elf
vita-elf-create $< $@
$(TARGET).elf: $(OBJS)
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
%.o: %.png
$(PREFIX)-ld -r -b binary -o $@ $^
clean:
@rm -rf $(TARGET).vpk $(TARGET).velf $(TARGET).elf $(OBJS) \
eboot.bin param.sfo
vpksend: $(TARGET).vpk
curl -T $(TARGET).vpk ftp://192.168.1.229:1337/ux0:/_stuffz/
@echo "Sent."
send: eboot.bin
curl -T eboot.bin ftp://192.168.1.229:1337/ux0:/app/$(TITLE_ID)/
@echo "Sent."