-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile.vita
143 lines (122 loc) · 3.64 KB
/
Makefile.vita
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
131
132
133
134
135
136
137
138
139
140
141
142
143
TITLE_ID = DSEMU0000
TARGET = DeSmuME
PSVITAIP = 10.0.0.208
SOURCE_DIR = src
INCLUDES = src src/libretro-common/include
DESMUME_SOURCES += \
armcpu.cpp \
arm_instructions.cpp \
bios.cpp \
cp15.cpp \
common.cpp \
debug.cpp \
Disassembler.cpp \
driver.cpp \
emufile.cpp \
encrypt.cpp \
firmware.cpp \
FIFO.cpp \
GPU.cpp \
mc.cpp \
readwrite.cpp \
wifi.cpp \
path.cpp \
MMU.cpp \
NDSSystem.cpp \
ROMReader.cpp \
render3D.cpp \
rasterize.cpp \
rtc.cpp \
saves.cpp \
SPU.cpp \
matrix.cpp \
gfx3d.cpp \
texcache.cpp \
thumb_instructions.cpp \
movie.cpp \
mic.cpp \
cheatSystem.cpp \
slot1.cpp \
slot2.cpp \
version.cpp \
addons/slot2_auto.cpp addons/slot2_mpcf.cpp addons/slot2_paddle.cpp addons/slot2_gbagame.cpp addons/slot2_none.cpp addons/slot2_rumblepak.cpp addons/slot2_guitarGrip.cpp addons/slot2_expMemory.cpp addons/slot2_piano.cpp addons/slot2_passme.cpp addons/slot1_none.cpp addons/slot1_r4.cpp addons/slot1_retail_nand.cpp addons/slot1_retail_auto.cpp addons/slot1_retail_mcrom.cpp addons/slot1comp_mc.cpp addons/slot1comp_rom.cpp addons/slot1comp_protocol.cpp \
utils/advanscene.cpp \
utils/datetime.cpp \
utils/xstring.cpp \
utils/vfat.cpp \
utils/dlditool.cpp \
utils/emufat.cpp \
utils/guid.cpp \
utils/decrypt/decrypt.cpp \
utils/decrypt/header.cpp \
utils/decrypt/crc.cpp \
utils/tinyxml/tinyxml.cpp \
utils/tinyxml/tinystr.cpp \
utils/tinyxml/tinyxmlerror.cpp \
utils/tinyxml/tinyxmlparser.cpp \
utils/libfat/cache.cpp \
utils/libfat/directory.cpp \
utils/libfat/disc.cpp \
utils/libfat/fatdir.cpp \
utils/libfat/fatfile.cpp \
utils/libfat/filetime.cpp \
utils/libfat/file_allocation_table.cpp \
utils/libfat/libfat.cpp \
utils/libfat/libfat_public_api.cpp \
utils/libfat/lock.cpp \
utils/libfat/partition.cpp \
metaspu/metaspu.cpp \
arm-common/arm_gen.cpp \
arm-common/arm_jit.cpp
FRONTEND_SOURCES += \
vita/main.cpp \
vita/task.cpp \
vita/video.cpp \
vita/input.cpp \
vita/menu.cpp \
vita/sound.cpp \
vita/config.cpp
LIBRETRO_SOURCES += \
libretro-common/compat/compat_strl.c \
libretro-common/file/file_path.c \
libretro-common/file/retro_dirent.c \
libretro-common/file/retro_stat.c \
utils/ConvertUTF.c
OBJS = $(DESMUME_SOURCES:%.cpp=$(SOURCE_DIR)/%.o) $(FRONTEND_SOURCES:%.cpp=$(SOURCE_DIR)/%.o) $(LIBRETRO_SOURCES:%.c=$(SOURCE_DIR)/%.o)
LIBS = -lvita2d -lSceKernel_stub -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub \
-lSceSysmodule_stub -lSceCtrl_stub -lSceTouch_stub -lScePgf_stub -lSceAudio_stub \
-lSceCommonDialog_stub -lScePower_stub -lfreetype -lpng -ljpeg -lz -lm -lc -lstdc++
PREFIX = arm-vita-eabi
CC = $(PREFIX)-gcc
CFLAGS += -O3 -march=armv7-a -mfloat-abi=hard -ffast-math -fsingle-precision-constant
CFLAGS += -Wl,-q -Wall -DVITA $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) -Wfatal-errors -DHAVE_LIBZ -DHAVE_JIT
ASFLAGS = $(CFLAGS)
CXX = arm-vita-eabi-g++
CXXFLAGS = $(CFLAGS)
DEPS := $(OBJS:.o=.d)
all: eboot.bin
%.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 $< $@
%.velf: %.elf
vita-elf-create $< $@
$(TARGET).elf: $(OBJS)
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
%.o: %.c
$(CC) -c $(CFLAGS) $*.c -o $*.o
$(CC) $(CFLAGS) -MM -MT $@ $*.c > $*.d
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $*.cpp -o $*.o
$(CXX) $(CXXFLAGS) -MM -MT $@ $*.cpp > $*.d
clean:
@rm -rf $(TARGET).vpk $(TARGET).velf $(TARGET).elf $(OBJS) $(DEPS) \
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."
-include $(DEPS)