forked from libretro/mupen64plus-libretro-nx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.common
517 lines (482 loc) · 23.7 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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
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
RSPDIR_PARALLEL = $(ROOT_DIR)/mupen64plus-rsp-paraLLEl
AUDIO_LIBRETRO_DIR = $(ROOT_DIR)/custom/mupen64plus-core/plugin/audio_libretro
VIDEODIR_GLIDEN64 = $(ROOT_DIR)/GLideN64
VIDEODIR_ANGRYLION = $(ROOT_DIR)/mupen64plus-video-angrylion
VIDEODIR_PARALLEL = $(ROOT_DIR)/mupen64plus-video-paraLLEl
MINIZIP_DIR = $(CORE_DIR)/subprojects/minizip
LIBPNG_DIR = $(ROOT_DIR)/custom/dependencies/libpng
XXHASH_DIR = $(ROOT_DIR)/xxHash
ZLIB_DIR = $(ROOT_DIR)/custom/dependencies/libzlib
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
MINIZIP_INCFLAGS = -I$(MINIZIP_DIR)
LIBPNG_INCFLAGS = -I$(LIBPNG_DIR)
XXHASH_INCFLAGS = -I$(XXHASH_DIR)
ZLIB_INCFLAGS = -I$(ZLIB_DIR)
ifneq (,$(findstring win,$(platform)))
INCFLAGS += -I$(ROOT_DIR)/custom/mman-win32
endif
SOURCES_C = \
$(CORE_DIR)/src/asm_defines/asm_defines.c \
$(CORE_DIR)/src/api/callbacks.c \
$(ROOT_DIR)/custom/mupen64plus-core/api/config.c \
$(CORE_DIR)/src/api/debugger.c \
$(CORE_DIR)/src/api/frontend.c \
$(CORE_DIR)/src/backends/plugins_compat/audio_plugin_compat.c \
$(CORE_DIR)/src/backends/api/video_capture_backend.c \
$(CORE_DIR)/src/backends/plugins_compat/input_plugin_compat.c \
$(CORE_DIR)/src/backends/clock_ctime_plus_delta.c \
$(CORE_DIR)/src/backends/dummy_video_capture.c \
$(CORE_DIR)/src/backends/file_storage.c \
$(CORE_DIR)/src/device/cart/cart.c \
$(CORE_DIR)/src/device/cart/af_rtc.c \
$(CORE_DIR)/src/device/cart/cart_rom.c \
$(CORE_DIR)/src/device/cart/eeprom.c \
$(CORE_DIR)/src/device/cart/flashram.c \
$(CORE_DIR)/src/device/cart/is_viewer.c \
$(CORE_DIR)/src/device/cart/sram.c \
$(CORE_DIR)/src/device/controllers/game_controller.c \
$(CORE_DIR)/src/device/controllers/paks/biopak.c \
$(CORE_DIR)/src/device/controllers/paks/mempak.c \
$(CORE_DIR)/src/device/controllers/paks/rumblepak.c \
$(CORE_DIR)/src/device/controllers/paks/transferpak.c \
$(CORE_DIR)/src/device/dd/dd_controller.c \
$(CORE_DIR)/src/device/dd/disk.c \
$(CORE_DIR)/src/device/device.c \
$(CORE_DIR)/src/device/gb/gb_cart.c \
$(CORE_DIR)/src/device/gb/mbc3_rtc.c \
$(CORE_DIR)/src/device/gb/m64282fp.c \
$(CORE_DIR)/src/device/memory/memory.c \
$(CORE_DIR)/src/device/pif/bootrom_hle.c \
$(CORE_DIR)/src/device/pif/cic.c \
$(CORE_DIR)/src/device/pif/n64_cic_nus_6105.c \
$(CORE_DIR)/src/device/pif/pif.c \
$(CORE_DIR)/src/device/r4300/cached_interp.c \
$(CORE_DIR)/src/device/r4300/cp0.c \
$(CORE_DIR)/src/device/r4300/cp1.c \
$(CORE_DIR)/src/device/r4300/idec.c \
$(CORE_DIR)/src/device/r4300/interrupt.c \
$(CORE_DIR)/src/device/r4300/pure_interp.c \
$(CORE_DIR)/src/device/r4300/r4300_core.c \
$(CORE_DIR)/src/device/r4300/tlb.c \
$(CORE_DIR)/src/device/rcp/ai/ai_controller.c \
$(CORE_DIR)/src/device/rcp/mi/mi_controller.c \
$(CORE_DIR)/src/device/rcp/pi/pi_controller.c \
$(CORE_DIR)/src/device/rcp/rdp/fb.c \
$(CORE_DIR)/src/device/rcp/rdp/rdp_core.c \
$(CORE_DIR)/src/device/rcp/ri/ri_controller.c \
$(CORE_DIR)/src/device/rcp/rsp/rsp_core.c \
$(CORE_DIR)/src/device/rcp/si/si_controller.c \
$(CORE_DIR)/src/device/rcp/vi/vi_controller.c \
$(CORE_DIR)/src/device/rdram/rdram.c \
$(CORE_DIR)/src/main/main.c \
$(CORE_DIR)/src/main/util.c \
$(CORE_DIR)/src/main/cheat.c \
$(CORE_DIR)/src/main/rom.c \
$(CORE_DIR)/src/main/savestates.c \
$(CORE_DIR)/src/plugin/plugin.c \
$(CORE_DIR)/src/plugin/dummy_audio.c \
$(CORE_DIR)/src/plugin/dummy_input.c
#$(CORE_DIR)/src/main/netplay.c
MINIZIP_SOURCES_C = \
$(MINIZIP_DIR)/zip.c \
$(MINIZIP_DIR)/unzip.c \
$(MINIZIP_DIR)/ioapi.c
LIBPNG_SOURCES_C = \
$(LIBPNG_DIR)/png.c \
$(LIBPNG_DIR)/pngerror.c \
$(LIBPNG_DIR)/pngget.c \
$(LIBPNG_DIR)/pngmem.c \
$(LIBPNG_DIR)/pngpread.c \
$(LIBPNG_DIR)/pngread.c \
$(LIBPNG_DIR)/pngrio.c \
$(LIBPNG_DIR)/pngrtran.c \
$(LIBPNG_DIR)/pngrutil.c \
$(LIBPNG_DIR)/pngset.c \
$(LIBPNG_DIR)/pngtrans.c \
$(LIBPNG_DIR)/pngwio.c \
$(LIBPNG_DIR)/pngwrite.c \
$(LIBPNG_DIR)/pngwtran.c \
$(LIBPNG_DIR)/pngwutil.c
ZLIB_SOURCES_C = \
$(ZLIB_DIR)/adler32.c \
$(ZLIB_DIR)/compress.c \
$(ZLIB_DIR)/crc32.c \
$(ZLIB_DIR)/deflate.c \
$(ZLIB_DIR)/gzclose.c \
$(ZLIB_DIR)/gzlib.c \
$(ZLIB_DIR)/gzread.c \
$(ZLIB_DIR)/gzwrite.c \
$(ZLIB_DIR)/infback.c \
$(ZLIB_DIR)/inffast.c \
$(ZLIB_DIR)/inflate.c \
$(ZLIB_DIR)/inftrees.c \
$(ZLIB_DIR)/trees.c \
$(ZLIB_DIR)/uncompr.c \
$(ZLIB_DIR)/zutil.c
AWK_DEST_DIR := $(CORE_DIR)/src/asm_defines
ASM_DEFINES_OBJ := $(AWK_DEST_DIR)/asm_defines.o
# MD5 lib
SOURCES_C += \
$(CORE_DIR)/subprojects/md5/md5.c
COREFLAGS += -I$(CORE_DIR)/subprojects/md5
# libpng
ifeq ($(SYSTEM_LIBPNG), 1)
CFLAGS += $(shell pkg-config --cflags libpng)
LDFLAGS += $(shell pkg-config --libs libpng)
else
INCFLAGS += $(LIBPNG_INCFLAGS)
SOURCES_C += $(LIBPNG_SOURCES_C)
endif
# Minizip
ifeq ($(SYSTEM_MINIZIP), 1)
CFLAGS += $(shell pkg-config --cflags minizip)
LDFLAGS += $(shell pkg-config --libs minizip)
else
INCFLAGS += $(MINIZIP_INCFLAGS)
SOURCES_C += $(MINIZIP_SOURCES_C)
endif
# xxHash
ifeq ($(SYSTEM_XXHASH), 1)
CFLAGS += $(shell pkg-config --cflags libxxhash)
LDFLAGS += $(shell pkg-config --libs libxxhash)
else
INCFLAGS += $(XXHASH_INCFLAGS)
endif
# zlib
ifeq ($(SYSTEM_ZLIB), 1)
CFLAGS += $(shell pkg-config --cflags zlib)
LDFLAGS += $(shell pkg-config --libs zlib)
else
INCFLAGS += $(ZLIB_INCFLAGS)
SOURCES_C += $(ZLIB_SOURCES_C)
endif
ifneq (,$(findstring win,$(platform)))
SOURCES_C += $(VIDEODIR_GLIDEN64)/src/osal/osal_files_win32.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/device/r4300/new_dynarec/new_dynarec.c \
$(CORE_DIR)/src/device/r4300/new_dynarec/arm/arm_cpu_features.c
SOURCES_ASM += \
$(CORE_DIR)/src/device/r4300/new_dynarec/arm/linkage_arm.S
endif
ifeq ($(WITH_DYNAREC), aarch64)
DYNAREC_USED = 1
DYNAFLAGS += -DNEW_DYNAREC=4
SOURCES_C += \
$(CORE_DIR)/src/device/r4300/new_dynarec/new_dynarec.c
SOURCES_ASM += \
$(CORE_DIR)/src/device/r4300/new_dynarec/arm64/linkage_arm64.S
endif
ifeq ($(WITH_DYNAREC), x86)
COREFLAGS += -DARCH_MIN_SSE2 -msse -msse2
DYNAREC_USED = 1
DYNAFLAGS += -DNEW_DYNAREC=1
SOURCES_C += \
$(CORE_DIR)/src/device/r4300/new_dynarec/new_dynarec.c
SOURCES_NASM += \
$(CORE_DIR)/src/device/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
DYNAFLAGS += -DNEW_DYNAREC=2
SOURCES_C += \
$(CORE_DIR)/src/device/r4300/new_dynarec/new_dynarec.c
SOURCES_NASM += \
$(CORE_DIR)/src/device/r4300/new_dynarec/x64/linkage_x64.asm
endif
ifeq ($(DYNAREC_USED),0)
else
DYNAFLAGS += -DDYNAREC -I$(AWK_DEST_DIR)/
endif
endif
# Libretro
SOURCES_C += $(LIBRETRO_DIR)/libretro.c \
$(LIBRETRO_COMM_DIR)/memmap/memalign.c \
$(ROOT_DIR)/custom/mupen64plus-core/plugin/emulate_game_controller_via_libretro.c \
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler.c \
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/nearest_resampler.c \
$(LIBRETRO_COMM_DIR)/audio/resampler/audio_resampler.c \
$(AUDIO_LIBRETRO_DIR)/audio_backend_libretro.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)/file/file_path_io.c \
$(LIBRETRO_COMM_DIR)/time/rtime.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)/lists/string_list.c \
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \
$(LIBRETRO_COMM_DIR)/string/stdstring.c \
$(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.c \
$(LIBRETRO_COMM_DIR)/streams/file_stream.c \
$(LIBRETRO_COMM_DIR)/compat/fopen_utf8.c \
$(ROOT_DIR)/custom/mupen64plus-core/api/vidext_libretro.c \
$(LIBRETRO_COMM_DIR)/glsm/glsm.c
SOURCES_CXX += \
$(VIDEODIR_GLIDEN64)/src/Combiner.cpp \
$(VIDEODIR_GLIDEN64)/src/CombinerKey.cpp \
$(VIDEODIR_GLIDEN64)/src/CommonPluginAPI.cpp \
$(VIDEODIR_GLIDEN64)/src/Config.cpp \
$(VIDEODIR_GLIDEN64)/src/convert.cpp \
$(VIDEODIR_GLIDEN64)/src/DebugDump.cpp \
$(VIDEODIR_GLIDEN64)/src/Debugger.cpp \
$(VIDEODIR_GLIDEN64)/src/DepthBuffer.cpp \
$(VIDEODIR_GLIDEN64)/src/DisplayWindow.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/mupen64plus/mupen64plus_DisplayWindow.cpp \
$(VIDEODIR_GLIDEN64)/src/DisplayLoadProgress.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/N64.cpp \
$(VIDEODIR_GLIDEN64)/src/TextDrawer.cpp \
$(VIDEODIR_GLIDEN64)/src/PaletteTexture.cpp \
$(VIDEODIR_GLIDEN64)/src/Performance.cpp \
$(VIDEODIR_GLIDEN64)/src/PostProcessor.cpp \
$(VIDEODIR_GLIDEN64)/src/RDP.cpp \
$(VIDEODIR_GLIDEN64)/src/RSP.cpp \
$(VIDEODIR_GLIDEN64)/src/SoftwareRender.cpp \
$(VIDEODIR_GLIDEN64)/src/TexrectDrawer.cpp \
$(VIDEODIR_GLIDEN64)/src/TextureFilterHandler.cpp \
$(VIDEODIR_GLIDEN64)/src/Textures.cpp \
$(VIDEODIR_GLIDEN64)/src/VI.cpp \
$(VIDEODIR_GLIDEN64)/src/ZlutTexture.cpp \
$(VIDEODIR_GLIDEN64)/src/common/CommonAPIImpl_common.cpp \
$(VIDEODIR_GLIDEN64)/src/NoiseTexture.cpp \
$(VIDEODIR_GLIDEN64)/src/DepthBufferRender/ClipPolygon.cpp \
$(VIDEODIR_GLIDEN64)/src/DepthBufferRender/DepthBufferRender.cpp \
$(VIDEODIR_GLIDEN64)/src/BufferCopy/BlueNoiseTexture.cpp \
$(VIDEODIR_GLIDEN64)/src/BufferCopy/ColorBufferToRDRAM.cpp \
$(VIDEODIR_GLIDEN64)/src/BufferCopy/DepthBufferToRDRAM.cpp \
$(VIDEODIR_GLIDEN64)/src/BufferCopy/RDRAMtoColorBuffer.cpp \
$(VIDEODIR_GLIDEN64)/src/GraphicsDrawer.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/Context.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/ColorBufferReader.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/CombinerProgram.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/ObjectHandle.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GLFunctions.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/ThreadedOpenGl/opengl_Wrapper.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/ThreadedOpenGl/opengl_WrappedFunctions.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/ThreadedOpenGl/opengl_Command.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/ThreadedOpenGl/opengl_ObjectPool.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/ThreadedOpenGl/RingBufferPool.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_Attributes.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_BufferedDrawer.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_BufferManipulationObjectFactory.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_CachedFunctions.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithBufferStorage.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithPixelBuffer.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithReadPixels.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithEGLImage.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_GLInfo.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_Parameters.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_TextureManipulationObjectFactory.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_UnbufferedDrawer.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/opengl_Utils.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GLSL/glsl_CombinerInputs.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilder.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramImpl.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactory.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GLSL/glsl_FXAA.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GLSL/glsl_ShaderStorage.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GLSL/glsl_SpecialShadersFactory.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GLSL/glsl_Utils.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GraphicBuffer/PrivateApi/GraphicBuffer.cpp \
$(VIDEODIR_GLIDEN64)/src/mupenplus/MemoryStatus_mupenplus.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3D.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3DAM.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3DBETA.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3DDKR.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3DEX.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3DEX2.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3DEX2ACCLAIM.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3DEX2CBFD.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3DZEX2.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3DFLX2.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3DGOLDEN.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3DPD.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3DSETA.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F5Indi_Naboo.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F5Rogue.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/F3DTEXA.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/L3D.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/L3DEX2.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/L3DEX.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/S2DEX2.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/S2DEX.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/T3DUX.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/Turbo3D.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/ZSort.cpp \
$(VIDEODIR_GLIDEN64)/src/uCodes/ZSortBOSS.cpp \
$(VIDEODIR_GLIDEN64)/src/MupenPlusPluginAPI.cpp \
$(VIDEODIR_GLIDEN64)/src/mupenplus/MupenPlusAPIImpl.cpp \
$(ROOT_DIR)/custom/GLideN64/mupenplus/Config_mupenplus.cpp \
$(ROOT_DIR)/custom/GLideN64/mupenplus/CommonAPIImpl_mupenplus.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 \
$(VIDEODIR_GLIDEN64)/src/RSP_LoadMatrix.cpp
ifeq ($(HAVE_THR_AL), 1)
CFLAGS += -DHAVE_THR_AL
CXXFLAGS += -DHAVE_THR_AL
### Angrylion's renderer ###
SOURCES_CXX += $(VIDEODIR_ANGRYLION)/parallel_al.cpp
SOURCES_C += $(VIDEODIR_ANGRYLION)/interface.c \
$(VIDEODIR_ANGRYLION)/n64video.c
endif
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/hvqm.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 += $(CXD4DIR)/rsp.c
endif
ifeq ($(HAVE_PARALLEL_RDP),1)
PARALLEL_RDP_IMPLEMENTATION = $(VIDEODIR_PARALLEL)/parallel-rdp
include $(PARALLEL_RDP_IMPLEMENTATION)/config.mk
CFLAGS += $(PARALLEL_RDP_CFLAGS) -DHAVE_PARALLEL_RDP
CXXFLAGS += $(PARALLEL_RDP_CXXFLAGS) -DHAVE_PARALLEL_RDP
INCFLAGS += $(PARALLEL_RDP_INCLUDE_DIRS)
SOURCES_CXX += $(PARALLEL_RDP_SOURCES_CXX) $(VIDEODIR_PARALLEL)/parallel.cpp $(VIDEODIR_PARALLEL)/rdp.cpp
SOURCES_C += $(PARALLEL_RDP_SOURCES_C)
LDFLAGS += $(PARALLEL_RDP_LDFLAGS)
endif
ifeq ($(HAVE_PARALLEL_RSP), 1)
PARALLEL_RSP_ARCH := simd
SOURCES_CXX += $(RSPDIR_PARALLEL)/parallel.cpp \
$(RSPDIR_PARALLEL)/rsp_disasm.cpp \
$(RSPDIR_PARALLEL)/jit_allocator.cpp \
$(wildcard $(RSPDIR_PARALLEL)/rsp/*.cpp) \
$(wildcard $(RSPDIR_PARALLEL)/arch/$(PARALLEL_RSP_ARCH)/rsp/*.cpp)
ifneq ($(DEBUG_JIT),)
CXXFLAGS += -DDEBUG_JIT
SOURCES_CXX += $(RSPDIR_PARALLEL)/debug_jit.cpp \
$(RSPDIR_PARALLEL)/rsp.cpp
LDFLAGS += -ldl
else
SOURCES_CXX += $(RSPDIR_PARALLEL)/rsp_jit.cpp
SOURCES_C += \
$(RSPDIR_PARALLEL)/lightning/lib/jit_disasm.c \
$(RSPDIR_PARALLEL)/lightning/lib/jit_memory.c \
$(RSPDIR_PARALLEL)/lightning/lib/jit_names.c \
$(RSPDIR_PARALLEL)/lightning/lib/jit_note.c \
$(RSPDIR_PARALLEL)/lightning/lib/jit_print.c \
$(RSPDIR_PARALLEL)/lightning/lib/jit_size.c \
$(RSPDIR_PARALLEL)/lightning/lib/lightning.c
endif
CXXFLAGS += -I$(RSPDIR_PARALLEL)/arch/$(PARALLEL_RSP_ARCH)/rsp -I$(RSPDIR_PARALLEL)/lightning/include
CFLAGS += -DHAVE_PARALLEL_RSP -DPARALLEL_INTEGRATION -I$(RSPDIR_PARALLEL)/lightning/include
CXXFLAGS += -DHAVE_PARALLEL_RSP -DPARALLEL_INTEGRATION
endif
ifneq (,$(findstring win,$(platform)))
SOURCES_C += $(RSPDIR_PARALLEL)/win32/mman/sys/mman.c
CFLAGS += -I$(RSPDIR_PARALLEL)/win32/mman
endif
SOURCES_C += $(LIBRETRO_COMM_DIR)/libco/libco.c
ifeq ($(platform), $(filter $(platform), rpi3 rpi4 libnx jetson-xavier))
SOURCES_CXX += $(VIDEODIR_GLIDEN64)/src/CRC32_ARMV8.cpp
else
SOURCES_CXX += $(VIDEODIR_GLIDEN64)/src/CRC_OPT.cpp
endif
ifeq ($(HAVE_NEON),1)
SOURCES_CXX += $(VIDEODIR_GLIDEN64)/src/Neon/3DMathNeon.cpp \
$(VIDEODIR_GLIDEN64)/src/Neon/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
ifneq ($(platform), ios-arm64)
EGL_LIB ?= -lEGL
endif
ifeq ($(GLES3),1)
ifeq ($(platform),ios-arm64)
GLFLAGS += -DHAVE_OPENGLES -DHAVE_OPENGLES3 -DGLES3
else
GLFLAGS += -DEGL -DHAVE_OPENGLES -DHAVE_OPENGLES3 -DGLES3
endif
LDFLAGS += $(EGL_LIB)
SOURCES_C += $(LIBRETRO_COMM_DIR)/glsym/glsym_es3.c
ifeq ($(ANDROID),1)
SOURCES_CXX += $(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GraphicBuffer/GraphicBufferWrapper.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GraphicBuffer/PublicApi/android_hardware_buffer_compat.cpp
endif
else ifeq ($(GLES),1)
GLFLAGS += -DEGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DGLES2
LDFLAGS += $(EGL_LIB)
SOURCES_C += $(LIBRETRO_COMM_DIR)/glsym/glsym_es2.c
ifeq ($(ANDROID),1)
SOURCES_CXX += $(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GraphicBuffer/GraphicBufferWrapper.cpp \
$(VIDEODIR_GLIDEN64)/src/Graphics/OpenGLContext/GraphicBuffer/PublicApi/android_hardware_buffer_compat.cpp
endif
else
ifeq (,$(findstring win,$(platform)))
GLFLAGS += -DCORE
endif
GLFLAGS += -DHAVE_OPENGL
SOURCES_C += $(LIBRETRO_COMM_DIR)/glsym/glsym_gl.c
endif
SOURCES_C += $(LIBRETRO_COMM_DIR)/glsym/rglgen.c