ROOT_DIR := . DEPS_DIR := $(ROOT_DIR)/deps LIBRETRO_COMM_DIR := $(ROOT_DIR)/libretro-common WANT_WGL = 0 ifeq ($(HAVE_STACK_USAGE), 1) CFLAGS += -fstack-usage endif ifeq ($(HAVE_GL_CONTEXT),) HAVE_GL_CONTEXT=0 ifeq ($(HAVE_OPENGL), 1) HAVE_GL_CONTEXT=1 endif ifeq ($(HAVE_OPENGLES), 1) HAVE_GL_CONTEXT=1 endif ifeq ($(HAVE_OPENGLES3), 1) HAVE_GL_CONTEXT=1 endif endif ifeq ($(HAVE_LIBRETRODB),) HAVE_LIBRETRODB = 1 endif ifeq ($(HAVE_VIDEO_PROCESSOR), 1) DEFINES += -DHAVE_VIDEO_PROCESSOR endif ifeq ($(HAVE_MENU), 1) DEFINES += -DHAVE_MENU HAVE_MENU_COMMON = 1 endif ifeq ($(HAVE_SOCKET_LEGACY), 1) DEFINES += -DHAVE_SOCKET_LEGACY endif ifeq ($(HAVE_HID), 1) DEFINES += -DHAVE_HID endif ifeq ($(HAVE_LIBRETRODB), 1) DEFINES += -DHAVE_LIBRETRODB endif ifeq ($(HAVE_VITA2D), 1) DEFINES += -DHAVE_VITA2D 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) CFLAGS += -DGL_DEBUG CXXFLAGS += -DGL_DEBUG endif ifeq ($(VULKAN_DEBUG), 1) CFLAGS += -DVULKAN_DEBUG CXXFLAGS += -DVULKAN_DEBUG endif ifeq ($(HAVE_HARD_FLOAT), 1) DEFINES += -mfloat-abi=hard endif ifeq ($(TDM_GCC),) LDCXXFLAGS += -static-libstdc++ endif ifeq ($(HAVE_FILE_LOGGER), 1) CFLAGS += -DHAVE_FILE_LOGGER endif ifeq ($(HAVE_SHADERPIPELINE), 1) CFLAGS += -DHAVE_SHADERPIPELINE endif CFLAGS += -I$(LIBRETRO_COMM_DIR)/include -I$(DEPS_DIR) # Switches ifeq ($(HAVE_NETLOGGER), 1) CFLAGS += -DHAVE_LOGGER 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 LIBS += -framework AppKit 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 endif ifeq ($(TARGET), retroarch_3ds) OBJ += frontend/drivers/platform_ctr.o endif # Git GIT_VERSION := $(shell git rev-parse --short HEAD 2>/dev/null) ifneq ($(GIT_VERSION),) DEFINES += -DHAVE_GIT_VERSION -DGIT_VERSION=$(GIT_VERSION) OBJ += version_git.o endif # General object files DEFINES += -DHAVE_DR_MP3 CFLAGS += -DHAVE_DR_MP3 OBJ += frontend/frontend.o \ frontend/frontend_driver.o \ frontend/drivers/platform_null.o \ ui/ui_companion_driver.o \ ui/drivers/ui_null.o \ ui/drivers/null/ui_null_window.o \ ui/drivers/null/ui_null_browser_window.o \ ui/drivers/null/ui_null_msg_window.o \ ui/drivers/null/ui_null_application.o \ core_impl.o \ retroarch.o \ dirs.o \ paths.o \ command.o \ msg_hash.o \ intl/msg_hash_us.o \ $(LIBRETRO_COMM_DIR)/queues/task_queue.o \ tasks/task_content.o \ tasks/task_save.o \ tasks/task_file_transfer.o \ tasks/task_image.o \ tasks/task_audio_mixer.o \ $(LIBRETRO_COMM_DIR)/encodings/encoding_utf.o \ $(LIBRETRO_COMM_DIR)/encodings/encoding_crc32.o \ $(LIBRETRO_COMM_DIR)/compat/fopen_utf8.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)/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)/vfs/vfs_implementation.o \ $(LIBRETRO_COMM_DIR)/lists/string_list.o \ $(LIBRETRO_COMM_DIR)/string/stdstring.o \ $(LIBRETRO_COMM_DIR)/memmap/memalign.o \ setting_list.o \ list_special.o \ $(LIBRETRO_COMM_DIR)/file/nbio/nbio_stdio.o \ $(LIBRETRO_COMM_DIR)/file/nbio/nbio_linux.o \ $(LIBRETRO_COMM_DIR)/file/nbio/nbio_unixmmap.o \ $(LIBRETRO_COMM_DIR)/file/nbio/nbio_windowsmmap.o \ $(LIBRETRO_COMM_DIR)/file/nbio/nbio_intf.o \ $(LIBRETRO_COMM_DIR)/file/file_path.o \ file_path_special.o \ file_path_str.o \ $(LIBRETRO_COMM_DIR)/hash/rhash.o \ audio/audio_driver.o \ $(LIBRETRO_COMM_DIR)/audio/audio_mixer.o \ input/common/input_common.o \ input/input_driver.o \ input/input_mapper.o \ led/led_driver.o \ led/drivers/led_null.o \ gfx/video_coord_array.o \ gfx/video_display_server.o \ gfx/video_driver.o \ gfx/video_crt_switch.o \ camera/camera_driver.o \ wifi/wifi_driver.o \ location/location_driver.o \ driver.o \ configuration.o \ $(LIBRETRO_COMM_DIR)/dynamic/dylib.o \ dynamic.o \ cores/dynamic_dummy.o \ $(LIBRETRO_COMM_DIR)/queues/message_queue.o \ managers/core_manager.o \ managers/state_manager.o \ gfx/drivers_font_renderer/bitmapfont.o \ tasks/task_autodetect.o \ input/input_autodetect_builtin.o \ input/input_keymaps.o \ input/input_remapping.o \ $(LIBRETRO_COMM_DIR)/queues/fifo_queue.o \ managers/core_option_manager.o \ $(LIBRETRO_COMM_DIR)/compat/compat_fnmatch.o \ $(LIBRETRO_COMM_DIR)/compat/compat_posix_string.o \ managers/cheat_manager.o \ core_info.o \ $(LIBRETRO_COMM_DIR)/file/config_file.o \ $(LIBRETRO_COMM_DIR)/file/config_file_userdata.o \ tasks/task_screenshot.o \ tasks/task_powerstate.o \ $(LIBRETRO_COMM_DIR)/gfx/scaler/scaler.o \ gfx/drivers_shader/shader_null.o \ gfx/video_shader_parse.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 \ gfx/video_filter.o \ $(LIBRETRO_COMM_DIR)/audio/resampler/audio_resampler.o \ $(LIBRETRO_COMM_DIR)/audio/dsp_filter.o \ $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler.o \ $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/nearest_resampler.o \ $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/null_resampler.o \ location/drivers/nulllocation.o \ camera/drivers/nullcamera.o \ wifi/drivers/nullwifi.o \ gfx/drivers/nullgfx.o \ gfx/display_servers/dispserv_null.o \ audio/drivers/nullaudio.o \ input/drivers/nullinput.o \ input/drivers_hid/null_hid.o \ input/drivers_joypad/null_joypad.o \ playlist.o \ movie.o \ record/record_driver.o \ record/drivers/record_null.o \ $(LIBRETRO_COMM_DIR)/features/features_cpu.o \ performance_counters.o \ verbosity.o \ ifeq ($(HAVE_RUNAHEAD), 1) DEFINES += -DHAVE_RUNAHEAD OBJ += runahead/copy_load_info.o \ runahead/dirty_input.o \ runahead/mem_util.o \ runahead/mylist.o \ runahead/run_ahead.o \ runahead/secondary_core.o endif ifeq ($(HAVE_CC_RESAMPLER), 1) DEFINES += -DHAVE_CC_RESAMPLER OBJ += audio/drivers_resampler/cc_resampler.o endif ifeq ($(HAVE_LANGEXTRA), 1) DEFINES += -DHAVE_LANGEXTRA DEFINES += -finput-charset=UTF-8 OBJ += intl/msg_hash_de.o \ intl/msg_hash_eo.o \ intl/msg_hash_es.o \ intl/msg_hash_fr.o \ intl/msg_hash_it.o \ intl/msg_hash_ja.o \ intl/msg_hash_ko.o \ intl/msg_hash_nl.o \ intl/msg_hash_pl.o \ intl/msg_hash_pt_br.o \ intl/msg_hash_pt_pt.o \ intl/msg_hash_ru.o \ intl/msg_hash_vn.o \ intl/msg_hash_chs.o \ intl/msg_hash_cht.o \ intl/msg_hash_ar.o endif ifneq ($(HAVE_GETOPT_LONG), 1) OBJ += $(LIBRETRO_COMM_DIR)/compat/compat_getopt.o endif ifneq ($(HAVE_STRCASESTR), 1) OBJ += $(LIBRETRO_COMM_DIR)/compat/compat_strcasestr.o endif ifneq ($(HAVE_STRL), 1) OBJ += $(LIBRETRO_COMM_DIR)/compat/compat_strl.o endif OBJ += $(LIBRETRO_COMM_DIR)/formats/image_texture.o ifeq ($(HAVE_IMAGEVIEWER), 1) DEFINES += -DHAVE_IMAGEVIEWER OBJ += cores/libretro-imageviewer/image_core.o endif # Qt WIMP GUI ifeq ($(HAVE_QT), 1) OBJ += ui/drivers/ui_qt.o \ ui/drivers/qt/ui_qt_application.o \ ui/drivers/qt/ui_qt_window.o \ ui/drivers/qt/ui_qt_browser_window.o \ ui/drivers/qt/ui_qt_load_core_window.o \ ui/drivers/qt/ui_qt_msg_window.o MOC_HEADERS += ui/drivers/ui_qt.h \ ui/drivers/qt/ui_qt_load_core_window.h DEFINES += $(QT5CORE_CFLAGS) $(QT5GUI_CFLAGS) $(QT5WIDGETS_CFLAGS) -DHAVE_MAIN #DEFINES += $(QT5WEBENGINE_CFLAGS) LIBS += $(QT5CORE_LIBS) $(QT5GUI_LIBS) $(QT5WIDGETS_LIBS) #LIBS += $(QT5WEBENGINE_LIBS) NEED_CXX_LINKER = 1 ifneq ($(findstring Linux,$(OS)),) DEFINES += -fPIC endif endif ifeq ($(HAVE_SSA),1) LIBS += $(SSA_LIBS) endif # LibretroDB ifeq ($(HAVE_LIBRETRODB), 1) OBJ += libretro-db/bintree.o \ libretro-db/libretrodb.o \ libretro-db/query.o \ libretro-db/rmsgpack.o \ libretro-db/rmsgpack_dom.o \ database_info.o \ tasks/task_database.o \ tasks/task_database_cue.o endif ifneq ($(C89_BUILD), 1) HAVE_LIBUI = 0 HAVE_GTKPLUS = 0 ifeq ($(HAVE_SSL), 1) DEFINES += -DHAVE_SSL DEFINES += -DMBEDTLS_SSL_DEBUG_ALL # MinGW requires this for some reason, even though the include paths are relative to the source INCLUDE_DIRS += -Ideps/mbedtls OBJS_TLS_CRYPTO = deps/mbedtls/aes.o deps/mbedtls/aesni.o deps/mbedtls/arc4.o \ deps/mbedtls/asn1parse.o deps/mbedtls/asn1write.o deps/mbedtls/base64.o \ deps/mbedtls/bignum.o deps/mbedtls/blowfish.o deps/mbedtls/camellia.o \ deps/mbedtls/ccm.o deps/mbedtls/cipher.o deps/mbedtls/cipher_wrap.o \ deps/mbedtls/cmac.o deps/mbedtls/ctr_drbg.o deps/mbedtls/des.o \ deps/mbedtls/dhm.o deps/mbedtls/ecdh.o deps/mbedtls/ecdsa.o \ deps/mbedtls/ecjpake.o deps/mbedtls/ecp.o \ deps/mbedtls/ecp_curves.o deps/mbedtls/entropy.o deps/mbedtls/entropy_poll.o \ deps/mbedtls/error.o deps/mbedtls/gcm.o deps/mbedtls/havege.o \ deps/mbedtls/hmac_drbg.o deps/mbedtls/md.o deps/mbedtls/md2.o \ deps/mbedtls/md4.o deps/mbedtls/md5.o deps/mbedtls/md_wrap.o \ deps/mbedtls/memory_buffer_alloc.o deps/mbedtls/oid.o \ deps/mbedtls/padlock.o deps/mbedtls/pem.o deps/mbedtls/pk.o \ deps/mbedtls/pk_wrap.o deps/mbedtls/pkcs12.o deps/mbedtls/pkcs5.o \ deps/mbedtls/pkparse.o deps/mbedtls/pkwrite.o deps/mbedtls/platform.o \ deps/mbedtls/ripemd160.o deps/mbedtls/rsa.o deps/mbedtls/sha1.o \ deps/mbedtls/sha256.o deps/mbedtls/sha512.o deps/mbedtls/threading.o \ deps/mbedtls/timing.o deps/mbedtls/version.o \ deps/mbedtls/version_features.o deps/mbedtls/xtea.o OBJS_TLS_X509 = deps/mbedtls/certs.o deps/mbedtls/pkcs11.o deps/mbedtls/x509.o \ deps/mbedtls/x509_create.o deps/mbedtls/x509_crl.o deps/mbedtls/x509_crt.o \ deps/mbedtls/x509_csr.o deps/mbedtls/x509write_crt.o deps/mbedtls/x509write_csr.o OBJS_TLS = deps/mbedtls/debug.o deps/mbedtls/net_sockets.o \ deps/mbedtls/ssl_cache.o deps/mbedtls/ssl_ciphersuites.o \ deps/mbedtls/ssl_cli.o deps/mbedtls/ssl_cookie.o \ deps/mbedtls/ssl_srv.o deps/mbedtls/ssl_ticket.o \ deps/mbedtls/ssl_tls.o OBJ += $(OBJS_TLS_CRYPTO) $(OBJS_TLS_X509) $(OBJS_TLS) endif ifeq ($(HAVE_LIBUI), 1) DEFINES += -DHAVE_LIBUI ifneq ($(findstring Win32,$(OS)),) OBJ += deps/libui/windows/alloc.o \ deps/libui/windows/area.o \ deps/libui/windows/areadraw.o \ deps/libui/windows/areaevents.o \ deps/libui/windows/areascroll.o \ deps/libui/windows/areautil.o \ deps/libui/windows/box.o \ deps/libui/windows/button.o \ deps/libui/windows/checkbox.o \ deps/libui/windows/colorbutton.o \ deps/libui/windows/colordialog.o \ deps/libui/windows/combobox.o \ deps/libui/windows/container.o \ deps/libui/windows/control.o \ deps/libui/windows/d2dscratch.o \ deps/libui/windows/datetimepicker.o \ deps/libui/windows/debug.o \ deps/libui/windows/draw.o \ deps/libui/windows/drawmatrix.o \ deps/libui/windows/drawpath.o \ deps/libui/windows/drawtext.o \ deps/libui/windows/dwrite.o \ deps/libui/windows/editablecombo.o \ deps/libui/windows/entry.o \ deps/libui/windows/events.o \ deps/libui/windows/fontbutton.o \ deps/libui/windows/fontdialog.o \ deps/libui/windows/form.o \ deps/libui/windows/graphemes.o \ deps/libui/windows/grid.o \ deps/libui/windows/group.o \ deps/libui/windows/init.o \ deps/libui/windows/label.o \ deps/libui/windows/main.o \ deps/libui/windows/menu.o \ deps/libui/windows/multilineentry.o \ deps/libui/windows/parent.o \ deps/libui/windows/progressbar.o \ deps/libui/windows/radiobuttons.o \ deps/libui/windows/separator.o \ deps/libui/windows/sizing.o \ deps/libui/windows/slider.o \ deps/libui/windows/spinbox.o \ deps/libui/windows/stddialogs.o \ deps/libui/windows/tab.o \ deps/libui/windows/tabpage.o \ deps/libui/windows/text.o \ deps/libui/windows/utf16.o \ deps/libui/windows/utilwin.o \ deps/libui/windows/window.o \ deps/libui/windows/winpublic.o \ deps/libui/windows/winutil.o LIBS += -luxtheme -ld2d1 -ldwrite -lusp10 else ifneq ($(findstring Darwin,$(OS)),) OBJ += deps/libui/darwin/alloc.o \ deps/libui/darwin/area.o \ deps/libui/darwin/areaevents.o \ deps/libui/darwin/autolayout.o \ deps/libui/darwin/box.o \ deps/libui/darwin/button.o \ deps/libui/darwin/checkbox.o \ deps/libui/darwin/colorbutton.o \ deps/libui/darwin/combobox.o \ deps/libui/darwin/control.o \ deps/libui/darwin/datetimepicker.o \ deps/libui/darwin/debug.o \ deps/libui/darwin/draw.o \ deps/libui/darwin/drawtext.o \ deps/libui/darwin/editablecombo.o \ deps/libui/darwin/entry.o \ deps/libui/darwin/fontbutton.o \ deps/libui/darwin/form.o \ deps/libui/darwin/grid.o \ deps/libui/darwin/group.o \ deps/libui/darwin/image.o \ deps/libui/darwin/label.o \ deps/libui/darwin/main.o \ deps/libui/darwin/map.o \ deps/libui/darwin/menu.o \ deps/libui/darwin/multilineentry.o \ deps/libui/darwin/progressbar.o \ deps/libui/darwin/radiobuttons.o \ deps/libui/darwin/scrollview.o \ deps/libui/darwin/separator.o \ deps/libui/darwin/slider.o \ deps/libui/darwin/spinbox.o \ deps/libui/darwin/stddialogs.o \ deps/libui/darwin/tab.o \ deps/libui/darwin/text.o \ deps/libui/darwin/util.o \ deps/libui/darwin/window.o \ deps/libui/darwin/winmoveresize.o else CFLAGS += -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 LIBS += -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 OBJ += deps/libui/unix/alloc.o \ deps/libui/unix/area.o \ deps/libui/unix/box.o \ deps/libui/unix/button.o \ deps/libui/unix/cellrendererbutton.o \ deps/libui/unix/checkbox.o \ deps/libui/unix/child.o \ deps/libui/unix/colorbutton.o \ deps/libui/unix/combobox.o \ deps/libui/unix/control.o \ deps/libui/unix/datetimepicker.o \ deps/libui/unix/debug.o \ deps/libui/unix/draw.o \ deps/libui/unix/drawmatrix.o \ deps/libui/unix/drawpath.o \ deps/libui/unix/drawtext.o \ deps/libui/unix/editablecombo.o \ deps/libui/unix/entry.o \ deps/libui/unix/fontbutton.o \ deps/libui/unix/form.o \ deps/libui/unix/future.o \ deps/libui/unix/graphemes.o \ deps/libui/unix/grid.o \ deps/libui/unix/group.o \ deps/libui/unix/image.o \ deps/libui/unix/label.o \ deps/libui/unix/main.o \ deps/libui/unix/menu.o \ deps/libui/unix/multilineentry.o \ deps/libui/unix/progressbar.o \ deps/libui/unix/radiobuttons.o \ deps/libui/unix/separator.o \ deps/libui/unix/slider.o \ deps/libui/unix/spinbox.o \ deps/libui/unix/stddialogs.o \ deps/libui/unix/tab.o \ deps/libui/unix/text.o \ deps/libui/unix/util.o \ deps/libui/unix/window.o endif endif OBJ += deps/libui/common/areaevents.o \ deps/libui/common/control.o \ deps/libui/common/debug.o \ deps/libui/common/matrix.o \ deps/libui/common/shouldquit.o \ deps/libui/common/userbugs.o OBJ += deps/libui/libui_main.o endif endif # Miscellaneous ifeq ($(HAVE_STDIN_CMD), 1) DEFINES += -DHAVE_COMMAND -DHAVE_STDIN_CMD endif ifeq ($(HAVE_PYTHON), 1) DEFINES += $(PYTHON_CFLAGS) -Wno-unused-parameter LIBS += $(PYTHON_LIBS) OBJ += gfx/drivers_tracker/video_state_python.o endif ifeq ($(HAVE_EMSCRIPTEN), 1) OBJ += frontend/drivers/platform_emscripten.o \ input/drivers/rwebinput_input.o \ input/drivers_joypad/rwebpad_joypad.o \ audio/drivers/rwebaudio.o \ camera/drivers/rwebcam.o endif ifeq ($(HAVE_LAKKA), 1) OBJ += wifi/drivers/connmanctl.o endif # Audio # ifeq ($(HAVE_COREAUDIO), 1) OBJ += audio/drivers/coreaudio.o LIBS += -framework CoreServices -framework CoreAudio -framework AudioUnit endif ifeq ($(HAVE_CORETEXT), 1) OBJ += gfx/drivers_font_renderer/coretext.o endif ifeq ($(TARGET), retroarch_3ds) OBJ += gfx/drivers_font/ctr_font.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/drivers/alsa.o ifeq ($(HAVE_THREADS), 1) OBJ += audio/drivers/alsathread.o endif LIBS += $(ALSA_LIBS) DEFINES += $(ALSA_CFLAGS) endif ifeq ($(HAVE_TINYALSA), 1) OBJ += audio/drivers/tinyalsa.o DEFINES += -DHAVE_TINYALSA endif ifeq ($(HAVE_ROAR), 1) OBJ += audio/drivers/roar.o LIBS += $(ROAR_LIBS) DEFINES += $(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 LIBS += $(JACK_LIBS) DEFINES += $(JACK_CFLAGS) endif ifeq ($(HAVE_PULSE), 1) OBJ += audio/drivers/pulse.o LIBS += $(PULSE_LIBS) DEFINES += $(PULSE_CFLAGS) endif ifeq ($(HAVE_OSS_LIB), 1) LIBS += -lossaudio endif ifeq ($(HAVE_RSOUND), 1) OBJ += audio/drivers/rsound.o DEFINES += $(RSOUND_CFLAGS) LIBS += $(RSOUND_LIBS) endif ifeq ($(HAVE_DSOUND), 1) OBJ += audio/drivers/dsound.o DEFINES += -DHAVE_DSOUND HAVE_DX_COMMON = 1 LIBS += -ldsound endif ifeq ($(HAVE_WASAPI), 1) OBJ += audio/drivers/wasapi.o DEFINES += -DHAVE_WASAPI LIBS += -lole32 -lksuser endif ifeq ($(HAVE_XAUDIO), 1) OBJ += audio/drivers/xaudio.o DEFINES += -DHAVE_XAUDIO LIBS += -lole32 endif # Audio Resamplers ifeq ($(HAVE_NEON),1) OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler_neon.o \ audio/drivers_resampler/cc_resampler_neon.o \ memory/neon/memcpy-neon.o DEFINES += -DHAVE_NEON endif OBJ += $(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float.o \ $(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16.o \ $(LIBRETRO_COMM_DIR)/audio/audio_mix.o \ $(LIBRETRO_COMM_DIR)/formats/wav/rwav.o 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_RGUI) 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_ZARCH),) HAVE_ZARCH = 1 endif ifeq ($(HAVE_MATERIALUI),) HAVE_MATERIALUI = 1 endif #ifeq ($(HAVE_NUKLEAR),) #HAVE_NUKLEAR = 1 #endif ifeq ($(HAVE_XMB),) HAVE_XMB = 1 endif else HAVE_ZARCH ?= 0 HAVE_MATERIALUI ?= 0 #HAVE_NUKLEAR ?= 0 HAVE_XMB ?= 0 endif ifeq ($(HAVE_RGUI), 1) OBJ += menu/drivers/rgui.o DEFINES += -DHAVE_MENU -DHAVE_RGUI HAVE_MENU_COMMON = 1 ifeq ($(HAVE_MATERIALUI), 1) OBJ += menu/drivers/materialui.o DEFINES += -DHAVE_MATERIALUI HAVE_MENU_COMMON = 1 endif ifeq ($(HAVE_NUKLEAR), 1) OBJ += menu/drivers/nuklear/nk_common.o OBJ += menu/drivers/nuklear/nk_menu.o OBJ += menu/drivers/nuklear/nk_wnd_debug.o OBJ += menu/drivers/nuklear.o DEFINES += -DHAVE_NUKLEAR endif ifeq ($(HAVE_ZARCH), 1) OBJ += menu/drivers/zarch.o DEFINES += -DHAVE_ZARCH endif endif ifeq ($(HAVE_XMB), 1) OBJ += menu/drivers/xmb.o DEFINES += -DHAVE_XMB HAVE_MENU_COMMON = 1 endif ifeq ($(HAVE_LAKKA), 1) DEFINES += -DHAVE_LAKKA endif ifeq ($(HAVE_MENU_COMMON), 1) OBJ += menu/menu_driver.o \ menu/menu_content.o \ menu/menu_input.o \ menu/menu_event.o \ menu/menu_entries.o \ menu/menu_setting.o \ menu/menu_networking.o \ menu/menu_shader.o \ menu/widgets/menu_filebrowser.o \ menu/widgets/menu_dialog.o \ menu/widgets/menu_input_dialog.o \ menu/widgets/menu_input_bind_dialog.o \ menu/widgets/menu_entry.o \ menu/widgets/menu_osk.o \ menu/menu_cbs.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_info.o \ menu/cbs/menu_cbs_refresh.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/cbs/menu_cbs_up.o \ menu/cbs/menu_cbs_down.o \ menu/cbs/menu_cbs_contentlist_switch.o \ menu/menu_displaylist.o \ menu/menu_animation.o \ menu/drivers_display/menu_display_null.o \ menu/drivers/menu_generic.o \ menu/drivers/null.o endif ifeq ($(HAVE_OVERLAY), 1) DEFINES += -DHAVE_OVERLAY OBJ += \ tasks/task_overlay.o \ input/input_overlay.o \ led/drivers/led_overlay.o endif ifeq ($(HAVE_STB_FONT), 1) OBJ += gfx/drivers_font_renderer/stb.o OBJ += gfx/drivers_font_renderer/stb_unicode.o DEFINES += -DHAVE_STB_FONT endif ifeq ($(HAVE_FREETYPE), 1) OBJ += gfx/drivers_font_renderer/freetype.o LIBS += $(FREETYPE_LIBS) DEFINES += $(FREETYPE_CFLAGS) endif ifeq ($(HAVE_THREADS), 1) OBJ += $(LIBRETRO_COMM_DIR)/rthreads/rthreads.o \ gfx/video_thread_wrapper.o \ audio/audio_thread_wrapper.o DEFINES += -DHAVE_THREADS ifeq ($(findstring Haiku,$(OS)),) LIBS += $(THREADS_LIBS) endif endif ifeq ($(HAVE_THREAD_STORAGE), 1) DEFINES += -DHAVE_THREAD_STORAGE endif ifeq ($(HAVE_VITA2D), 1) OBJ += $(DEPS_DIR)/libvita2d/source/vita2d.o \ $(DEPS_DIR)/libvita2d/source/vita2d_texture.o \ $(DEPS_DIR)/libvita2d/source/vita2d_draw.o \ $(DEPS_DIR)/libvita2d/source/utils.o OBJ += $(DEPS_DIR)/libvita2d/shader/clear_v_gxp.o \ $(DEPS_DIR)/libvita2d/shader/clear_f_gxp.o \ $(DEPS_DIR)/libvita2d/shader/color_v_gxp.o \ $(DEPS_DIR)/libvita2d/shader/color_f_gxp.o \ $(DEPS_DIR)/libvita2d/shader/texture_v_gxp.o \ $(DEPS_DIR)/libvita2d/shader/texture_f_gxp.o \ $(DEPS_DIR)/libvita2d/shader/texture_tint_f_gxp.o ifeq ($(HAVE_MENU),1) OBJ += menu/drivers_display/menu_display_vita2d.o endif OBJ += gfx/drivers/vita2d_gfx.o \ gfx/drivers_font/vita2d_font.o CFLAGS += -I$(DEPS_DIR)/libvita2d/include endif ifeq ($(TARGET), retroarch_3ds) OBJ += gfx/drivers/ctr_gfx.o \ menu/drivers_display/menu_display_ctr.o \ input/drivers/ctr_input.o \ input/drivers_joypad/ctr_joypad.o endif ifeq ($(TARGET), retroarch_switch) OBJ += gfx/drivers/switch_gfx.o \ input/drivers/switch_input.o \ input/drivers_joypad/switch_joypad.o \ audio/drivers/switch_audio.o endif ifeq ($(HAVE_WAYLAND), 1) OBJ += gfx/drivers_context/wayland_ctx.o \ input/drivers/wayland_input.o DEFINES += $(WAYLAND_CFLAGS) $(WAYLAND_CURSOR_CFLAGS) LIBS += $(WAYLAND_LIBS) $(WAYLAND_CURSOR_LIBS) endif #Input ifeq ($(HAVE_DINPUT), 1) HAVE_DX_COMMON = 1 LIBS += -ldinput8 -lole32 DEFINES += -DHAVE_DINPUT OBJ += input/drivers/dinput.o \ input/drivers_joypad/dinput_joypad.o endif ifeq ($(HAVE_XINPUT), 1) DEFINES += -DHAVE_XINPUT OBJ += input/drivers_joypad/xinput_joypad.o endif ifeq ($(HAVE_OPENDINGUX_FBDEV), 1) OBJ += gfx/drivers_context/opendingux_fbdev_ctx.o DEFINES += $(EGL_CFLAGS) LIBS += $(EGL_LIBS) 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) DEFINES += -DHAVE_X11 $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS) ifeq ($(HAVE_XCB),1) LIBS += -lX11-xcb endif ifneq ($(HAVE_OPENGLES), 1) OBJ += gfx/drivers_context/x_ctx.o endif endif ifeq ($(HAVE_XCB),1) DEFINES += $(XCB_CFLAGS) LIBS += $(XCB_LIBS) endif ifeq ($(HAVE_XKBCOMMON), 1) DEFINES += $(XKBCOMMON_CFLAGS) OBJ += input/drivers_keyboard/keyboard_event_xkb.o LIBS += $(XKBCOMMON_LIBS) endif ifeq ($(HAVE_DBUS), 1) LIBS += $(DBUS_LIBS) CFLAGS += $(DBUS_CFLAGS) OBJ += gfx/common/dbus_common.o endif ifeq ($(HAVE_UDEV), 1) DEFINES += $(UDEV_CFLAGS) LIBS += $(UDEV_LIBS) OBJ += input/drivers/udev_input.o \ input/drivers_joypad/udev_joypad.o endif ifeq ($(HAVE_LIBUSB), 1) ifeq ($(HAVE_THREADS), 1) ifeq ($(HAVE_HID), 1) DEFINES += -DHAVE_LIBUSB OBJ += input/drivers_hid/libusb_hid.o ifneq ($(findstring BSD,$(OS)),) LIBS += -lusb else LIBS += -lusb-1.0 endif endif endif endif ifeq ($(HAVE_IOHIDMANAGER), 1) ifeq ($(HAVE_HID), 1) DEFINES += -DHAVE_IOHIDMANAGER OBJ += input/drivers_hid/iohidmanager_hid.o LIBS += -framework IOKit endif endif ifeq ($(HAVE_CORELOCATION), 1) DEFINES += -DHAVE_CORELOCATION LIBS += -framework CoreLocation 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_wii.o \ input/connect/connect_nesusb.o \ input/connect/connect_snesusb.o \ input/connect/connect_wiiupro.o \ input/connect/connect_wiiugca.o endif ifeq ($(HAVE_PARPORT), 1) OBJ += input/drivers_joypad/parport_joypad.o endif ifneq ($(findstring Win32,$(OS)),) OBJ += input/drivers/winraw_input.o endif # Companion UI ifneq ($(findstring Win32,$(OS)),) OBJ += ui/drivers/ui_win32.o \ ui/drivers/win32/ui_win32_window.o \ ui/drivers/win32/ui_win32_browser_window.o \ ui/drivers/win32/ui_win32_msg_window.o \ ui/drivers/win32/ui_win32_application.o endif # Video OBJ += gfx/drivers_context/gfx_null_ctx.o \ gfx/video_state_tracker.o ifeq ($(HAVE_KMS), 1) HAVE_AND_WILL_USE_DRM = 1 OBJ += gfx/drivers_context/drm_ctx.o DEFINES += $(GBM_CFLAGS) $(DRM_CFLAGS) $(EGL_CFLAGS) LIBS += $(GBM_LIBS) $(DRM_LIBS) $(EGL_LIBS) endif ifeq ($(HAVE_CACA), 1) DEFINES += -DHAVE_CACA OBJ += gfx/drivers/caca_gfx.o gfx/drivers_font/caca_font.o LIBS += -lcaca ifeq ($(HAVE_MENU_COMMON), 1) OBJ += menu/drivers_display/menu_display_caca.o endif endif ifeq ($(HAVE_PLAIN_DRM), 1) OBJ += gfx/drivers/drm_gfx.o CFLAGS += -I/usr/include/libdrm LIBS += -ldrm endif ifeq ($(HAVE_GL_CONTEXT), 1) DEFINES += -DHAVE_OPENGL -DHAVE_GLSL OBJ += gfx/drivers/gl.o \ gfx/drivers_renderchain/gl2_renderchain.o \ $(LIBRETRO_COMM_DIR)/gfx/gl_capabilities.o \ gfx/common/gl_common.o \ gfx/drivers_font/gl_raster_font.o \ $(LIBRETRO_COMM_DIR)/glsym/rglgen.o ifeq ($(HAVE_MENU_COMMON), 1) OBJ += menu/drivers_display/menu_display_gl.o endif ifeq ($(HAVE_VIDEOCORE), 1) OBJ += gfx/drivers_context/vc_egl_ctx.o DEFINES += $(EGL_CFLAGS) LIBS += $(EGL_LIBS) endif ifeq ($(HAVE_EMSCRIPTEN), 1) OBJ += gfx/drivers_context/emscriptenegl_ctx.o endif ifeq ($(HAVE_MALI_FBDEV), 1) OBJ += gfx/drivers_context/mali_fbdev_ctx.o DEFINES += $(EGL_CFLAGS) LIBS += $(EGL_LIBS) endif ifeq ($(HAVE_VIVANTE_FBDEV), 1) OBJ += gfx/drivers_context/vivante_fbdev_ctx.o DEFINES += $(EGL_CFLAGS) LIBS += $(EGL_LIBS) endif ifeq ($(HAVE_X11), 1) ifeq ($(HAVE_EGL), 1) OBJ += gfx/drivers_context/xegl_ctx.o DEFINES += $(EGL_CFLAGS) LIBS += $(EGL_LIBS) endif endif ifeq ($(HAVE_OSMESA), 1) OBJ += gfx/drivers_context/osmesa_ctx.o LIBS += -lOSMesa endif ifeq ($(HAVE_FFMPEG), 1) ifneq ($(C89_BUILD), 1) ifneq ($(HAVE_OPENGLES), 1) OBJ += cores/libretro-ffmpeg/ffmpeg_fft.o DEFINES += -I$(DEPS_DIR) -DHAVE_GL_FFT NEED_CXX_LINKER=1 endif endif endif ifeq ($(HAVE_OPENGLES), 1) LIBS += $(OPENGLES_LIBS) DEFINES += $(OPENGLES_CFLAGS) -DHAVE_OPENGLES ifeq ($(HAVE_OPENGLES3), 1) DEFINES += -DHAVE_OPENGLES3 else DEFINES += -DHAVE_OPENGLES2 endif OBJ += $(LIBRETRO_COMM_DIR)/glsym/glsym_es2.o else DEFINES += -DHAVE_GL_SYNC OBJ += $(LIBRETRO_COMM_DIR)/glsym/glsym_gl.o GL_LIBS := $(OPENGL_LIBS) ifeq ($(OSX), 1) GL_LIBS := -framework OpenGL OBJ += gfx/drivers_context/cgl_ctx.o else ifneq ($(findstring Win32,$(OS)),) GL_LIBS := -lopengl32 -lgdi32 -lcomdlg32 WANT_WGL=1 endif LIBS += $(GL_LIBS) endif OBJ += gfx/drivers_shader/shader_glsl.o DEFINES += -DHAVE_GLSL endif ifeq ($(HAVE_EGL), 1) DEFINES += -DHAVE_EGL $(EGL_CFLAGS) LIBS += $(EGL_LIBS) OBJ += gfx/common/egl_common.o endif ifeq ($(HAVE_SDL2), 1) HAVE_SDL=0 endif ifeq ($(HAVE_SDL), 1) OBJ += gfx/drivers/sdl_gfx.o \ input/drivers/sdl_input.o \ input/drivers_joypad/sdl_joypad.o \ audio/drivers/sdl_audio.o ifeq ($(HAVE_GL_CONTEXT), 1) OBJ += gfx/drivers_context/sdl_gl_ctx.o endif DEFINES += $(SDL_CFLAGS) $(BSD_LOCAL_INC) LIBS += $(SDL_LIBS) endif ifeq ($(HAVE_SDL2), 1) OBJ += gfx/drivers/sdl2_gfx.o \ input/drivers/sdl_input.o \ input/drivers_joypad/sdl_joypad.o \ audio/drivers/sdl_audio.o ifeq ($(HAVE_GL_CONTEXT), 1) OBJ += gfx/drivers_context/sdl_gl_ctx.o endif DEFINES += $(SDL2_CFLAGS) $(BSD_LOCAL_INC) LIBS += $(SDL2_LIBS) HAVE_SDL = 0 endif ifeq ($(HAVE_XSHM), 1) OBJ += gfx/drivers/xshm_gfx.o endif ifeq ($(HAVE_VULKAN), 1) ifneq ($(findstring Win32,$(OS)),) WANT_WGL = 1 # Trivial temporary workaround for MinGW and glslang. CXXFLAGS += -fpermissive endif CXXFLAGS += -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -Wno-parentheses OBJ += gfx/drivers/vulkan.o \ gfx/common/vulkan_common.o \ $(LIBRETRO_COMM_DIR)/vulkan/vulkan_symbol_wrapper.o \ gfx/drivers_font/vulkan_raster_font.o \ gfx/drivers_shader/shader_vulkan.o ifeq ($(HAVE_VULKAN_DISPLAY), 1) OBJ += gfx/drivers_context/khr_display_ctx.o endif ifeq ($(HAVE_MENU_COMMON), 1) OBJ += menu/drivers_display/menu_display_vulkan.o endif #LIBS += -lstdc++ DEFINES += -DHAVE_VULKAN INCLUDE_DIRS += -Igfx/include HAVE_SLANG = 1 HAVE_GLSLANG = 1 HAVE_SPIRV_CROSS = 1 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) DEFINES += $(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 LIBS += $(DISPMANX_LIBS) DEFINES += $(DISPMANX_CFLAGS) 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 DEFINES += $(VG_CFLAGS) LIBS += $(VG_LIBS) endif ifeq ($(HAVE_XVIDEO), 1) OBJ += gfx/drivers/xvideo.o LIBS += $(XVIDEO_LIBS) DEFINES += $(XVIDEO_CFLAGS) endif ifeq ($(HAVE_CG), 1) DEFINES += -DHAVE_CG OBJ += gfx/drivers_shader/shader_gl_cg.o LIBS += $(CG_LIBS) endif ifeq ($(HAVE_D3D9), 1) HAVE_D3D_COMMON = 1 HAVE_D3DX = 1 DEFINES += -DHAVE_D3D9 ifeq ($(HAVE_D3DX), 1) DEFINES += -DHAVE_D3DX endif ifneq ($(HAVE_DYLIB), 1) LIBS += -ld3d9 ifeq ($(HAVE_D3DX), 1) LIBS += -ld3dx9 endif endif HAVE_DX_COMMON = 1 OBJ += gfx/drivers_font/d3d_w32_font.o ifeq ($(HAVE_CG), 1) LIBS += -lcgD3D9 OBJ += gfx/drivers_renderchain/d3d9_cg_renderchain.o endif ifeq ($(HAVE_HLSL), 1) OBJ += gfx/drivers_renderchain/d3d9_hlsl_renderchain.o \ gfx/drivers_shader/shader_hlsl.o endif endif ifeq ($(HAVE_D3D10), 1) OBJ += gfx/drivers/d3d10.o \ gfx/common/d3d10_common.o \ gfx/drivers_font/d3d10_font.o \ menu/drivers_display/menu_display_d3d10.o DEFINES += -DHAVE_D3D10 endif ifeq ($(HAVE_D3D11), 1) OBJ += gfx/drivers/d3d11.o \ gfx/common/d3d11_common.o \ gfx/drivers_font/d3d11_font.o \ menu/drivers_display/menu_display_d3d11.o DEFINES += -DHAVE_D3D11 HAVE_SLANG = 1 HAVE_GLSLANG = 1 HAVE_SPIRV_CROSS = 1 endif ifeq ($(HAVE_D3D12), 1) OBJ += gfx/drivers/d3d12.o \ gfx/common/d3d12_common.o \ gfx/drivers_font/d3d12_font.o \ menu/drivers_display/menu_display_d3d12.o DEFINES += -DHAVE_D3D12 HAVE_SLANG = 1 HAVE_GLSLANG = 1 HAVE_SPIRV_CROSS = 1 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 CFLAGS += -Wno-unknown-pragmas endif ifeq ($(HAVE_D3D8), 1) HAVE_D3D_COMMON = 1 HAVE_DX_COMMON = 1 DEFINES += -DHAVE_D3D8 ifneq ($(HAVE_DYLIB), 1) LIBS += -ld3d8 ifeq ($(HAVE_D3DX), 1) LIBS += -ld3dx8 endif endif endif ifeq ($(HAVE_DX_COMMON), 1) LIBS += -ldxguid endif ifeq ($(HAVE_D3D8), 1) DEFINES += -DHAVE_D3D8 OBJ += gfx/drivers/d3d8.o OBJ += gfx/common/d3d8_common.o ifeq ($(HAVE_MENU_COMMON), 1) OBJ += menu/drivers_display/menu_display_d3d8.o endif endif ifeq ($(HAVE_D3D9), 1) DEFINES += -DHAVE_D3D9 OBJ += gfx/drivers/d3d9.o OBJ += gfx/common/d3d9_common.o ifeq ($(HAVE_MENU_COMMON), 1) OBJ += menu/drivers_display/menu_display_d3d9.o endif endif ifeq ($(HAVE_D3D_COMMON), 1) DEFINES += -DHAVE_D3D OBJ += gfx/common/d3d_common.o endif ifeq ($(HAVE_SLANG),1) DEFINES += -DHAVE_SLANG OBJ += gfx/drivers_shader/slang_process.o OBJ += gfx/drivers_shader/slang_preprocess.o OBJ += gfx/drivers_shader/glslang_util.o OBJ += gfx/drivers_shader/slang_reflection.o endif ifeq ($(HAVE_GLSLANG), 1) DEFINES += -DHAVE_GLSLANG ifneq ($(findstring Win32,$(OS)),) GLSLANG_PLATFORM := Windows else GLSLANG_PLATFORM := Unix endif INCLUDE_DIRS += \ -I$(DEPS_DIR)/glslang/glslang/glslang/OSDependent/$(GLSLANG_PLATFORM) \ -I$(DEPS_DIR)/glslang/glslang/OGLCompilersDLL \ -I$(DEPS_DIR)/glslang/glslang \ -I$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent \ -I$(DEPS_DIR)/glslang/glslang/glslang/Public \ -I$(DEPS_DIR)/glslang/glslang/SPIRV \ -I$(DEPS_DIR)/glslang GLSLANG_SOURCES := \ $(wildcard $(DEPS_DIR)/glslang/*.cpp) \ $(wildcard $(DEPS_DIR)/glslang/glslang/SPIRV/*.cpp) \ $(wildcard $(DEPS_DIR)/glslang/glslang/glslang/GenericCodeGen/*.cpp) \ $(wildcard $(DEPS_DIR)/glslang/glslang/OGLCompilersDLL/*.cpp) \ $(wildcard $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/*.cpp) \ $(wildcard $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/*.cpp) \ $(wildcard $(DEPS_DIR)/glslang/glslang/hlsl/*.cpp) \ $(wildcard $(DEPS_DIR)/glslang/glslang/glslang/OSDependent/$(GLSLANG_PLATFORM)/*.cpp) OBJ += $(GLSLANG_SOURCES:.cpp=.o) endif ifeq ($(HAVE_SPIRV_CROSS), 1) DEFINES += -DHAVE_SPIRV_CROSS INCLUDE_DIRS += -I$(DEPS_DIR)/SPIRV-Cross OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_cross.o OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_cfg.o OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_glsl.o OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_hlsl.o OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_msl.o endif ifeq ($(WANT_WGL), 1) OBJ += gfx/drivers_context/wgl_ctx.o LIBS += -lcomctl32 endif #ifeq ($(HAVE_LIBXML2), 1) #LIBS += $(LIBXML2_LIBS) #DEFINES += $(LIBXML2_CFLAGS) #else #OBJ += $(LIBRETRO_COMM_DIR)/formats/xml/rxml.o #endif # Compression/Archive OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file.o \ $(LIBRETRO_COMM_DIR)/streams/trans_stream.o \ $(LIBRETRO_COMM_DIR)/streams/trans_stream_pipe.o ifeq ($(HAVE_7ZIP),1) CFLAGS += -I$(DEPS_DIR)/7zip HAVE_COMPRESSION = 1 DEFINES += -DHAVE_7ZIP -D_7ZIP_ST 7ZOBJ = $(DEPS_DIR)/7zip/7zIn.o \ $(DEPS_DIR)/7zip/Bra86.o \ $(DEPS_DIR)/7zip/7zFile.o \ $(DEPS_DIR)/7zip/7zStream.o \ $(DEPS_DIR)/7zip/LzFind.o \ $(DEPS_DIR)/7zip/LzmaDec.o \ $(DEPS_DIR)/7zip/LzmaEnc.o \ $(DEPS_DIR)/7zip/7zCrcOpt.o \ $(DEPS_DIR)/7zip/Bra.o \ $(DEPS_DIR)/7zip/7zDec.o \ $(DEPS_DIR)/7zip/Bcj2.o \ $(DEPS_DIR)/7zip/7zCrc.o \ $(DEPS_DIR)/7zip/Lzma2Dec.o \ $(DEPS_DIR)/7zip/7zBuf.o OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file_7z.o \ $(7ZOBJ) endif ifeq ($(HAVE_IBXM), 1) DEFINES += -DHAVE_IBXM OBJ += $(DEPS_DIR)/ibxm/ibxm.o endif ifeq ($(HAVE_BUILTINFLAC),1) HAVE_FLAC = 1 DEFINES += -DHAVE_DR_FLAC -I$(DEPS_DIR) CFLAGS += -DHAVE_DR_FLAC CFLAGS += -DHAVE_FLAC -I$(DEPS_DIR)/libFLAC/include DEFINES += -DHAVE_STDINT_H -DHAVE_LROUND -DFLAC__HAS_OGG=0 \ -DFLAC_PACKAGE_VERSION="\"retroarch\"" FLACOBJ = $(DEPS_DIR)/libFLAC/bitmath.o \ $(DEPS_DIR)/libFLAC/bitreader.o \ $(DEPS_DIR)/libFLAC/cpu.o \ $(DEPS_DIR)/libFLAC/crc.o \ $(DEPS_DIR)/libFLAC/fixed.o \ $(DEPS_DIR)/libFLAC/float.o \ $(DEPS_DIR)/libFLAC/format.o \ $(DEPS_DIR)/libFLAC/lpc.o \ $(DEPS_DIR)/libFLAC/lpc_intrin_avx2.o \ $(DEPS_DIR)/libFLAC/lpc_intrin_sse2.o \ $(DEPS_DIR)/libFLAC/lpc_intrin_sse41.o \ $(DEPS_DIR)/libFLAC/lpc_intrin_sse.o \ $(DEPS_DIR)/libFLAC/md5.o \ $(DEPS_DIR)/libFLAC/memory.o \ $(DEPS_DIR)/libFLAC/stream_decoder.o ifneq ($(findstring Win32,$(OS)),) DEFINES += -DHAVE_FSEEKO # make sure not to use this on legacy Windows versions that don't have W-functions implemented DEFINES += -DNEED_UTF8_SUPPORT FLACOBJ += $(DEPS_DIR)/libFLAC/windows_unicode_filenames.o endif OBJ += $(FLACOBJ) else ifeq ($(HAVE_FLAC),1) DEFINES += -DHAVE_FLAC LIBS += $(FLAC_LIBS) endif ifeq ($(HAVE_ZLIB), 1) OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file_zlib.o \ $(LIBRETRO_COMM_DIR)/streams/trans_stream_zlib.o DEFINES += -DHAVE_ZLIB HAVE_COMPRESSION = 1 ifeq ($(HAVE_BUILTINZLIB), 1) OBJ += $(DEPS_DIR)/libz/adler32.o \ $(DEPS_DIR)/libz/compress.o \ $(DEPS_DIR)/libz/libz-crc32.o \ $(DEPS_DIR)/libz/deflate.o \ $(DEPS_DIR)/libz/gzclose.o \ $(DEPS_DIR)/libz/gzlib.o \ $(DEPS_DIR)/libz/gzread.o \ $(DEPS_DIR)/libz/gzwrite.o \ $(DEPS_DIR)/libz/inffast.o \ $(DEPS_DIR)/libz/inflate.o \ $(DEPS_DIR)/libz/inftrees.o \ $(DEPS_DIR)/libz/trees.o \ $(DEPS_DIR)/libz/uncompr.o \ $(DEPS_DIR)/libz/zutil.o INCLUDE_DIRS += -I$(LIBRETRO_COMM_DIR)/include/compat DEFINES += -DWANT_ZLIB else LIBS += $(ZLIB_LIBS) endif endif ifeq ($(HAVE_CHD), 1) CFLAGS += -I$(LIBRETRO_COMM_DIR)/formats/libchdr DEFINES += -DHAVE_CHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR 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 ifeq ($(HAVE_FLAC), 1) OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_flac.o \ $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_flac_codec.o endif ifeq ($(HAVE_7ZIP), 1) OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_lzma.o endif ifeq ($(HAVE_ZLIB), 1) OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_zlib.o endif endif ifeq ($(HAVE_RTGA), 1) DEFINES += -DHAVE_RTGA OBJ += $(LIBRETRO_COMM_DIR)/formats/tga/rtga.o endif ifeq ($(HAVE_RPNG), 1) DEFINES += -DHAVE_RPNG OBJ += $(LIBRETRO_COMM_DIR)/formats/png/rpng.o \ $(LIBRETRO_COMM_DIR)/formats/png/rpng_encode.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 OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp_encode.o \ $(LIBRETRO_COMM_DIR)/formats/json/jsonsax.o \ $(LIBRETRO_COMM_DIR)/formats/json/jsonsax_full.o \ $(LIBRETRO_COMM_DIR)/formats/image_transfer.o ifdef HAVE_COMPRESSION DEFINES += -DHAVE_COMPRESSION endif # Video4Linux 2 ifeq ($(HAVE_V4L2),1) OBJ += camera/drivers/video4linux2.o ifeq ($(HAVE_VIDEO_PROCESSOR),1) OBJ += cores/libretro-video-processor/video_processor_v4l2.o endif DEFINES += -DHAVE_V4L2 LIBS += $(V4L2_LIBS) 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 \ $(LIBRETRO_COMM_DIR)/net/net_natt.o \ network/net_http_special.o \ tasks/task_http.o \ tasks/task_netplay_lan_scan.o \ tasks/task_netplay_nat_traversal.o \ tasks/task_wifi.o \ tasks/task_netplay_find_content.o ifeq ($(HAVE_SSL), 1) OBJ += $(LIBRETRO_COMM_DIR)/net/net_socket_ssl.o endif ifneq ($(HAVE_SOCKET_LEGACY),1) 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_delta.o \ network/netplay/netplay_frontend.o \ network/netplay/netplay_handshake.o \ network/netplay/netplay_init.o \ network/netplay/netplay_io.o \ network/netplay/netplay_keyboard.o \ network/netplay/netplay_sync.o \ network/netplay/netplay_discovery.o \ network/netplay/netplay_buf.o \ network/netplay/netplay_room_parse.o # Retro Achievements ifeq ($(HAVE_CHEEVOS), 1) DEFINES += -DHAVE_CHEEVOS OBJ += cheevos/cheevos.o \ cheevos/var.o \ cheevos/cond.o \ cheevos/badges.o \ $(LIBRETRO_COMM_DIR)/utils/md5.o endif ifeq ($(HAVE_NETWORKGAMEPAD), 1) OBJ += input/input_remote.o \ cores/libretro-net-retropad/net_retropad_core.o endif ifeq ($(HAVE_BUILTINMINIUPNPC), 1) HAVE_MINIUPNPC = 1 DEFINES += -DHAVE_MINIUPNPC -DHAVE_BUILTINMINIUPNPC -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR DEFINES += -I$(DEPS_DIR) OBJ += $(DEPS_DIR)/miniupnpc/igd_desc_parse.o \ $(DEPS_DIR)/miniupnpc/upnpreplyparse.o \ $(DEPS_DIR)/miniupnpc/upnpcommands.o \ $(DEPS_DIR)/miniupnpc/upnperrors.o \ $(DEPS_DIR)/miniupnpc/connecthostport.o \ $(DEPS_DIR)/miniupnpc/portlistingparse.o \ $(DEPS_DIR)/miniupnpc/receivedata.o \ $(DEPS_DIR)/miniupnpc/upnpdev.o \ $(DEPS_DIR)/miniupnpc/minissdpc.o \ $(DEPS_DIR)/miniupnpc/miniwget.o \ $(DEPS_DIR)/miniupnpc/miniupnpc.o \ $(DEPS_DIR)/miniupnpc/minixml.o \ $(DEPS_DIR)/miniupnpc/minisoap.o else ifeq ($(HAVE_MINIUPNPC), 1) LIBS += $(MINIUPNPC_LIBS) endif endif ifneq ($(findstring Win32,$(OS)),) OBJ += media/rarch.o \ gfx/common/win32_common.o \ frontend/drivers/platform_win32.o OBJ += gfx/drivers/gdi_gfx.o \ gfx/drivers_context/gdi_ctx.o \ gfx/drivers_font/gdi_font.o \ gfx/display_servers/dispserv_win32.o \ menu/drivers_display/menu_display_gdi.o LIBS += -lmsimg32 -lhid -lsetupapi endif ifeq ($(HAVE_AVFOUNDATION), 1) ifeq ($(HAVE_COCOA), 1) DEFINES += -DHAVE_AVFOUNDATION LIBS += -framework AVFoundation LIBS += -framework CoreVideo LIBS += -framework CoreMedia endif 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) DEFINES += $(AVCODEC_CFLAGS) $(AVFORMAT_CFLAGS) $(AVUTIL_CFLAGS) $(SWSCALE_CFLAGS) $(SWRESAMPLE_CFLAGS) DEFINES += -Wno-deprecated-declarations -DHAVE_FFMPEG -Iffmpeg endif ifeq ($(HAVE_COMPRESSION), 1) DEFINES += -DHAVE_COMPRESSION OBJ += tasks/task_decompress.o endif ifeq ($(HAVE_COCOA),1) DEFINES += -DHAVE_MAIN OBJ += input/drivers/cocoa_input.o \ input/drivers_keyboard/keyboard_event_apple.o \ ui/drivers/ui_cocoa.o \ ui/drivers/cocoa/ui_cocoa_window.o \ ui/drivers/cocoa/ui_cocoa_browser_window.o \ ui/drivers/cocoa/ui_cocoa_msg_window.o \ ui/drivers/cocoa/ui_cocoa_application.o \ ui/drivers/cocoa/cocoa_common.o \ gfx/drivers_context/cocoa_gl_ctx.o endif ifneq ($(findstring DOS,$(OS)),) OBJ += gfx/drivers/vga_gfx.o gfx/drivers_font/vga_font.o \ input/drivers/dos_input.o input/drivers_joypad/dos_joypad.o \ frontend/drivers/platform_dos.o input/drivers_keyboard/keyboard_event_dos.o ifeq ($(HAVE_MENU_COMMON), 1) OBJ += menu/drivers_display/menu_display_vga.o endif 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 endif ifeq ($(WANT_IOSUHAX), 1) DEFINES += -I$(DEPS_DIR)/libiosuhax CFLAGS += -I$(DEPS_DIR)/libiosuhax OBJ += $(DEPS_DIR)/libiosuhax/iosuhax.o \ $(DEPS_DIR)/libiosuhax/iosuhax_devoptab.o \ $(DEPS_DIR)/libiosuhax/iosuhax_disc_interface.o endif ifeq ($(WANT_LIBFAT), 1) DEFINES += -I$(DEPS_DIR)/libfat/include CFLAGS += -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/echo.o \ libretro-common/audio/dsp_filters/eq.o \ libretro-common/audio/dsp_filters/chorus.o \ libretro-common/audio/dsp_filters/iir.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/wahwah.o endif ifeq ($(HAVE_RPILED), 1) OBJ += led/drivers/led_rpi.o endif