forked from libretro/mupen64plus-libretro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.common
327 lines (305 loc) · 11.6 KB
/
Makefile.common
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
RSPDIR = $(ROOT_DIR)/mupen64plus-rsp-hle
CXD4DIR = $(ROOT_DIR)/mupen64plus-rsp-cxd4
CORE_DIR = $(ROOT_DIR)/mupen64plus-core
LIBRETRO_COMM_DIR = $(ROOT_DIR)/libretro-common
AUDIO_LIBRETRO_DIR = $(ROOT_DIR)/custom/mupen64plus-core/plugin/audio_libretro
VIDEODIR_GLIDEN64 = $(ROOT_DIR)/GLideN64
DYNAREC_USED := 0
INCFLAGS += \
-I$(ROOT_DIR)/custom \
-I$(ROOT_DIR)/custom/mupen64plus-core \
-I$(ROOT_DIR)/custom/android/include \
-I$(ROOT_DIR)/custom/GLideN64 \
-I$(VIDEODIR_GLIDEN64)/src \
-I$(VIDEODIR_GLIDEN64)/src/osal \
-I$(CORE_DIR)/src \
-I$(CORE_DIR)/src/api \
-I$(AUDIO_LIBRETRO_DIR) \
-I$(LIBRETRO_COMM_DIR)/include \
-I$(LIBRETRO_DIR) \
-I$(VIDEODIR_GLIDEN64)/src/inc \
-I$(ROOT_DIR)/xxHash
ifneq (,$(findstring win,$(platform)))
INCFLAGS += -I$(ROOT_DIR)/custom/mman-win32
endif
SOURCES_C += $(LIBRETRO_COMM_DIR)/libco/libco.c \
$(ROOT_DIR)/xxHash/xxhash.c
SOURCES_C += \
$(RSPDIR)/src/alist.c \
$(RSPDIR)/src/alist_audio.c \
$(RSPDIR)/src/alist_naudio.c \
$(RSPDIR)/src/alist_nead.c \
$(RSPDIR)/src/audio.c \
$(RSPDIR)/src/cicx105.c \
$(RSPDIR)/src/hle.c \
$(RSPDIR)/src/jpeg.c \
$(RSPDIR)/src/memory.c \
$(RSPDIR)/src/mp3.c \
$(RSPDIR)/src/musyx.c \
$(RSPDIR)/src/re2.c \
$(RSPDIR)/src/plugin.c
ifeq ($(LLE), 1)
SOURCES_C += \
$(ROOT_DIR)/custom/mupen64plus-rsp-cxd4/module.c \
$(CXD4DIR)/su.c \
$(CXD4DIR)/vu/add.c \
$(CXD4DIR)/vu/divide.c \
$(CXD4DIR)/vu/logical.c \
$(CXD4DIR)/vu/multiply.c \
$(CXD4DIR)/vu/select.c \
$(CXD4DIR)/vu/vu.c
endif
# Core
SOURCES_C += \
$(CORE_DIR)/src/ai/ai_controller.c \
$(CORE_DIR)/src/api/callbacks.c \
$(ROOT_DIR)/custom/mupen64plus-core/api/config.c \
$(CORE_DIR)/src/api/debugger.c \
$(ROOT_DIR)/custom/mupen64plus-core/api/vidext_libretro.c \
$(ROOT_DIR)/custom/mupen64plus-core/main/main.c \
$(ROOT_DIR)/custom/mupen64plus-core/api/frontend_libretro.c \
$(CORE_DIR)/src/backends/audio_out_backend.c \
$(CORE_DIR)/src/backends/clock_backend.c \
$(CORE_DIR)/src/backends/controller_input_backend.c \
$(CORE_DIR)/src/backends/rumble_backend.c \
$(CORE_DIR)/src/backends/storage_backend.c \
$(CORE_DIR)/src/main/cheat.c \
$(CORE_DIR)/src/main/util.c \
$(CORE_DIR)/src/main/device.c \
$(CORE_DIR)/src/main/md5.c \
$(CORE_DIR)/src/main/profile.c \
$(CORE_DIR)/src/main/rom.c \
$(CORE_DIR)/src/main/savestates.c \
$(CORE_DIR)/src/main/storage_file.c \
$(CORE_DIR)/src/main/zip/zip.c \
$(CORE_DIR)/src/main/zip/unzip.c \
$(CORE_DIR)/src/main/zip/ioapi.c \
$(CORE_DIR)/src/memory/memory.c \
$(CORE_DIR)/src/pi/cart_rom.c \
$(CORE_DIR)/src/pi/flashram.c \
$(CORE_DIR)/src/pi/pi_controller.c \
$(CORE_DIR)/src/pi/sram.c \
$(CORE_DIR)/src/plugin/get_time_using_C_localtime.c \
$(CORE_DIR)/src/plugin/rumble_via_input_plugin.c \
$(ROOT_DIR)/custom/mupen64plus-core/plugin/plugin_libretro.c \
$(CORE_DIR)/src/plugin/dummy_video.c \
$(CORE_DIR)/src/plugin/dummy_audio.c \
$(CORE_DIR)/src/plugin/dummy_input.c \
$(CORE_DIR)/src/plugin/dummy_rsp.c \
$(CORE_DIR)/src/r4300/r4300.c \
$(CORE_DIR)/src/r4300/cached_interp.c \
$(CORE_DIR)/src/r4300/cp0.c \
$(CORE_DIR)/src/r4300/cp1.c \
$(CORE_DIR)/src/r4300/exception.c \
$(CORE_DIR)/src/r4300/instr_counters.c \
$(CORE_DIR)/src/r4300/interupt.c \
$(CORE_DIR)/src/r4300/mi_controller.c \
$(CORE_DIR)/src/r4300/pure_interp.c \
$(CORE_DIR)/src/r4300/r4300_core.c \
$(CORE_DIR)/src/r4300/recomp.c \
$(CORE_DIR)/src/r4300/reset.c \
$(CORE_DIR)/src/r4300/tlb.c \
$(CORE_DIR)/src/rdp/fb.c \
$(CORE_DIR)/src/rdp/rdp_core.c \
$(CORE_DIR)/src/ri/rdram.c \
$(CORE_DIR)/src/ri/rdram_detection_hack.c \
$(CORE_DIR)/src/ri/ri_controller.c \
$(CORE_DIR)/src/rsp/rsp_core.c \
$(CORE_DIR)/src/si/af_rtc.c \
$(CORE_DIR)/src/si/cic.c \
$(CORE_DIR)/src/si/eeprom.c \
$(CORE_DIR)/src/si/game_controller.c \
$(CORE_DIR)/src/si/mempak.c \
$(CORE_DIR)/src/si/n64_cic_nus_6105.c \
$(CORE_DIR)/src/si/pif.c \
$(CORE_DIR)/src/si/rumblepak.c \
$(CORE_DIR)/src/si/si_controller.c \
$(CORE_DIR)/src/vi/vi_controller.c
ifneq (,$(findstring win,$(platform)))
SOURCES_C += $(VIDEODIR_GLIDEN64)/src/osal/osal_files_win32.c \
$(ROOT_DIR)/custom/mman-win32/mman.c
else
SOURCES_C += $(VIDEODIR_GLIDEN64)/src/osal/osal_files_unix.c
endif
### DYNAREC ###
ifdef WITH_DYNAREC
ifeq ($(WITH_DYNAREC), arm)
DYNAREC_USED = 1
DYNAFLAGS += -DNEW_DYNAREC=3
SOURCES_C += \
$(CORE_DIR)/src/r4300/new_dynarec/new_dynarec.c \
$(CORE_DIR)/src/r4300/empty_dynarec.c \
$(CORE_DIR)/src/r4300/new_dynarec/arm/arm_cpu_features.c
SOURCES_ASM += \
$(CORE_DIR)/src/r4300/new_dynarec/arm/linkage_arm.S
endif
ifeq ($(WITH_DYNAREC), x86)
COREFLAGS += -DARCH_MIN_SSE2 -msse -msse2
DYNAREC_USED = 1
DYNAFLAGS += -DNEW_DYNAREC=1
SOURCES_C += \
$(CORE_DIR)/src/r4300/new_dynarec/new_dynarec.c \
$(CORE_DIR)/src/r4300/empty_dynarec.c \
SOURCES_NASM += \
$(CORE_DIR)/src/r4300/new_dynarec/x86/linkage_x86.asm
endif
ifeq ($(WITH_DYNAREC), $(filter $(WITH_DYNAREC), x86_64 x64))
COREFLAGS += -DARCH_MIN_SSE2 -msse -msse2
DYNAREC_USED = 1
SOURCES_C += $(CORE_DIR)/src/r4300/x86_64/assemble.c \
$(CORE_DIR)/src/r4300/x86_64/gbc.c \
$(CORE_DIR)/src/r4300/x86_64/gcop0.c \
$(CORE_DIR)/src/r4300/x86_64/gcop1.c \
$(CORE_DIR)/src/r4300/x86_64/gcop1_d.c \
$(CORE_DIR)/src/r4300/x86_64/gcop1_l.c \
$(CORE_DIR)/src/r4300/x86_64/gcop1_s.c \
$(CORE_DIR)/src/r4300/x86_64/gcop1_w.c \
$(CORE_DIR)/src/r4300/x86_64/gr4300.c \
$(CORE_DIR)/src/r4300/x86_64/gregimm.c \
$(CORE_DIR)/src/r4300/x86_64/gspecial.c \
$(CORE_DIR)/src/r4300/x86_64/gtlb.c \
$(CORE_DIR)/src/r4300/x86_64/regcache.c \
$(CORE_DIR)/src/r4300/x86_64/rjump.c
endif
ifeq ($(DYNAREC_USED),0)
SOURCES_C += $(CORE_DIR)/src/r4300/empty_dynarec.c
else
DYNAFLAGS += -DDYNAREC
endif
endif
# Libretro
SOURCES_C += $(LIBRETRO_DIR)/libretro.c \
$(ROOT_DIR)/custom/mupen64plus-core/plugin/emulate_game_controller_via_libretro.c \
$(LIBRETRO_COMM_DIR)/memmap/memalign.c \
$(AUDIO_LIBRETRO_DIR)/audio_backend_libretro.c \
$(LIBRETRO_COMM_DIR)/audio/resampler/audio_resampler.c \
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler.c \
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/nearest_resampler.c \
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/null_resampler.c \
$(LIBRETRO_COMM_DIR)/file/config_file.c \
$(LIBRETRO_COMM_DIR)/file/config_file_userdata.c \
$(LIBRETRO_COMM_DIR)/file/file_path.c \
$(LIBRETRO_COMM_DIR)/hash/rhash.c \
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
$(LIBRETRO_COMM_DIR)/compat/compat_posix_string.c \
$(LIBRETRO_COMM_DIR)/compat/compat_strcasestr.c \
$(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16.c \
$(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float.c \
$(LIBRETRO_COMM_DIR)/features/features_cpu.c \
$(LIBRETRO_COMM_DIR)/file/retro_stat.c \
$(LIBRETRO_COMM_DIR)/lists/string_list.c \
$(LIBRETRO_COMM_DIR)/string/stdstring.c \
$(LIBRETRO_COMM_DIR)/streams/file_stream.c
SOURCES_CXX += \
$(VIDEODIR_GLIDEN64)/src/Combiner.cpp \
$(VIDEODIR_GLIDEN64)/src/CommonPluginAPI.cpp \
$(VIDEODIR_GLIDEN64)/src/Config.cpp \
$(VIDEODIR_GLIDEN64)/src/convert.cpp \
$(VIDEODIR_GLIDEN64)/src/DepthBuffer.cpp \
$(VIDEODIR_GLIDEN64)/src/F3D.cpp \
$(VIDEODIR_GLIDEN64)/src/F3DDKR.cpp \
$(VIDEODIR_GLIDEN64)/src/F3DEX.cpp \
$(VIDEODIR_GLIDEN64)/src/F3DPD.cpp \
$(VIDEODIR_GLIDEN64)/src/F3DGOLDEN.cpp \
$(VIDEODIR_GLIDEN64)/src/F3DBETA.cpp \
$(VIDEODIR_GLIDEN64)/src/F3DSETA.cpp \
$(VIDEODIR_GLIDEN64)/src/F3DEX2.cpp \
$(VIDEODIR_GLIDEN64)/src/F3DEX2MM.cpp \
$(VIDEODIR_GLIDEN64)/src/F3DEX2CBFD.cpp \
$(VIDEODIR_GLIDEN64)/src/FBOTextureFormats.cpp \
$(VIDEODIR_GLIDEN64)/src/FrameBuffer.cpp \
$(VIDEODIR_GLIDEN64)/src/FrameBufferInfo.cpp \
$(VIDEODIR_GLIDEN64)/src/GBI.cpp \
$(VIDEODIR_GLIDEN64)/src/gDP.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideN64.cpp \
$(VIDEODIR_GLIDEN64)/src/gSP.cpp \
$(VIDEODIR_GLIDEN64)/src/Keys.cpp \
$(VIDEODIR_GLIDEN64)/src/L3D.cpp \
$(VIDEODIR_GLIDEN64)/src/L3DEX2.cpp \
$(VIDEODIR_GLIDEN64)/src/L3DEX.cpp \
$(VIDEODIR_GLIDEN64)/src/N64.cpp \
$(VIDEODIR_GLIDEN64)/src/OpenGL.cpp \
$(VIDEODIR_GLIDEN64)/src/Performance.cpp \
$(VIDEODIR_GLIDEN64)/src/RDP.cpp \
$(VIDEODIR_GLIDEN64)/src/RSP.cpp \
$(VIDEODIR_GLIDEN64)/src/S2DEX2.cpp \
$(VIDEODIR_GLIDEN64)/src/S2DEX.cpp \
$(VIDEODIR_GLIDEN64)/src/Turbo3D.cpp \
$(VIDEODIR_GLIDEN64)/src/ZSort.cpp \
$(VIDEODIR_GLIDEN64)/src/ShaderUtils.cpp \
$(VIDEODIR_GLIDEN64)/src/SoftwareRender.cpp \
$(VIDEODIR_GLIDEN64)/src/Textures.cpp \
$(VIDEODIR_GLIDEN64)/src/TextDrawerStub.cpp \
$(VIDEODIR_GLIDEN64)/src/TextureFilterHandler.cpp \
$(VIDEODIR_GLIDEN64)/src/PostProcessor.cpp \
$(VIDEODIR_GLIDEN64)/src/VI.cpp \
$(VIDEODIR_GLIDEN64)/src/BufferCopy/ColorBufferToRDRAM.cpp \
$(VIDEODIR_GLIDEN64)/src/BufferCopy/DepthBufferToRDRAM.cpp \
$(VIDEODIR_GLIDEN64)/src/BufferCopy/RDRAMtoColorBuffer.cpp \
$(VIDEODIR_GLIDEN64)/src/DepthBufferRender/ClipPolygon.cpp \
$(VIDEODIR_GLIDEN64)/src/DepthBufferRender/DepthBufferRender.cpp \
$(VIDEODIR_GLIDEN64)/src/GLUniforms/UniformSet.cpp \
$(VIDEODIR_GLIDEN64)/src/common/CommonAPIImpl_common.cpp \
$(ROOT_DIR)/custom/GLideN64/MupenPlusPluginAPI.cpp \
$(ROOT_DIR)/custom/GLideN64/mupenplus/Config_mupenplus.cpp \
$(ROOT_DIR)/custom/GLideN64/mupenplus/OpenGL_mupenplus.cpp \
$(ROOT_DIR)/custom/GLideN64/mupenplus/CommonAPIImpl_mupenplus.cpp \
$(ROOT_DIR)/custom/glsm/glsm.cpp
ifneq (,$(findstring android,$(platform)))
SOURCES_CXX += $(VIDEODIR_GLIDEN64)/src/GLideNHQ/txWidestringWrapper.cpp \
$(VIDEODIR_GLIDEN64)/src/Log_android.cpp
else
SOURCES_CXX += $(VIDEODIR_GLIDEN64)/src/Log.cpp
endif
SOURCES_CXX += \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TextureFilters.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TextureFilters_2xsai.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TextureFilters_hq2x.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TextureFilters_hq4x.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TextureFilters_xbrz.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TxCache.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TxDbg.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TxFilter.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TxFilterExport.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TxHiResCache.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TxImage.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TxQuantize.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TxReSample.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TxTexCache.cpp \
$(VIDEODIR_GLIDEN64)/src/GLideNHQ/TxUtil.cpp
ifneq (,$(findstring rpi3,$(platform)))
SOURCES_CXX += $(VIDEODIR_GLIDEN64)/src/CRC32_ARMV8.cpp
else
SOURCES_CXX += $(ROOT_DIR)/custom/GLideN64/CRC.cpp
endif
ifeq ($(HAVE_NEON),1)
SOURCES_CXX += $(VIDEODIR_GLIDEN64)/src/3DMathNeon.cpp \
$(VIDEODIR_GLIDEN64)/src/gSPNeon.cpp
SOURCES_ASM += $(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16_neon.S \
$(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float_neon.S \
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler_neon.S
else
SOURCES_CXX += $(VIDEODIR_GLIDEN64)/src/3DMath.cpp
endif
ifeq ($(GLES),1)
GLFLAGS += -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DGLES2 -DUSE_DEPTH_RENDERBUFFER
LDFLAGS += -lEGL
SOURCES_C += $(LIBRETRO_COMM_DIR)/glsym/glsym_es2.c
SOURCES_CXX += $(VIDEODIR_GLIDEN64)/src/GLES2/GLSLCombiner_gles2.cpp
else ifeq ($(GLES3),1)
GLFLAGS += -DHAVE_OPENGLES -DHAVE_OPENGLES3 -DGLES3
LDFLAGS += -lEGL
SOURCES_C += $(LIBRETRO_COMM_DIR)/glsym/glsym_es3.c
SOURCES_CXX += $(VIDEODIR_GLIDEN64)/src/OGL3X/GLSLCombiner_ogl3x.cpp \
$(VIDEODIR_GLIDEN64)/src/BufferCopy/ColorBufferToRDRAM_GL.cpp
else
ifeq (,$(findstring win,$(platform)))
GLFLAGS += -DCORE
endif
GLFLAGS += -DHAVE_OPENGL
SOURCES_C += $(LIBRETRO_COMM_DIR)/glsym/glsym_gl.c
SOURCES_CXX += $(VIDEODIR_GLIDEN64)/src/OGL3X/GLSLCombiner_ogl3x.cpp \
$(VIDEODIR_GLIDEN64)/src/BufferCopy/ColorBufferToRDRAM_GL.cpp \
$(VIDEODIR_GLIDEN64)/src/BufferCopy/ColorBufferToRDRAM_BufferStorageExt.cpp
endif
SOURCES_C += $(LIBRETRO_COMM_DIR)/glsym/rglgen.c