mirror of
https://github.com/libretro/parallel-gx2.git
synced 2026-11-07 04:25:58 -10:00
Under libretro the Vulkan instance, device, surface and swapchain are the frontend's: the core is handed a device and queue (the shared-device constructor) and draws into the image the frontend gives it. Everything the standalone emulator used to make its own was still compiled in and never ran: the default constructor with its instance creation and device selection, GetDevices, the X11, XCB, Wayland, Win32 and Metal surface creation (CocoaSurface.mm), SwapchainInfoVk, swapchain acquire, recreate and present, the swapchain blit pipeline and descriptor layout, and the Breath of the Wild workaround that forked a child process to probe RADV before creating an instance. All of it is removed (SwapchainInfoVk and CocoaSurface are listed in .upstream-excluded). What touched the swapchain on the way keeps its libretro behaviour: BeginFrame reports no frame, ClearColorbuffer and ImguiInit do nothing, ImguiBegin returns false after the base class's setup, IsPadWindowActive follows the DRC layout, and a screenshot is always a single one. With no VK_USE_PLATFORM_* defined, vulkan.h includes no window-system header, and Common/platform.h no longer includes Xlib, Xrender or Xutil: the Linux build needs no headers beyond the compiler's, so the CI jobs and the README install none. tools/check_no_wsi.sh, run in both CIs, fails on an X11, XCB, Wayland, GL or EGL include, a VK_USE_PLATFORM_* define or a platform surface or context entry point in the core.
708 lines
39 KiB
Makefile
708 lines
39 KiB
Makefile
# Source lists and per-library flags for the static Makefile build of the
|
|
# parallel_gx2 libretro core. Included by Makefile, which sets the platform
|
|
# switches used here:
|
|
#
|
|
# ARCH_X86_64 / ARCH_ARM64 target architecture
|
|
# OS_WIN / OS_UNIX OS family
|
|
# OS_LINUX (Linux, webOS) / OS_ANDROID / OS_APPLE, with OS_MACOS or OS_IOS
|
|
# HAVE_LIBUSB HAVE_VULKAN HAVE_OPENGL HAVE_METAL optional components
|
|
#
|
|
# Units only the standalone emulator uses are left out.
|
|
|
|
DEP_DIR := $(CORE_DIR)/dependencies
|
|
SRC_DIR := $(CORE_DIR)/src
|
|
LRC_DIR := $(DEP_DIR)/libretro-common
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Generated files
|
|
# ----------------------------------------------------------------------------
|
|
GLSLANG_DIR := $(DEP_DIR)/glslang
|
|
GLSLANG_GEN_DIR := $(GEN_DIR)/glslang
|
|
GRAPHIC_PACKS_C := $(GEN_DIR)/libretro_graphic_packs.cpp
|
|
PACK_TOOL := $(GEN_DIR)/pack_graphic_packs$(HOST_EXE)
|
|
|
|
GEN_HEADERS := $(GLSLANG_GEN_DIR)/glslang/build_info.h $(GLSLANG_GEN_DIR)/glslang/SPIRV/GlslangToSpv.h
|
|
|
|
# glslang's version, as its build_info.py takes it from CHANGES.md
|
|
GLSLANG_VERSION := $(shell sed -n 's/^\#\# \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \2 \3/p' $(GLSLANG_DIR)/CHANGES.md | head -n 1)
|
|
$(GLSLANG_GEN_DIR)/glslang/build_info.h: $(GLSLANG_DIR)/build_info.h.tmpl $(GLSLANG_DIR)/CHANGES.md
|
|
@mkdir -p $(@D)
|
|
sed -e 's/@major@/$(word 1,$(GLSLANG_VERSION))/' -e 's/@minor@/$(word 2,$(GLSLANG_VERSION))/' \
|
|
-e 's/@patch@/$(word 3,$(GLSLANG_VERSION))/' -e 's/@flavor@//' $< > $@
|
|
|
|
# <glslang/SPIRV/...>, where an installed glslang has the SPIRV headers
|
|
$(GLSLANG_GEN_DIR)/glslang/SPIRV/GlslangToSpv.h:
|
|
@mkdir -p $(@D)
|
|
echo '#include "$(abspath $(GLSLANG_DIR)/SPIRV/GlslangToSpv.h)"' > $@
|
|
|
|
# The community graphic packs, compiled in (src/libretro/LibretroGraphicPacks.cpp)
|
|
GRAPHIC_PACKS_DIR := $(DEP_DIR)/cemu_graphic_packs
|
|
PACK_TOOL_SOURCES := $(CORE_DIR)/tools/pack_graphic_packs.c \
|
|
$(addprefix $(DEP_DIR)/zlib/,adler32.c compress.c crc32.c deflate.c trees.c zutil.c)
|
|
$(PACK_TOOL): $(PACK_TOOL_SOURCES)
|
|
@mkdir -p $(@D)
|
|
$(HOSTCC) -O2 -I$(DEP_DIR)/zlib $(PACK_TOOL_SOURCES) -o $@
|
|
# The packs' names have spaces, which make cannot take as prerequisites:
|
|
# a stamp with a checksum of the tree's listing stands in for them, and is
|
|
# rewritten only when that changes.
|
|
GRAPHIC_PACKS_STAMP := $(GEN_DIR)/graphic_packs.stamp
|
|
GRAPHIC_PACKS_STATUS := $(shell mkdir -p $(GEN_DIR); \
|
|
(cd $(GRAPHIC_PACKS_DIR) 2>/dev/null && ls -lR Enhancements Resolutions Mods Workarounds src LICENSE.md 2>/dev/null) \
|
|
| cksum > $(GRAPHIC_PACKS_STAMP).tmp; \
|
|
cmp -s $(GRAPHIC_PACKS_STAMP).tmp $(GRAPHIC_PACKS_STAMP) || mv -f $(GRAPHIC_PACKS_STAMP).tmp $(GRAPHIC_PACKS_STAMP); \
|
|
rm -f $(GRAPHIC_PACKS_STAMP).tmp)
|
|
$(GRAPHIC_PACKS_C): $(PACK_TOOL) $(GRAPHIC_PACKS_STAMP)
|
|
@mkdir -p $(@D)
|
|
$(PACK_TOOL) $(GRAPHIC_PACKS_DIR) $@
|
|
|
|
# The commit the core is built from, for log.txt
|
|
GIT_HASH := $(shell git -C $(CORE_DIR) log --format=%h -1 2>/dev/null)
|
|
ifeq ($(GIT_HASH),)
|
|
GIT_HASH := unknown
|
|
endif
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# The core
|
|
# ----------------------------------------------------------------------------
|
|
CORE_SOURCES_C :=
|
|
CORE_SOURCES_CXX :=
|
|
CORE_SOURCES_ASM :=
|
|
CORE_SOURCES_OBJCXX :=
|
|
CORE_SOURCES_CXX += \
|
|
$(CORE_DIR)/src/Cafe/Account/Account.cpp \
|
|
$(CORE_DIR)/src/Cafe/CafeSystem.cpp \
|
|
$(CORE_DIR)/src/Cafe/Filesystem/FST/FST.cpp \
|
|
$(CORE_DIR)/src/Cafe/Filesystem/FST/KeyCache.cpp \
|
|
$(CORE_DIR)/src/Cafe/Filesystem/WUD/wud.cpp \
|
|
$(CORE_DIR)/src/Cafe/Filesystem/WUHB/WUHBReader.cpp \
|
|
$(CORE_DIR)/src/Cafe/Filesystem/fsc.cpp \
|
|
$(CORE_DIR)/src/Cafe/Filesystem/fscDeviceHostFS.cpp \
|
|
$(CORE_DIR)/src/Cafe/Filesystem/fscDeviceRedirect.cpp \
|
|
$(CORE_DIR)/src/Cafe/Filesystem/fscDeviceWua.cpp \
|
|
$(CORE_DIR)/src/Cafe/Filesystem/fscDeviceWud.cpp \
|
|
$(CORE_DIR)/src/Cafe/Filesystem/fscDeviceWuhb.cpp \
|
|
$(CORE_DIR)/src/Cafe/GamePatch.cpp \
|
|
$(CORE_DIR)/src/Cafe/GameProfile/GameProfile.cpp \
|
|
$(CORE_DIR)/src/Cafe/GraphicPack/GraphicPack2.cpp \
|
|
$(CORE_DIR)/src/Cafe/GraphicPack/GraphicPack2Patches.cpp \
|
|
$(CORE_DIR)/src/Cafe/GraphicPack/GraphicPack2PatchesApply.cpp \
|
|
$(CORE_DIR)/src/Cafe/GraphicPack/GraphicPack2PatchesParser.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/ACR/ACR.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/AI/AI.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Debugger/DebugSymbolStorage.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Debugger/Debugger.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Debugger/GDBBreakpoints.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Debugger/GDBStub.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Interpreter/PPCInterpreterFPU.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Interpreter/PPCInterpreterHLE.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Interpreter/PPCInterpreterImpl.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Interpreter/PPCInterpreterMain.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Interpreter/PPCInterpreterOPC.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Interpreter/PPCInterpreterPS.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/PPCScheduler.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/PPCSchedulerLLE.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/PPCTimer.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/BackendX64/BackendX64.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/BackendX64/BackendX64AVX.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/BackendX64/BackendX64BMI.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/BackendX64/BackendX64FPU.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/BackendX64/BackendX64Gen.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/BackendX64/BackendX64GenFPU.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/IML/IMLAnalyzer.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/IML/IMLDebug.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/IML/IMLInstruction.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/IML/IMLOptimizer.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/IML/IMLRegisterAllocator.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/IML/IMLRegisterAllocatorRanges.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/IML/IMLSegment.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/PPCRecompiler.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/PPCRecompilerWorkQueue.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/PPCRecompilerImlGen.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/PPCRecompilerImlGenFPU.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Espresso/Recompiler/PPCRecompilerIntermediate.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Common/RegisterSerializer.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Common/ShaderSerializer.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/FetchShader.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteAsyncCommands.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteBufferCache.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteBufferData.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteCommandProcessor.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteGSCopyShaderParser.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteGpuCothread.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteGpuWake.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteIndices.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteOverlay.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LattePerformanceMonitor.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteQuery.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteRenderTarget.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteRingBuffer.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteShader.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteShaderCache.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteSoftware.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteStreamoutGPU.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteSurfaceCopy.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteTexture.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteTextureCache.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteTextureLegacy.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteTextureLoader.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteTextureReadback.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteTextureView.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteThread.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Core/LatteTiming.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/LatteAddrLib/LatteAddrLib.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/LatteAddrLib/LatteAddrLib_Coord.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompiler.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerAnalyzer.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerEmitGLSL.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerEmitGLSLAttrDecoder.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerRegisterDataTypeTracker.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Renderer.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/RendererCore.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/RendererOuputShader.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/RendererShader.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/ShaderInfo/ShaderDescription.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/ShaderInfo/ShaderInstanceInfo.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Transcompiler/LatteTC.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Transcompiler/LatteTCGenIR.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/MMU/MMU.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/SI/SI.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/VI/VI.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/ODM/iosu_odm.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/PDM/iosu_pdm.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/ccr_nfc/iosu_ccr_nfc.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/fsa/iosu_fsa.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/kernel/iosu_kernel.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/legacy/iosu_acp.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/legacy/iosu_act.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/legacy/iosu_crypto.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/legacy/iosu_fpd.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/legacy/iosu_ioctl.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/legacy/iosu_mcp.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/legacy/iosu_nim.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/nn/boss/boss_common.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/nn/boss/boss_service.cpp \
|
|
$(CORE_DIR)/src/Cafe/IOSU/nn/iosu_nn_service.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/RPL/COSModule.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/RPL/elf.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/RPL/rpl.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/RPL/rpl_debug_symbols.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/RPL/rpl_symbol_storage.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/common/OSCommon.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/TCL/TCL.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/avm/avm.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/camera/camera.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_Alarm.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_Atomic.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_BSP.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_Callbacks.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_CodeGen.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_Coroutine.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_DynLoad.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_FG.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_FS.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_GHS.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_HWInterface.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_IM.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_IOS.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_IPC.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_IPCBuf.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_Init.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_LockedCache.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_MCP.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_MEM.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_MEM_BlockHeap.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_MEM_ExpHeap.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_MEM_FrmHeap.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_MEM_UnitHeap.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_MPQueue.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_Memory.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_MemoryMapping.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_MessageQueue.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_Misc.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_OSScreen.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_OverlayArena.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_Scheduler.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_Spinlock.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_Synchronization.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_SysHeap.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_SystemInfo.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_Thread.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_ThreadQueue.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/coreinit/coreinit_Time.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/dmae/dmae.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/drmapp/drmapp.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/erreula/erreula.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_AddrTest.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_Blit.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_Command.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_ContextState.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_Draw.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_Event.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_Memory.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_Misc.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_Query.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_RenderTarget.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_Resource.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_Shader.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_State.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_Streamout.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_Surface.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_Surface_Copy.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_Texture.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_TilingAperture.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/gx2/GX2_shader_legacy.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/h264_avc/H264Dec.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/h264_avc/H264DecBackendAVC.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/h264_avc/parser/H264Parser.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/mic/mic.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nfc/TLV.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nfc/TagV0.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nfc/ndef.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nfc/nfc.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nfc/stream.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nlibcurl/nlibcurl.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nlibnss/nlibnss.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_ac/nn_ac.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_acp/nn_acp.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_act/nn_act.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_aoc/nn_aoc.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_boss/nn_boss.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_ccr/nn_ccr.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_cmpt/nn_cmpt.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_ec/nn_ec.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_fp/nn_fp.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_idbe/nn_idbe.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_ndm/nn_ndm.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_nfp/nn_nfp.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_nim/nn_nim.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_olv/nn_olv.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_olv/nn_olv_Common.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_olv/nn_olv_DownloadCommunityTypes.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_olv/nn_olv_InitializeTypes.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_olv/nn_olv_OfflineDB.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_olv/nn_olv_PostTypes.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_olv/nn_olv_UploadCommunityTypes.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_olv/nn_olv_UploadFavoriteTypes.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_pdm/nn_pdm.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_save/nn_save.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_sl/nn_sl.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_spm/nn_spm.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_temp/nn_temp.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nn_uds/nn_uds.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nsyshid/AttachDefaultBackends.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nsyshid/BackendEmulated.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nsyshid/Dimensions.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nsyshid/Infinity.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nsyshid/Skylander.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nsyshid/SkylanderXbox360.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nsyshid/Whitelist.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nsyshid/g721/g721.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nsyshid/nsyshid.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nsyskbd/nsyskbd.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nsysnet/nsysnet.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/ntag/ntag.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/padscore/padscore.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/proc_ui/proc_ui.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/snd_core/ax_aux.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/snd_core/ax_exports.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/snd_core/ax_ist.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/snd_core/ax_mix.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/snd_core/ax_multivoice.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/snd_core/ax_out.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/snd_core/ax_voice.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/snd_user/snd_user.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/swkbd/swkbd.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/sysapp/sysapp.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/vpad/vpad.cpp \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/zlib125/zlib125.cpp \
|
|
$(CORE_DIR)/src/Cafe/TitleList/GameInfo.cpp \
|
|
$(CORE_DIR)/src/Cafe/TitleList/SaveInfo.cpp \
|
|
$(CORE_DIR)/src/Cafe/TitleList/SaveList.cpp \
|
|
$(CORE_DIR)/src/Cafe/TitleList/TitleConverter.cpp \
|
|
$(CORE_DIR)/src/Cafe/TitleList/TitleInfo.cpp \
|
|
$(CORE_DIR)/src/Cafe/TitleList/TitleList.cpp \
|
|
$(CORE_DIR)/src/Cemu/ExpressionParser/ExpressionParser.cpp \
|
|
$(CORE_DIR)/src/Cemu/FileCache/FileCache.cpp \
|
|
$(CORE_DIR)/src/Cemu/Logging/CemuLogging.cpp \
|
|
$(CORE_DIR)/src/Cemu/PPCAssembler/ppcAssembler.cpp \
|
|
$(CORE_DIR)/src/Cemu/napi/napi.cpp \
|
|
$(CORE_DIR)/src/Cemu/napi/napi_act.cpp \
|
|
$(CORE_DIR)/src/Cemu/napi/napi_ec.cpp \
|
|
$(CORE_DIR)/src/Cemu/napi/napi_helper.cpp \
|
|
$(CORE_DIR)/src/Cemu/napi/napi_idbe.cpp \
|
|
$(CORE_DIR)/src/Cemu/napi/napi_version.cpp \
|
|
$(CORE_DIR)/src/Cemu/ncrypto/ncrypto.cpp \
|
|
$(CORE_DIR)/src/Cemu/nex/nex.cpp \
|
|
$(CORE_DIR)/src/Cemu/nex/nexFriends.cpp \
|
|
$(CORE_DIR)/src/Cemu/nex/nexThread.cpp \
|
|
$(CORE_DIR)/src/Cemu/nex/prudp.cpp \
|
|
$(CORE_DIR)/src/Common/ExceptionHandler/Breadcrumb.cpp \
|
|
$(CORE_DIR)/src/Common/ExceptionHandler/ExceptionHandler.cpp \
|
|
$(CORE_DIR)/src/Common/SysAllocator.cpp \
|
|
$(CORE_DIR)/src/Common/VFSFileStream.cpp \
|
|
$(CORE_DIR)/src/Common/cpu_features.cpp \
|
|
$(CORE_DIR)/src/Common/precompiled.cpp \
|
|
$(CORE_DIR)/src/audio/IAudioAPI.cpp \
|
|
$(CORE_DIR)/src/audio/IAudioInputAPI.cpp \
|
|
$(CORE_DIR)/src/config/ActiveSettings.cpp \
|
|
$(CORE_DIR)/src/config/CemuConfig.cpp \
|
|
$(CORE_DIR)/src/config/NetworkSettings.cpp \
|
|
$(CORE_DIR)/src/imgui/imgui_extension.cpp \
|
|
$(CORE_DIR)/src/input/ControllerFactory.cpp \
|
|
$(CORE_DIR)/src/input/InputManager.cpp \
|
|
$(CORE_DIR)/src/input/api/Controller.cpp \
|
|
$(CORE_DIR)/src/input/api/ControllerState.cpp \
|
|
$(CORE_DIR)/src/input/api/Libretro/LibretroController.cpp \
|
|
$(CORE_DIR)/src/input/api/Libretro/LibretroControllerProvider.cpp \
|
|
$(CORE_DIR)/src/input/emulated/ClassicController.cpp \
|
|
$(CORE_DIR)/src/input/emulated/EmulatedController.cpp \
|
|
$(CORE_DIR)/src/input/emulated/ProController.cpp \
|
|
$(CORE_DIR)/src/input/emulated/VPADController.cpp \
|
|
$(CORE_DIR)/src/input/emulated/WPADController.cpp \
|
|
$(CORE_DIR)/src/input/emulated/WiimoteController.cpp \
|
|
$(CORE_DIR)/src/libretro/CemuLibretro.cpp \
|
|
$(CORE_DIR)/src/libretro/LibretroAudioAPI.cpp \
|
|
$(CORE_DIR)/src/libretro/LibretroGraphicPacks.cpp \
|
|
$(CORE_DIR)/src/libretro/LibretroWindowSystem.cpp \
|
|
$(CORE_DIR)/src/main.cpp \
|
|
$(CORE_DIR)/src/mainLLE.cpp \
|
|
$(CORE_DIR)/src/resource/CafeDefaultFont.cpp \
|
|
$(CORE_DIR)/src/resource/embedded/resources.cpp \
|
|
$(CORE_DIR)/src/util/IniParser/IniParser.cpp \
|
|
$(CORE_DIR)/src/util/SystemInfo/SystemInfo.cpp \
|
|
$(CORE_DIR)/src/util/VirtualHeap/VirtualHeap.cpp \
|
|
$(CORE_DIR)/src/util/Zir/Core/IR.cpp \
|
|
$(CORE_DIR)/src/util/Zir/EmitterGLSL/ZpIREmitGLSL.cpp \
|
|
$(CORE_DIR)/src/util/Zir/Passes/RegisterAllocatorForGLSL.cpp \
|
|
$(CORE_DIR)/src/util/Zir/Passes/ZpIRRegisterAllocator.cpp \
|
|
$(CORE_DIR)/src/util/bootSound/BootSoundReader.cpp \
|
|
$(CORE_DIR)/src/util/crypto/aes128.cpp \
|
|
$(CORE_DIR)/src/util/crypto/crc32.cpp \
|
|
$(CORE_DIR)/src/util/crypto/md5.cpp \
|
|
$(CORE_DIR)/src/util/helpers/Serializer.cpp \
|
|
$(CORE_DIR)/src/util/helpers/helpers.cpp \
|
|
$(CORE_DIR)/src/util/highresolutiontimer/HighResolutionTimer.cpp \
|
|
$(CORE_DIR)/src/util/tinyxml2/tinyxml2.cpp
|
|
|
|
CORE_SOURCES_CXX += $(GRAPHIC_PACKS_C)
|
|
|
|
ifeq ($(OS_WIN),1)
|
|
CORE_SOURCES_CXX += \
|
|
$(SRC_DIR)/Common/windows/platform.cpp \
|
|
$(SRC_DIR)/Common/windows/FileStream_win32.cpp \
|
|
$(SRC_DIR)/Common/ExceptionHandler/ExceptionHandler_win32.cpp \
|
|
$(SRC_DIR)/util/Fiber/FiberWin.cpp \
|
|
$(SRC_DIR)/util/MemMapper/MemMapperWin.cpp \
|
|
$(SRC_DIR)/util/SystemInfo/SystemInfoWin.cpp
|
|
else
|
|
CORE_SOURCES_CXX += \
|
|
$(CORE_DIR)/src/Common/unix/platform.cpp \
|
|
$(CORE_DIR)/src/Common/unix/FileStream_unix.cpp \
|
|
$(CORE_DIR)/src/Common/ExceptionHandler/ExceptionHandler_posix.cpp \
|
|
$(CORE_DIR)/src/util/MemMapper/MemMapperUnix.cpp \
|
|
$(CORE_DIR)/src/util/SystemInfo/SystemInfoUnix.cpp
|
|
endif
|
|
ifeq ($(OS_LINUX),1)
|
|
CORE_SOURCES_CXX += \
|
|
$(CORE_DIR)/src/Common/ExceptionHandler/ELFSymbolTable.cpp \
|
|
$(CORE_DIR)/src/util/Fiber/FiberUnix.cpp \
|
|
$(CORE_DIR)/src/util/SystemInfo/SystemInfoLinux.cpp
|
|
CORE_SOURCES_ASM += \
|
|
$(CORE_DIR)/src/resource/embedded/fontawesome.S
|
|
endif
|
|
ifeq ($(OS_ANDROID),1)
|
|
CORE_SOURCES_CXX += \
|
|
$(SRC_DIR)/util/Fiber/FiberAndroid.cpp \
|
|
$(CORE_DIR)/src/util/SystemInfo/SystemInfoLinux.cpp
|
|
CORE_SOURCES_ASM += \
|
|
$(CORE_DIR)/src/resource/embedded/fontawesome.S
|
|
endif
|
|
ifeq ($(OS_APPLE),1)
|
|
CORE_SOURCES_CXX += \
|
|
$(CORE_DIR)/src/util/Fiber/FiberUnix.cpp \
|
|
$(SRC_DIR)/util/SystemInfo/SystemInfoMac.cpp
|
|
CORE_SOURCES_ASM += \
|
|
$(SRC_DIR)/resource/embedded/fontawesome_macos.S
|
|
endif
|
|
ifeq ($(HAVE_OPENGL),1)
|
|
CORE_SOURCES_CXX += \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/OpenGL/LatteShaderGL.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/OpenGL/LatteTextureGL.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/OpenGL/LatteTextureViewGL.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLQuery.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRendererCore.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRendererStreamout.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRendererUniformData.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLSurfaceCopy.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/OpenGL/RendererShaderGL.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/OpenGL/TextureReadbackGL.cpp \
|
|
$(CORE_DIR)/src/imgui/imgui_impl_opengl3.cpp
|
|
endif
|
|
ifeq ($(HAVE_VULKAN),1)
|
|
CORE_SOURCES_CXX += \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/CachedFBOVk.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/LatteTextureViewVk.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/LatteTextureVk.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/TextureReadbackVk.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/VKRMemoryManager.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/VKRPipelineInfo.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/VsyncDriver.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanAPI.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanPipelineCompiler.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanPipelineStableCache.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanQuery.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRendererCore.cpp \
|
|
$(CORE_DIR)/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanSurfaceCopy.cpp \
|
|
$(CORE_DIR)/src/imgui/imgui_impl_vulkan.cpp \
|
|
$(CORE_DIR)/src/libretro/LibretroVkQueue.cpp
|
|
endif
|
|
ifeq ($(HAVE_METAL),1)
|
|
CORE_SOURCES_CXX += \
|
|
$(addprefix $(SRC_DIR)/Cafe/HW/Latte/Renderer/Metal/, \
|
|
CachedFBOMtl.cpp LatteTextureMtl.cpp LatteTextureReadbackMtl.cpp \
|
|
LatteTextureViewMtl.cpp LatteToMtl.cpp MetalAttachmentsInfo.cpp \
|
|
MetalBufferAllocator.cpp MetalCppImpl.cpp MetalDepthStencilCache.cpp \
|
|
MetalLayerHandle.cpp MetalMemoryManager.cpp MetalOutputShaderCache.cpp \
|
|
MetalPipelineCache.cpp MetalPipelineCompiler.cpp MetalQuery.cpp \
|
|
MetalRenderer.cpp MetalSamplerCache.cpp MetalVoidVertexPipeline.cpp \
|
|
RendererShaderMtl.cpp) \
|
|
$(SRC_DIR)/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerEmitMSLAttrDecoder.cpp \
|
|
$(SRC_DIR)/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerEmitMSL.cpp
|
|
CORE_SOURCES_OBJCXX += \
|
|
$(SRC_DIR)/Cafe/HW/Latte/Renderer/Metal/MetalLayer.mm \
|
|
$(SRC_DIR)/imgui/imgui_impl_metal.mm
|
|
ifeq ($(OS_MACOS),1)
|
|
CORE_SOURCES_OBJCXX += \
|
|
$(SRC_DIR)/Cafe/HW/Latte/Renderer/MetalView.mm
|
|
endif
|
|
endif
|
|
ifeq ($(HAVE_LIBUSB),1)
|
|
CORE_SOURCES_CXX += \
|
|
$(CORE_DIR)/src/Cafe/OS/libs/nsyshid/BackendLibusb.cpp \
|
|
$(CORE_DIR)/src/util/libusbWrapper/libusbWrapper.cpp
|
|
endif
|
|
ifeq ($(ARCH_ARM64),1)
|
|
CORE_SOURCES_CXX += \
|
|
$(SRC_DIR)/Cafe/HW/Espresso/Recompiler/BackendAArch64/BackendAArch64.cpp
|
|
endif
|
|
|
|
CORE_FLAGS := -DENABLE_LIBRETRO -DRETRO_CORE -DVK_NO_PROTOTYPES \
|
|
-DEMULATOR_VERSION_MAJOR=0 -DEMULATOR_VERSION_MINOR=0 -DEMULATOR_VERSION_PATCH=0 \
|
|
-DEMULATOR_HASH=$(GIT_HASH) \
|
|
-I$(SRC_DIR) -I$(SRC_DIR)/Cafe -I$(SRC_DIR)/Common -I$(SRC_DIR)/util -I$(SRC_DIR)/Cemu \
|
|
-I$(SRC_DIR)/input -I$(SRC_DIR)/config -I$(SRC_DIR)/audio -I$(SRC_DIR)/imgui \
|
|
-I$(SRC_DIR)/gui -I$(SRC_DIR)/gui/interface -I$(SRC_DIR)/libretro -I$(SRC_DIR)/resource \
|
|
-I$(DEP_DIR)/Vulkan-Headers/include -I$(DEP_DIR)/ZArchive/include \
|
|
-I$(DEP_DIR)/imgui -I$(DEP_DIR)/glm -I$(DEP_DIR)/fmt/include \
|
|
-I$(DEP_DIR)/pugixml/src -I$(DEP_DIR)/zlib -I$(DEP_DIR)/zstd/lib \
|
|
-I$(GLSLANG_DIR) -I$(GLSLANG_GEN_DIR) -I$(DEP_DIR)/boost-compat \
|
|
-I$(DEP_DIR)/curl-compat/include -I$(DEP_DIR)/libusb-config \
|
|
-I$(LRC_DIR)/include
|
|
CORE_WARNFLAGS := -Wno-multichar -Wno-invalid-offsetof -Wno-switch -Wno-ignored-attributes \
|
|
-Wno-deprecated-enum-enum-conversion
|
|
ifeq ($(HAVE_VULKAN),1)
|
|
CORE_FLAGS += -DENABLE_VULKAN
|
|
endif
|
|
ifeq ($(HAVE_OPENGL),1)
|
|
CORE_FLAGS += -DENABLE_OPENGL
|
|
endif
|
|
ifeq ($(HAVE_METAL),1)
|
|
CORE_FLAGS += -DENABLE_METAL -DIMGUI_IMPL_METAL_CPP -I$(DEP_DIR)/metal-cpp
|
|
endif
|
|
# No VK_USE_PLATFORM_*: the surface and the swapchain are the frontend's, so
|
|
# no window-system header is ever included
|
|
ifeq ($(HAVE_LIBUSB),1)
|
|
CORE_FLAGS += -DHAS_LIBUSB
|
|
endif
|
|
ifeq ($(ARCH_ARM64),1)
|
|
CORE_FLAGS += -I$(DEP_DIR)/xbyak_aarch64 -I$(DEP_DIR)/xbyak_aarch64/xbyak_aarch64
|
|
endif
|
|
CORE_ASFLAGS := -I$(SRC_DIR)/resource
|
|
|
|
# Every unit of the core starts with Common/precompiled.h, read
|
|
# precompiled: a stub of that name is force-included, and the compiler
|
|
# takes the precompiled header next to it in its place (GCC a .gch, which
|
|
# it skips for the stub when the flags do not match; Clang a .pch).
|
|
CORE_PCH_HEADER := $(abspath $(SRC_DIR)/Common/precompiled.h)
|
|
CORE_PCH_INCLUDE := $(CORE_PCH_HEADER)
|
|
ifneq ($(NO_PCH),1)
|
|
CORE_PCH_STUB := $(OBJ_DIR)/pch/precompiled.h
|
|
ifneq (,$(findstring clang,$(shell $(CXX) --version 2>/dev/null)))
|
|
CORE_PCH := $(CORE_PCH_STUB).pch
|
|
else
|
|
CORE_PCH := $(CORE_PCH_STUB).gch
|
|
endif
|
|
# rewritten only when the flags change, which is when the PCH must be
|
|
CORE_PCH_FLAGS = $(CXXFLAGS) $(CORE_FLAGS) $(CORE_WARNFLAGS)
|
|
$(CORE_PCH_STUB):
|
|
@mkdir -p $(@D)
|
|
echo '#include "$(CORE_PCH_HEADER)"' > $@
|
|
$(CORE_PCH): $(CORE_PCH_STUB) $(OBJ_DIR)/pch/flags $(SRC_DIR)/Common/precompiled.h | $(GEN_HEADERS)
|
|
@$(if $(E),echo PCH $<,)
|
|
$(CXX) $(CORE_PCH_FLAGS) -MMD -MP -MF $(CORE_PCH_STUB).d -MT $@ -x c++-header -c $< -o $@
|
|
CORE_PCH_INCLUDE := $(abspath $(CORE_PCH_STUB))
|
|
endif
|
|
CORE_CXXFLAGS := -include $(CORE_PCH_INCLUDE) $(CORE_WARNFLAGS)
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# libcurl's API over libretro-common's net_http, and the part of
|
|
# libretro-common the core uses
|
|
# ----------------------------------------------------------------------------
|
|
CURLCOMPAT_SOURCES_CXX := $(DEP_DIR)/curl-compat/curl_compat.cpp
|
|
CURLCOMPAT_FLAGS := -I$(DEP_DIR)/curl-compat/include -I$(LRC_DIR)/include \
|
|
-DHAVE_SSL -DHAVE_RETROSSL -DHAVE_CRYPTO
|
|
|
|
LRC_SOURCES_C := \
|
|
$(LRC_DIR)/compat/compat_posix_string.c \
|
|
$(LRC_DIR)/compat/compat_strcasestr.c \
|
|
$(LRC_DIR)/compat/compat_strl.c \
|
|
$(LRC_DIR)/compat/fopen_utf8.c \
|
|
$(LRC_DIR)/crypto/crypto.c \
|
|
$(LRC_DIR)/crypto/kdf.c \
|
|
$(LRC_DIR)/crypto/pk.c \
|
|
$(LRC_DIR)/crypto/x509.c \
|
|
$(LRC_DIR)/encodings/encoding_base64.c \
|
|
$(LRC_DIR)/encodings/encoding_utf.c \
|
|
$(LRC_DIR)/features/features_cpu.c \
|
|
$(LRC_DIR)/file/file_path.c \
|
|
$(LRC_DIR)/file/file_path_io.c \
|
|
$(LRC_DIR)/file/retro_dirent.c \
|
|
$(LRC_DIR)/hash/lrc_hash.c \
|
|
$(LRC_DIR)/lists/string_list.c \
|
|
$(LRC_DIR)/net/net_compat.c \
|
|
$(LRC_DIR)/net/net_http.c \
|
|
$(LRC_DIR)/net/net_socket.c \
|
|
$(LRC_DIR)/net/net_socket_ssl_retro.c \
|
|
$(LRC_DIR)/queues/retro_spsc.c \
|
|
$(LRC_DIR)/rthreads/retro_eventcount.c \
|
|
$(LRC_DIR)/rthreads/rthreads.c \
|
|
$(LRC_DIR)/streams/file_stream.c \
|
|
$(LRC_DIR)/string/rstrtod.c \
|
|
$(LRC_DIR)/string/stdstring.c \
|
|
$(LRC_DIR)/time/rtime.c \
|
|
$(LRC_DIR)/utils/md5.c \
|
|
$(LRC_DIR)/vfs/vfs_implementation.c
|
|
LRC_FLAGS := -I$(LRC_DIR)/include -DHAVE_SSL -DHAVE_RETROSSL -DHAVE_CRYPTO -DHAVE_THREADS
|
|
# libco: Android's fibers (FiberAndroid.cpp), and the OpenGL GPU, which runs as
|
|
# a cothread of the frontend's thread because the frontend's context is current
|
|
# there and nowhere else (LatteThread.cpp). Per-thread state (LIBCO_MP): more
|
|
# than one thread switches cothreads. Windows gets its own fibers, as libco.c
|
|
# only picks those for MSVC.
|
|
ifneq (,$(filter 1,$(OS_ANDROID) $(HAVE_OPENGL)))
|
|
LRC_FLAGS += -DLIBCO_MP
|
|
ifeq ($(OS_WIN),1)
|
|
LRC_SOURCES_C += $(LRC_DIR)/libco/fiber.c
|
|
else
|
|
LRC_SOURCES_C += $(LRC_DIR)/libco/libco.c
|
|
endif
|
|
endif
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Dependencies
|
|
# ----------------------------------------------------------------------------
|
|
IH264D_DIR := $(DEP_DIR)/ih264d
|
|
IH264D_SOURCES_C := $(addprefix $(IH264D_DIR)/, \
|
|
common/ih264_buf_mgr.c common/ih264_cabac_tables.c common/ih264_cavlc_tables.c common/ih264_chroma_intra_pred_filters.c common/ih264_common_tables.c common/ih264_deblk_edge_filters.c common/ih264_deblk_tables.c common/ih264_disp_mgr.c common/ih264_dpb_mgr.c common/ih264_ihadamard_scaling.c common/ih264_inter_pred_filters.c common/ih264_iquant_itrans_recon.c common/ih264_luma_intra_pred_filters.c common/ih264_mem_fns.c common/ih264_padding.c common/ih264_resi_trans_quant.c common/ih264_trans_data.c common/ih264_weighted_pred.c common/ithread.c decoder/ih264d_api.c decoder/ih264d_bitstrm.c decoder/ih264d_cabac.c decoder/ih264d_cabac_init_tables.c decoder/ih264d_compute_bs.c decoder/ih264d_deblocking.c decoder/ih264d_dpb_mgr.c decoder/ih264d_format_conv.c decoder/ih264d_function_selector_generic.c decoder/ih264d_inter_pred.c decoder/ih264d_mb_utils.c decoder/ih264d_mvpred.c decoder/ih264d_nal.c decoder/ih264d_parse_bslice.c decoder/ih264d_parse_cabac.c decoder/ih264d_parse_cavlc.c decoder/ih264d_parse_headers.c decoder/ih264d_parse_islice.c decoder/ih264d_parse_mb_header.c decoder/ih264d_parse_pslice.c decoder/ih264d_parse_slice.c decoder/ih264d_process_bslice.c decoder/ih264d_process_intra_mb.c decoder/ih264d_process_pslice.c decoder/ih264d_quant_scaling.c decoder/ih264d_sei.c decoder/ih264d_tables.c decoder/ih264d_thread_compute_bs.c decoder/ih264d_thread_parse_decode.c decoder/ih264d_utils.c decoder/ih264d_vui.c)
|
|
IH264D_SOURCES_ASM :=
|
|
# ih264_list.c is left out: the decoder does not use it, and outside
|
|
# Windows it calls an ithread_usleep() that ithread.c does not have.
|
|
IH264D_FLAGS := -I$(IH264D_DIR)/common -I$(IH264D_DIR)/decoder -w
|
|
ifeq ($(ARCH_X86_64),1)
|
|
IH264D_SOURCES_C += $(addprefix $(IH264D_DIR)/, \
|
|
common/x86/ih264_chroma_intra_pred_filters_ssse3.c common/x86/ih264_deblk_chroma_ssse3.c common/x86/ih264_deblk_luma_ssse3.c common/x86/ih264_ihadamard_scaling_sse42.c common/x86/ih264_ihadamard_scaling_ssse3.c common/x86/ih264_inter_pred_filters_ssse3.c common/x86/ih264_iquant_itrans_recon_dc_ssse3.c common/x86/ih264_iquant_itrans_recon_sse42.c common/x86/ih264_iquant_itrans_recon_ssse3.c common/x86/ih264_luma_intra_pred_filters_ssse3.c common/x86/ih264_mem_fns_ssse3.c common/x86/ih264_padding_ssse3.c common/x86/ih264_resi_trans_quant_sse42.c common/x86/ih264_weighted_pred_sse42.c decoder/x86/ih264d_function_selector.c decoder/x86/ih264d_function_selector_sse42.c decoder/x86/ih264d_function_selector_ssse3.c)
|
|
IH264D_FLAGS += -I$(IH264D_DIR)/common/x86 -I$(IH264D_DIR)/decoder/x86
|
|
else
|
|
IH264D_SOURCES_C += $(addprefix $(IH264D_DIR)/, \
|
|
decoder/arm/ih264d_function_selector_a9q.c decoder/arm/ih264d_function_selector_av8.c decoder/arm/ih264d_function_selector.c)
|
|
IH264D_SOURCES_ASM += $(addprefix $(IH264D_DIR)/, \
|
|
common/armv8/ih264_deblk_chroma_av8.s common/armv8/ih264_deblk_luma_av8.s common/armv8/ih264_default_weighted_pred_av8.s common/armv8/ih264_ihadamard_scaling_av8.s common/armv8/ih264_inter_pred_chroma_av8.s common/armv8/ih264_inter_pred_filters_luma_horz_av8.s common/armv8/ih264_inter_pred_filters_luma_vert_av8.s common/armv8/ih264_inter_pred_luma_copy_av8.s common/armv8/ih264_inter_pred_luma_horz_hpel_vert_hpel_av8.s common/armv8/ih264_inter_pred_luma_horz_hpel_vert_qpel_av8.s common/armv8/ih264_inter_pred_luma_horz_qpel_av8.s common/armv8/ih264_inter_pred_luma_horz_qpel_vert_hpel_av8.s common/armv8/ih264_inter_pred_luma_horz_qpel_vert_qpel_av8.s common/armv8/ih264_inter_pred_luma_vert_qpel_av8.s common/armv8/ih264_intra_pred_chroma_av8.s common/armv8/ih264_intra_pred_luma_16x16_av8.s common/armv8/ih264_intra_pred_luma_4x4_av8.s common/armv8/ih264_intra_pred_luma_8x8_av8.s common/armv8/ih264_iquant_itrans_recon_av8.s common/armv8/ih264_iquant_itrans_recon_dc_av8.s common/armv8/ih264_mem_fns_neon_av8.s common/armv8/ih264_padding_neon_av8.s common/armv8/ih264_resi_trans_quant_av8.s common/armv8/ih264_weighted_bi_pred_av8.s common/armv8/ih264_weighted_pred_av8.s common/armv8/macos_arm_symbol_aliases.s)
|
|
ifeq ($(OS_APPLE),1)
|
|
IH264D_SOURCES_ASM += $(IH264D_DIR)/common/armv8/macos_arm_symbol_aliases.s
|
|
endif
|
|
IH264D_FLAGS += -DARMV8 -I$(IH264D_DIR)/common/armv8 -I$(IH264D_DIR)/decoder/arm
|
|
endif
|
|
IH264D_ASFLAGS := -I$(IH264D_DIR)/common/armv8
|
|
|
|
ZARCHIVE_SOURCES_C := $(DEP_DIR)/ZArchive/src/sha_256.c
|
|
ZARCHIVE_SOURCES_CXX := $(DEP_DIR)/ZArchive/src/zarchivereader.cpp $(DEP_DIR)/ZArchive/src/zarchivewriter.cpp
|
|
ZARCHIVE_FLAGS := -I$(DEP_DIR)/ZArchive/include -I$(DEP_DIR)/zstd/lib -w
|
|
|
|
IMGUI_SOURCES_CXX := $(addprefix $(DEP_DIR)/imgui/,imgui.cpp imgui_draw.cpp imgui_tables.cpp imgui_widgets.cpp)
|
|
IMGUI_FLAGS := -I$(DEP_DIR)/imgui -w
|
|
|
|
GLSLANG_SOURCES_CXX := $(addprefix $(GLSLANG_DIR)/, \
|
|
glslang/GenericCodeGen/CodeGen.cpp glslang/GenericCodeGen/Link.cpp glslang/MachineIndependent/glslang_tab.cpp glslang/MachineIndependent/attribute.cpp glslang/MachineIndependent/Constant.cpp glslang/MachineIndependent/iomapper.cpp glslang/MachineIndependent/InfoSink.cpp glslang/MachineIndependent/Initialize.cpp glslang/MachineIndependent/IntermTraverse.cpp glslang/MachineIndependent/Intermediate.cpp glslang/MachineIndependent/ParseContextBase.cpp glslang/MachineIndependent/ParseHelper.cpp glslang/MachineIndependent/PoolAlloc.cpp glslang/MachineIndependent/RemoveTree.cpp glslang/MachineIndependent/Scan.cpp glslang/MachineIndependent/ShaderLang.cpp glslang/MachineIndependent/SpirvIntrinsics.cpp glslang/MachineIndependent/SymbolTable.cpp glslang/MachineIndependent/Versions.cpp glslang/MachineIndependent/intermOut.cpp glslang/MachineIndependent/limits.cpp glslang/MachineIndependent/linkValidate.cpp glslang/MachineIndependent/parseConst.cpp glslang/MachineIndependent/reflection.cpp glslang/MachineIndependent/preprocessor/Pp.cpp glslang/MachineIndependent/preprocessor/PpAtom.cpp glslang/MachineIndependent/preprocessor/PpContext.cpp glslang/MachineIndependent/preprocessor/PpScanner.cpp glslang/MachineIndependent/preprocessor/PpTokens.cpp glslang/MachineIndependent/propagateNoContraction.cpp glslang/ResourceLimits/ResourceLimits.cpp SPIRV/GlslangToSpv.cpp SPIRV/InReadableOrder.cpp SPIRV/Logger.cpp SPIRV/SpvBuilder.cpp SPIRV/SpvPostProcess.cpp SPIRV/doc.cpp SPIRV/SpvTools.cpp SPIRV/disassemble.cpp)
|
|
ifeq ($(OS_WIN),1)
|
|
GLSLANG_SOURCES_CXX += $(GLSLANG_DIR)/glslang/OSDependent/Windows/ossource.cpp
|
|
GLSLANG_FLAGS := -DGLSLANG_OSINCLUDE_WIN32
|
|
else
|
|
GLSLANG_SOURCES_CXX += $(GLSLANG_DIR)/glslang/OSDependent/Unix/ossource.cpp
|
|
GLSLANG_FLAGS := -DGLSLANG_OSINCLUDE_UNIX
|
|
endif
|
|
GLSLANG_FLAGS += -DENABLE_SPIRV -DENABLE_OPT=0 -I$(GLSLANG_DIR) -I$(GLSLANG_GEN_DIR) -w
|
|
|
|
# fmt is header-only except on Android (precompiled.h): format.cc there only,
|
|
# as its definitions and the inline ones every other TU has would clash where
|
|
# the linker does not merge them (PE/COFF)
|
|
FMT_SOURCES_CXX := $(DEP_DIR)/fmt/src/os.cc
|
|
FMT_FLAGS := -I$(DEP_DIR)/fmt/include -w
|
|
ifeq ($(OS_ANDROID),1)
|
|
FMT_SOURCES_CXX += $(DEP_DIR)/fmt/src/format.cc
|
|
else
|
|
FMT_FLAGS += -DFMT_HEADER_ONLY
|
|
endif
|
|
|
|
PUGIXML_SOURCES_CXX := $(DEP_DIR)/pugixml/src/pugixml.cpp
|
|
PUGIXML_FLAGS := -w
|
|
|
|
ZLIB_SOURCES_C := $(addprefix $(DEP_DIR)/zlib/,adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c)
|
|
ZLIB_FLAGS := -w
|
|
ifneq ($(OS_WIN),1)
|
|
ZLIB_FLAGS += -DHAVE_UNISTD_H
|
|
endif
|
|
|
|
ZSTD_SOURCES_C := $(addprefix $(DEP_DIR)/zstd/lib/, \
|
|
common/debug.c common/entropy_common.c common/error_private.c common/fse_decompress.c common/pool.c common/threading.c common/xxhash.c common/zstd_common.c compress/fse_compress.c compress/hist.c compress/huf_compress.c compress/zstd_compress.c compress/zstd_compress_literals.c compress/zstd_compress_sequences.c compress/zstd_compress_superblock.c compress/zstd_double_fast.c compress/zstd_fast.c compress/zstd_lazy.c compress/zstd_ldm.c compress/zstd_opt.c compress/zstd_preSplit.c compress/zstdmt_compress.c decompress/huf_decompress.c decompress/zstd_ddict.c decompress/zstd_decompress.c decompress/zstd_decompress_block.c)
|
|
ZSTD_SOURCES_ASM :=
|
|
ZSTD_FLAGS := -I$(DEP_DIR)/zstd/lib -I$(DEP_DIR)/zstd/lib/common -DZSTD_MULTITHREAD -w
|
|
ifeq ($(ARCH_X86_64),1)
|
|
ifneq ($(OS_WIN),1)
|
|
ZSTD_SOURCES_ASM += $(DEP_DIR)/zstd/lib/decompress/huf_decompress_amd64.S
|
|
else
|
|
ZSTD_FLAGS += -DZSTD_DISABLE_ASM
|
|
endif
|
|
endif
|
|
|
|
LIBUSB_DIR := $(DEP_DIR)/libusb/libusb
|
|
LIBUSB_SOURCES_C := $(addprefix $(LIBUSB_DIR)/,core.c descriptor.c hotplug.c io.c strerror.c sync.c)
|
|
ifneq (,$(filter 1,$(OS_LINUX) $(OS_ANDROID)))
|
|
LIBUSB_SOURCES_C += $(LIBUSB_DIR)/os/linux_usbfs.c $(LIBUSB_DIR)/os/linux_netlink.c
|
|
endif
|
|
ifeq ($(OS_UNIX),1)
|
|
LIBUSB_SOURCES_C += $(LIBUSB_DIR)/os/events_posix.c $(LIBUSB_DIR)/os/threads_posix.c
|
|
endif
|
|
ifeq ($(OS_WIN),1)
|
|
LIBUSB_SOURCES_C += $(addprefix $(LIBUSB_DIR)/os/,threads_windows.c windows_common.c \
|
|
windows_usbdk.c windows_winusb.c events_windows.c)
|
|
endif
|
|
ifeq ($(OS_MACOS),1)
|
|
LIBUSB_SOURCES_C += $(LIBUSB_DIR)/os/darwin_usb.c
|
|
endif
|
|
LIBUSB_FLAGS := -I$(DEP_DIR)/libusb-config -I$(LIBUSB_DIR) -w
|
|
|
|
XBYAK_SOURCES_CXX := $(DEP_DIR)/xbyak_aarch64/src/xbyak_aarch64_impl.cpp $(DEP_DIR)/xbyak_aarch64/src/util_impl.cpp
|
|
XBYAK_FLAGS := -I$(DEP_DIR)/xbyak_aarch64 -I$(DEP_DIR)/xbyak_aarch64/xbyak_aarch64 -w
|
|
|
|
LIB_GROUPS := CORE CURLCOMPAT LRC IH264D ZARCHIVE IMGUI GLSLANG FMT PUGIXML ZLIB ZSTD
|
|
ifeq ($(HAVE_LIBUSB),1)
|
|
LIB_GROUPS += LIBUSB
|
|
endif
|
|
ifeq ($(ARCH_ARM64),1)
|
|
LIB_GROUPS += XBYAK
|
|
endif
|