mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-07 08:36:02 -10:00
The Dingux helpers live under os/dingux with the other platforms' system code.
3330 lines
103 KiB
Makefile
3330 lines
103 KiB
Makefile
ROOT_DIR := .
|
|
DEPS_DIR := $(ROOT_DIR)/deps
|
|
LIBRETRO_COMM_DIR := $(ROOT_DIR)/libretro-common
|
|
WANT_WGL = 0
|
|
|
|
ifeq ($(HAVE_STACK_USAGE), 1)
|
|
DEF_FLAGS += -fstack-usage
|
|
endif
|
|
|
|
ifeq ($(HAVE_NOUNUSED), 1)
|
|
DEF_FLAGS += $(NOUNUSED_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_NOUNUSED_VARIABLE), 1)
|
|
DEF_FLAGS += $(NOUNUSED_VARIABLE_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_QT6), 1)
|
|
CXXFLAGS += $(CXX17_CFLAGS)
|
|
else ifeq ($(HAVE_CXX11), 1)
|
|
CXXFLAGS += $(CXX11_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_SAPI), 1)
|
|
LIBS += sapi.dll
|
|
endif
|
|
|
|
ifeq ($(HAVE_GL_CONTEXT),)
|
|
HAVE_GL_CONTEXT = 0
|
|
HAVE_GL_MODERN = 0
|
|
|
|
ifeq ($(HAVE_OPENGL), 1)
|
|
HAVE_GL_CONTEXT = 1
|
|
HAVE_GL_MODERN = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_OPENGL1), 1)
|
|
HAVE_GL_CONTEXT = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_OPENGLES), 1)
|
|
HAVE_GL_CONTEXT = 1
|
|
HAVE_GL_MODERN = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_OPENGLES3), 1)
|
|
HAVE_GL_CONTEXT = 1
|
|
HAVE_GL_MODERN = 1
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_LIBRETRODB),)
|
|
HAVE_LIBRETRODB = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_SOCKET_LEGACY), 1)
|
|
DEFINES += -DHAVE_SOCKET_LEGACY
|
|
endif
|
|
|
|
ifeq ($(HAVE_LIBRETRODB), 1)
|
|
DEFINES += -DHAVE_LIBRETRODB
|
|
endif
|
|
|
|
ifeq ($(HAVE_GXM), 1)
|
|
DEFINES += -DHAVE_GXM
|
|
endif
|
|
|
|
ifeq ($(HAVE_DYLIB), 1)
|
|
DEFINES += -DHAVE_DYLIB
|
|
endif
|
|
|
|
ifeq ($(SCALER_NO_SIMD), 1)
|
|
DEFINES += -DSCALER_NO_SIMD
|
|
endif
|
|
|
|
ifeq ($(HAVE_PRESERVE_DYLIB),1)
|
|
DEFINES += -DNO_DLCLOSE
|
|
endif
|
|
|
|
ifeq ($(GL_DEBUG), 1)
|
|
DEFINES += -DGL_DEBUG
|
|
endif
|
|
|
|
ifeq ($(VULKAN_DEBUG), 1)
|
|
DEFINES += -DVULKAN_DEBUG
|
|
endif
|
|
|
|
ifeq ($(HAVE_FLOATHARD), 1)
|
|
DEF_FLAGS += $(FLOATHARD_CFLAGS)
|
|
ASFLAGS += $(FLOATHARD_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_FLOATSOFTFP), 1)
|
|
DEF_FLAGS += $(FLOATSOFTFP_CFLAGS)
|
|
ASFLAGS += $(FLOATSOFTFP_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(TDM_GCC),)
|
|
LDCXXFLAGS += -static-libstdc++
|
|
endif
|
|
|
|
ifeq ($(HAVE_FILE_LOGGER), 1)
|
|
DEFINES += -DHAVE_FILE_LOGGER
|
|
endif
|
|
|
|
ifeq ($(HAVE_SHADERPIPELINE), 1)
|
|
DEFINES += -DHAVE_SHADERPIPELINE
|
|
endif
|
|
|
|
INCLUDE_DIRS += -I$(LIBRETRO_COMM_DIR)/include -I$(DEPS_DIR)
|
|
|
|
# Switches
|
|
#
|
|
ifeq ($(HAVE_NETPLAYDISCOVERY), 1)
|
|
DEFINES += -DHAVE_NETPLAYDISCOVERY
|
|
endif
|
|
|
|
ifeq ($(HAVE_NETLOGGER), 1)
|
|
DEFINES += -DHAVE_LOGGER
|
|
OBJ += network/net_logger.o
|
|
endif
|
|
|
|
# System
|
|
|
|
ifneq ($(findstring BSD,$(OS)),)
|
|
BSD_LOCAL_INC += -I/usr/local/include
|
|
HAVE_UNIX = 1
|
|
endif
|
|
|
|
ifneq ($(findstring Darwin,$(OS)),)
|
|
OSX := 1
|
|
# IOKit for the power-source query in platform_darwin.m, which every
|
|
# macOS build makes; the HID driver adds nothing beyond it.
|
|
LIBS += -framework AppKit -framework IOKit
|
|
ARCHFLAGS=
|
|
MINVERFLAGS=
|
|
ifeq ($(shell uname -p),arm)
|
|
MINVERFLAGS = -mmacosx-version-min=10.15 # macOS (Metal, ARM 64bit)
|
|
else ifeq ($(HAVE_METAL),1)
|
|
MINVERFLAGS = -mmacosx-version-min=10.13 # macOS (Metal, x86 64bit)
|
|
else ifeq ($(shell uname -p),powerpc)
|
|
MINVERFLAGS = -mmacosx-version-min=10.5 # macOSX (PowerPC 32-bit)
|
|
else ifeq ($(shell uname -m),i386)
|
|
MINVERFLAGS = -mmacosx-version-min=10.6 # macOSX (OpenGL, x86 32bit)
|
|
else
|
|
MINVERFLAGS = -mmacosx-version-min=10.7 # macOSX (OpenGL, x86 64bit)
|
|
endif
|
|
|
|
# Build for a specific architecture when ARCH is defined as a switch
|
|
ifeq ($(ARCH),arm64)
|
|
MINVERFLAGS = -mmacosx-version-min=10.15 # macOS (Metal, ARM 64bit)
|
|
ARCHFLAGS = -arch arm64
|
|
else ifeq ($(ARCH),x86_64)
|
|
ifeq ($(HAVE_METAL),1)
|
|
MINVERFLAGS = -mmacosx-version-min=10.13
|
|
else
|
|
MINVERFLAGS = -mmacosx-version-min=10.7
|
|
endif
|
|
ARCHFLAGS = -arch x86_64
|
|
else ifeq ($(ARCH),x86)
|
|
MINVERFLAGS = -mmacosx-version-min=10.6
|
|
ARCHFLAGS = -arch x86
|
|
else ifeq ($(ARCH),ppc)
|
|
# 10.5 unless the invoker targets older (10.4 is the floor).
|
|
MINVERFLAGS = -mmacosx-version-min=$(or $(MACOSX_DEPLOYMENT_TARGET),10.5)
|
|
ARCHFLAGS = -arch ppc
|
|
endif
|
|
ifeq ($(BUILDBOT),1)
|
|
ARCHFLAGS = -target $(LIBRETRO_APPLE_PLATFORM) -isysroot $(LIBRETRO_APPLE_ISYSROOT)
|
|
endif
|
|
DEF_FLAGS += $(MINVERFLAGS) $(ARCHFLAGS)
|
|
LDFLAGS += $(MINVERFLAGS) $(ARCHFLAGS)
|
|
else
|
|
OSX := 0
|
|
endif
|
|
|
|
ifneq ($(findstring Haiku,$(OS)),)
|
|
LIBS += -lroot -lnetwork
|
|
HAVE_UNIX = 1
|
|
else
|
|
LIBS += -lm
|
|
endif
|
|
|
|
ifneq ($(findstring Linux,$(OS)),)
|
|
LIBS += -lrt
|
|
OBJ += input/drivers/linuxraw_input.o \
|
|
input/common/linux_common.o \
|
|
input/drivers_joypad/linuxraw_joypad.o
|
|
HAVE_UNIX = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_UNIX), 1)
|
|
OBJ += frontend/drivers/platform_unix.o \
|
|
frontend/drivers/gamemode_linux.o
|
|
|
|
ifeq ($(UNIX_CWD_ENV), 1)
|
|
DEF_FLAGS += -DRARCH_UNIX_CWD_ENV
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(TARGET), retroarch_3ds)
|
|
OBJ += frontend/drivers/platform_ctr.o
|
|
endif
|
|
|
|
ifeq ($(TARGET), retroarch_ps2)
|
|
OBJ += frontend/drivers/platform_ps2.o
|
|
endif
|
|
|
|
# Git Version
|
|
GIT_VERSION_CACHEDIR = $(if $(OBJDIR),$(OBJDIR),$(CURDIR))
|
|
GIT_VERSION_CACHEFILE = $(GIT_VERSION_CACHEDIR)/git-version.cache
|
|
|
|
ifneq (,$(wildcard .git/index)) # Building inside a Git repository?
|
|
GIT_VERSION := $(shell git rev-parse --short HEAD 2>/dev/null)
|
|
endif
|
|
|
|
ifneq (,$(wildcard $(GIT_VERSION_CACHEFILE))) # Cached Git version?
|
|
GIT_VERSION_CACHE = $(shell cat "$(GIT_VERSION_CACHEFILE)" 2>/dev/null)
|
|
endif
|
|
|
|
ifeq ($(GIT_VERSION),)
|
|
ifneq ($(GIT_VERSION_CACHE),) # If no Git version, use cached if found
|
|
GIT_VERSION = $(GIT_VERSION_CACHE)
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(GIT_VERSION),) # Enable version_git.o?
|
|
ifneq ($(GIT_VERSION),$(GIT_VERSION_CACHE)) # Update version_git.o?
|
|
$(shell \
|
|
mkdir -p "$(GIT_VERSION_CACHEDIR)" && \
|
|
echo "$(GIT_VERSION)" > "$(GIT_VERSION_CACHEFILE)" && \
|
|
touch version_git.c)
|
|
endif
|
|
DEFINES += -DHAVE_GIT_VERSION -DGIT_VERSION=$(GIT_VERSION)
|
|
OBJ += version_git.o
|
|
endif
|
|
|
|
# General object files
|
|
ifeq ($(HAVE_RMP3), 1)
|
|
DEFINES += -DHAVE_RMP3
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/mp3/rmp3.o
|
|
endif
|
|
|
|
OBJ += frontend/frontend_driver.o \
|
|
retroarch.o \
|
|
runloop.o \
|
|
ui/ui_companion_driver.o \
|
|
camera/camera_driver.o \
|
|
record/record_driver.o \
|
|
record/record_gpu_reinit.o \
|
|
record/drivers/record_wav.o \
|
|
record/drivers/record_nvenc.o \
|
|
record/drivers/record_metal.o \
|
|
record/drivers/record_mediacodec.o \
|
|
command.o \
|
|
msg_hash.o \
|
|
intl/msg_hash_us.o \
|
|
$(LIBRETRO_COMM_DIR)/queues/task_queue.o \
|
|
tasks/task_content.o
|
|
|
|
ifeq ($(HAVE_PATCH), 1)
|
|
DEFINES += -DHAVE_PATCH
|
|
OBJ += tasks/task_patch.o
|
|
OBJ += tasks/patch_stream.o
|
|
ifeq ($(HAVE_XDELTA), 1)
|
|
DEFINES += -DHAVE_XDELTA
|
|
OBJ += $(LIBRETRO_COMM_DIR)/encodings/encoding_vcdiff.o
|
|
endif
|
|
endif
|
|
|
|
OBJ += \
|
|
save.o \
|
|
tasks/task_save.o \
|
|
tasks/task_movie.o \
|
|
tasks/task_file_transfer.o \
|
|
tasks/task_nbio_slice.o \
|
|
tasks/task_content_prefetch.o \
|
|
tasks/task_image.o \
|
|
tasks/task_playlist_manager.o \
|
|
tasks/task_core_backup.o \
|
|
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.o \
|
|
$(LIBRETRO_COMM_DIR)/encodings/encoding_crc32.o \
|
|
$(LIBRETRO_COMM_DIR)/encodings/encoding_xxh64.o \
|
|
$(LIBRETRO_COMM_DIR)/encodings/encoding_base64.o
|
|
|
|
ifeq ($(HAVE_TRANSLATE), 1)
|
|
OBJ += tasks/task_translation.o
|
|
endif
|
|
|
|
OBJ += \
|
|
$(LIBRETRO_COMM_DIR)/compat/fopen_utf8.o \
|
|
$(LIBRETRO_COMM_DIR)/compat/compat_strldup.o \
|
|
$(LIBRETRO_COMM_DIR)/lists/file_list.o \
|
|
$(LIBRETRO_COMM_DIR)/lists/dir_list.o \
|
|
$(LIBRETRO_COMM_DIR)/file/retro_dirent.o \
|
|
$(LIBRETRO_COMM_DIR)/file/file_watch.o \
|
|
$(LIBRETRO_COMM_DIR)/streams/stdin_stream.o \
|
|
$(LIBRETRO_COMM_DIR)/streams/file_stream.o \
|
|
$(LIBRETRO_COMM_DIR)/streams/file_stream_transforms.o \
|
|
$(LIBRETRO_COMM_DIR)/streams/interface_stream.o \
|
|
$(LIBRETRO_COMM_DIR)/streams/memory_stream.o \
|
|
$(LIBRETRO_COMM_DIR)/streams/network_stream.o \
|
|
$(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.o \
|
|
$(LIBRETRO_COMM_DIR)/vfs/vfs_hybrid.o
|
|
|
|
ifeq ($(ANDROID), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/vfs/vfs_implementation_saf.o
|
|
endif
|
|
|
|
OBJ += \
|
|
$(LIBRETRO_COMM_DIR)/lists/string_list.o \
|
|
$(LIBRETRO_COMM_DIR)/string/rstrtod.o \
|
|
$(LIBRETRO_COMM_DIR)/string/stdstring.o \
|
|
$(LIBRETRO_COMM_DIR)/memmap/memalign.o \
|
|
$(LIBRETRO_COMM_DIR)/memmap/memcpy_nt.o
|
|
|
|
OBJ += \
|
|
$(LIBRETRO_COMM_DIR)/lists/linked_list.o \
|
|
$(LIBRETRO_COMM_DIR)/lists/nested_list.o \
|
|
$(LIBRETRO_COMM_DIR)/queues/generic_queue.o
|
|
|
|
OBJ += \
|
|
$(LIBRETRO_COMM_DIR)/file/file_path.o \
|
|
$(LIBRETRO_COMM_DIR)/file/file_path_io.o \
|
|
file_path_special.o \
|
|
$(LIBRETRO_COMM_DIR)/hash/lrc_hash.o \
|
|
audio/audio_driver.o \
|
|
audio/audio_upmix.o \
|
|
audio/audio_stretch.o \
|
|
audio/audio_speed_lpf.o \
|
|
audio/audio_pipeline_stretch.o \
|
|
audio/audio_binaural.o \
|
|
input/input_driver.o \
|
|
input/input_driver_choice.o \
|
|
input/input_overlay_textures.o \
|
|
input/input_overlay_alpha.o \
|
|
input/common/input_hid_common.o \
|
|
led/led_driver.o \
|
|
gfx/video_driver.o \
|
|
gfx/common/video_mode_select.o \
|
|
gfx/video_views.o \
|
|
gfx/gfx_display.o \
|
|
gfx/gfx_animation.o \
|
|
gfx/gfx_instrument.o \
|
|
gfx/gfx_surface.o \
|
|
gfx/gfx_surface_player.o \
|
|
gfx/gfx_thumbnail.o \
|
|
gfx/gfx_media_controls.o \
|
|
gfx/gfx_media_display.o \
|
|
gfx/gfx_media_player.o \
|
|
gfx/gfx_media_cpu.o \
|
|
gfx/gfx_anim_preview.o \
|
|
configuration.o \
|
|
$(LIBRETRO_COMM_DIR)/dynamic/dylib.o \
|
|
cores/dynamic_dummy.o \
|
|
$(LIBRETRO_COMM_DIR)/queues/message_queue.o
|
|
|
|
ifeq ($(HAVE_MICROPHONE), 1)
|
|
DEFINES += -DHAVE_MICROPHONE
|
|
endif
|
|
|
|
ifeq ($(HAVE_REWIND), 1)
|
|
DEFINES += -DHAVE_REWIND
|
|
OBJ += state_manager.o
|
|
endif
|
|
|
|
OBJ += \
|
|
gfx/bitmapfont.o \
|
|
tasks/task_autodetect.o \
|
|
input/input_autodetect_builtin.o \
|
|
input/input_keymaps.o \
|
|
$(LIBRETRO_COMM_DIR)/queues/fifo_queue.o \
|
|
$(LIBRETRO_COMM_DIR)/queues/retro_spsc.o \
|
|
$(LIBRETRO_COMM_DIR)/compat/compat_fnmatch.o \
|
|
$(LIBRETRO_COMM_DIR)/compat/compat_posix_string.o
|
|
|
|
ifeq ($(HAVE_CHEATS), 1)
|
|
DEFINES += -DHAVE_CHEATS
|
|
OBJ += cheat_manager.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_CORE_INFO_CACHE), 1)
|
|
DEFINES += -DHAVE_CORE_INFO_CACHE
|
|
endif
|
|
|
|
OBJ += \
|
|
core_info.o \
|
|
core_backup.o \
|
|
core_option_manager.o \
|
|
$(LIBRETRO_COMM_DIR)/file/config_file.o \
|
|
$(LIBRETRO_COMM_DIR)/file/config_file_io.o \
|
|
$(LIBRETRO_COMM_DIR)/file/config_file_userdata.o \
|
|
runtime_file.o \
|
|
disk_index_file.o
|
|
|
|
ifeq ($(HAVE_SCREENSHOTS), 1)
|
|
DEFINES += -DHAVE_SCREENSHOTS
|
|
OBJ += tasks/task_screenshot.o
|
|
endif
|
|
|
|
OBJ += \
|
|
tasks/task_powerstate.o \
|
|
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler.o \
|
|
$(LIBRETRO_COMM_DIR)/gfx/scaler/pixconv.o \
|
|
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_int.o \
|
|
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_filter.o \
|
|
gfx/font_driver.o
|
|
|
|
ifeq ($(HAVE_VIDEO_FILTER), 1)
|
|
DEFINES += -DHAVE_VIDEO_FILTER
|
|
OBJ += gfx/video_filter.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_WINDOW_OFFSET), 1)
|
|
DEFINES += -DHAVE_WINDOW_OFFSET
|
|
endif
|
|
|
|
OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/audio_resampler.o
|
|
OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/audio_resampler_int16.o
|
|
|
|
ifeq ($(HAVE_DSP_FILTER), 1)
|
|
DEFINES += -DHAVE_DSP_FILTER
|
|
OBJ += $(LIBRETRO_COMM_DIR)/audio/dsp_filter.o
|
|
endif
|
|
|
|
OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler.o
|
|
OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler_int16.o
|
|
|
|
ifeq ($(HAVE_NEAREST_RESAMPLER), 1)
|
|
DEFINES += -DHAVE_NEAREST_RESAMPLER
|
|
OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/nearest_resampler.o
|
|
OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/nearest_resampler_int16.o
|
|
endif
|
|
|
|
OBJ += \
|
|
$(LIBRETRO_COMM_DIR)/utils/md5.o \
|
|
playlist.o \
|
|
$(LIBRETRO_COMM_DIR)/features/features_cpu.o \
|
|
$(LIBRETRO_COMM_DIR)/memory/mem_stats.o \
|
|
$(LIBRETRO_COMM_DIR)/memory/mempool.o \
|
|
verbosity.o \
|
|
$(LIBRETRO_COMM_DIR)/playlists/label_sanitization.o \
|
|
$(LIBRETRO_COMM_DIR)/time/rtime.o \
|
|
manual_content_scan.o \
|
|
tasks/task_database.o \
|
|
disk_control_interface.o
|
|
|
|
# The cleanroom crypto library. Off unless a build asks for it: the
|
|
# round tables, curve constants and 4 KiB RSA working set are nothing
|
|
# for a desktop and too much for GameCube, Wii or PS2, whose Makefiles
|
|
# do not set it.
|
|
ifeq ($(HAVE_CRYPTO), 1)
|
|
DEFINES += -DHAVE_CRYPTO
|
|
OBJ += $(LIBRETRO_COMM_DIR)/crypto/crypto.o \
|
|
$(LIBRETRO_COMM_DIR)/crypto/kdf.o \
|
|
$(LIBRETRO_COMM_DIR)/crypto/pk.o \
|
|
$(LIBRETRO_COMM_DIR)/crypto/x509.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_CONFIGFILE), 1)
|
|
DEFINES += -DHAVE_CONFIGFILE
|
|
ifeq ($(HAVE_CRYPTO), 1)
|
|
ifeq ($(HAVE_KEYCHAIN), 1)
|
|
DEFINES += -DHAVE_KEYCHAIN
|
|
OBJ += $(LIBRETRO_COMM_DIR)/file/keychain.o \
|
|
tasks/task_keychain.o
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_BLISSBOX), 1)
|
|
DEFINES += -DHAVE_BLISSBOX
|
|
OBJ += tasks/task_autodetect_blissbox.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_AUDIOMIXER), 1)
|
|
DEFINES += -DHAVE_AUDIOMIXER
|
|
OBJ += tasks/task_audio_mixer.o \
|
|
$(LIBRETRO_COMM_DIR)/audio/audio_mix.o \
|
|
$(LIBRETRO_COMM_DIR)/audio/audio_mixer.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_BSV_MOVIE), 1)
|
|
DEFINES += -DHAVE_BSV_MOVIE
|
|
OBJ += input/bsv/bsvmovie.o
|
|
endif
|
|
|
|
# The MessagePack encoder is shared: the database stores its records
|
|
# with it and the BSV movie format writes its frames with it, so it is
|
|
# linked when either is built rather than only with the database.
|
|
ifneq ($(filter 1,$(HAVE_LIBRETRODB) $(HAVE_BSV_MOVIE)),)
|
|
OBJ += libretro-db/rmsgpack.o \
|
|
libretro-db/rmsgpack_dom.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_STATESTREAM), 1)
|
|
DEFINES += -DHAVE_STATESTREAM
|
|
OBJ += input/bsv/uint32s_index.o \
|
|
$(LIBRETRO_COMM_DIR)/encodings/encoding_xxh3.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RUNAHEAD), 1)
|
|
DEFINES += -DHAVE_RUNAHEAD
|
|
OBJ += runahead.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_CC_RESAMPLER), 1)
|
|
DEFINES += -DHAVE_CC_RESAMPLER
|
|
OBJ += audio/drivers_resampler/cc_resampler.o
|
|
OBJ += audio/drivers_resampler/cc_resampler_int16.o
|
|
|
|
endif
|
|
|
|
ifeq ($(HAVE_LANGEXTRA), 1)
|
|
DEFINES += -DHAVE_LANGEXTRA
|
|
DEF_FLAGS += -finput-charset=UTF-8
|
|
endif
|
|
|
|
ifneq ($(HAVE_GETOPT_LONG), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/compat/compat_getopt.o
|
|
endif
|
|
|
|
# Always built: compat_strcasestr is used by name rather than as a
|
|
# fallback for a missing C library function.
|
|
OBJ += $(LIBRETRO_COMM_DIR)/compat/compat_strcasestr.o
|
|
|
|
ifneq ($(HAVE_STRL), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/compat/compat_strl.o
|
|
endif
|
|
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/image_texture.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/image_texture_scale.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/image_texture_set.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/image/image_yuv_blit.o
|
|
|
|
ifeq ($(HAVE_IMAGEVIEWER), 1)
|
|
OBJ += cores/libretro-imageviewer/image_core.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_D3D9), 1)
|
|
HAVE_HLSL = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_CG), 1)
|
|
HAVE_SHADERS_COMMON = 1
|
|
endif
|
|
ifeq ($(HAVE_GLSL), 1)
|
|
HAVE_SHADERS_COMMON = 1
|
|
endif
|
|
ifeq ($(HAVE_HLSL), 1)
|
|
HAVE_SHADERS_COMMON = 1
|
|
endif
|
|
ifeq ($(HAVE_SLANG), 1)
|
|
HAVE_SHADERS_COMMON = 1
|
|
endif
|
|
|
|
# Qt WIMP GUI
|
|
|
|
ifeq ($(HAVE_OPENSSL), 1)
|
|
DEF_FLAGS += $(OPENSSL_CFLAGS)
|
|
LIBS += $(OPENSSL_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_QT), 1)
|
|
OBJ += ui/drivers/ui_qt.o \
|
|
ui/drivers/ui_qt_widgets.o
|
|
|
|
MOC_HEADERS += ui/drivers/ui_qt.h \
|
|
ui/drivers/ui_qt_widgets.h
|
|
|
|
DEFINES += -DHAVE_MAIN
|
|
ifeq ($(HAVE_QT6), 1)
|
|
CXXFLAGS += -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 $(QT6CORE_CFLAGS) $(QT6GUI_CFLAGS) $(QT6WIDGETS_CFLAGS)
|
|
#DEF_FLAGS += $(QT6WEBENGINE_CFLAGS)
|
|
LIBS += $(QT6CORE_LIBS) $(QT6GUI_LIBS) $(QT6WIDGETS_LIBS)
|
|
#LIBS += $(QT6WEBENGINE_LIBS)
|
|
else
|
|
DEF_FLAGS += $(QT5CORE_CFLAGS) $(QT5GUI_CFLAGS) $(QT5WIDGETS_CFLAGS)
|
|
#DEF_FLAGS += $(QT5WEBENGINE_CFLAGS)
|
|
LIBS += $(QT5CORE_LIBS) $(QT5GUI_LIBS) $(QT5WIDGETS_LIBS)
|
|
#LIBS += $(QT5WEBENGINE_LIBS)
|
|
endif
|
|
|
|
NEED_CXX_LINKER = 1
|
|
|
|
ifneq ($(findstring Linux,$(OS)),)
|
|
DEF_FLAGS += -fPIC
|
|
else ifneq ($(findstring BSD,$(OS)),)
|
|
DEF_FLAGS += -fPIC
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_SSA),1)
|
|
LIBS += $(SSA_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_SSE),1)
|
|
DEF_FLAGS += $(SSE_LIBS)
|
|
endif
|
|
|
|
# LibretroDB
|
|
|
|
ifeq ($(HAVE_LIBRETRODB), 1)
|
|
OBJ += libretro-db/bintree.o \
|
|
libretro-db/libretrodb.o \
|
|
libretro-db/query.o \
|
|
database_info.o \
|
|
tasks/task_database_cue.o
|
|
|
|
ifeq ($(HAVE_MENU), 1)
|
|
OBJ += menu/menu_explore.o \
|
|
tasks/task_menu_explore.o \
|
|
tasks/task_database_info.o
|
|
endif
|
|
endif
|
|
|
|
# TLS needs the sockets: a makefile that asks for a client without
|
|
# networking (a handheld with the crypto and keychain for the store
|
|
# but no network) gets neither the define nor the object.
|
|
ifneq ($(HAVE_NETWORKING), 1)
|
|
HAVE_SSL = 0
|
|
HAVE_RETROSSL = 0
|
|
HAVE_BEARSSL = 0
|
|
HAVE_MBEDTLS = 0
|
|
endif
|
|
|
|
# TLS: the built-in client by default; a system mbedTLS or BearSSL in
|
|
# its place when configure was asked for one. Nothing is bundled.
|
|
ifeq ($(HAVE_RETROSSL), 1)
|
|
HAVE_SSL = 1
|
|
DEFINES += -DHAVE_SSL -DHAVE_RETROSSL
|
|
else ifeq ($(HAVE_BEARSSL), 1)
|
|
HAVE_SSL = 1
|
|
DEFINES += -DHAVE_SSL -DHAVE_BEARSSL
|
|
LIBS += $(if $(BEARSSL_LIBS),$(BEARSSL_LIBS),-lbearssl)
|
|
DEF_FLAGS += $(BEARSSL_CFLAGS)
|
|
else ifeq ($(HAVE_MBEDTLS), 1)
|
|
HAVE_SSL = 1
|
|
DEFINES += -DHAVE_SSL
|
|
ifeq ($(DEBUG), 1)
|
|
DEFINES += -DMBEDTLS_SSL_DEBUG_ALL
|
|
endif
|
|
LIBS += $(MBEDTLS_LIBS) $(MBEDX509_LIBS) $(MBEDCRYPTO_LIBS)
|
|
DEF_FLAGS += $(MBEDTLS_CFLAGS) $(MBEDX509_CFLAGS) $(MBEDCRYPTO_CFLAGS)
|
|
endif
|
|
|
|
# Miscellaneous
|
|
|
|
ifeq ($(HAVE_COMMAND), 1)
|
|
DEFINES += -DHAVE_COMMAND
|
|
# The MCP server: desktop builds, through ./configure; no console
|
|
# Makefile sets HAVE_MCP.
|
|
ifeq ($(HAVE_NETWORKING), 1)
|
|
ifeq ($(HAVE_MCP), 1)
|
|
DEFINES += -DHAVE_MCP
|
|
OBJ += network/mcp_server.o
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_STDIN_CMD), 1)
|
|
DEFINES += -DHAVE_STDIN_CMD
|
|
endif
|
|
|
|
ifeq ($(HAVE_EMSCRIPTEN), 1)
|
|
OBJ += frontend/drivers/platform_emscripten.o \
|
|
input/drivers/rwebinput_input.o \
|
|
input/drivers_joypad/rwebpad_joypad.o \
|
|
camera/drivers/rwebcam.o
|
|
ifeq ($(HAVE_RWEBAUDIO), 1)
|
|
OBJ += audio/drivers/rwebaudio.o
|
|
endif
|
|
ifeq ($(HAVE_AUDIOWORKLET), 1)
|
|
OBJ += audio/drivers/audioworklet.o
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_BLUETOOTH), 1)
|
|
OBJ += bluetooth/bluetooth_driver.o
|
|
OBJ += tasks/task_bluetooth.o
|
|
ifneq ($(findstring Win32,$(OS)),)
|
|
OBJ += bluetooth/drivers/windows_bt.o
|
|
else
|
|
OBJ += bluetooth/drivers/bluetoothctl.o
|
|
endif
|
|
ifeq ($(HAVE_DBUS), 1)
|
|
OBJ += bluetooth/drivers/bluez.o
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_LAKKA), 1)
|
|
OBJ += network/drivers_wifi/connmanctl.o
|
|
OBJ += misc/cpufreq/cpufreq.o
|
|
LIBS += -lsystemd
|
|
endif
|
|
|
|
ifeq ($(HAVE_WIFI), 1)
|
|
OBJ += network/wifi_driver.o
|
|
OBJ += tasks/task_wifi.o
|
|
OBJ += network/drivers_wifi/nmcli.o
|
|
DEFINES += -DHAVE_WIFI
|
|
endif
|
|
|
|
# Audio
|
|
|
|
ifeq ($(HAVE_COREAUDIO), 1)
|
|
DEFINES += -DHAVE_COREAUDIO
|
|
OBJ += audio/drivers/coreaudio.o
|
|
HAVE_COREAUDIO_LIBS = 1
|
|
LIBS += -framework AudioToolbox
|
|
endif
|
|
|
|
ifeq ($(HAVE_COREAUDIO_LIBS), 1)
|
|
LIBS += -framework CoreServices -framework CoreAudio -framework AudioUnit
|
|
endif
|
|
|
|
ifeq ($(HAVE_CORELOCATION), 1)
|
|
DEFINES += -DHAVE_CORELOCATION
|
|
OBJ += location/drivers/corelocation.o
|
|
LIBS += -framework CoreLocation
|
|
endif
|
|
|
|
ifeq ($(HAVE_CORETEXT), 1)
|
|
OBJ += gfx/drivers_font_renderer/coretext.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_AUDIOIO), 1)
|
|
OBJ += audio/drivers/audioio.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_OSS), 1)
|
|
OBJ += audio/drivers/oss.o
|
|
else ifeq ($(HAVE_OSS_BSD), 1)
|
|
OBJ += audio/drivers/oss.o
|
|
endif
|
|
|
|
ifeq ($(TARGET), retroarch_3ds)
|
|
OBJ += audio/drivers/ctr_csnd_audio.o \
|
|
audio/drivers/ctr_dsp_audio.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_ALSA), 1)
|
|
OBJ += audio/common/alsa.o
|
|
# audio/drivers/alsa.c carries both drivers; see HAVE_TINYALSA below
|
|
# for the case where it is built without alsa-lib.
|
|
ifneq ($(HAVE_TINYALSA), 1)
|
|
OBJ += audio/drivers/alsa.o
|
|
endif
|
|
|
|
ifneq ($(HAVE_HAKCHI), 1)
|
|
ifneq ($(HAVE_SEGAM), 1)
|
|
ifneq ($(DINGUX), 1)
|
|
OBJ += midi/drivers/alsa_midi.o
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
|
|
LIBS += $(ALSA_LIBS)
|
|
DEF_FLAGS += $(ALSA_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_TINYALSA), 1)
|
|
# The embedded driver lives in audio/drivers/alsa.c beside the
|
|
# alsa-lib one, each behind its own define; one object either way,
|
|
# and a build with only this one needs no alsa-lib.
|
|
OBJ += audio/drivers/alsa.o
|
|
DEFINES += -DHAVE_TINYALSA
|
|
endif
|
|
|
|
ifeq ($(HAVE_ROAR), 1)
|
|
OBJ += audio/drivers/roar.o
|
|
LIBS += $(ROAR_LIBS)
|
|
DEF_FLAGS += $(ROAR_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_AL), 1)
|
|
OBJ += audio/drivers/openal.o
|
|
ifeq ($(OSX),1)
|
|
LIBS += -framework OpenAL
|
|
else
|
|
LIBS += $(AL_LIBS)
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(findstring Darwin,$(OS)),)
|
|
OBJ += frontend/drivers/platform_darwin.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_JACK),1)
|
|
OBJ += audio/drivers/jack.o
|
|
# With dynamic loading the driver opens libjack itself when asked
|
|
# for, so the binary runs where JACK is not installed.
|
|
ifneq ($(HAVE_DYLIB),1)
|
|
LIBS += $(JACK_LIBS)
|
|
endif
|
|
DEF_FLAGS += $(JACK_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_PULSE), 1)
|
|
OBJ += audio/drivers/pulse.o
|
|
LIBS += $(PULSE_LIBS)
|
|
DEF_FLAGS += $(PULSE_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_PIPEWIRE), 1)
|
|
OBJ += audio/drivers/pipewire.o \
|
|
audio/common/pipewire.o
|
|
|
|
ifeq ($(HAVE_PIPEWIRE_STABLE), 1)
|
|
OBJ += camera/drivers/pipewire.o
|
|
endif
|
|
|
|
LIBS += $(PIPEWIRE_LIBS)
|
|
DEF_FLAGS += $(PIPEWIRE_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_OSS_LIB), 1)
|
|
LIBS += -lossaudio
|
|
endif
|
|
|
|
ifeq ($(HAVE_RSOUND), 1)
|
|
OBJ += audio/drivers/rsound.o
|
|
DEF_FLAGS += $(RSOUND_CFLAGS)
|
|
LIBS += $(RSOUND_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_DSOUND), 1)
|
|
OBJ += audio/drivers/dsound.o
|
|
DEFINES += -DHAVE_DSOUND
|
|
LIBS += -ldsound
|
|
endif
|
|
|
|
# The multimedia library's wave output: what a Windows with no DirectX
|
|
# has. Not on by default anywhere but the Visual C++ 6 project.
|
|
ifeq ($(HAVE_WAVEOUT), 1)
|
|
OBJ += audio/drivers/waveout.o
|
|
DEFINES += -DHAVE_WAVEOUT
|
|
LIBS += -lwinmm
|
|
endif
|
|
|
|
ifeq ($(HAVE_WASAPI), 1)
|
|
HAVE_MMDEVAPI = 1
|
|
OBJ += audio/drivers/wasapi.o
|
|
DEFINES += -DHAVE_WASAPI
|
|
LIBS += -lole32 -lksuser
|
|
endif
|
|
|
|
ifeq ($(HAVE_ASIO), 1)
|
|
OBJ += audio/drivers/asio.o
|
|
DEFINES += -DHAVE_ASIO
|
|
LIBS += -lole32
|
|
endif
|
|
|
|
ifeq ($(HAVE_XAUDIO), 1)
|
|
OBJ += audio/drivers/xaudio.o
|
|
DEFINES += -DHAVE_XAUDIO
|
|
LIBS += -lole32
|
|
endif
|
|
|
|
# WDM-KS: kernel streaming. setupapi and ksuser are resolved at
|
|
# runtime rather than linked, so that a binary carrying this driver
|
|
# still loads on a Windows that has neither.
|
|
ifeq ($(HAVE_WDMKS), 1)
|
|
OBJ += audio/drivers/wdmks.o
|
|
DEFINES += -DHAVE_WDMKS
|
|
endif
|
|
|
|
ifeq ($(HAVE_MMDEVAPI), 1)
|
|
OBJ += audio/common/mmdevice_common.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_WINMM), 1)
|
|
OBJ += midi/drivers/winmm_midi.o
|
|
DEFINES += -DHAVE_WINMM
|
|
LIBS += -lwinmm
|
|
endif
|
|
|
|
ifeq ($(HAVE_COREMIDI), 1)
|
|
OBJ += midi/drivers/coremidi.o
|
|
DEFINES += -DHAVE_COREMIDI
|
|
LIBS += -framework CoreMIDI
|
|
endif
|
|
|
|
# In-process FM synth MIDI driver (no external dependency, all platforms)
|
|
OBJ += midi/drivers/fmsynth_midi.o
|
|
|
|
# Audio Resamplers
|
|
|
|
ifeq ($(HAVE_NEON),1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler_neon.o \
|
|
memory/neon/memcpy-neon.o
|
|
|
|
DEFINES += -DHAVE_NEON
|
|
ASFLAGS += $(NEON_ASFLAGS)
|
|
DEF_FLAGS += $(NEON_CFLAGS)
|
|
endif
|
|
|
|
OBJ += $(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float.o \
|
|
$(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16.o \
|
|
$(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s32.o \
|
|
$(LIBRETRO_COMM_DIR)/audio/conversion/mono_to_stereo_float.o \
|
|
$(LIBRETRO_COMM_DIR)/audio/conversion/stereo_to_mono_float.o \
|
|
|
|
# AC-3: the frame layer, decoder and encoder from ATSC A/52 and the
|
|
# IEC 61937 burst framing, no dependencies. The decoder is an arm of
|
|
# audio_transfer (an .ac3 file in the mixer); the encoder and the
|
|
# framing carry a wider layout to a device that decodes Dolby Digital
|
|
# but takes stereo PCM only (WASAPI exclusive mode, and WDM-KS).
|
|
DEFINES += -DHAVE_RAC3
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/ac3/rac3_frame.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/ac3/rac3_decode.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/ac3/rac3_encode.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/iec61937/iec61937.o
|
|
|
|
# Linear PCM, and the DTS frame layer. Neither has a dependency and
|
|
# both are small, so they are in wherever rac3 is: LPCM is what a disc
|
|
# carries when nothing was compressed, and rdts is what carries a DTS
|
|
# stream to a decoder that is not this one - the bursts iec61937
|
|
# already frames.
|
|
DEFINES += -DHAVE_RLPCM -DHAVE_RDTS
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/lpcm/rlpcm.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/dts/rdts.o
|
|
|
|
# The bitstream source: where a stream that arrived already coded
|
|
# plugs into the output path, which the PCM pipeline has no place for.
|
|
OBJ += audio/audio_bitstream.o
|
|
|
|
ifeq ($(HAVE_RWAV), 1)
|
|
DEFINES += -DHAVE_RWAV
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/wav/rwav.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_NEON),1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float_neon.o \
|
|
$(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16_neon.o
|
|
endif
|
|
|
|
HW_CONTEXT_MENU_DRIVERS=$(HAVE_MENU)
|
|
|
|
ifeq ($(HW_CONTEXT_MENU_DRIVERS),0)
|
|
ifeq ($(HAVE_GL_CONTEXT),1)
|
|
HW_CONTEXT_MENU_DRIVERS=1
|
|
endif
|
|
ifeq ($(HAVE_VULKAN),1)
|
|
HW_CONTEXT_MENU_DRIVERS=1
|
|
endif
|
|
endif
|
|
|
|
# XMB and MaterialUI are always enabled if supported and not explicitly disabled
|
|
ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1)
|
|
ifeq ($(HAVE_RGUI),)
|
|
HAVE_RGUI = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_MATERIALUI),)
|
|
HAVE_MATERIALUI = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_XMB),)
|
|
HAVE_XMB = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_OZONE),)
|
|
HAVE_OZONE = 1
|
|
endif
|
|
else
|
|
HAVE_RGUI ?= 0
|
|
HAVE_MATERIALUI ?= 0
|
|
HAVE_XMB ?= 0
|
|
HAVE_OZONE ?= 0
|
|
endif
|
|
|
|
ifeq ($(HAVE_MENU), 1)
|
|
DEFINES += -DHAVE_MENU
|
|
HAVE_MENU_COMMON = 1
|
|
|
|
ifeq ($(HAVE_GFX_WIDGETS), 1)
|
|
DEFINES += -DHAVE_GFX_WIDGETS
|
|
endif
|
|
|
|
ifeq ($(HAVE_RGUI), 1)
|
|
OBJ += menu/drivers/rgui.o \
|
|
menu/drivers/rgui_bitmapfont.o
|
|
DEFINES += -DHAVE_RGUI
|
|
endif
|
|
|
|
ifeq ($(HAVE_MATERIALUI), 1)
|
|
OBJ += menu/drivers/materialui.o
|
|
DEFINES += -DHAVE_MATERIALUI
|
|
HAVE_ASSETS = 1
|
|
HAVE_MENU_SCREENSAVER = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_XMB), 1)
|
|
OBJ += menu/drivers/xmb.o
|
|
DEFINES += -DHAVE_XMB
|
|
HAVE_ASSETS = 1
|
|
HAVE_MENU_SCREENSAVER = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_OZONE), 1)
|
|
OBJ += menu/drivers/ozone.o
|
|
DEFINES += -DHAVE_OZONE
|
|
HAVE_ASSETS = 1
|
|
HAVE_MENU_SCREENSAVER = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_MENU_SCREENSAVER), 1)
|
|
OBJ += menu/menu_screensaver.o
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_BLUETOOTH), 1)
|
|
DEFINES += -DHAVE_BLUETOOTH
|
|
endif
|
|
|
|
ifeq ($(HAVE_LAKKA), 1)
|
|
DEFINES += -DHAVE_LAKKA
|
|
ifeq ($(HAVE_RETROFLAG), 1)
|
|
DEFINES += -DHAVE_RETROFLAG
|
|
ifeq ($(HAVE_RETROFLAG_RPI5), 1)
|
|
DEFINES += -DHAVE_RETROFLAG_RPI5
|
|
endif
|
|
else
|
|
ifeq ($(HAVE_RETROFLAG_RPI5), 1)
|
|
DEFINES += -DHAVE_RETROFLAG
|
|
DEFINES += -DHAVE_RETROFLAG_RPI5
|
|
endif
|
|
endif
|
|
ifneq ($(HAVE_LAKKA_PROJECT),)
|
|
DEFINES += -DHAVE_LAKKA_PROJECT=\"${HAVE_LAKKA_PROJECT}\"
|
|
else
|
|
$(error You asked for Lakka, but you did not specify a target device name in HAVE_LAKKA_PROJECT.)
|
|
endif
|
|
ifneq ($(HAVE_LAKKA_SERVER),)
|
|
DEFINES += -DHAVE_LAKKA_SERVER=\"${HAVE_LAKKA_SERVER}\"
|
|
else
|
|
$(error You asked for Lakka, but you did not specify update server in HAVE_LAKKA_SERVER.)
|
|
endif
|
|
else
|
|
ifeq ($(HAVE_RETROFLAG), 1)
|
|
$(error You enabled Retroflag specific codepaths with HAVE_RETROFLAG, but not Lakka! Add HAVE_LAKKA=1 to continue.)
|
|
endif
|
|
ifeq ($(HAVE_RETROFLAG_RPI5), 1)
|
|
$(error You enabled Retroflag specific codepaths with HAVE_RETROFLAG_RPI5, but not Lakka! Add HAVE_LAKKA=1 to continue.)
|
|
endif
|
|
ifneq ($(HAVE_LAKKA_PROJECT),)
|
|
$(error You set Lakka project with HAVE_LAKKA_PROJECT, but did not enable Lakka! Add HAVE_LAKKA=1 to continue.)
|
|
endif
|
|
ifneq ($(HAVE_LAKKA_SERVER),)
|
|
$(error You set Lakka update server with HAVE_LAKKA_SERVER, but did not enable Lakka! Add HAVE_LAKKA=1 to continue.)
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_LAKKA_SWITCH), 1)
|
|
DEFINES += -DHAVE_LAKKA_SWITCH
|
|
OBJ += misc/reboot2payload/reboot2payload.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_MENU_COMMON), 1)
|
|
OBJ += menu/menu_setting.o \
|
|
menu/menu_driver.o \
|
|
menu/menu_media_controls.o \
|
|
gfx/gfx_media_subtitle.o \
|
|
tasks/task_subtitle.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/subtitle/rsubtitle_srt.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/subtitle/rsubtitle_vtt.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/subtitle/rsubtitle_vtt_css.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/subtitle/rsubtitle_vtt_css_tree.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/subtitle/rsubtitle_vtt_selector.o \
|
|
menu/menu_media_browser.o \
|
|
menu/menu_str.o \
|
|
menu/cbs/menu_cbs_ok.o \
|
|
menu/cbs/menu_cbs_cancel.o \
|
|
menu/cbs/menu_cbs_select.o \
|
|
menu/cbs/menu_cbs_start.o \
|
|
menu/cbs/menu_cbs_drag.o \
|
|
menu/cbs/menu_cbs_drop.o \
|
|
menu/cbs/menu_cbs_info.o \
|
|
menu/cbs/menu_cbs_left.o \
|
|
menu/cbs/menu_cbs_right.o \
|
|
menu/cbs/menu_cbs_deferred_push.o \
|
|
menu/cbs/menu_cbs_scan.o \
|
|
menu/cbs/menu_cbs_get_value.o \
|
|
menu/cbs/menu_cbs_label.o \
|
|
menu/cbs/menu_cbs_sublabel.o \
|
|
menu/cbs/menu_cbs_title.o \
|
|
menu/menu_displaylist.o \
|
|
menu/menu_dirwalk.o \
|
|
menu/menu_contentless_cores.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_GFX_WIDGETS), 1)
|
|
OBJ += gfx/gfx_widgets.o
|
|
|
|
ifeq ($(HAVE_SCREENSHOTS), 1)
|
|
OBJ += gfx/widgets/gfx_widget_screenshot.o
|
|
endif
|
|
|
|
OBJ += \
|
|
gfx/widgets/gfx_widget_volume.o \
|
|
gfx/widgets/gfx_widget_generic_message.o \
|
|
gfx/widgets/gfx_widget_libretro_message.o \
|
|
gfx/widgets/gfx_widget_progress_message.o \
|
|
gfx/widgets/gfx_widget_load_content_animation.o
|
|
ifeq ($(HAVE_CHEEVOS), 1)
|
|
OBJ += gfx/widgets/gfx_widget_achievement_popup.o \
|
|
gfx/widgets/gfx_widget_leaderboard_display.o
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_OVERLAY), 1)
|
|
DEFINES += -DHAVE_OVERLAY
|
|
OBJ += tasks/task_overlay.o \
|
|
led/drivers/led_overlay.o
|
|
endif
|
|
|
|
OBJ += gfx/drivers_font_renderer/stb.o
|
|
|
|
ifeq ($(HAVE_FREETYPE), 1)
|
|
OBJ += gfx/drivers_font_renderer/freetype.o
|
|
LIBS += $(FREETYPE_LIBS)
|
|
DEF_FLAGS += $(FREETYPE_CFLAGS)
|
|
ifeq ($(HAVE_FREETYPE), 1)
|
|
LIBS += $(FONTCONFIG_LIBS)
|
|
DEF_FLAGS += $(FONTCONFIG_CFLAGS)
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_THREADS), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/rthreads/rthreads.o \
|
|
$(LIBRETRO_COMM_DIR)/rthreads/tpool.o \
|
|
$(LIBRETRO_COMM_DIR)/rthreads/retro_eventcount.o \
|
|
$(LIBRETRO_COMM_DIR)/rthreads/retro_procbarrier.o \
|
|
$(LIBRETRO_COMM_DIR)/rthreads/retro_asym_eventcount.o \
|
|
$(LIBRETRO_COMM_DIR)/queues/retro_waitable_spsc.o \
|
|
gfx/video_thread_wrapper.o \
|
|
gfx/video_thread_hw.o \
|
|
audio/audio_thread_wrapper.o \
|
|
frontend/thread_elevation.o \
|
|
frontend/thread_elevation/eevdf.o
|
|
|
|
# RealtimeKit and screensaver inhibit over libdbus loaded at run
|
|
# time: no D-Bus headers or link dependency, just the library where
|
|
# the desktop has it.
|
|
ifneq ($(findstring Linux,$(OS))$(findstring BSD,$(OS)),)
|
|
OBJ += gfx/common/dbus_runtime.o \
|
|
gfx/common/dbus_common.o \
|
|
gfx/common/mutter_displayconfig.o \
|
|
frontend/thread_elevation/rtkit.o
|
|
endif
|
|
DEFINES += -DHAVE_THREADS
|
|
ifeq ($(findstring Haiku,$(OS)),)
|
|
LIBS += $(THREADS_LIBS)
|
|
endif
|
|
else ifeq ($(OS), Win32)
|
|
ifneq ($(filter 1,$(HAVE_DSOUND) $(HAVE_XAUDIO) $(HAVE_WAVEOUT)),)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/rthreads/rthreads.o \
|
|
$(LIBRETRO_COMM_DIR)/rthreads/retro_eventcount.o
|
|
endif
|
|
else ifeq ($(OS), Darwin)
|
|
ifneq ($(filter 1,$(HAVE_COCOA) $(HAVE_COREAUDIO)),)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/rthreads/rthreads.o \
|
|
$(LIBRETRO_COMM_DIR)/rthreads/retro_eventcount.o
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_THREAD_STORAGE), 1)
|
|
DEFINES += -DHAVE_THREAD_STORAGE
|
|
endif
|
|
|
|
ifeq ($(HAVE_GXM), 1)
|
|
# The GXM backend (was deps/libvita2d) is folded directly into
|
|
# gxm_gfx.c; only the precompiled shader blobs remain as a dependency
|
|
# (the driver still references color_v_gxp/texture_v_gxp/... as externs).
|
|
OBJ += gfx/drivers/vita_shaders/color_v_gxp.o \
|
|
gfx/drivers/vita_shaders/color_f_gxp.o \
|
|
gfx/drivers/vita_shaders/texture_v_gxp.o \
|
|
gfx/drivers/vita_shaders/texture_f_gxp.o \
|
|
gfx/drivers/vita_shaders/texture_tint_v_gxp.o \
|
|
gfx/drivers/vita_shaders/texture_tint_f_gxp.o
|
|
|
|
OBJ += gfx/drivers/gxm_gfx.o
|
|
endif
|
|
|
|
ifeq ($(TARGET), retroarch_3ds)
|
|
OBJ += gfx/drivers/ctr_gfx.o \
|
|
input/drivers/ctr_input.o \
|
|
input/drivers_joypad/ctr_joypad.o
|
|
endif
|
|
|
|
ifeq ($(TARGET), retroarch_ps2)
|
|
OBJ += gfx/drivers/ps2_gfx.o \
|
|
input/drivers/ps2_input.o \
|
|
input/drivers_joypad/ps2_joypad.o \
|
|
audio/drivers/ps2_audio.o
|
|
endif
|
|
|
|
ifeq ($(TARGET), retroarch_orbis)
|
|
OBJ += input/drivers/ps4_input.o \
|
|
input/drivers_joypad/ps4_joypad.o \
|
|
audio/drivers/ps4_audio.o
|
|
endif
|
|
|
|
ifeq ($(TARGET), retroarch_vita)
|
|
OBJ += input/drivers/psp_input.o \
|
|
input/drivers_joypad/psp_joypad.o \
|
|
audio/drivers/psp2_audio.o \
|
|
frontend/drivers/platform_psp.o
|
|
endif
|
|
|
|
ifeq ($(TARGET), retroarch_wiiu)
|
|
OBJ += gfx/drivers/gx2_gfx.o \
|
|
input/drivers/wiiu_input.o \
|
|
input/drivers_joypad/wiiu_joypad.o \
|
|
input/drivers_joypad/wiiu/wpad_driver.o \
|
|
input/drivers_joypad/wiiu/kpad_driver.o \
|
|
input/drivers_joypad/wiiu/pad_functions.o \
|
|
audio/drivers/wiiu_audio.o \
|
|
frontend/drivers/platform_wiiu.o
|
|
|
|
ifeq ($(WIIU_HID),1)
|
|
DEFINES += -DWIIU_HID
|
|
INCLUDE_DIRS += -Iinput/include
|
|
OBJ += input/drivers_joypad/wiiu/hidpad_driver.o
|
|
OBJ += input/drivers_hid/wiiu_hid.o
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(TARGET), retroarch_switch)
|
|
OBJ += gfx/drivers/switch_nx_gfx.o \
|
|
audio/drivers/switch_libnx_audren_audio.o
|
|
ifeq ($(HAVE_OPENGL), 1)
|
|
OBJ += gfx/drivers_context/switch_ctx.o
|
|
endif
|
|
OBJ += audio/drivers/switch_audio.o \
|
|
input/drivers/switch_input.o \
|
|
input/drivers_joypad/switch_joypad.o \
|
|
frontend/drivers/platform_switch.o
|
|
endif
|
|
|
|
ifeq ($(TARGET), retroarch_orbis)
|
|
OBJ += gfx/drivers_context/orbis_ctx.o \
|
|
frontend/drivers/platform_orbis.o
|
|
endif
|
|
|
|
ifeq ($(DINGUX), 1)
|
|
OBJ += os/dingux/dingux_utils.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_WAYLAND), 1)
|
|
OBJ += gfx/drivers_context/wayland_ctx.o \
|
|
gfx/display_servers/dispserv_wl.o \
|
|
input/common/wayland_common.o \
|
|
input/drivers/wayland_input.o \
|
|
gfx/common/wayland_common.o \
|
|
gfx/common/wayland/fractional-scale-v1.o \
|
|
gfx/common/wayland/viewporter.o \
|
|
gfx/common/wayland/xdg-toplevel-icon-v1.o \
|
|
gfx/common/wayland/xdg-toplevel-tag-v1.o \
|
|
gfx/common/wayland/xdg-shell.o \
|
|
gfx/common/wayland/idle-inhibit-unstable-v1.o \
|
|
gfx/common/wayland/xdg-decoration-unstable-v1.o \
|
|
gfx/common/wayland/pointer-constraints-unstable-v1.o \
|
|
gfx/common/wayland/presentation-time.o \
|
|
gfx/common/wayland/relative-pointer-unstable-v1.o \
|
|
gfx/common/wayland/cursor-shape-v1.o \
|
|
gfx/common/wayland/tablet-unstable-v2.o \
|
|
gfx/common/wayland/content-type-v1.o \
|
|
gfx/common/wayland/single-pixel-buffer-v1.o \
|
|
gfx/common/wayland/tearing-control-v1.o \
|
|
gfx/common/wayland/color-management-v1.o \
|
|
gfx/common/wayland_color.o \
|
|
gfx/common/wayland_present.o \
|
|
gfx/common/wayland/kde-output-device-v2.o \
|
|
gfx/common/wayland/kde-output-management-v2.o \
|
|
gfx/common/wayland_kwin_output.o \
|
|
gfx/common/wayland/wlr-output-management-unstable-v1.o \
|
|
gfx/common/wayland_wlr_output.o \
|
|
gfx/common/wayland/drm-lease-v1.o \
|
|
gfx/common/wayland_drm_lease.o
|
|
|
|
ifeq ($(HAVE_VULKAN), 1)
|
|
OBJ += gfx/drivers_context/wayland_vk_ctx.o
|
|
endif
|
|
|
|
ifeq ($(WEBOS), 1)
|
|
OBJ += input/common/wayland_common_webos.o
|
|
OBJ += gfx/common/wayland/webos-shell.o
|
|
ifeq ($(HAVE_WEBOS_EXTRA_PROTOS), 1)
|
|
OBJ += gfx/common/wayland/webos-foreign.o
|
|
OBJ += gfx/common/wayland/webos-input-manager.o
|
|
OBJ += gfx/common/wayland/webos-surface-group.o
|
|
endif
|
|
endif
|
|
|
|
DEF_FLAGS += $(WAYLAND_CFLAGS) $(WAYLAND_CURSOR_CFLAGS)
|
|
LIBS += $(WAYLAND_LIBS) $(WAYLAND_CURSOR_LIBS)
|
|
|
|
ifeq ($(HAVE_LIBDECOR), 1)
|
|
DEFINES += -DHAVE_LIBDECOR_H
|
|
DEF_FLAGS += $(LIBDECOR_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_WAYLAND_BACKPORT),1)
|
|
DEFINES += -DHAVE_WAYLAND_BACKPORT=1
|
|
OBJ += gfx/common/wayland_common_backport.o
|
|
endif
|
|
endif
|
|
|
|
# XML
|
|
OBJ += \
|
|
$(LIBRETRO_COMM_DIR)/formats/xml/rxml.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/logiqx_dat/logiqx_dat.o
|
|
|
|
#Input
|
|
|
|
ifeq ($(HAVE_DINPUT), 1)
|
|
LIBS += -ldinput8 -lole32
|
|
DEFINES += -DHAVE_DINPUT
|
|
OBJ += input/drivers/dinput.o
|
|
OBJ += input/drivers_joypad/dinput_joypad.o
|
|
endif
|
|
|
|
# The keyboard and the mouse from the window and the oldest of the
|
|
# Windows API: for a Windows with neither raw input nor DirectInput 8.
|
|
# Not on by default anywhere but the Visual C++ 6 project.
|
|
ifeq ($(HAVE_WIN32INPUT), 1)
|
|
DEFINES += -DHAVE_WIN32INPUT
|
|
OBJ += input/drivers/win32_input.o
|
|
endif
|
|
|
|
# Controllers through the multimedia library's joystick calls: for a
|
|
# Windows with no DirectX. Not on by default anywhere but the Visual
|
|
# C++ 6 project.
|
|
ifeq ($(HAVE_WINMM_JOYPAD), 1)
|
|
DEFINES += -DHAVE_WINMM_JOYPAD
|
|
OBJ += input/drivers_joypad/winmm_joypad.o
|
|
LIBS += -lwinmm
|
|
endif
|
|
|
|
ifeq ($(HAVE_XINPUT), 1)
|
|
DEFINES += -DHAVE_XINPUT
|
|
HAVE_INPUT_OUTPUT_WRITER = 1
|
|
ifeq ($(HAVE_DINPUT), 1)
|
|
OBJ += input/drivers_joypad/xinput_hybrid_joypad.o
|
|
else
|
|
OBJ += input/drivers_joypad/xinput_joypad.o
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_OPENDINGUX_FBDEV), 1)
|
|
OBJ += gfx/drivers_context/opendingux_fbdev_ctx.o
|
|
endif
|
|
|
|
ifneq ($(findstring Darwin,$(OS)),)
|
|
OBJ += gfx/display_servers/dispserv_apple.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_X11), 1)
|
|
OBJ += input/common/input_x11_common.o \
|
|
input/drivers/x11_input.o \
|
|
gfx/common/x11_common.o \
|
|
gfx/common/xinerama_common.o \
|
|
gfx/display_servers/dispserv_x11.o
|
|
|
|
LIBS += $(X11_LIBS) $(XEXT_LIBS) $(XF86VM_LIBS) $(XINERAMA_LIBS) $(XRANDR_LIBS)
|
|
DEFINES += -DHAVE_X11
|
|
DEF_FLAGS += $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS)
|
|
ifeq ($(HAVE_XCB),1)
|
|
LIBS += $(X11_XCB_LIBS)
|
|
endif
|
|
ifeq ($(HAVE_XI2),1)
|
|
LIBS += -lXi
|
|
DEFINES += -DHAVE_XI2
|
|
endif
|
|
ifeq ($(HAVE_XSCRNSAVER),1)
|
|
LIBS += -lXss
|
|
endif
|
|
ifneq ($(HAVE_OPENGLES), 1)
|
|
OBJ += gfx/drivers_context/x_ctx.o
|
|
endif
|
|
ifeq ($(HAVE_VULKAN), 1)
|
|
# The X11 Vulkan context creates an XCB surface.
|
|
ifeq ($(HAVE_XCB), 1)
|
|
OBJ += gfx/drivers_context/x_vk_ctx.o
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_XCB),1)
|
|
DEF_FLAGS += $(XCB_CFLAGS)
|
|
LIBS += $(XCB_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_XKBCOMMON), 1)
|
|
DEF_FLAGS += $(XKBCOMMON_CFLAGS)
|
|
OBJ += input/drivers_keyboard/keyboard_event_xkb.o
|
|
LIBS += $(XKBCOMMON_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_DBUS), 1)
|
|
LIBS += $(DBUS_LIBS)
|
|
DEF_FLAGS += $(DBUS_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_UDEV), 1)
|
|
DEF_FLAGS += $(UDEV_CFLAGS)
|
|
LIBS += $(UDEV_LIBS)
|
|
OBJ += input/drivers/udev_input.o \
|
|
input/drivers_joypad/udev_joypad.o
|
|
HAVE_INPUT_OUTPUT_WRITER = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_LIBUSB), 1)
|
|
DEFINES += -DHAVE_LIBUSB
|
|
OBJ += input/drivers_hid/libusb_hid.o
|
|
DEF_FLAGS += $(LIBUSB_CFLAGS)
|
|
LIBS += $(LIBUSB_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_HIDRAW), 1)
|
|
HAVE_HID=1
|
|
DEFINES += -DHAVE_HIDRAW
|
|
OBJ += input/drivers_hid/hidraw_hid.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_WINUSB), 1)
|
|
HAVE_HID=1
|
|
DEFINES += -DHAVE_WINUSB
|
|
OBJ += input/drivers_hid/winusb_hid.o \
|
|
input/drivers_hid/winusb_bind.o
|
|
ifeq ($(HAVE_WGI), 1)
|
|
DEFINES += -DHAVE_WGI
|
|
OBJ += input/drivers_hid/winusb_wgi.o
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_IOHIDMANAGER), 1)
|
|
HAVE_HID=1
|
|
DEFINES += -DHAVE_IOHIDMANAGER
|
|
OBJ += input/drivers_hid/iohidmanager_hid.o
|
|
LIBS += -framework IOKit
|
|
endif
|
|
|
|
ifeq ($(HAVE_HID), 1)
|
|
DEFINES += -DHAVE_HID
|
|
OBJ += input/drivers_joypad/hid_joypad.o \
|
|
input/connect/joypad_connection.o \
|
|
input/connect/connect_ps2adapter.o \
|
|
input/connect/connect_psxadapter.o \
|
|
input/connect/connect_ps3.o \
|
|
input/connect/connect_ps4.o \
|
|
input/connect/connect_ps5.o \
|
|
input/connect/connect_switch_pro.o \
|
|
input/connect/connect_switch2_pro.o \
|
|
input/connect/connect_ps4_hori_mini.o \
|
|
input/connect/connect_wii.o \
|
|
input/connect/connect_retrode.o \
|
|
input/connect/connect_nesusb.o \
|
|
input/connect/connect_snesusb.o \
|
|
input/connect/connect_wiiupro.o \
|
|
input/connect/connect_kade.o \
|
|
input/connect/connect_zerodelay_dragonrise.o \
|
|
input/connect/connect_8bitdo.o \
|
|
input/connect/connect_gamecube_pc.o \
|
|
input/connect/connect_wiiugca.o \
|
|
input/connect/connect_xid.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_PARPORT), 1)
|
|
OBJ += input/drivers_joypad/parport_joypad.o
|
|
endif
|
|
|
|
ifneq ($(findstring Win32,$(OS)),)
|
|
ifeq ($(HAVE_WINRAWINPUT), 1)
|
|
DEFINES += -DHAVE_WINRAWINPUT
|
|
OBJ += input/drivers/winraw_input.o
|
|
OBJ += input/drivers_joypad/winraw_joypad.o
|
|
HAVE_INPUT_OUTPUT_WRITER = 1
|
|
endif
|
|
endif
|
|
|
|
# The Dingux joypad driver's vibration motor is written from it too
|
|
ifeq ($(HAVE_SDL_DINGUX), 1)
|
|
HAVE_INPUT_OUTPUT_WRITER = 1
|
|
endif
|
|
|
|
# The thread the joypad drivers write to their controllers from (udev,
|
|
# XInput, Windows raw input, Dingux): one object, whichever of them is built.
|
|
ifeq ($(HAVE_INPUT_OUTPUT_WRITER), 1)
|
|
OBJ += input/common/output_writer.o
|
|
endif
|
|
|
|
|
|
# Companion UI
|
|
|
|
# Shared companion core (ui/companion/) is needed by every desktop
|
|
# companion driver: Qt, native Win32, native Cocoa. Added once.
|
|
ifneq ($(findstring Win32,$(OS)),)
|
|
OBJ += ui/drivers/ui_win32.o \
|
|
ui/drivers/ui_win32_companion.o
|
|
# comctl32: InitCommonControls / list-view / status bar used by the
|
|
# native Win32 companion (MSVC builds pull it in via #pragma comment).
|
|
LIBS += -lcomctl32 -lshell32 -lole32
|
|
HAVE_COMPANION_CORE = 1
|
|
endif
|
|
ifeq ($(HAVE_QT), 1)
|
|
HAVE_COMPANION_CORE = 1
|
|
endif
|
|
ifeq ($(HAVE_COMPANION_CORE), 1)
|
|
OBJ += ui/companion/companion_core.o ui/companion/companion_thumbs.o ui/companion/companion_dock.o
|
|
endif
|
|
|
|
# Video
|
|
|
|
OBJ += gfx/drivers_context/gfx_null_ctx.o
|
|
|
|
ifeq ($(HAVE_KMS), 1)
|
|
HAVE_AND_WILL_USE_DRM = 1
|
|
OBJ += gfx/drivers_context/drm_ctx.o \
|
|
gfx/display_servers/dispserv_kms.o \
|
|
gfx/common/drm_hdr.o \
|
|
gfx/common/egl_gbm_frames.o
|
|
|
|
ifeq ($(HAVE_ODROIDGO2), 1)
|
|
OBJ += gfx/drivers_context/drm_go2_ctx.o
|
|
endif
|
|
DEF_FLAGS += $(GBM_CFLAGS) $(DRM_CFLAGS)
|
|
LIBS += $(GBM_LIBS) $(DRM_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_CACA), 1)
|
|
DEFINES += -DHAVE_CACA
|
|
OBJ += gfx/drivers/caca_gfx.o
|
|
LIBS += $(CACA_LIBS)
|
|
DEF_FLAGS += $(CACA_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_SIXEL), 1)
|
|
DEFINES += -DHAVE_SIXEL
|
|
INCLUDE_DIRS += -I/usr/include/sixel
|
|
OBJ += gfx/drivers/sixel_gfx.o
|
|
LIBS += $(SIXEL_LIBS)
|
|
DEF_FLAGS += $(SIXEL_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_NETWORK_VIDEO), 1)
|
|
ifneq ($(NETWORK_VIDEO_HOST),)
|
|
DEFINES += -DNETWORK_VIDEO_HOST=$(NETWORK_VIDEO_HOST)
|
|
else
|
|
DEFINES += -DNETWORK_VIDEO_HOST=127.0.0.1
|
|
endif
|
|
|
|
ifneq ($(NETWORK_VIDEO_PORT),)
|
|
DEFINES += -DNETWORK_VIDEO_PORT=$(NETWORK_VIDEO_PORT)
|
|
else
|
|
DEFINES += -DNETWORK_VIDEO_PORT=4953
|
|
endif
|
|
|
|
DEFINES += -DHAVE_NETWORK_VIDEO
|
|
OBJ += gfx/drivers/network_gfx.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_HUB75), 1)
|
|
DEFINES += -DHAVE_HUB75
|
|
OBJ += gfx/drivers/hub75_gfx.o
|
|
LIBS += -lrt -lm -lpthread
|
|
endif
|
|
|
|
ifeq ($(HAVE_PLAIN_DRM), 1)
|
|
OBJ += gfx/drivers/drm_gfx.o
|
|
ifneq ($(HAVE_LAKKA), 1)
|
|
INCLUDE_DIRS += -I/usr/include/libdrm
|
|
endif
|
|
LIBS += -ldrm
|
|
HAVE_AND_WILL_USE_DRM = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_VITAGL), 1)
|
|
DEFINES += -DHAVE_OPENGL1 -DHAVE_VITAGL
|
|
OBJ += gfx/drivers/gl1.o \
|
|
gfx/drivers_context/vita_ctx.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_VITAGLES), 1)
|
|
OBJ += gfx/drivers_context/vita_ctx.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_GL_CONTEXT), 1)
|
|
OBJ += gfx/common/gl_common.o
|
|
ifeq ($(HAVE_GL_MODERN), 1)
|
|
DEFINES += -DHAVE_OPENGL
|
|
OBJ += gfx/drivers/gl2.o \
|
|
$(LIBRETRO_COMM_DIR)/gfx/gl_capabilities.o
|
|
endif
|
|
|
|
OBJ += $(LIBRETRO_COMM_DIR)/glsym/rglgen.o
|
|
|
|
ifeq ($(HAVE_OPENGL1), 1)
|
|
DEFINES += -DHAVE_OPENGL1
|
|
OBJ += gfx/drivers/gl1.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_VIDEOCORE), 1)
|
|
OBJ += gfx/drivers_context/vc_egl_ctx.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_EMSCRIPTEN), 1)
|
|
ifeq ($(HAVE_EGL), 1)
|
|
OBJ += gfx/drivers_context/emscriptenegl_ctx.o
|
|
endif
|
|
OBJ += gfx/drivers_context/emscriptenwebgl_ctx.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_MALI_FBDEV), 1)
|
|
OBJ += gfx/drivers_context/mali_fbdev_ctx.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_VIVANTE_FBDEV), 1)
|
|
OBJ += gfx/drivers_context/vivante_fbdev_ctx.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_X11), 1)
|
|
ifeq ($(HAVE_EGL), 1)
|
|
OBJ += gfx/drivers_context/xegl_ctx.o
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_OSMESA), 1)
|
|
OBJ += gfx/drivers_context/osmesa_ctx.o
|
|
LIBS += -lOSMesa
|
|
endif
|
|
|
|
ifeq ($(HAVE_FFMPEG), 1)
|
|
ifneq ($(HAVE_OPENGLES), 1)
|
|
INCLUDE_DIRS += -I$(DEPS_DIR)
|
|
endif
|
|
endif
|
|
|
|
|
|
ifeq ($(HAVE_MPV), 1)
|
|
OBJ += cores/libretro-mpv/mpv-libretro.o
|
|
DEFINES += -DHAVE_MPV
|
|
INCLUDE_DIRS += -I$(DEPS_DIR)
|
|
LIBS += -lmpv
|
|
endif
|
|
|
|
ifeq ($(HAVE_OPENGLES), 1)
|
|
DEFINES += -DHAVE_OPENGLES
|
|
LIBS += $(OPENGLES_LIBS)
|
|
DEF_FLAGS += $(OPENGLES_CFLAGS)
|
|
ifeq ($(HAVE_OPENGLES3), 1)
|
|
DEFINES += -DHAVE_OPENGLES3
|
|
OBJ += $(LIBRETRO_COMM_DIR)/glsym/glsym_es3.o
|
|
else
|
|
DEFINES += -DHAVE_OPENGLES2
|
|
OBJ += $(LIBRETRO_COMM_DIR)/glsym/glsym_es2.o
|
|
endif
|
|
else
|
|
DEFINES += -DHAVE_GL_SYNC
|
|
OBJ += $(LIBRETRO_COMM_DIR)/glsym/glsym_gl.o
|
|
GL_LIBS := $(OPENGL_LIBS)
|
|
ifeq ($(OSX), 1)
|
|
GL_LIBS := -framework OpenGL
|
|
else ifneq ($(findstring Win32,$(OS)),)
|
|
GL_LIBS := -lopengl32 -lgdi32 -lcomdlg32
|
|
WANT_WGL=1
|
|
endif
|
|
LIBS += $(GL_LIBS)
|
|
endif
|
|
|
|
endif
|
|
|
|
ifeq ($(HAVE_METAL), 1)
|
|
DEFINES += -DHAVE_METAL
|
|
LIBS += -framework Metal -framework MetalKit -framework QuartzCore -framework CoreVideo
|
|
ifneq ($(findstring 1, $(HAVE_RMP4) $(HAVE_RWEBM)),)
|
|
LIBS += -framework CoreMedia -framework VideoToolbox
|
|
endif
|
|
# metal.m builds under both ARC and MRC (see the M_OBJC_* ownership
|
|
# macros at the top of the file). The top-level Makefile still builds
|
|
# it with a per-file -fobjc-arc override — ARC is the preferred mode
|
|
# for the standalone object — but the griffin_objc.m unity TU may
|
|
# compile it either way depending on the Xcode configuration.
|
|
OBJ += gfx/drivers/metal.o
|
|
ifeq ($(HAVE_AVF), 1)
|
|
OBJ += record/record_gpu_queue.o \
|
|
record/record_audio_queue.o \
|
|
record/record_gpu_worker_vt.o \
|
|
record/record_avfoundation_worker.o \
|
|
record/record_avfoundation_session.o \
|
|
record/record_gpu_capture_metal.o \
|
|
record/record_mux_avfoundation.o \
|
|
record/record_gpu_session_metal.o \
|
|
record/record_gpu_dispatch_metal.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/h265/rh265_sps_crop.o
|
|
LIBS += -framework CoreMedia -framework VideoToolbox -framework AudioToolbox
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_MFI), 1)
|
|
DEFINES += -DHAVE_MFI
|
|
LIBS += -framework GameController -framework CoreHaptics
|
|
# mfi_joypad.m uses __weak references, which require ARC. Enabled
|
|
# per-file in the top-level Makefile (see comment above).
|
|
OBJ += input/drivers_joypad/mfi_joypad.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_EGL), 1)
|
|
DEFINES += -DHAVE_EGL
|
|
DEF_FLAGS += $(EGL_CFLAGS)
|
|
OBJ += gfx/common/egl_common.o
|
|
|
|
ifeq ($(HAVE_DYNAMIC_EGL), 1)
|
|
DEFINES += -DHAVE_DYNAMIC_EGL
|
|
else
|
|
LIBS += $(EGL_LIBS)
|
|
endif
|
|
|
|
endif
|
|
|
|
ifeq ($(HAVE_SDL3), 1)
|
|
SDL3_CFLAGS = $(shell pkg-config sdl3 --cflags)
|
|
SDL3_LIBS = $(shell pkg-config sdl3 --libs)
|
|
ifeq ($(strip $(SDL3_LIBS)),)
|
|
$(warning SDL3_LIBS is not set, falling back to -lSDL3)
|
|
SDL3_LIBS = -lSDL3
|
|
endif
|
|
DEF_FLAGS += $(SDL3_CFLAGS)
|
|
# RetroArch supplies its own entry point and sets SDL_MAIN_HANDLED
|
|
# (see retroarch.c), so SDL's WinMain shim library (-lSDL3main /
|
|
# -lSDLmain, pulled in automatically by pkg-config --libs on
|
|
# Windows/MSYS2) is both unnecessary and harmful: its WinMain
|
|
# references SDL_main, which no longer exists once main stays main.
|
|
# Filter it out.
|
|
LIBS += $(filter-out -lSDL3main -lSDLmain -lSDL_main,$(SDL3_LIBS))
|
|
DEFINES += -DHAVE_SDL3
|
|
OBJ += input/drivers_joypad/sdl3_joypad.o \
|
|
input/drivers/sdl3_input.o \
|
|
gfx/drivers/sdl3_gfx.o \
|
|
gfx/common/sdl3_common.o \
|
|
gfx/display_servers/dispserv_sdl3.o \
|
|
audio/drivers/sdl3_audio.o
|
|
|
|
ifneq ($(filter 1,$(HAVE_OPENGL) $(HAVE_OPENGL1) $(HAVE_OPENGL_CORE) $(HAVE_OPENGLES)),)
|
|
OBJ += gfx/drivers_context/sdl3_gl_ctx.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_VULKAN), 1)
|
|
OBJ += gfx/drivers_context/sdl3_vk_ctx.o
|
|
endif
|
|
else ifeq ($(HAVE_SDL2), 1)
|
|
HAVE_SDL_COMMON = 1
|
|
OBJ += gfx/drivers/sdl2_gfx.o \
|
|
gfx/common/sdl2_common.o \
|
|
gfx/display_servers/dispserv_sdl2.o \
|
|
audio/drivers/sdl2_audio.o
|
|
DEF_FLAGS += $(SDL2_CFLAGS)
|
|
# See the SDL3 note above: drop SDL's WinMain shim lib, we set
|
|
# SDL_MAIN_HANDLED and provide our own entry point.
|
|
LIBS += $(filter-out -lSDL2main -lSDLmain -lSDL_main,$(SDL2_LIBS))
|
|
else ifeq ($(HAVE_SDL), 1)
|
|
HAVE_SDL_COMMON = 1
|
|
OBJ += gfx/drivers/sdl_gfx.o \
|
|
audio/drivers/sdl1_audio.o
|
|
DEF_FLAGS += $(SDL_CFLAGS)
|
|
# See the SDL3 note above: drop SDL's WinMain shim lib.
|
|
LIBS += $(filter-out -lSDLmain -lSDL_main,$(SDL_LIBS))
|
|
else ifeq ($(HAVE_SDL_DINGUX), 1)
|
|
HAVE_SDL_COMMON = 1
|
|
DEF_FLAGS += -DHAVE_SDL -DHAVE_SDL_DINGUX
|
|
|
|
ifeq ($(RS90), 1)
|
|
OBJ += gfx/drivers/sdl_rs90_gfx.o
|
|
else ifeq ($(MIYOO), 1)
|
|
OBJ += gfx/drivers/sdl_rs90_gfx.o
|
|
else
|
|
OBJ += gfx/drivers/sdl_dingux_gfx.o
|
|
endif
|
|
|
|
OBJ += input/drivers/sdl_dingux_input.o \
|
|
input/drivers_joypad/sdl_dingux_joypad.o \
|
|
audio/drivers/sdl1_audio.o
|
|
DEF_FLAGS += $(SDL_DINGUX_CFLAGS)
|
|
LIBS += $(SDL_DINGUX_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_SDL_COMMON), 1)
|
|
ifeq ($(HAVE_SDL2), 1)
|
|
OBJ += input/drivers/sdl2_input.o \
|
|
input/drivers_joypad/sdl2_joypad.o
|
|
else
|
|
OBJ += input/drivers/sdl1_input.o \
|
|
input/drivers_joypad/sdl1_joypad.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_GL_CONTEXT), 1)
|
|
ifeq ($(HAVE_SDL2), 1)
|
|
OBJ += gfx/drivers_context/sdl2_gl_ctx.o
|
|
else
|
|
OBJ += gfx/drivers_context/sdl1_gl_ctx.o
|
|
endif
|
|
endif
|
|
|
|
INCLUDE_DIRS += $(BSD_LOCAL_INC)
|
|
endif
|
|
|
|
ifeq ($(HAVE_XSHM), 1)
|
|
OBJ += gfx/drivers/xshm_gfx.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_VULKAN), 1)
|
|
ifneq ($(findstring Win32,$(OS)),)
|
|
OBJ += gfx/drivers_context/w_vk_ctx.o
|
|
endif
|
|
|
|
CXXFLAGS += -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-reorder -Wno-parentheses
|
|
|
|
OBJ += gfx/drivers/vulkan.o \
|
|
gfx/common/vulkan_common.o \
|
|
$(LIBRETRO_COMM_DIR)/vulkan/vulkan_symbol_wrapper.o
|
|
|
|
ifeq ($(ANDROID)$(HAVE_THREADS), 11)
|
|
OBJ += record/record_android_capture_device.o
|
|
endif
|
|
|
|
# H.264/HEVC previews decoded on the GPU
|
|
ifneq ($(findstring 1, $(HAVE_RMP4) $(HAVE_RWEBM)),)
|
|
OBJ += gfx/common/vulkan_video_decode.o
|
|
endif
|
|
|
|
ifneq ($(filter 1,$(HAVE_RMP4) $(HAVE_RVP9) $(HAVE_RAV1) $(HAVE_RECORD_MEDIACODEC)),)
|
|
ifeq ($(ANDROID), 1)
|
|
OBJ += gfx/common/vulkan_android_device.o \
|
|
gfx/common/android_image_queue.o \
|
|
gfx/common/android_frame.o \
|
|
gfx/common/vulkan_android_image.o \
|
|
gfx/common/vulkan_android_sync.o \
|
|
gfx/common/vulkan_android_pipeline.o \
|
|
gfx/common/vulkan_android_submit.o \
|
|
gfx/common/vulkan_android_queue.o \
|
|
gfx/common/vulkan_android_cache_entry.o \
|
|
gfx/common/vulkan_android_cache.o
|
|
ifeq ($(HAVE_THREADS), 1)
|
|
OBJ += gfx/common/mediacodec_inventory.o \
|
|
gfx/common/android_image_ndk.o \
|
|
gfx/common/mediacodec_session.o \
|
|
gfx/common/mediacodec_color.o \
|
|
gfx/common/mediacodec_frame_export.o
|
|
ifeq ($(HAVE_RMP4), 1)
|
|
OBJ += gfx/common/mediacodec_hevc_packet.o \
|
|
gfx/common/mediacodec_hevc_decoder.o \
|
|
gfx/common/mediacodec_hevc_backend.o
|
|
endif
|
|
ifeq ($(HAVE_RVP9), 1)
|
|
OBJ += gfx/common/mediacodec_vp9_decoder.o \
|
|
gfx/common/mediacodec_vp9_backend.o
|
|
endif
|
|
ifeq ($(HAVE_RAV1), 1)
|
|
OBJ += gfx/common/mediacodec_av1_decoder.o \
|
|
gfx/common/mediacodec_av1_backend.o
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_SLANG), 1)
|
|
OBJ += gfx/drivers_shader/shader_vulkan.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_VULKAN_DISPLAY), 1)
|
|
OBJ += gfx/drivers_context/khr_display_ctx.o
|
|
endif
|
|
ifeq ($(HAVE_OPENXR), 1)
|
|
OBJ += gfx/common/vulkan_openxr.o
|
|
endif
|
|
NEED_CXX_LINKER = 1
|
|
DEFINES += -DHAVE_VULKAN
|
|
INCLUDE_DIRS += -Igfx/include
|
|
|
|
# On macOS, the Vulkan loader at gfx/common/vulkan_common.c dlopens
|
|
# "MoltenVK" by bare name. Embed rpath entries pointing at the Frameworks
|
|
# dir inside an .app bundle, so that `make bundle` (which copies
|
|
# pkg/apple/Frameworks/MoltenVK.xcframework/macos-arm64_x86_64/MoltenVK.framework
|
|
# into Contents/Frameworks) produces a self-contained bundle with no
|
|
# external MoltenVK dependency. Matches what Xcode's
|
|
# LD_RUNPATH_SEARCH_PATHS does for the .xcodeproj build.
|
|
# The Vulkan render view is a CAMetalLayer on a Metal device, so the
|
|
# Metal frameworks are linked whether or not the Metal driver is.
|
|
ifneq ($(findstring Darwin,$(OS)),)
|
|
LDFLAGS += -Xlinker -rpath -Xlinker @executable_path/../Frameworks \
|
|
-Xlinker -rpath -Xlinker @executable_path/../Frameworks/MoltenVK.framework
|
|
LIBS += -framework Metal -framework QuartzCore
|
|
endif
|
|
endif
|
|
|
|
# SPIR-V the Vulkan driver and the glcore driver with slang share
|
|
ifeq ($(HAVE_VULKAN), 1)
|
|
OBJ += gfx/common/spirv_shaders.o
|
|
else ifeq ($(HAVE_OPENGL_CORE)$(HAVE_SLANG), 11)
|
|
OBJ += gfx/common/spirv_shaders.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_OPENGL_CORE), 1)
|
|
OBJ += gfx/drivers/gl3.o
|
|
|
|
DEFINES += -DHAVE_OPENGL_CORE
|
|
|
|
ifeq ($(HAVE_SLANG), 1)
|
|
OBJ += gfx/drivers_shader/shader_gl3.o
|
|
OBJ += gfx/drivers_shader/spirv_opengl.o
|
|
|
|
NEED_CXX_LINKER = 1
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_OMAP), 1)
|
|
OBJ += gfx/drivers/omap_gfx.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_EXYNOS), 1)
|
|
OBJ += gfx/drivers/exynos_gfx.o
|
|
LIBS += $(DRM_LIBS) $(EXYNOS_LIBS)
|
|
DEF_FLAGS += $(DRM_CFLAGS) $(EXYNOS_CFLAGS)
|
|
HAVE_AND_WILL_USE_DRM = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_AND_WILL_USE_DRM), 1)
|
|
OBJ += gfx/common/drm_common.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_DISPMANX), 1)
|
|
OBJ += gfx/drivers/dispmanx_gfx.o
|
|
HAVE_VIDEOCORE = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_VIDEOCORE), 1)
|
|
OBJ += gfx/display_servers/dispserv_videocore.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_SUNXI), 1)
|
|
OBJ += gfx/drivers/sunxi_gfx.o \
|
|
gfx/include/pixman/pixman-arm-neon-asm.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_VG), 1)
|
|
OBJ += gfx/drivers/vg.o
|
|
DEF_FLAGS += $(VG_CFLAGS)
|
|
LIBS += $(VG_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_XVIDEO), 1)
|
|
OBJ += gfx/drivers/xvideo.o
|
|
LIBS += $(XVIDEO_LIBS)
|
|
DEF_FLAGS += $(XVIDEO_CFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_D3D9), 1)
|
|
HAVE_D3D_COMMON = 1
|
|
DEFINES += -DHAVE_D3D9
|
|
ifneq ($(HAVE_DYLIB), 1)
|
|
LIBS += $(D3D9_LIBS)
|
|
endif
|
|
ifeq ($(HAVE_CG), 1)
|
|
LIBS += -lcgD3D9
|
|
OBJ += gfx/drivers/d3d9cg.o
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_D3D10), 1)
|
|
HAVE_D3D_COMMON = 1
|
|
OBJ += gfx/drivers/d3d10.o
|
|
DEFINES += -DHAVE_D3D10
|
|
endif
|
|
|
|
ifeq ($(HAVE_D3D11), 1)
|
|
HAVE_D3D_COMMON = 1
|
|
OBJ += gfx/drivers/d3d11.o \
|
|
gfx/common/d3d11_deferred_proxy.o
|
|
DEFINES += -DHAVE_D3D11
|
|
endif
|
|
|
|
ifeq ($(HAVE_D3D12), 1)
|
|
HAVE_D3D_COMMON = 1
|
|
OBJ += gfx/drivers/d3d12.o \
|
|
gfx/common/nvenc_d3d12.o \
|
|
record/record_gpu_queue.o \
|
|
record/record_gpu_capture_d3d12.o \
|
|
record/record_gpu_worker_d3d12.o \
|
|
record/record_mux_mp4.o \
|
|
record/record_file_win32.o \
|
|
record/record_gpu_output_d3d12.o \
|
|
record/record_gpu_session_d3d12.o \
|
|
record/record_gpu_dispatch_d3d12.o
|
|
DEFINES += -DHAVE_D3D12
|
|
endif
|
|
|
|
# H.264 previews decoded on the GPU, as rh264's backend; D3D12 imports
|
|
# its frames as well
|
|
ifneq ($(findstring 1, $(HAVE_D3D11) $(HAVE_D3D12)),)
|
|
ifneq ($(findstring 1, $(HAVE_RMP4) $(HAVE_RWEBM)),)
|
|
OBJ += gfx/common/d3d11_video_decode.o
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(findstring 1, $(HAVE_D3D10) $(HAVE_D3D11) $(HAVE_D3D12)),)
|
|
INCLUDE_DIRS += -isystemgfx/include/dxsdk
|
|
OBJ += gfx/common/d3dcompiler_common.o \
|
|
gfx/common/dxgi_common.o
|
|
DEF_FLAGS += -Wno-unknown-pragmas
|
|
endif
|
|
|
|
ifeq ($(HAVE_D3D8), 1)
|
|
HAVE_D3D_COMMON = 1
|
|
DEFINES += -DHAVE_D3D8
|
|
ifneq ($(HAVE_DYLIB), 1)
|
|
LIBS += $(D3D8_LIBS)
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_D3D8), 1)
|
|
DEFINES += -DHAVE_D3D8
|
|
OBJ += gfx/drivers/d3d8.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_D3D9), 1)
|
|
DEFINES += -DHAVE_D3D9
|
|
OBJ += gfx/common/d3d9_common.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_D3D_COMMON), 1)
|
|
DEFINES += -DHAVE_D3D
|
|
OBJ += gfx/common/d3d_common.o
|
|
endif
|
|
|
|
# Driver Pacing through NVAPI: the Direct3D drivers', and Vulkan's
|
|
# when it presents through DXGI
|
|
ifneq ($(findstring Win32,$(OS)),)
|
|
ifneq ($(findstring 1,$(HAVE_D3D_COMMON) $(HAVE_VULKAN)),)
|
|
OBJ += gfx/common/d3d_driver_pacing.o \
|
|
$(LIBRETRO_COMM_DIR)/gfx/nvidia/nvapi_loader.o
|
|
endif
|
|
endif
|
|
|
|
# Temporal Upscaler: DLSS Super Resolution through NGX, FSR through the
|
|
# FidelityFX API and XeSS, each loaded at run time, for the Vulkan and
|
|
# Direct3D 12 drivers
|
|
ifneq ($(findstring 1,$(HAVE_VULKAN) $(HAVE_D3D12)),)
|
|
ifneq ($(findstring Win32,$(OS))$(findstring Linux,$(OS)),)
|
|
DEFINES += -DHAVE_TEMPORAL_UPSCALER
|
|
OBJ += gfx/video_upscaler.o \
|
|
gfx/common/ffx_common.o \
|
|
gfx/common/xess_common.o \
|
|
$(LIBRETRO_COMM_DIR)/gfx/nvidia/ngx_loader.o \
|
|
$(LIBRETRO_COMM_DIR)/gfx/amd/ffx_loader.o \
|
|
$(LIBRETRO_COMM_DIR)/gfx/intel/xess_loader.o
|
|
ifeq ($(HAVE_VULKAN), 1)
|
|
OBJ += gfx/common/vulkan_upscaler.o \
|
|
gfx/common/vulkan_ngx.o \
|
|
gfx/common/vulkan_ffx.o \
|
|
gfx/common/vulkan_xess.o
|
|
endif
|
|
ifeq ($(HAVE_D3D12), 1)
|
|
OBJ += gfx/common/d3d12_upscaler.o \
|
|
gfx/common/d3d12_ngx.o \
|
|
gfx/common/d3d12_ffx.o \
|
|
gfx/common/d3d12_xess.o
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_CG), 1)
|
|
DEFINES += -DHAVE_CG
|
|
OBJ += gfx/drivers_shader/shader_gl_cg.o
|
|
LIBS += $(CG_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_GLSL), 1)
|
|
DEFINES += -DHAVE_GLSL
|
|
OBJ += gfx/drivers_shader/shader_glsl.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_HLSL),1)
|
|
DEFINES += -DHAVE_HLSL
|
|
OBJ += gfx/drivers/d3d9hlsl.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_SLANG),1)
|
|
DEFINES += -DHAVE_SLANG
|
|
OBJ += gfx/drivers_shader/slang_process.o
|
|
OBJ += gfx/drivers_shader/glslang_util.o
|
|
OBJ += gfx/drivers_shader/slang_cache.o
|
|
OBJ += gfx/drivers_shader/slang_rect.o
|
|
OBJ += gfx/drivers_shader/slang_blob.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RSLC),1)
|
|
DEFINES += -DHAVE_RSLC
|
|
OBJ += $(LIBRETRO_COMM_DIR)/gfx/shaders/rslc_front.o \
|
|
$(LIBRETRO_COMM_DIR)/gfx/shaders/rslc_ir.o \
|
|
$(LIBRETRO_COMM_DIR)/gfx/shaders/rslc_emit.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_SHADERS_COMMON), 1)
|
|
OBJ += gfx/video_shader_parse.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_VIDEO_WINDOWS), 1)
|
|
DEFINES += -DHAVE_VIDEO_WINDOWS
|
|
OBJ += gfx/video_windows.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_OPENXR), 1)
|
|
NEED_CXX_LINKER = 1
|
|
DEFINES += -DHAVE_OPENXR
|
|
OBJ += gfx/common/openxr_runtime.o \
|
|
gfx/common/openxr_session.o \
|
|
gfx/common/openxr_tracking.o \
|
|
gfx/common/openxr_host.o \
|
|
gfx/common/openxr_swapchain.o \
|
|
gfx/common/openxr_frame.o \
|
|
gfx/video_xr.o \
|
|
input/common/input_openxr.o
|
|
|
|
# Desktop GL headset output: a context in the window's share group on
|
|
# the XR thread, made by an EGL or GLX context driver.
|
|
ifneq ($(findstring Linux,$(OS)),)
|
|
ifneq ($(HAVE_OPENGLES), 1)
|
|
ifneq ($(filter 1,$(HAVE_OPENGL) $(HAVE_OPENGL_CORE)),)
|
|
ifneq ($(filter 1,$(HAVE_EGL) $(HAVE_X11)),)
|
|
DEFINES += -DHAVE_OPENXR_GL
|
|
OBJ += gfx/common/openxr_ring.o \
|
|
gfx/common/openxr_binding_gl.o \
|
|
gfx/common/gl_openxr.o
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
ifneq ($(findstring Win32,$(OS)),)
|
|
DEFINES += -DXR_OS_WINDOWS -DXR_USE_PLATFORM_WIN32
|
|
else ifneq ($(findstring Darwin,$(OS)),)
|
|
DEFINES += -DXR_OS_APPLE
|
|
else
|
|
DEFINES += -DXR_OS_LINUX
|
|
endif
|
|
|
|
INCLUDE_DIRS += \
|
|
-I$(DEPS_DIR)/openxr/include \
|
|
-I$(DEPS_DIR)/openxr/src \
|
|
-I$(DEPS_DIR)/openxr/src/common \
|
|
-I$(DEPS_DIR)/openxr/src/loader
|
|
|
|
# Vendored Khronos OpenXR loader, built from the tree like every other
|
|
# dependency. The Android-only pieces (android_utilities,
|
|
#) are pulled in by griffin on Android instead.
|
|
OPENXR_SOURCES := \
|
|
$(DEPS_DIR)/openxr/src/common/object_info.cpp \
|
|
$(DEPS_DIR)/openxr/src/common/filesystem_utils.cpp \
|
|
$(DEPS_DIR)/openxr/src/loader/api_layer_interface.cpp \
|
|
$(DEPS_DIR)/openxr/src/loader/loader_core.cpp \
|
|
$(DEPS_DIR)/openxr/src/loader/loader_init_data.cpp \
|
|
$(DEPS_DIR)/openxr/src/loader/loader_json.cpp \
|
|
$(DEPS_DIR)/openxr/src/loader/loader_instance.cpp \
|
|
$(DEPS_DIR)/openxr/src/loader/loader_logger.cpp \
|
|
$(DEPS_DIR)/openxr/src/loader/loader_logger_recorders.cpp \
|
|
$(DEPS_DIR)/openxr/src/loader/loader_properties.cpp \
|
|
$(DEPS_DIR)/openxr/src/loader/manifest_file.cpp \
|
|
$(DEPS_DIR)/openxr/src/loader/runtime_interface.cpp \
|
|
$(DEPS_DIR)/openxr/src/loader/xr_generated_loader.cpp
|
|
|
|
OBJ += $(OPENXR_SOURCES:.cpp=.o)
|
|
OBJ += $(DEPS_DIR)/openxr/src/xr_generated_dispatch_table_core.o
|
|
|
|
# The vendored loader is C++17 and built without exceptions.
|
|
$(addprefix $(OBJDIR)/,$(OPENXR_SOURCES:.cpp=.o)): CXXFLAGS += -std=gnu++17 -fno-exceptions
|
|
endif
|
|
|
|
# glslang and SPIRV-Cross are the system's, and only when configure
|
|
# was asked for them (--enable-glslang --enable-spirv_cross); rslc
|
|
# compiles slang without them.
|
|
ifeq ($(HAVE_GLSLANG), 1)
|
|
NEED_CXX_LINKER = 1
|
|
DEFINES += -DHAVE_GLSLANG
|
|
OBJ += gfx/drivers_shader/glslang.o
|
|
|
|
# The order of these libs are somewhat specific
|
|
LIBS += $(GLSLANG_LIBS) \
|
|
$(GLSLANG_MACHINEINDEPENDENT_LIBS) \
|
|
$(GLSLANG_GENERICCODEGEN_LIBS) \
|
|
$(GLSLANG_OSDEPENDENT_LIBS) \
|
|
$(GLSLANG_OGLCOMPILER_LIBS) \
|
|
$(GLSLANG_SPIRV_LIBS) \
|
|
$(GLSLANG_SPIRV_TOOLS_OPT_LIBS) \
|
|
$(GLSLANG_SPIRV_TOOLS_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_SPIRV_CROSS), 1)
|
|
DEFINES += -DHAVE_SPIRV_CROSS
|
|
# slang_process.c is C: the header path must reach the C compiler too.
|
|
CFLAGS += $(SPIRV_CROSS_CFLAGS)
|
|
CXXFLAGS += $(SPIRV_CROSS_CFLAGS)
|
|
LIBS += $(SPIRV_CROSS_LIBS)
|
|
endif
|
|
|
|
ifeq ($(WANT_WGL), 1)
|
|
OBJ += gfx/drivers_context/wgl_ctx.o
|
|
endif
|
|
|
|
# Compression/Archive
|
|
|
|
OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file.o \
|
|
$(LIBRETRO_COMM_DIR)/file/archive_file_zlib.o \
|
|
$(LIBRETRO_COMM_DIR)/streams/trans_stream.o \
|
|
$(LIBRETRO_COMM_DIR)/streams/trans_stream_pipe.o \
|
|
$(LIBRETRO_COMM_DIR)/encodings/encoding_deflate.o \
|
|
$(LIBRETRO_COMM_DIR)/streams/trans_stream_deflate.o \
|
|
$(LIBRETRO_COMM_DIR)/streams/rzip_stream.o
|
|
|
|
# The ZIP archive backend decodes DEFLATE through the built-in inflate when
|
|
# zlib is not present, so ZIP/APK extraction is always available.
|
|
HAVE_COMPRESSION = 1
|
|
|
|
ifeq ($(HAVE_7ZIP),1)
|
|
HAVE_COMPRESSION = 1
|
|
DEFINES += -DHAVE_7ZIP
|
|
7ZOBJ = $(LIBRETRO_COMM_DIR)/formats/7z/r7z_archive.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/7z/r7z_lzma.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/7z/r7z_lzma_stream.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/7z/r7z_lzma2.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/7z/r7z_bcj2.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/7z/r7z_filters.o
|
|
|
|
OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file_7z.o \
|
|
$(7ZOBJ)
|
|
endif
|
|
|
|
# The built-in RAR reader: no dependency, on unless configured off.
|
|
HAVE_RRAR ?= 1
|
|
ifeq ($(HAVE_RRAR),1)
|
|
DEFINES += -DHAVE_RRAR
|
|
OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file_rar.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/rar/rrar_archive.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/rar/rrar_ppmd7.o
|
|
else ifeq ($(HAVE_7ZIP),1)
|
|
# 7z's PPMd shares the RAR reader's model.
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/rar/rrar_ppmd7.o
|
|
endif
|
|
|
|
# The built-in bzip2 decoder: one C file, no dependency.
|
|
HAVE_RBZIP2 ?= 1
|
|
ifeq ($(HAVE_RBZIP2),1)
|
|
DEFINES += -DHAVE_RBZIP2
|
|
OBJ += $(LIBRETRO_COMM_DIR)/encodings/encoding_rbzip2.o \
|
|
$(LIBRETRO_COMM_DIR)/file/archive_file_bz2.o
|
|
endif
|
|
|
|
# The built-in Zstandard codec: one C file, no dependency.
|
|
ifeq ($(HAVE_RZSTD),1)
|
|
DEFINES += -DHAVE_RZSTD
|
|
OBJ += $(LIBRETRO_COMM_DIR)/encodings/encoding_rzstd.o \
|
|
$(LIBRETRO_COMM_DIR)/streams/trans_stream_rzstd.o
|
|
endif
|
|
|
|
|
|
# The archive backend needs one decoder, not a particular one. Testing
|
|
# the two concatenated would be wrong: "00" is not empty.
|
|
ifeq ($(HAVE_RZSTD),1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file_zstd.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RMODTRACKER), 1)
|
|
DEFINES += -DHAVE_RMODTRACKER
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/mod/rmodtracker.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RAAC), 1)
|
|
DEFINES += -DHAVE_RAAC
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/aac/raac.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_ROPUS), 1)
|
|
DEFINES += -DHAVE_ROPUS
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/opus/ropus.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RFLAC),1)
|
|
DEFINES += -DHAVE_RFLAC
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/flac/rflac.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_FLAC),1)
|
|
DEFINES += -DHAVE_FLAC
|
|
LIBS += $(FLAC_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_RVORBIS),1)
|
|
DEFINES += -DHAVE_RVORBIS
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/vorbis/rvorbis.o
|
|
endif
|
|
|
|
# System zlib is optional. When it is absent every consumer
|
|
# (archive_file_zlib, libchdr's zlib codec, trans_stream) falls back to the
|
|
# clean-room DEFLATE/inflate codec in encodings/deflate.c, which is always
|
|
# part of the base object list above.
|
|
ifeq ($(HAVE_ZLIB),1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/streams/trans_stream_zlib.o
|
|
DEFINES += -DHAVE_ZLIB
|
|
LIBS += $(ZLIB_LIBS)
|
|
endif
|
|
|
|
# Which CHD reader streams/chd_stream.c is built against. HAVE_RCHD
|
|
# selects formats/chd/rchd.c and none of libchdr is compiled; without it,
|
|
# libchdr, exactly as before. Nested rather than testing the two flags
|
|
# concatenated, because an explicit HAVE_RCHD=0 is not the same string as
|
|
# an unset one and would fall through both arms.
|
|
ifeq ($(HAVE_CHD), 1)
|
|
ifeq ($(HAVE_RCHD), 1)
|
|
DEFINES += -DHAVE_CHD -DHAVE_RCHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR
|
|
OBJ += $(LIBRETRO_COMM_DIR)/streams/chd_stream.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/chd/rchd.o
|
|
# rchd calls these directly where the libchdr path reached them
|
|
# through libchdr's own wrappers. encoding_huffman is not optional:
|
|
# a version 5 map is Huffman-coded, so it is needed to open an image
|
|
# at all, whatever codecs the hunks use.
|
|
OBJ += $(LIBRETRO_COMM_DIR)/encodings/encoding_huffman.o
|
|
DEFINES += -DHAVE_RCHD_DEFLATE -DHAVE_RCHD_LZMA
|
|
ifneq ($(filter 1,$(HAVE_FLAC) $(HAVE_RFLAC)),)
|
|
DEFINES += -DHAVE_RCHD_FLAC
|
|
ifneq ($(HAVE_RFLAC),1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/flac/rflac.o
|
|
endif
|
|
endif
|
|
ifeq ($(HAVE_RZSTD), 1)
|
|
DEFINES += -DHAVE_RCHD_ZSTD
|
|
endif
|
|
ifneq ($(HAVE_7ZIP), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/7z/r7z_lzma.o
|
|
endif
|
|
else
|
|
INCLUDE_DIRS += -I$(LIBRETRO_COMM_DIR)/formats/libchdr
|
|
DEFINES += -DHAVE_CHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR
|
|
ifeq ($(HAVE_STATIC_CORES), 1)
|
|
DEFINES += -Dbitstream_overflow=retroarch_internal_bitstream_overflow
|
|
DEFINES += -Dcreate_bitstream=retroarch_internal_create_bitstream
|
|
DEFINES += -Dbitstream_peek=retroarch_internal_bitstream_peek
|
|
DEFINES += -Dbitstream_remove=retroarch_internal_bitstream_remove
|
|
DEFINES += -Dbitstream_read=retroarch_internal_bitstream_read
|
|
DEFINES += -Dbitstream_read_offset=retroarch_internal_bitstream_read_offset
|
|
DEFINES += -Dbitstream_flush=retroarch_internal_bitstream_flush
|
|
|
|
DEFINES += -Decc_compute_bytes=retroarch_internal_ecc_compute_bytes
|
|
DEFINES += -Decc_verify=retroarch_internal_ecc_verify
|
|
DEFINES += -Decc_generate=retroarch_internal_ecc_generate
|
|
DEFINES += -Decc_clear=retroarch_internal_ecc_clear
|
|
|
|
DEFINES += -Ds_cd_sync_header=retroarch_internal_s_cd_sync_header
|
|
DEFINES += -Dchd_open_file=retroarch_internal_chd_open_file
|
|
DEFINES += -Dchd_precache=retroarch_internal_chd_precache
|
|
DEFINES += -Dchd_open=retroarch_internal_chd_open
|
|
DEFINES += -Dchd_close=retroarch_internal_chd_close
|
|
DEFINES += -Dchd_core_file=retroarch_internal_chd_core_file
|
|
DEFINES += -Dchd_error_string=retroarch_internal_chd_error_string
|
|
DEFINES += -Dchd_get_header=retroarch_internal_chd_get_header
|
|
DEFINES += -Dchd_read=retroarch_internal_chd_read
|
|
DEFINES += -Dchd_get_metadata=retroarch_internal_chd_get_metadata
|
|
DEFINES += -Dchd_codec_config=retroarch_internal_chd_codec_config
|
|
DEFINES += -Dchd_get_codec_name=retroarch_internal_chd_get_codec_name
|
|
|
|
DEFINES += -Dcreate_huffman_decoder=retroarch_internal_create_huffman_decoder
|
|
DEFINES += -Ddelete_huffman_decoder=retroarch_internal_delete_huffman_decoder
|
|
DEFINES += -Dhuffman_decode_one=retroarch_internal_huffman_decode_one
|
|
DEFINES += -Dhuffman_import_tree_rle=retroarch_internal_huffman_import_tree_rle
|
|
DEFINES += -Dhuffman_import_tree_huffman=retroarch_internal_huffman_import_tree_huffman
|
|
DEFINES += -Dhuffman_compute_tree_from_histo=retroarch_internal_huffman_compute_tree_from_histo
|
|
DEFINES += -Dhuffman_build_tree=retroarch_internal_huffman_build_tree
|
|
DEFINES += -Dhuffman_assign_canonical_codes=retroarch_internal_huffman_assign_canonical_codes
|
|
DEFINES += -Dhuffman_build_lookup_table=retroarch_internal_huffman_build_lookup_table
|
|
|
|
DEFINES += -Dcdzl_codec_init=retroarch_internal_cdzl_codec_init
|
|
DEFINES += -Dcdzl_codec_free=retroarch_internal_cdzl_codec_free
|
|
DEFINES += -Dcdzl_codec_decompress=retroarch_internal_cdzl_codec_decompress
|
|
DEFINES += -Dzlib_codec_init=retroarch_internal_zlib_codec_init
|
|
DEFINES += -Dzlib_codec_free=retroarch_internal_zlib_codec_free
|
|
DEFINES += -Dzlib_codec_decompress=retroarch_internal_zlib_codec_decompress
|
|
DEFINES += -Dzlib_fast_alloc=retroarch_internal_zlib_fast_alloc
|
|
DEFINES += -Dzlib_fast_free=retroarch_internal_zlib_fast_free
|
|
|
|
DEFINES += -Dchdstream_open=retroarch_internal_chdstream_open
|
|
DEFINES += -Dchdstream_close=retroarch_internal_chdstream_close
|
|
DEFINES += -Dchdstream_read=retroarch_internal_chdstream_read
|
|
DEFINES += -Dchdstream_getc=retroarch_internal_chdstream_getc
|
|
DEFINES += -Dchdstream_gets=retroarch_internal_chdstream_gets
|
|
DEFINES += -Dchdstream_tell=retroarch_internal_chdstream_tell
|
|
DEFINES += -Dchdstream_rewind=retroarch_internal_chdstream_rewind
|
|
DEFINES += -Dchdstream_seek=retroarch_internal_chdstream_seek
|
|
DEFINES += -Dchdstream_get_size=retroarch_internal_chdstream_get_size
|
|
DEFINES += -Dchdstream_get_track_start=retroarch_internal_chdstream_get_track_start
|
|
DEFINES += -Dchdstream_get_frame_size=retroarch_internal_chdstream_get_frame_size
|
|
DEFINES += -Dchdstream_get_first_track_sector=retroarch_internal_chdstream_get_first_track_sector
|
|
|
|
DEFINES += -Dflac_decoder_init=retroarch_internal_flac_decoder_init
|
|
DEFINES += -Dflac_decoder_free=retroarch_internal_flac_decoder_free
|
|
DEFINES += -Dflac_decoder_reset=retroarch_internal_flac_decoder_reset
|
|
DEFINES += -Dflac_decoder_decode_interleaved=retroarch_internal_flac_decoder_decode_interleaved
|
|
DEFINES += -Dflac_decoder_finish=retroarch_internal_flac_decoder_finish
|
|
DEFINES += -Dflac_decoder_read_callback_static=retroarch_internal_flac_decoder_read_callback_static
|
|
DEFINES += -Dflac_decoder_read_callback=retroarch_internal_flac_decoder_read_callback
|
|
DEFINES += -Dflac_decoder_metadata_callback_static=retroarch_internal_flac_decoder_metadata_callback_static
|
|
DEFINES += -Dflac_decoder_tell_callback_static=retroarch_internal_flac_decoder_tell_callback_static
|
|
DEFINES += -Dflac_decoder_write_callback_static=retroarch_internal_flac_decoder_write_callback_static
|
|
DEFINES += -Dflac_decoder_write_callback=retroarch_internal_flac_decoder_write_callback
|
|
DEFINES += -Dflac_decoder_error_callback_static=retroarch_internal_flac_decoder_error_callback_static
|
|
DEFINES += -Dcdfl_codec_init=retroarch_internal_cdfl_codec_init
|
|
DEFINES += -Dcdfl_codec_free=retroarch_internal_cdfl_codec_free
|
|
DEFINES += -Dcdfl_codec_decompress=retroarch_internal_cdfl_codec_decompress
|
|
|
|
DEFINES += -Dlzma_allocator_init=retroarch_internal_lzma_allocator_init
|
|
DEFINES += -Dlzma_allocator_free=retroarch_internal_lzma_allocator_free
|
|
DEFINES += -Dlzma_codec_init=retroarch_internal_lzma_codec_init
|
|
DEFINES += -Dlzma_codec_free=retroarch_internal_lzma_codec_free
|
|
DEFINES += -Dlzma_codec_decompress=retroarch_internal_lzma_codec_decompress
|
|
DEFINES += -Dcdlz_codec_init=retroarch_internal_cdlz_codec_init
|
|
DEFINES += -Dcdlz_codec_free=retroarch_internal_cdlz_codec_free
|
|
DEFINES += -Dcdlz_codec_decompress=retroarch_internal_cdlz_codec_decompress
|
|
|
|
DEFINES += -Dzstd_codec_init=retroarch_internal_zstd_codec_init
|
|
DEFINES += -Dzstd_codec_free=retroarch_internal_zstd_codec_free
|
|
DEFINES += -Dzstd_codec_decompress=retroarch_internal_zstd_codec_decompress
|
|
DEFINES += -Dcdzs_codec_init=retroarch_internal_cdzs_codec_init
|
|
DEFINES += -Dcdzs_codec_free=retroarch_internal_cdzs_codec_free
|
|
DEFINES += -Dcdzs_codec_decompress=retroarch_internal_cdzs_codec_decompress
|
|
endif
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_bitstream.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_cdrom.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_chd.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_huffman.o \
|
|
$(LIBRETRO_COMM_DIR)/streams/chd_stream.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_zlib.o
|
|
|
|
ifneq ($(filter 1,$(HAVE_FLAC) $(HAVE_RFLAC)),)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_flac.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_flac_codec.o
|
|
# libchdr decodes CHD FLAC through rflac; add the object only
|
|
# when the RFLAC block has not already.
|
|
ifneq ($(HAVE_RFLAC),1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/flac/rflac.o
|
|
endif
|
|
endif
|
|
|
|
# CHD decodes LZMA through r7z_lzma. r7z_lzma.o is also part of
|
|
# the 7z backend's object list, so only add it when that is off.
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_lzma.o
|
|
ifneq ($(HAVE_7ZIP), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/7z/r7z_lzma.o
|
|
endif
|
|
|
|
# The CHD Zstandard codec decodes through whichever backend is
|
|
# configured, rzstd first. Same shape as the FLAC test above: either
|
|
# one gives libchdr a decoder, so build the wrapper for both.
|
|
ifeq ($(HAVE_RZSTD),1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_zstd.o
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_CDROM), 1)
|
|
ifeq ($(CDROM_DEBUG), 1)
|
|
DEFINES += -DCDROM_DEBUG
|
|
endif
|
|
|
|
DEFINES += -DHAVE_CDROM
|
|
OBJ += $(LIBRETRO_COMM_DIR)/cdrom/cdrom.o \
|
|
$(LIBRETRO_COMM_DIR)/vfs/vfs_implementation_cdrom.o \
|
|
$(LIBRETRO_COMM_DIR)/media/media_detect_cd.o \
|
|
tasks/task_content_disc.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RTGA), 1)
|
|
DEFINES += -DHAVE_RTGA
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/tga/rtga.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RDDS), 1)
|
|
DEFINES += -DHAVE_RDDS
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/dds/rdds.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RPNG), 1)
|
|
DEFINES += -DHAVE_RPNG
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/png/rpng.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/png/rpng_apng.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/png/rpng_encode.o \
|
|
$(LIBRETRO_COMM_DIR)/file/rpng_file.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RJPEG), 1)
|
|
DEFINES += -DHAVE_RJPEG
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/jpeg/rjpeg.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RBMP), 1)
|
|
DEFINES += -DHAVE_RBMP
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RWEBP), 1)
|
|
DEFINES += -DHAVE_RWEBP
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/webp/rwebp.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/vp8/rvp8.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RWEBM), 1)
|
|
DEFINES += -DHAVE_RWEBM
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/webm/rwebm.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/webm/rwebm_video.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/webm/rwebm_audio.o
|
|
ifneq ($(HAVE_RMP4), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/h264/rh264.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/h265/rh265.o
|
|
ifneq ($(HAVE_RVP9), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/image/image_hdr_blit.o
|
|
endif
|
|
endif
|
|
# The row-band splitter the video blits run through; the mp4 block
|
|
# adds it when building without webm.
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/image/image_blit_bands.o
|
|
ifneq ($(HAVE_RWEBP), 1)
|
|
# rwebm_video decodes VP8 tracks with rvp8, normally built with RWEBP
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/vp8/rvp8.o
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_RMP4), 1)
|
|
DEFINES += -DHAVE_RMP4
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/mp4/rmp4.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/mp4/rmp4_video.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/mp4/rmp4_audio.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/h264/rh264.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/h265/rh265.o
|
|
ifneq ($(HAVE_RVP9), 1)
|
|
# rmp4_video's H.265 Main10 arm uses the shared 10-bit / HDR
|
|
# I420->RGB blits; normally linked from the HAVE_RVP9 block below.
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/image/image_hdr_blit.o
|
|
endif
|
|
ifneq ($(HAVE_RWEBM), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/image/image_blit_bands.o
|
|
endif
|
|
ifneq ($(HAVE_RWEBP), 1)
|
|
ifneq ($(HAVE_RWEBM), 1)
|
|
# rmp4_video decodes VP8 tracks with rvp8, normally built with RWEBP
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/vp8/rvp8.o
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_RAV1), 1)
|
|
DEFINES += -DHAVE_RAV1
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/av1/rav1_hw.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RVP9), 1)
|
|
DEFINES += -DHAVE_RVP9
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/vp9/rvp9.o
|
|
# Shared 10-bit / HDR I420->RGB blits, used by both the webm and mp4
|
|
# rvp9 paths; kept demuxer-independent so neither has to link the other.
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/image/image_hdr_blit.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RMPEG1), 1)
|
|
DEFINES += -DHAVE_RMPEG1
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/mpeg1/rmpeg1_ps.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/mpeg1/rmpeg1_video.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/dvd/rdvd_lpcm.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/dvd/rdvd_ac3.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/dvd/rdvd_demux.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/dvd/rdvd_packet.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/dvd/rdvd_spu.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/dvd/rdvd_ifo.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/dvd/rdvd_stream.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/dvd/rdvd_source.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/dvd/rdvd_vfs.o
|
|
# MPEG-1 audio is layer II, which rmp3 already decodes; a consumer that
|
|
# wants sound from an MPEG-1 stream needs HAVE_RMP3 as well.
|
|
endif
|
|
|
|
ifeq ($(HAVE_WEBMPLAYER), 1)
|
|
DEFINES += -DHAVE_WEBMPLAYER
|
|
OBJ += cores/libretro-media/media_core.o
|
|
endif
|
|
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp_encode.o \
|
|
$(LIBRETRO_COMM_DIR)/file/rbmp_file.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/json/rjson.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/image_transfer.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/video_player.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/audio_transfer.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/data_transfer.o \
|
|
$(LIBRETRO_COMM_DIR)/memmap/memmap.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/m3u/rm3u.o
|
|
|
|
# Video4Linux 2
|
|
|
|
ifeq ($(HAVE_V4L2),1)
|
|
OBJ += camera/drivers/video4linux2.o
|
|
ifeq ($(HAVE_VIDEOPROCESSOR),1)
|
|
DEFINES += -DHAVE_VIDEOPROCESSOR
|
|
OBJ += cores/libretro-video-processor/video_processor_v4l2.o
|
|
endif
|
|
DEFINES += -DHAVE_V4L2
|
|
LIBS += $(V4L2_LIBS)
|
|
endif
|
|
|
|
# AVFoundation camera + recording (Apple, macOS 10.7+ / iOS). The
|
|
# 10.7 gate is enforced in qb/config.libs.sh (see the HAVE_AVF block
|
|
# there); this section just wires the object files and frameworks in
|
|
# when HAVE_AVF is on.
|
|
ifeq ($(HAVE_AVF), 1)
|
|
DEFINES += -DHAVE_AVF
|
|
OBJ += camera/drivers/avfoundation.o \
|
|
record/drivers/record_avfoundation.o
|
|
LIBS += -framework AVFoundation -framework CoreVideo \
|
|
-framework CoreMedia -framework Accelerate
|
|
ifeq ($(HAVE_COCOATOUCH), 1)
|
|
LIBS += -framework UIKit
|
|
endif
|
|
endif
|
|
|
|
# FFmpeg
|
|
|
|
ifeq ($(HAVE_FFMPEG), 1)
|
|
DEFINES += -DHAVE_FFMPEG
|
|
INCLUDE_DIRS += -Iffmpeg
|
|
DEF_FLAGS += $(FFMPEG_CFLAGS) -Wno-deprecated-declarations
|
|
LIBS += $(FFMPEG_LIBS)
|
|
|
|
ifeq ($(HAVE_AVCODEC), 1)
|
|
DEFINES += -DHAVE_AVCODEC
|
|
DEF_FLAGS += $(AVCODEC_CFLAGS)
|
|
LIBS += $(AVCODEC_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_AVDEVICE), 1)
|
|
DEFINES += -DHAVE_AVDEVICE
|
|
DEF_FLAGS += $(AVDEVICE_CFLAGS)
|
|
LIBS += $(AVDEVICE_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_AVFORMAT), 1)
|
|
DEFINES += -DHAVE_AVFORMAT
|
|
DEF_FLAGS += $(AVFORMAT_CFLAGS)
|
|
LIBS += $(AVFORMAT_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_AVUTIL), 1)
|
|
DEFINES += -DHAVE_AVUTIL
|
|
DEF_FLAGS += $(AVUTIL_CFLAGS)
|
|
LIBS += $(AVUTIL_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_SWSCALE), 1)
|
|
DEFINES += -DHAVE_SWSCALE
|
|
DEF_FLAGS += $(SWSCALE_CFLAGS)
|
|
LIBS += $(SWSCALE_LIBS)
|
|
endif
|
|
|
|
ifeq ($(HAVE_SWRESAMPLE), 1)
|
|
DEFINES += -DHAVE_SWRESAMPLE
|
|
DEF_FLAGS += $(SWRESAMPLE_CFLAGS)
|
|
LIBS += $(SWRESAMPLE_LIBS)
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_FFMPEG), 1)
|
|
ifeq ($(HAVE_AVFORMAT), 1)
|
|
ifeq ($(HAVE_AVDEVICE), 1)
|
|
ifeq ($(HAVE_AVCODEC), 1)
|
|
ifeq ($(HAVE_AVUTIL), 1)
|
|
ifeq ($(HAVE_SWSCALE), 1)
|
|
OBJ += camera/drivers/ffmpeg.o
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
# Accessibility
|
|
ifeq ($(HAVE_ACCESSIBILITY), 1)
|
|
DEFINES += -DHAVE_ACCESSIBILITY
|
|
|
|
ifeq ($(HAVE_SAPI), 1)
|
|
ifneq ($(findstring Win32,$(OS)),)
|
|
LIBS += -lsapi
|
|
endif
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Things that depend on network availability
|
|
|
|
ifeq ($(HAVE_NETWORKING), 1)
|
|
DEFINES += -DHAVE_NETWORKING
|
|
OBJ += $(LIBRETRO_COMM_DIR)/net/net_compat.o \
|
|
$(LIBRETRO_COMM_DIR)/net/net_http.o \
|
|
$(LIBRETRO_COMM_DIR)/net/net_http_parse.o \
|
|
$(LIBRETRO_COMM_DIR)/net/net_socket.o \
|
|
core_updater_list.o \
|
|
network/natt.o \
|
|
network/natt_desc.o \
|
|
tasks/task_netplay_lan_scan.o \
|
|
tasks/task_netplay_nat_traversal.o \
|
|
tasks/task_pl_thumbnail_download.o \
|
|
tasks/task_netplay_find_content.o
|
|
|
|
ifeq ($(HAVE_EMSCRIPTEN), 1)
|
|
OBJ += tasks/task_http_emscripten.o
|
|
else
|
|
OBJ += tasks/task_http.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_MENU_COMMON), 1)
|
|
OBJ += tasks/task_core_updater.o
|
|
endif
|
|
|
|
ifneq ($(findstring Linux,$(OS)),)
|
|
HAVE_CLOUDSYNC = 1
|
|
endif
|
|
|
|
ifneq ($(findstring Win,$(OS)),)
|
|
HAVE_CLOUDSYNC = 1
|
|
endif
|
|
|
|
ifeq ($(HAVE_CLOUDSYNC), 1)
|
|
DEFINES += -DHAVE_CLOUDSYNC
|
|
OBJ += tasks/task_cloudsync.o \
|
|
tasks/task_cloudsync_path.o \
|
|
network/cloud_sync/webdav.o \
|
|
network/cloud_sync_driver.o
|
|
ifeq ($(HAVE_SSL), 1)
|
|
OBJ += network/cloud_sync/google_drive.o
|
|
endif
|
|
ifneq (,$(filter 1,$(HAVE_SMBCLIENT) $(HAVE_RETROSMB)))
|
|
OBJ += network/cloud_sync/smb.o
|
|
endif
|
|
ifeq ($(HAVE_RETRONFS), 1)
|
|
OBJ += network/cloud_sync/nfs.o
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_RETROSSL), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/net/net_socket_ssl_retro.o \
|
|
network/tls_log.o
|
|
else ifeq ($(HAVE_BEARSSL), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/net/net_socket_ssl_bear.o
|
|
else ifeq ($(HAVE_MBEDTLS), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/net/net_socket_ssl_mbed.o \
|
|
network/tls_log.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_IFINFO), 1)
|
|
DEFINES += -DHAVE_IFINFO
|
|
OBJ += $(LIBRETRO_COMM_DIR)/net/net_ifinfo.o
|
|
endif
|
|
|
|
ifeq ($(WANT_IFADDRS), 1)
|
|
DEFINES += -DWANT_IFADDRS
|
|
OBJ += $(LIBRETRO_COMM_DIR)/compat/compat_ifaddrs.o
|
|
endif
|
|
|
|
ifneq ($(findstring Win32,$(OS)),)
|
|
LIBS += -lws2_32 -liphlpapi
|
|
endif
|
|
|
|
# Netplay
|
|
DEFINES += -DHAVE_NETWORK_CMD
|
|
OBJ += \
|
|
network/netplay/netplay_frontend.o \
|
|
network/netplay/netplay_room_parse.o
|
|
|
|
# RetroAchievements
|
|
ifeq ($(HAVE_CHEEVOS), 1)
|
|
DEFINES += -DHAVE_CHEEVOS -DRC_CLIENT_SUPPORTS_HASH
|
|
INCLUDE_DIRS += -Ideps/rcheevos/include
|
|
|
|
# rc_compat carries native recursive mutexes for the consoles
|
|
# that build threaded, so only a thread-less build compiles
|
|
# the locks out.
|
|
ifneq ($(HAVE_THREADS), 1)
|
|
DEFINES += -DRC_NO_THREADS
|
|
endif
|
|
|
|
OBJ += cheevos/cheevos.o \
|
|
cheevos/cheevos_client.o \
|
|
cheevos/cheevos_menu.o \
|
|
cheevos/cheevos_badge.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/cdfs/cdfs.o \
|
|
deps/rcheevos/src/rc_client.o \
|
|
deps/rcheevos/src/rc_compat.o \
|
|
deps/rcheevos/src/rc_libretro.o \
|
|
deps/rcheevos/src/rc_util.o \
|
|
deps/rcheevos/src/rcheevos/alloc.o \
|
|
deps/rcheevos/src/rcheevos/condition.o \
|
|
deps/rcheevos/src/rcheevos/condset.o \
|
|
deps/rcheevos/src/rcheevos/consoleinfo.o \
|
|
deps/rcheevos/src/rcheevos/format.o \
|
|
deps/rcheevos/src/rcheevos/lboard.o \
|
|
deps/rcheevos/src/rcheevos/memref.o \
|
|
deps/rcheevos/src/rcheevos/operand.o \
|
|
deps/rcheevos/src/rcheevos/richpresence.o \
|
|
deps/rcheevos/src/rcheevos/runtime.o \
|
|
deps/rcheevos/src/rcheevos/runtime_progress.o \
|
|
deps/rcheevos/src/rcheevos/trigger.o \
|
|
deps/rcheevos/src/rcheevos/value.o \
|
|
deps/rcheevos/src/rhash/cdreader.o \
|
|
deps/rcheevos/src/rhash/hash.o \
|
|
deps/rcheevos/src/rhash/hash_disc.o \
|
|
deps/rcheevos/src/rhash/hash_encrypted.o \
|
|
deps/rcheevos/src/rhash/hash_rom.o \
|
|
deps/rcheevos/src/rhash/hash_zip.o \
|
|
deps/rcheevos/src/rapi/rc_api_common.o \
|
|
deps/rcheevos/src/rapi/rc_api_info.o \
|
|
deps/rcheevos/src/rapi/rc_api_runtime.o \
|
|
deps/rcheevos/src/rapi/rc_api_user.o \
|
|
|
|
# RVZ disc images for RetroAchievements: formats/rvz, which takes
|
|
# Zstandard for the groups and AES to encrypt the Wii partitions
|
|
# again. A build without the crypto library gets its AES alone,
|
|
# crypto.o without the rest of the library or HAVE_CRYPTO.
|
|
HAVE_CHEEVOS_RVZ ?= $(if $(filter 1,$(HAVE_RZSTD)),1,0)
|
|
ifeq ($(HAVE_CHEEVOS_RVZ), 1)
|
|
DEFINES += -DHAVE_CHEEVOS_RVZ
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/rvz/rvz.o
|
|
# bzip2 groups, decoded as the archive layer does
|
|
ifneq ($(HAVE_RBZIP2), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/encodings/encoding_rbzip2.o
|
|
endif
|
|
ifneq ($(HAVE_CRYPTO), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/crypto/crypto.o
|
|
endif
|
|
# LZMA and LZMA2 groups, decoded as the 7z backend does
|
|
ifneq ($(HAVE_7ZIP), 1)
|
|
OBJ += $(LIBRETRO_COMM_DIR)/formats/7z/r7z_lzma_stream.o \
|
|
$(LIBRETRO_COMM_DIR)/formats/7z/r7z_lzma2.o
|
|
endif
|
|
endif
|
|
|
|
# The hashes' AES (3DS titles) is the crypto library's wherever
|
|
# crypto.o is built, rcheevos' own elsewhere.
|
|
ifneq ($(filter 1,$(HAVE_CRYPTO) $(HAVE_CHEEVOS_RVZ)),)
|
|
OBJ += cheevos/cheevos_aes.o
|
|
else
|
|
OBJ += deps/rcheevos/src/rhash/aes.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_LUA), 1)
|
|
DEFINES += -DHAVE_LUA \
|
|
-DLUA_32BITS
|
|
INCLUDE_DIRS += -Ideps/lua/src
|
|
OBJ += deps/lua/src/lapi.o \
|
|
deps/lua/src/lcode.o \
|
|
deps/lua/src/lctype.o \
|
|
deps/lua/src/ldebug.o \
|
|
deps/lua/src/ldo.o \
|
|
deps/lua/src/ldump.o \
|
|
deps/lua/src/lfunc.o \
|
|
deps/lua/src/lgc.o \
|
|
deps/lua/src/llex.o \
|
|
deps/lua/src/lmem.o \
|
|
deps/lua/src/lobject.o \
|
|
deps/lua/src/lopcodes.o \
|
|
deps/lua/src/lparser.o \
|
|
deps/lua/src/lstate.o \
|
|
deps/lua/src/lstring.o \
|
|
deps/lua/src/ltable.o \
|
|
deps/lua/src/ltm.o \
|
|
deps/lua/src/lundump.o \
|
|
deps/lua/src/lvm.o \
|
|
deps/lua/src/lzio.o \
|
|
deps/lua/src/lauxlib.o \
|
|
deps/lua/src/lbaselib.o \
|
|
deps/lua/src/lbitlib.o \
|
|
deps/lua/src/lcorolib.o \
|
|
deps/lua/src/ldblib.o \
|
|
deps/lua/src/liolib.o \
|
|
deps/lua/src/lmathlib.o \
|
|
deps/lua/src/loslib.o \
|
|
deps/lua/src/lstrlib.o \
|
|
deps/lua/src/ltablib.o \
|
|
deps/lua/src/lutf8lib.o \
|
|
deps/lua/src/loadlib.o \
|
|
deps/lua/src/linit.o
|
|
else
|
|
DEFINES += -DRC_DISABLE_LUA
|
|
endif
|
|
|
|
endif
|
|
|
|
ifeq ($(HAVE_DISCORD), 1)
|
|
HAVE_PRESENCE = 1
|
|
DEFINES += -DHAVE_DISCORD
|
|
|
|
OBJ += network/discord.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_TRANSLATE), 1)
|
|
DEFINES += -DHAVE_TRANSLATE
|
|
endif
|
|
|
|
ifeq ($(HAVE_NETWORKGAMEPAD), 1)
|
|
OBJ += cores/libretro-net-retropad/net_retropad_core.o
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(findstring FPGA,$(OS)),)
|
|
OBJ += gfx/drivers/fpga_gfx.o
|
|
endif
|
|
|
|
ifneq ($(findstring Win32,$(OS)),)
|
|
OBJ += media/rarch.o \
|
|
gfx/common/win32_common.o \
|
|
frontend/drivers/platform_win32.o \
|
|
gfx/display_servers/dispserv_win32.o \
|
|
gfx/common/dx_guids.o
|
|
|
|
# Scanline Sync. Despite the name, D3DKMT is the kernel-mode thunk
|
|
# into dxgkrnl.sys rather than Direct3D: gdi32 forwards
|
|
# D3DKMTGetScanLine to ext-ms-win-dx-d3dkmt-dxcore, the adapter is
|
|
# opened from a plain GDI HDC via EnumDisplayDevices()/CreateDC(),
|
|
# and d3dkmt_init() runs from win32_window_init(), which every win32
|
|
# video driver calls - w_vk_ctx, wgl_ctx, gdi and sdl2 as much as
|
|
# the d3d ones. It lives in win32_common.c, so gate it the same way
|
|
# that object is gated. It used to be defined only as a side effect
|
|
# of HAVE_D3D12, which silently dropped the feature from a
|
|
# Vulkan-or-GL-only Windows build.
|
|
DEFINES += -DHAVE_D3DKMT
|
|
INCLUDE_DIRS += -isystemgfx/include/dxsdk
|
|
|
|
# Legacy pre-DXGI GUID storage in their own TUs to avoid clashes
|
|
# between system <d3d8types.h> / <d3d9types.h> and the bundled
|
|
# <dxsdk/dxgitype.h>. See dx_guids.c header comment.
|
|
ifeq ($(HAVE_D3D9), 1)
|
|
OBJ += gfx/common/dx_guids_d3d9.o
|
|
endif
|
|
ifeq ($(HAVE_D3D8), 1)
|
|
OBJ += gfx/common/dx_guids_d3d8.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_GDI), 1)
|
|
OBJ += gfx/drivers/gdi_gfx.o
|
|
LIBS += -lmsimg32
|
|
endif
|
|
LIBS += -lhid -lsetupapi
|
|
endif
|
|
|
|
ifeq ($(HAVE_ANGLE), 1)
|
|
OBJ += gfx/common/angle_common.o
|
|
DEFINES += -DHAVE_ANGLE
|
|
endif
|
|
|
|
# Record
|
|
|
|
ifeq ($(HAVE_FFMPEG), 1)
|
|
OBJ += record/drivers/record_ffmpeg.o \
|
|
cores/libretro-ffmpeg/ffmpeg_core.o
|
|
|
|
LIBS += $(AVCODEC_LIBS) $(AVFORMAT_LIBS) $(AVUTIL_LIBS) $(SWSCALE_LIBS) $(SWRESAMPLE_LIBS) $(FFMPEG_LIBS) $(AVDEVICE_LIBS)
|
|
DEFINES += -DHAVE_FFMPEG
|
|
DEF_FLAGS += $(AVCODEC_CFLAGS) $(AVFORMAT_CFLAGS) $(AVUTIL_CFLAGS) $(SWSCALE_CFLAGS) $(SWRESAMPLE_CFLAGS) \
|
|
-Wno-deprecated-declarations
|
|
INCLUDE_DIRS += -Iffmpeg
|
|
endif
|
|
|
|
# Video modeline engine (CRT mode switching is its first consumer)
|
|
ifeq ($(HAVE_CRTSWITCHRES), 1)
|
|
HAVE_MODELINE = 1
|
|
endif
|
|
ifeq ($(HAVE_MODELINE), 1)
|
|
DEFINES += -DHAVE_MODELINE
|
|
OBJ += gfx/video_crt_switch.o \
|
|
gfx/modeline/modeline_core.o \
|
|
gfx/modeline/modeline_monitor.o \
|
|
gfx/modeline/modeline_list.o \
|
|
gfx/modeline/modeline_ini.o \
|
|
gfx/modeline/modeline_edid.o
|
|
ifneq ($(findstring Win32,$(OS)),)
|
|
OBJ += gfx/display_servers/win32_modeline_resync.o \
|
|
gfx/display_servers/win32_modeline_adl.o \
|
|
gfx/display_servers/win32_modeline_ati.o \
|
|
gfx/display_servers/win32_modeline_pstrip.o
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_COMPRESSION), 1)
|
|
DEFINES += -DHAVE_COMPRESSION
|
|
OBJ += tasks/task_decompress.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_COCOA), 1)
|
|
DEFINES += -DHAVE_MAIN -DTARGET_OS_OSX=1 -DHAVE_COCOA
|
|
OBJ += input/drivers/cocoa_input.o \
|
|
ui/drivers/ui_cocoa.o \
|
|
ui/drivers/ui_cocoa_companion.o \
|
|
ui/drivers/cocoa/cocoa_common.o
|
|
# HAVE_COCOA_COMMON is only known here, after the companion-core
|
|
# block above ran; add the shared core if Qt/Win32 did not already.
|
|
ifneq ($(HAVE_COMPANION_CORE), 1)
|
|
OBJ += ui/companion/companion_core.o ui/companion/companion_thumbs.o ui/companion/companion_dock.o
|
|
HAVE_COMPANION_CORE = 1
|
|
endif
|
|
# RetroArchPlaylistManager uses Obj-C lightweight generics and
|
|
# nullability macros (Xcode 7+, 2015). It's fine on iOS/tvOS and
|
|
# modern macOS (10.11+), but GCC 4.0 / old clang on pre-10.11
|
|
# macOS SDKs can't parse the syntax. HAVE_RETROARCH_PLAYLIST_MANAGER
|
|
# is set by qb/config.libs.sh based on the macOS target version
|
|
# (or HAVE_COCOATOUCH on iOS/tvOS).
|
|
ifeq ($(HAVE_RETROARCH_PLAYLIST_MANAGER), 1)
|
|
OBJ += ui/drivers/cocoa/RetroArchPlaylistManager.o
|
|
endif
|
|
LIBS += -framework Cocoa -framework AppKit -framework Foundation
|
|
|
|
ifeq ($(HAVE_OPENGL), 1)
|
|
DEFINES += -DGL_SILENCE_DEPRECATION
|
|
OBJ += gfx/drivers_context/cocoa_gl_ctx.o
|
|
endif
|
|
ifeq ($(HAVE_VULKAN), 1)
|
|
OBJ += gfx/drivers_context/cocoa_vk_ctx.o
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(findstring DOS,$(OS)),)
|
|
OBJ += gfx/drivers/vga_gfx.o \
|
|
input/drivers/dos_input.o \
|
|
input/drivers_joypad/dos_joypad.o \
|
|
frontend/drivers/platform_dos.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_STATIC_VIDEO_FILTERS), 1)
|
|
OBJ += gfx/video_filters/2xsai.o \
|
|
gfx/video_filters/super2xsai.o \
|
|
gfx/video_filters/supereagle.o \
|
|
gfx/video_filters/2xbr.o \
|
|
gfx/video_filters/darken.o \
|
|
gfx/video_filters/epx.o \
|
|
gfx/video_filters/scale2x.o \
|
|
gfx/video_filters/blargg_ntsc_snes.o \
|
|
gfx/video_filters/lq2x.o \
|
|
gfx/video_filters/phosphor2x.o \
|
|
gfx/video_filters/normal2x.o \
|
|
gfx/video_filters/normal2x_width.o \
|
|
gfx/video_filters/normal2x_height.o \
|
|
gfx/video_filters/normal4x.o \
|
|
gfx/video_filters/scanline2x.o \
|
|
gfx/video_filters/grid2x.o \
|
|
gfx/video_filters/grid3x.o \
|
|
gfx/video_filters/gameboy3x.o \
|
|
gfx/video_filters/gameboy4x.o \
|
|
gfx/video_filters/dot_matrix_3x.o \
|
|
gfx/video_filters/dot_matrix_4x.o \
|
|
gfx/video_filters/upscale_1_5x.o \
|
|
gfx/video_filters/upscale_1_66x_fast.o \
|
|
gfx/video_filters/upscale_256x_320x240.o \
|
|
gfx/video_filters/picoscale_256x_320x240.o \
|
|
gfx/video_filters/upscale_240x160_320x240.o \
|
|
gfx/video_filters/upscale_mix_240x160_320x240.o \
|
|
gfx/video_filters/dedither.o \
|
|
gfx/video_filters/pixel_art_aa.o \
|
|
gfx/video_filters/crop_borders.o \
|
|
gfx/video_filters/ntsc.o \
|
|
gfx/video_filters/ntsc_crt.o
|
|
endif
|
|
|
|
ifeq ($(WANT_IOSUHAX), 1)
|
|
DEFINES += -DHAVE_IOSUHAX
|
|
# libfat includes iosuhax_disc_interface.h by name
|
|
INCLUDE_DIRS += -Ios/wiiu/fs
|
|
OBJ += os/wiiu/fs/iosuhax.o
|
|
endif
|
|
|
|
ifeq ($(WANT_LIBFAT), 1)
|
|
DEFINES += -DHAVE_LIBFAT
|
|
INCLUDE_DIRS += -I$(DEPS_DIR)/libfat/include
|
|
OBJ += $(DEPS_DIR)/libfat/cache.o \
|
|
$(DEPS_DIR)/libfat/directory.o \
|
|
$(DEPS_DIR)/libfat/disc.o \
|
|
$(DEPS_DIR)/libfat/fatdir.o \
|
|
$(DEPS_DIR)/libfat/fatfile.o \
|
|
$(DEPS_DIR)/libfat/file_allocation_table.o \
|
|
$(DEPS_DIR)/libfat/filetime.o \
|
|
$(DEPS_DIR)/libfat/libfat.o \
|
|
$(DEPS_DIR)/libfat/lock.o \
|
|
$(DEPS_DIR)/libfat/partition.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_STATIC_AUDIO_FILTERS), 1)
|
|
OBJ += libretro-common/audio/dsp_filters/bitcrusher.o \
|
|
libretro-common/audio/dsp_filters/chorus.o \
|
|
libretro-common/audio/dsp_filters/crystalizer.o \
|
|
libretro-common/audio/dsp_filters/echo.o \
|
|
libretro-common/audio/dsp_filters/eq.o \
|
|
libretro-common/audio/dsp_filters/iir.o \
|
|
libretro-common/audio/dsp_filters/overdrive.o \
|
|
libretro-common/audio/dsp_filters/panning.o \
|
|
libretro-common/audio/dsp_filters/phaser.o \
|
|
libretro-common/audio/dsp_filters/reverb.o \
|
|
libretro-common/audio/dsp_filters/reverb_early.o \
|
|
libretro-common/audio/dsp_filters/tremolo.o \
|
|
libretro-common/audio/dsp_filters/vibrato.o \
|
|
libretro-common/audio/dsp_filters/wahwah.o \
|
|
libretro-common/audio/dsp_filters/wsolapitchtempo.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_RPILED), 1)
|
|
OBJ += led/drivers/led_rpi.o \
|
|
led/drivers/led_sys_linux.o
|
|
endif
|
|
|
|
ifneq ($(findstring Win32,$(OS)),)
|
|
OBJ += led/drivers/led_win32_keyboard.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_X11), 1)
|
|
OBJ += led/drivers/led_x11_keyboard.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_VITAGLES), 1)
|
|
DEFINES += -DHAVE_VITAGLES
|
|
INCLUDE_DIRS += -Igfx/drivers_context/vita_pib/include
|
|
SOURCES := gfx/drivers_context/vita_pib/src
|
|
OBJ += $(patsubst %.c,%.o,$(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c)))
|
|
endif
|
|
|
|
ifeq ($(HAVE_WEBOS), 1)
|
|
DEFINES += -DWEBOS
|
|
endif
|
|
|
|
ifeq ($(HAVE_TEST_DRIVERS), 1)
|
|
DEFINES += -DHAVE_TEST_DRIVERS
|
|
OBJ += input/drivers_joypad/test_joypad.o
|
|
OBJ += input/drivers/test_input.o
|
|
endif
|
|
|
|
# The built-in NFSv3 client and its nfs:// VFS backend. Needs only
|
|
# networking; the console Makefiles do not set it.
|
|
ifeq ($(HAVE_RETRONFS), 1)
|
|
DEFINES += -DHAVE_NFSCLIENT -DHAVE_RETRONFS
|
|
OBJ += $(LIBRETRO_COMM_DIR)/net/net_nfs3.o \
|
|
$(LIBRETRO_COMM_DIR)/vfs/vfs_implementation_nfs.o
|
|
endif
|
|
|
|
# The background prefetcher the network backends read through, built
|
|
# always: statically linked cores read ahead through it too. Without
|
|
# HAVE_THREADS it is stubs.
|
|
OBJ += $(LIBRETRO_COMM_DIR)/vfs/vfs_prefetch.o
|
|
|
|
# The built-in SMB2/3 client (libretro-common/net/net_smb2.c) stands in
|
|
# for libsmb2: the same HAVE_SMBCLIENT surface for the menu, VFS and
|
|
# cloud sync, no bundled or system library, needs HAVE_CRYPTO.
|
|
ifeq ($(HAVE_RETROSMB), 1)
|
|
DEFINES += -DHAVE_SMBCLIENT -DHAVE_RETROSMB
|
|
OBJ += $(LIBRETRO_COMM_DIR)/net/net_smb2.o \
|
|
$(LIBRETRO_COMM_DIR)/net/net_krb5.o \
|
|
$(LIBRETRO_COMM_DIR)/vfs/vfs_implementation_smb.o
|
|
else ifeq ($(HAVE_SMBCLIENT), 1)
|
|
# a system libsmb2 behind the same HAVE_SMBCLIENT surface
|
|
DEFINES += -DHAVE_SMBCLIENT
|
|
# The libsmb2 public headers gate their <stdint.h> include on
|
|
# HAVE_STDINT_H (autoconf-style); every TU that includes them needs
|
|
# the define.
|
|
DEFINES += -DHAVE_STDINT_H
|
|
ifeq ($(shell pkg-config --exists libsmb2 && echo yes),yes)
|
|
CFLAGS += $(shell pkg-config --cflags libsmb2)
|
|
LIBS += $(shell pkg-config --libs libsmb2)
|
|
else
|
|
LIBS += -lsmb2
|
|
endif
|
|
OBJ += $(LIBRETRO_COMM_DIR)/vfs/vfs_implementation_smb.o
|
|
endif
|
|
|
|
#####################################
|
|
### Android Play Feature Delivery ###
|
|
### (Play Store build core ###
|
|
### downloader) ###
|
|
#####################################
|
|
ifeq ($(ANDROID), 1)
|
|
OBJ += play_feature_delivery/play_feature_delivery.o
|
|
endif
|
|
|
|
### Steam integration using mist
|
|
ifeq ($(HAVE_MIST), 1)
|
|
HAVE_PRESENCE = 1
|
|
DEFINES += -DHAVE_MIST
|
|
INCLUDE_DIRS += -I$(MIST_PATH)/include
|
|
LDFLAGS += -L$(MIST_PATH) -lmist
|
|
OBJ += steam/steam.o tasks/task_steam.o
|
|
endif
|
|
|
|
### Shared rich presence code for Discord and Steam
|
|
|
|
ifeq ($(HAVE_PRESENCE), 1)
|
|
DEFINES += -DHAVE_PRESENCE
|
|
OBJ += network/presence.o
|
|
endif
|
|
|
|
##################################
|
|
### Classic Platform specifics ###
|
|
###############WIP################
|
|
# Help at https://modmyclassic.com
|
|
|
|
ifeq ($(HAVE_CLASSIC), 1)
|
|
DEFINES += -DHAVE_CLASSIC
|
|
endif
|
|
|
|
ifeq ($(HAVE_C_A7A7), 1)
|
|
C_A7A7_OPT = -Ofast \
|
|
-fno-lto \
|
|
-fdata-sections -ffunction-sections -Wl,--gc-sections \
|
|
-fno-stack-protector -fno-ident -fomit-frame-pointer \
|
|
-falign-functions=1 -falign-jumps=1 -falign-loops=1 \
|
|
-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
|
|
-fmerge-all-constants -fno-math-errno \
|
|
-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
|
DEF_FLAGS += $(C_A7A7_OPT)
|
|
CC_VERSION := $(shell $(CC) -dumpversion)
|
|
ifneq (4.9,$(firstword $(sort $(CC_VERSION) 4.9))) # if version < 4.9
|
|
DEF_FLAGS += -march=armv7-a
|
|
else
|
|
DEF_FLAGS += -march=armv7ve
|
|
# If gcc is 5.0 or later
|
|
ifeq (5,$(firstword $(sort $(CC_VERSION) 5)))
|
|
LDFLAGS += -static-libgcc -static-libstdc++
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_HAKCHI), 1)
|
|
DEFINES += -DHAVE_HAKCHI
|
|
endif
|
|
|
|
ifeq ($(HAVE_SEGAM), 1)
|
|
DEFINES += -DHAVE_SEGAM
|
|
endif
|
|
|
|
ifeq ($(HAVE_ODROIDGO2), 1)
|
|
DEFINES += -DHAVE_ODROIDGO2
|
|
LIBS += -lrga
|
|
OBJ += gfx/drivers/oga_gfx.o
|
|
endif
|
|
|
|
ifeq ($(HAVE_GAME_AI),1)
|
|
DEFINES += -DHAVE_GAME_AI
|
|
OBJ += ai/game_ai.o
|
|
endif
|
|
|
|
# Detect the operating system
|
|
UNAME := $(shell uname -s)
|
|
|
|
# Check if the system is MSYS2 (MINGW64 or MINGW32)
|
|
ifneq ($(findstring MINGW,$(UNAME)),)
|
|
$(info Detected MSYS2 environment)
|
|
|
|
NT_VERSION := $(shell \
|
|
echo '#include <windows.h>' > temp.c; \
|
|
echo '#ifdef _WIN32_WINNT' >> temp.c; \
|
|
echo '#define GET_MACRO_VALUE(x) #x' >> temp.c; \
|
|
echo '#define EXPAND_MACRO_VALUE(x) GET_MACRO_VALUE(x)' >> temp.c; \
|
|
echo '#pragma message("_WIN32_WINNT=" EXPAND_MACRO_VALUE(_WIN32_WINNT))' >> temp.c; \
|
|
echo '#endif' >> temp.c; \
|
|
$(CC) -c temp.c 2>&1 | sed -n 's/^.*_WIN32_WINNT=\(0x[0-9A-Fa-f]\+\).*/\1/p'; \
|
|
rm -f temp.c temp.o)
|
|
|
|
ifneq ($(NT_VERSION),)
|
|
ifeq ($(shell [ $$(( $(NT_VERSION) )) -gt $$(( 0x602 )) ] && echo true),true)
|
|
LIBS += -lxaudio2_9
|
|
endif
|
|
else
|
|
$(warning Windows NT version macro (_WIN32_WINNT) is not defined.)
|
|
endif
|
|
|
|
endif
|
|
|
|
# Cross builds with mingw-w64 (a Linux host, so the MSYS2 detection
|
|
# above never fires): the toolchain ships the 2.8 import library.
|
|
ifneq (,$(findstring mingw,$(CC)$(HOST_PREFIX)))
|
|
ifeq ($(HAVE_XAUDIO), 1)
|
|
LIBS += -lxaudio2_8
|
|
endif
|
|
endif
|
|
|
|
##################################
|
|
|
|
ifneq ($(findstring Win32,$(OS)),)
|
|
ifneq ($(findstring 1,$(HAVE_VULKAN) $(WANT_WGL)),)
|
|
INCLUDE_DIRS += -isystemgfx/include/dxsdk
|
|
OBJ += gfx/common/win_dxgi_present.o
|
|
ifeq ($(HAVE_VULKAN),1)
|
|
OBJ += gfx/common/win_vulkan_dxgi.o
|
|
endif
|
|
ifeq ($(WANT_WGL),1)
|
|
OBJ += gfx/common/win_wgl_dxgi.o
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HAVE_RECORD_MEDIACODEC), 1)
|
|
ifneq ($(ANDROID)$(HAVE_VULKAN)$(HAVE_THREADS)$(HAVE_CONFIGFILE), 1111)
|
|
$(error MediaCodec recording requires Android, Vulkan, threads and config files)
|
|
endif
|
|
DEFINES += -DHAVE_RECORD_MEDIACODEC
|
|
MEDIA_RECORD_OBJ := record/record_mediacodec_encoder.o \
|
|
record/record_audio_tap.o \
|
|
record/record_mux_mediacodec.o record/record_mediacodec_worker.o \
|
|
record/record_aac_probe.o \
|
|
record/record_mp4_audio_edit.o record/record_mediacodec_file_edit.o \
|
|
record/record_mediacodec_surface.o record/record_mediacodec_file.o \
|
|
record/record_session_mediacodec.o record/record_dispatch_mediacodec.o \
|
|
record/record_gpu_dispatch_mediacodec.o record/record_mediacodec_gpu_worker.o \
|
|
record/record_android_capture_config.o record/record_android_capture_request.o \
|
|
record/record_android_capture_images.o record/record_android_capture_submit.o \
|
|
record/record_android_capture_pipe.o record/record_android_capture_pool.o \
|
|
record/record_android_capture_ops.o record/record_android_capture_egl.o \
|
|
record/record_android_capture_gl.o record/record_android_capture_draw.o \
|
|
record/record_gpu_queue.o record/record_audio_queue.o
|
|
MEDIA_RECORD_OBJ := $(filter-out $(OBJ),$(MEDIA_RECORD_OBJ))
|
|
OBJ += $(MEDIA_RECORD_OBJ)
|
|
endif
|