-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.sysapp
executable file
·46 lines (34 loc) · 1.1 KB
/
Makefile.sysapp
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
TITLE_ID = VITA2DTST
TARGET = vita2dsample
OBJS = main.o image.o
LIBS = -lvita2d -lSceDisplay_stub -lSceGxm_stub -lSceAppMgr_stub \
-lSceSysmodule_stub -lSceCtrl_stub -lScePgf_stub -lScePvf_stub \
-lSceCommonDialog_stub -lfreetype -lpng -ljpeg -lz -lm -lc
PREFIX = arm-vita-eabi
CC = $(PREFIX)-gcc
CFLAGS = -Wl,-q -Wall -fno-lto
ASFLAGS = $(CFLAGS)
# Link against the locally-built version of libvita2d if possible
LIBS += -L../libvita2d
CFLAGS += -I../libvita2d/include
all: $(TARGET).vpk
%.vpk: eboot.bin
vita-mksfoex -s TITLE_ID=$(TITLE_ID) "$(TARGET)" param.sfo
vita-pack-vpk -s param.sfo -b eboot.bin $@
eboot.bin: $(TARGET).velf
vita-make-fself -at 0x0E -m 0x10000 $< $@
%.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://$(PSVITAIP):1337/ux0:/
@echo "Sent."
send: eboot.bin
curl -T eboot.bin ftp://$(PSVITAIP):1337/ux0:/app/$(TITLE_ID)/
@echo "Sent."