RetroArch/Makefile.common

1174 lines
30 KiB
Makefile
Raw Normal View History

2016-09-19 17:44:20 +00:00
ROOT_DIR := .
DEPS_DIR := $(ROOT_DIR)/deps
LIBRETRO_COMM_DIR := $(ROOT_DIR)/libretro-common
ifeq ($(HAVE_GL_CONTEXT),)
HAVE_GL_CONTEXT=0
ifeq ($(HAVE_OPENGL), 1)
HAVE_GL_CONTEXT=1
endif
2016-09-16 22:38:35 +00:00
ifeq ($(HAVE_OPENGLES), 1)
HAVE_GL_CONTEXT=1
endif
2016-09-16 22:38:35 +00:00
ifeq ($(HAVE_OPENGLES3), 1)
HAVE_GL_CONTEXT=1
endif
endif
2015-06-02 13:57:18 +00:00
ifeq ($(HAVE_LIBRETRODB),)
HAVE_LIBRETRODB = 1
endif
2015-01-22 02:58:04 +00:00
2016-07-28 18:01:38 +00:00
ifeq ($(HAVE_VIDEO_PROCESSOR), 1)
DEFINES += -DHAVE_VIDEO_PROCESSOR
endif
2016-06-07 01:01:33 +00:00
ifeq ($(HAVE_HID), 1)
2016-07-15 13:40:06 +00:00
DEFINES += -DHAVE_HID
2016-06-07 01:01:33 +00:00
endif
2015-01-22 02:58:04 +00:00
ifeq ($(HAVE_LIBRETRODB), 1)
2016-02-09 16:36:59 +00:00
DEFINES += -DHAVE_LIBRETRODB
2015-01-22 02:58:04 +00:00
endif
2014-09-14 00:15:41 +00:00
ifeq ($(HAVE_FBO), 1)
DEFINES += -DHAVE_FBO
endif
2014-09-14 01:22:04 +00:00
ifeq ($(HAVE_DYLIB), 1)
DEFINES += -DHAVE_DYLIB
endif
2014-09-14 00:52:30 +00:00
ifeq ($(SCALER_NO_SIMD), 1)
DEFINES += -DSCALER_NO_SIMD
endif
2014-09-14 00:15:41 +00:00
2014-09-14 00:52:30 +00:00
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
2014-09-14 00:52:30 +00:00
ifeq ($(HAVE_HARD_FLOAT), 1)
DEFINES += -mfloat-abi=hard
endif
2014-09-14 02:37:57 +00:00
ifeq ($(TDM_GCC),)
LDCXXFLAGS += -static-libstdc++
endif
ifeq ($(HAVE_FILE_LOGGER), 1)
CFLAGS += -DHAVE_FILE_LOGGER
endif
2016-06-06 22:00:28 +00:00
ifeq ($(HAVE_SHADERPIPELINE), 1)
2016-07-15 13:40:06 +00:00
CFLAGS += -DHAVE_SHADERPIPELINE
2016-06-06 22:00:28 +00:00
endif
2016-09-19 17:44:20 +00:00
CFLAGS += -I$(LIBRETRO_COMM_DIR)/include
2016-06-07 04:28:33 +00:00
2016-06-07 04:35:48 +00:00
# Switches
2016-06-07 04:28:33 +00:00
# System
ifneq ($(findstring BSD,$(OS)),)
BSD_LOCAL_INC += -I/usr/local/include
2016-07-15 13:40:06 +00:00
OBJ += frontend/drivers/platform_bsd.o
2016-06-07 04:28:33 +00:00
endif
ifneq ($(findstring Darwin,$(OS)),)
OSX := 1
LIBS += -framework AppKit
else
OSX := 0
endif
ifneq ($(findstring Linux,$(OS)),)
LIBS += -lrt
OBJ += input/drivers/linuxraw_input.o \
input/common/linux_common.o \
input/common/epoll_common.o \
input/drivers_joypad/linuxraw_joypad.o \
frontend/drivers/platform_linux.o
endif
2016-06-07 04:35:48 +00:00
2016-06-07 04:28:33 +00:00
ifeq ($(findstring Haiku,$(OS)),)
LIBS += -lm
DEBUG_FLAG = -g
else
LIBS += -lroot -lnetwork
# stable and nightly haiku builds are stuck on gdb 6.x but we use gcc4
DEBUG_FLAG = -gdwarf-2
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
2016-06-07 04:28:33 +00:00
endif
# General object files
2016-06-07 04:35:48 +00:00
OBJ += frontend/frontend.o \
2015-10-11 07:26:54 +00:00
frontend/frontend_driver.o \
frontend/drivers/platform_null.o \
ui/ui_companion_driver.o \
ui/drivers/ui_null.o \
2016-07-15 13:40:06 +00:00
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 \
2016-05-08 03:29:10 +00:00
core_impl.o \
2015-10-11 07:26:54 +00:00
retroarch.o \
2016-09-17 12:44:19 +00:00
dirs.o \
2016-09-17 10:10:46 +00:00
paths.o \
2016-02-09 16:36:59 +00:00
input/input_keyboard.o \
2016-05-09 18:30:47 +00:00
command.o \
2015-10-11 07:26:54 +00:00
msg_hash.o \
intl/msg_hash_us.o \
runloop.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/algorithms/mismatch.o \
$(LIBRETRO_COMM_DIR)/queues/task_queue.o \
2016-02-09 16:36:59 +00:00
tasks/task_content.o \
2016-09-19 00:57:23 +00:00
tasks/task_save.o \
2015-10-11 07:26:54 +00:00
tasks/task_file_transfer.o \
2016-05-10 05:54:47 +00:00
tasks/task_image.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.o \
$(LIBRETRO_COMM_DIR)/encodings/encoding_crc32.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/file_stream.o \
$(LIBRETRO_COMM_DIR)/streams/interface_stream.o \
$(LIBRETRO_COMM_DIR)/streams/memory_stream.o \
$(LIBRETRO_COMM_DIR)/file/retro_stat.o \
$(LIBRETRO_COMM_DIR)/lists/string_list.o \
$(LIBRETRO_COMM_DIR)/string/stdstring.o \
$(LIBRETRO_COMM_DIR)/memmap/memalign.o \
2016-08-29 01:07:20 +00:00
setting_list.o \
2016-03-20 16:28:24 +00:00
list_special.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_stdio.o \
$(LIBRETRO_COMM_DIR)/file/file_path.o \
2015-10-11 07:26:54 +00:00
file_path_special.o \
2016-06-20 03:20:14 +00:00
file_path_str.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/hash/rhash.o \
2015-10-11 07:26:54 +00:00
audio/audio_driver.o \
input/input_driver.o \
2016-03-05 06:27:48 +00:00
gfx/video_coord_array.o \
2015-10-11 07:26:54 +00:00
gfx/video_driver.o \
camera/camera_driver.o \
2016-09-21 14:06:14 +00:00
wifi/wifi_driver.o \
2015-10-11 07:26:54 +00:00
location/location_driver.o \
driver.o \
configuration.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/dynamic/dylib.o \
2015-10-11 07:26:54 +00:00
dynamic.o \
cores/dynamic_dummy.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/queues/message_queue.o \
managers/state_manager.o \
2015-10-11 07:26:54 +00:00
gfx/drivers_font_renderer/bitmapfont.o \
input/input_autodetect.o \
2016-10-04 05:35:29 +00:00
input/input_autodetect_builtin.o \
2015-10-11 07:26:54 +00:00
input/input_joypad_driver.o \
input/input_config.o \
2015-10-11 07:26:54 +00:00
input/input_keymaps.o \
input/input_remapping.o \
tasks/task_overlay.o \
input/input_overlay.o \
patch.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/queues/fifo_queue.o \
2016-05-09 23:25:47 +00:00
managers/core_option_manager.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/compat/compat_fnmatch.o \
$(LIBRETRO_COMM_DIR)/compat/compat_posix_string.o \
managers/cheat_manager.o \
2015-10-11 07:26:54 +00:00
core_info.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/file/config_file.o \
config_file_userdata.o \
tasks/task_screenshot.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler.o \
2015-10-11 07:26:54 +00:00
gfx/drivers_shader/shader_null.o \
gfx/video_shader_driver.o \
gfx/video_shader_parse.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/gfx/scaler/pixconv.o \
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_int.o \
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_filter.o \
2015-10-11 07:26:54 +00:00
gfx/font_driver.o \
gfx/video_filter.o \
2016-09-06 21:41:09 +00:00
gfx/video_frame.o \
2015-10-11 07:26:54 +00:00
audio/audio_resampler_driver.o \
audio/audio_dsp_filter.o \
2016-03-14 14:43:40 +00:00
audio/drivers_resampler/sinc_resampler.o \
audio/drivers_resampler/nearest_resampler.o \
audio/drivers_resampler/null_resampler.o \
2015-10-11 07:26:54 +00:00
audio/drivers_resampler/cc_resampler.o \
location/drivers/nulllocation.o \
camera/drivers/nullcamera.o \
2016-09-21 14:06:14 +00:00
wifi/drivers/nullwifi.o \
2015-10-11 07:26:54 +00:00
gfx/drivers/nullgfx.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 \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/features/features_cpu.o \
2016-05-10 06:53:14 +00:00
performance_counters.o \
verbosity.o
2014-09-13 22:53:00 +00:00
2016-06-07 04:05:41 +00:00
ifeq ($(HAVE_LANGEXTRA), 1)
DEFINES += -DHAVE_LANGEXTRA
DEFINES += -finput-charset=UTF-8
2016-06-07 04:05:41 +00:00
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 \
2016-08-20 21:36:21 +00:00
intl/msg_hash_jp.o \
2016-06-07 04:05:41 +00:00
intl/msg_hash_nl.o \
intl/msg_hash_pl.o \
intl/msg_hash_pt.o \
intl/msg_hash_ru.o
2016-06-07 04:05:41 +00:00
endif
2016-06-07 04:35:48 +00:00
ifneq ($(HAVE_GETOPT_LONG), 1)
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/compat/compat_getopt.o
2016-06-07 04:35:48 +00:00
endif
ifneq ($(HAVE_STRCASESTR), 1)
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/compat/compat_strcasestr.o
2016-06-07 04:35:48 +00:00
endif
ifneq ($(HAVE_STRL), 1)
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/compat/compat_strl.o
2016-06-07 04:35:48 +00:00
endif
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/formats/image_texture.o
2015-06-28 16:55:00 +00:00
ifeq ($(HAVE_IMAGEVIEWER), 1)
DEFINES += -DHAVE_IMAGEVIEWER
2016-01-21 18:53:52 +00:00
OBJ += cores/libretro-imageviewer/image_core.o
2015-06-28 16:55:00 +00:00
endif
2015-02-19 02:16:47 +00:00
# Qt
ifeq ($(HAVE_QT), 1)
HAVE_QT_WRAPPER=0
2016-06-09 18:11:26 +00:00
OBJ += ui/drivers/ui_qt.o \
2016-07-15 13:40:06 +00:00
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_msg_window.o
2016-06-09 18:11:26 +00:00
ifneq ($(findstring Linux,$(OS)),)
DEFINES += -I/usr/include/qt -fPIC
endif
# TODO/FIXME - figure out which libraries we need to link against
LIBS += -lQt5Quick -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -L./ui/drivers/qt/wrapper/build/release
ifeq ($(HAVE_QT_WRAPPER), 1)
LIBS += -lwrapper
endif
endif
2016-03-03 17:17:48 +00:00
ifeq ($(HAVE_SSA),1)
LIBS += -lass
endif
# LibretroDB
2015-01-22 02:58:04 +00:00
ifeq ($(HAVE_LIBRETRODB), 1)
2015-02-18 23:47:19 +00:00
OBJ += libretro-db/bintree.o \
2015-10-11 07:26:54 +00:00
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
2015-01-22 02:58:04 +00:00
endif
2014-09-14 00:52:30 +00:00
# Miscellaneous
2014-09-14 02:37:57 +00:00
ifeq ($(HAVE_STDIN_CMD), 1)
DEFINES += -DHAVE_COMMAND -DHAVE_STDIN_CMD
endif
2014-09-14 00:52:30 +00:00
ifeq ($(HAVE_PYTHON), 1)
DEFINES += $(PYTHON_CFLAGS) -Wno-unused-parameter
LIBS += $(PYTHON_LIBS)
OBJ += gfx/drivers_tracker/video_state_python.o
2014-09-14 00:52:30 +00:00
endif
2014-09-14 01:58:49 +00:00
ifeq ($(HAVE_EMSCRIPTEN), 1)
OBJ += frontend/drivers/platform_emscripten.o \
2015-10-11 07:26:54 +00:00
input/drivers/rwebinput_input.o \
audio/drivers/rwebaudio.o \
camera/drivers/rwebcam.o
2014-09-14 01:58:49 +00:00
endif
2016-09-21 14:06:14 +00:00
ifeq ($(HAVE_LAKKA), 1)
OBJ += wifi/drivers/connmanctl.o
endif
2014-09-14 00:52:30 +00:00
# Audio
#
ifeq ($(HAVE_COREAUDIO), 1)
2015-01-12 04:05:56 +00:00
OBJ += audio/drivers/coreaudio.o
2014-09-14 00:52:30 +00:00
LIBS += -framework CoreServices -framework CoreAudio -framework AudioUnit
endif
2015-04-19 22:13:02 +00:00
ifeq ($(HAVE_CORETEXT), 1)
OBJ += gfx/drivers_font_renderer/coretext.o
endif
2014-09-14 00:52:30 +00:00
ifeq ($(HAVE_OSS), 1)
2015-01-12 04:05:56 +00:00
OBJ += audio/drivers/oss.o
2014-09-14 00:52:30 +00:00
endif
ifeq ($(HAVE_OSS_BSD), 1)
2015-01-12 04:05:56 +00:00
OBJ += audio/drivers/oss.o
2014-09-14 00:52:30 +00:00
endif
ifeq ($(HAVE_ALSA), 1)
2016-05-11 17:02:43 +00:00
OBJ += audio/drivers/alsa.o
ifeq ($(HAVE_THREADS), 1)
2016-07-15 13:40:06 +00:00
OBJ += audio/drivers/alsathread.o
2016-05-11 17:02:43 +00:00
endif
2014-09-14 00:52:30 +00:00
LIBS += $(ALSA_LIBS)
DEFINES += $(ALSA_CFLAGS)
endif
ifeq ($(HAVE_ROAR), 1)
2015-01-12 04:05:56 +00:00
OBJ += audio/drivers/roar.o
2014-09-14 00:52:30 +00:00
LIBS += $(ROAR_LIBS)
DEFINES += $(ROAR_CFLAGS)
endif
ifeq ($(HAVE_AL), 1)
2015-01-12 04:05:56 +00:00
OBJ += audio/drivers/openal.o
2014-09-14 00:52:30 +00:00
ifeq ($(OSX),1)
LIBS += -framework OpenAL
else
LIBS += -lopenal
endif
endif
ifneq ($(findstring Darwin,$(OS)),)
2015-10-11 07:26:54 +00:00
OBJ += frontend/drivers/platform_darwin.o
endif
2014-09-14 00:52:30 +00:00
ifeq ($(HAVE_JACK),1)
2015-01-12 04:05:56 +00:00
OBJ += audio/drivers/jack.o
2014-09-14 00:52:30 +00:00
LIBS += $(JACK_LIBS)
DEFINES += $(JACK_CFLAGS)
endif
ifeq ($(HAVE_PULSE), 1)
2015-01-12 04:05:56 +00:00
OBJ += audio/drivers/pulse.o
2014-09-14 00:52:30 +00:00
LIBS += $(PULSE_LIBS)
DEFINES += $(PULSE_CFLAGS)
endif
ifeq ($(HAVE_OSS_LIB), 1)
LIBS += -lossaudio
endif
ifeq ($(HAVE_RSOUND), 1)
2015-03-15 13:28:20 +00:00
OBJ += audio/drivers/rsound.o
2014-09-14 00:52:30 +00:00
DEFINES += $(RSOUND_CFLAGS)
LIBS += $(RSOUND_LIBS)
endif
ifeq ($(HAVE_DSOUND), 1)
HAVE_DIRECTX=1
2015-01-12 04:05:56 +00:00
OBJ += audio/drivers/dsound.o
2014-09-14 00:52:30 +00:00
DEFINES += -DHAVE_DSOUND
LIBS += -ldxguid -ldsound
endif
ifeq ($(HAVE_XAUDIO), 1)
2015-04-03 00:29:20 +00:00
OBJ += audio/drivers/xaudio.o
2014-09-14 00:52:30 +00:00
DEFINES += -DHAVE_XAUDIO
LIBS += -lole32
endif
# Audio Resamplers
ifeq ($(HAVE_NEON),1)
OBJ += audio/drivers_resampler/sinc_resampler_neon.o \
2015-10-11 07:26:54 +00:00
audio/drivers_resampler/cc_resampler_neon.o
2014-09-14 00:52:30 +00:00
# When compiled without this, tries to attempt to compile sinc lerp,
# which will error out
2016-02-09 16:36:59 +00:00
#
# TODO - we need to make quality levels of sinc
# runtime toggleable instead of going by compile-time
# defines
2014-09-14 00:52:30 +00:00
DEFINES += -DSINC_LOWER_QUALITY
endif
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/conversion/s16_to_float.o \
$(LIBRETRO_COMM_DIR)/conversion/float_to_s16.o
2016-06-07 04:35:48 +00:00
ifeq ($(HAVE_NEON),1)
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/conversion/s16_to_float_neon.o \
$(LIBRETRO_COMM_DIR)/conversion/float_to_s16_neon.o
2016-06-07 04:35:48 +00:00
endif
2014-09-14 00:52:30 +00:00
ifneq ($(findstring Win32,$(OS)),)
HAVE_VULKAN=1
DEFINES += -DHAVE_VULKAN
endif
HW_CONTEXT_MENU_DRIVERS=$(HAVE_RGUI)
ifeq ($(HW_CONTEXT_MENU_DRIVERS),0)
ifeq ($(HAVE_GL_CONTEXT),1)
2016-07-15 13:40:06 +00:00
HW_CONTEXT_MENU_DRIVERS=1
endif
ifeq ($(HAVE_VULKAN),1)
2016-07-15 13:40:06 +00:00
HW_CONTEXT_MENU_DRIVERS=1
endif
endif
2015-11-17 11:04:02 +00:00
# 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
2016-04-25 12:58:47 +00:00
#ifeq ($(HAVE_NUKLEAR),)
#HAVE_NUKLEAR = 1
2016-02-25 20:29:38 +00:00
#endif
ifeq ($(HAVE_XMB),)
HAVE_XMB = 1
endif
else
2015-10-11 07:26:54 +00:00
HAVE_ZARCH = 0
HAVE_MATERIALUI = 0
2016-04-25 12:58:47 +00:00
#HAVE_NUKLEAR = 0
HAVE_XMB = 0
endif
2014-09-13 22:53:00 +00:00
ifeq ($(HAVE_RGUI), 1)
2015-01-26 09:54:13 +00:00
OBJ += menu/drivers/rgui.o
2014-09-13 22:53:00 +00:00
DEFINES += -DHAVE_MENU -DHAVE_RGUI
HAVE_MENU_COMMON = 1
ifeq ($(HAVE_MATERIALUI), 1)
OBJ += menu/drivers/materialui.o
DEFINES += -DHAVE_MATERIALUI
2014-09-13 22:53:00 +00:00
endif
2016-04-25 12:58:47 +00:00
ifeq ($(HAVE_NUKLEAR), 1)
OBJ += menu/drivers/nuklear/nk_common.o
OBJ += menu/drivers/nuklear/nk_menu.o
2016-05-26 00:38:20 +00:00
OBJ += menu/drivers/nuklear/nk_wnd_main.o
2016-05-26 00:58:16 +00:00
OBJ += menu/drivers/nuklear/nk_wnd_file_picker.o
OBJ += menu/drivers/nuklear/nk_wnd_shader_parameters.o
2016-05-26 00:58:16 +00:00
OBJ += menu/drivers/nuklear/nk_wnd_settings.o
2016-04-25 12:58:47 +00:00
OBJ += menu/drivers/nuklear.o
DEFINES += -DHAVE_NUKLEAR
2016-02-14 19:10:06 +00:00
endif
ifeq ($(HAVE_ZARCH), 1)
OBJ += menu/drivers/zarch.o
DEFINES += -DHAVE_ZARCH
endif
2014-10-08 23:21:22 +00:00
ifeq ($(HAVE_XMB), 1)
2015-01-26 09:54:13 +00:00
OBJ += menu/drivers/xmb.o
2014-10-08 23:21:22 +00:00
DEFINES += -DHAVE_XMB
endif
2014-09-13 22:53:00 +00:00
endif
ifeq ($(HAVE_LAKKA), 1)
DEFINES += -DHAVE_LAKKA
DEFINES += -DLAKKA_PROJECT=$(LAKKA_PROJECT)
endif
2014-09-13 22:53:00 +00:00
ifeq ($(HAVE_MENU_COMMON), 1)
2016-06-20 01:35:09 +00:00
OBJ += menu/menu_driver.o \
2016-02-09 16:36:59 +00:00
menu/menu_content.o \
2015-10-11 07:26:54 +00:00
menu/menu_input.o \
2016-09-16 14:39:30 +00:00
menu/menu_event.o \
2015-10-11 07:26:54 +00:00
menu/menu_entries.o \
menu/menu_navigation.o \
menu/menu_setting.o \
menu/menu_shader.o \
menu/widgets/menu_dialog.o \
2016-09-15 17:23:32 +00:00
menu/widgets/menu_input_dialog.o \
2016-09-15 18:35:39 +00:00
menu/widgets/menu_input_bind_dialog.o \
2016-09-14 22:20:43 +00:00
menu/widgets/menu_entry.o \
2016-09-14 22:10:37 +00:00
menu/widgets/menu_list.o \
2015-10-11 07:26:54 +00:00
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 \
2016-07-08 14:24:05 +00:00
menu/cbs/menu_cbs_label.o \
2016-10-20 13:57:35 +00:00
menu/cbs/menu_cbs_sublabel.o \
2015-10-11 07:26:54 +00:00
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_display.o \
menu/menu_displaylist.o \
menu/menu_animation.o \
menu/drivers_display/menu_display_null.o \
2015-10-11 07:26:54 +00:00
menu/drivers/menu_generic.o \
menu/drivers/null.o
2014-09-13 22:53:00 +00:00
endif
2014-09-13 23:01:52 +00:00
2015-07-14 15:00:28 +00:00
ifeq ($(HAVE_STB_FONT), 1)
OBJ += gfx/drivers_font_renderer/stb.o
endif
2014-09-13 23:01:52 +00:00
ifeq ($(HAVE_FREETYPE), 1)
2015-01-12 22:34:10 +00:00
OBJ += gfx/drivers_font_renderer/freetype.o
2014-09-13 23:01:52 +00:00
LIBS += $(FREETYPE_LIBS)
DEFINES += $(FREETYPE_CFLAGS)
endif
ifeq ($(HAVE_THREADS), 1)
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/rthreads/rthreads.o \
$(LIBRETRO_COMM_DIR)/rthreads/rsemaphore.o \
2016-06-07 04:35:48 +00:00
gfx/video_thread_wrapper.o \
2016-02-09 16:36:59 +00:00
audio/audio_thread_wrapper.o
2014-09-13 23:01:52 +00:00
DEFINES += -DHAVE_THREADS
ifeq ($(findstring Haiku,$(OS)),)
LIBS += -lpthread
endif
endif
2014-09-13 23:58:57 +00:00
2016-10-18 00:21:51 +00:00
ifeq ($(HAVE_THREAD_STORAGE), 1)
DEFINES += -DHAVE_THREAD_STORAGE
endif
2014-09-14 01:22:04 +00:00
ifeq ($(HAVE_WAYLAND), 1)
OBJ += gfx/drivers_context/wayland_ctx.o
2014-09-14 01:22:04 +00:00
DEFINES += $(WAYLAND_CFLAGS)
LIBS += $(WAYLAND_LIBS)
endif
#Input
2014-09-14 00:52:30 +00:00
ifeq ($(HAVE_DINPUT), 1)
LIBS += -ldinput8 -ldxguid -lole32
HAVE_DIRECTX=1
2014-09-14 00:52:30 +00:00
DEFINES += -DHAVE_DINPUT
OBJ += input/drivers/dinput.o \
2015-10-11 07:26:54 +00:00
input/drivers_joypad/dinput_joypad.o
2014-09-14 00:52:30 +00:00
endif
2015-04-05 18:54:46 +00:00
ifeq ($(HAVE_XINPUT), 1)
DEFINES += -DHAVE_XINPUT
OBJ += input/drivers_joypad/xinput_joypad.o
2014-09-13 23:58:57 +00:00
endif
ifeq ($(HAVE_OPENDINGUX_FBDEV), 1)
2016-07-15 13:40:06 +00:00
OBJ += gfx/drivers_context/opendingux_fbdev_ctx.o
DEFINES += $(EGL_CFLAGS)
LIBS += $(EGL_LIBS)
endif
2014-09-13 23:58:57 +00:00
ifeq ($(HAVE_X11), 1)
2015-11-29 02:34:09 +00:00
OBJ += input/common/input_x11_common.o \
2016-02-09 16:36:59 +00:00
input/drivers/x11_input.o \
2015-10-11 07:26:54 +00:00
gfx/common/x11_common.o \
input/drivers_keyboard/keyboard_event_x11.o
2014-09-13 23:58:57 +00:00
LIBS += $(X11_LIBS) $(XEXT_LIBS) $(XF86VM_LIBS) $(XINERAMA_LIBS)
DEFINES += $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS)
2016-02-19 14:44:03 +00:00
ifeq ($(HAVE_XCB),1)
2016-07-15 13:40:06 +00:00
LIBS += -lX11-xcb
2016-02-19 14:44:03 +00:00
endif
2016-09-16 22:38:35 +00:00
ifneq ($(HAVE_OPENGLES), 1)
2016-07-15 13:40:06 +00:00
OBJ += gfx/drivers_context/x_ctx.o
endif
2014-09-13 23:58:57 +00:00
endif
2016-02-19 14:43:12 +00:00
ifeq ($(HAVE_XCB),1)
2016-07-15 13:40:06 +00:00
DEFINES += $(XCB_CFLAGS)
LIBS += $(XCB_LIBS)
2016-02-19 14:43:12 +00:00
endif
2014-09-13 23:58:57 +00:00
ifeq ($(HAVE_XKBCOMMON), 1)
DEFINES += $(XKBCOMMON_CFLAGS)
2016-02-09 16:36:59 +00:00
OBJ += input/drivers_keyboard/keyboard_event_xkb.o
2014-09-13 23:58:57 +00:00
LIBS += $(XKBCOMMON_LIBS)
endif
WIP: Fixes #2026 Screensaver suspend on Linux via Dbus One some systems (tested with Gnome 3 on Arch Linux) the current method of using `xdg-screensaver` to suspend the screensaver does not work. Instead, using DBus to issue an `Inhibit` request is recommended. The request returns a cookie that needs to be re-used to un-inhibit the screensaver later. Additionally if the DBus connection is closed the current inhibition is discarded. Thus, the DBus connection needs to stay connected for the duration of the screenshot inhibition. The code is heavily inspired from the [SDL 2.x code](http://hg.libsdl.org/SDL/file/default/src/core/linux/SDL_dbus.c#l172). I didn't call the SDL 2 code though since this it to fix the issue with the GL driver, and I assume one would want to have screensaver inhibited even when SDL 2 is not available (but GL is). I've set "WIP" because: * I haven't done C in a long time so my code is probably not great * There's a dependency on DBus which I don't know is acceptable or not * I've put my code where I could to check it works, but `x11_common` may not be the best place * The code need and "init" and "deinit" kind of method as it needs to initialise the DBus connection, and on deinit close it properly. I've used `x11_connect` and `x11_window_destroy` but they don't sound like the best choices. * I'm a bit unclear as to what happens when "suspend screensaver" is ticked on/off in the menu. This doesn't seem to call `x11_suspend_screensaver` everytime, so I'm not sure if there's a hook somewhere (as disabling screensaver suspend in the menu should cause a DBus unhinibit request to be sent). * Should I just call the SDL 2.x code (meaning that the GL driver would depend on SDL 2.x at runtime)? So, first of all are you ok with the approach, and if yes I'd gladly get feedback about the code, how to architecture it and the best place to put it. Thanks!
2016-09-08 22:18:37 +00:00
ifeq ($(HAVE_DBUS), 1)
LIBS += $(DBUS_LIBS)
CFLAGS += $(DBUS_CFLAGS)
endif
2014-09-13 23:58:57 +00:00
ifeq ($(HAVE_UDEV), 1)
DEFINES += $(UDEV_CFLAGS)
LIBS += $(UDEV_LIBS)
2015-04-04 19:45:59 +00:00
OBJ += input/drivers/udev_input.o \
2016-02-09 16:36:59 +00:00
input/drivers_keyboard/keyboard_event_udev.o \
2015-10-11 07:26:54 +00:00
input/drivers_joypad/udev_joypad.o
2014-09-13 23:58:57 +00:00
endif
ifeq ($(HAVE_LIBUSB), 1)
2016-05-11 17:02:43 +00:00
ifeq ($(HAVE_THREADS), 1)
2016-06-07 01:01:33 +00:00
ifeq ($(HAVE_HID), 1)
2016-02-09 16:36:59 +00:00
DEFINES += -DHAVE_LIBUSB
OBJ += input/drivers_hid/libusb_hid.o
LIBS += -lusb-1.0
2016-06-07 01:01:33 +00:00
endif
endif
2016-05-11 17:02:43 +00:00
endif
ifeq ($(HAVE_IOHIDMANAGER), 1)
2016-06-07 01:01:33 +00:00
ifeq ($(HAVE_HID), 1)
2016-02-09 16:36:59 +00:00
DEFINES += -DHAVE_IOHIDMANAGER
OBJ += input/drivers_hid/iohidmanager_hid.o
LIBS += -framework IOKit
endif
2016-06-07 01:01:33 +00:00
endif
ifeq ($(HAVE_CORELOCATION), 1)
2016-02-09 16:36:59 +00:00
DEFINES += -DHAVE_CORELOCATION
LIBS += -framework CoreLocation
endif
ifeq ($(HAVE_HID), 1)
2016-02-09 16:36:59 +00:00
DEFINES += -DHAVE_HID
2016-06-07 01:01:33 +00:00
OBJ += input/input_hid_driver.o \
2016-07-15 13:40:06 +00:00
input/drivers_joypad/hid_joypad.o \
input/connect/joypad_connection.o \
input/connect/connect_ps2adapter.o \
2015-10-11 07:26:54 +00:00
input/connect/connect_ps3.o \
input/connect/connect_ps4.o \
input/connect/connect_wii.o \
2016-02-04 22:43:33 +00:00
input/connect/connect_nesusb.o \
input/connect/connect_snesusb.o \
2016-02-04 22:49:04 +00:00
input/connect/connect_wiiupro.o \
input/connect/connect_wiiugca.o
endif
2014-10-04 21:04:38 +00:00
ifeq ($(HAVE_PARPORT), 1)
OBJ += input/drivers_joypad/parport_joypad.o
2014-10-04 21:04:38 +00:00
endif
2014-09-14 00:52:30 +00:00
2015-11-19 06:23:41 +00:00
# Companion UI
ifneq ($(findstring Win32,$(OS)),)
2016-06-04 02:24:54 +00:00
OBJ += ui/drivers/ui_win32.o \
2016-07-15 13:40:06 +00:00
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
2015-11-19 06:23:41 +00:00
endif
2014-09-13 23:58:57 +00:00
# Video
2015-06-17 18:18:25 +00:00
2015-10-11 07:19:11 +00:00
OBJ += gfx/video_context_driver.o \
2015-10-11 07:26:54 +00:00
gfx/drivers_context/gfx_null_ctx.o \
2016-06-07 04:35:48 +00:00
gfx/video_state_tracker.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/gfx/math/vector_2.o \
$(LIBRETRO_COMM_DIR)/gfx/math/vector_3.o \
$(LIBRETRO_COMM_DIR)/gfx/math/vector_4.o \
$(LIBRETRO_COMM_DIR)/gfx/math/matrix_4x4.o \
$(LIBRETRO_COMM_DIR)/gfx/math/matrix_3x3.o
2015-10-11 07:19:11 +00:00
2016-02-22 12:01:16 +00:00
ifeq ($(HAVE_KMS), 1)
2016-07-15 13:40:06 +00:00
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)
2016-02-22 12:01:16 +00:00
endif
ifeq ($(HAVE_PLAIN_DRM), 1)
2016-07-15 13:40:06 +00:00
OBJ += gfx/drivers/drm_gfx.o
CFLAGS += -I/usr/include/libdrm
2016-08-22 12:23:17 +00:00
LIBS += -ldrm
endif
2015-06-17 18:18:25 +00:00
ifeq ($(HAVE_GL_CONTEXT), 1)
2014-09-15 15:07:17 +00:00
DEFINES += -DHAVE_OPENGL -DHAVE_GLSL
OBJ += gfx/drivers/gl.o \
$(LIBRETRO_COMM_DIR)/gfx/gl_capabilities.o \
gfx/drivers/gl_renderchains/render_chain_gl_legacy.o \
2015-11-17 07:01:33 +00:00
gfx/common/gl_common.o \
2016-06-07 04:35:48 +00:00
gfx/drivers_font/gl_raster_font.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/glsym/rglgen.o
2016-02-09 16:36:59 +00:00
ifeq ($(HAVE_MENU_COMMON), 1)
2016-02-09 16:36:59 +00:00
OBJ += menu/drivers_display/menu_display_gl.o
endif
2014-09-14 01:44:54 +00:00
ifeq ($(HAVE_VIDEOCORE), 1)
2015-01-12 21:19:31 +00:00
OBJ += gfx/drivers_context/vc_egl_ctx.o
2014-09-14 01:44:54 +00:00
DEFINES += $(EGL_CFLAGS)
LIBS += $(EGL_LIBS)
endif
ifeq ($(HAVE_EMSCRIPTEN), 1)
2015-01-12 21:19:31 +00:00
OBJ += gfx/drivers_context/emscriptenegl_ctx.o
2014-09-14 01:44:54 +00:00
endif
ifeq ($(HAVE_MALI_FBDEV), 1)
2015-01-12 21:19:31 +00:00
OBJ += gfx/drivers_context/mali_fbdev_ctx.o
DEFINES += $(EGL_CFLAGS)
LIBS += $(EGL_LIBS)
2014-09-14 01:44:54 +00:00
endif
ifeq ($(HAVE_VIVANTE_FBDEV), 1)
2015-01-12 21:19:31 +00:00
OBJ += gfx/drivers_context/vivante_fbdev_ctx.o
2014-09-14 01:44:54 +00:00
DEFINES += $(EGL_CFLAGS)
LIBS += $(EGL_LIBS)
endif
ifeq ($(HAVE_X11), 1)
ifeq ($(HAVE_EGL), 1)
2015-01-12 21:19:31 +00:00
OBJ += gfx/drivers_context/xegl_ctx.o
2014-09-14 01:44:54 +00:00
DEFINES += $(EGL_CFLAGS)
LIBS += $(EGL_LIBS)
endif
endif
2016-07-30 14:37:22 +00:00
ifeq ($(HAVE_OSMESA), 1)
OBJ += gfx/drivers_context/osmesa_ctx.o
LIBS += -lOSMesa
endif
ifeq ($(HAVE_FFMPEG), 1)
ifneq ($(C89_BUILD), 1)
2016-09-16 22:38:35 +00:00
ifneq ($(HAVE_OPENGLES), 1)
OBJ += cores/libretro-ffmpeg/fft/fft.o
2016-09-19 17:44:20 +00:00
DEFINES += -I$(DEPS_DIR) -DHAVE_GL_FFT
2016-07-15 13:40:06 +00:00
NEED_CXX_LINKER=1
endif
endif
endif
2016-09-16 22:38:35 +00:00
ifeq ($(HAVE_OPENGLES), 1)
LIBS += $(OPENGLES_LIBS)
DEFINES += $(OPENGLES_CFLAGS) -DHAVE_OPENGLES
2016-09-16 22:38:35 +00:00
ifeq ($(HAVE_OPENGLES3), 1)
2014-09-14 01:44:54 +00:00
DEFINES += -DHAVE_OPENGLES3
2016-08-07 03:45:35 +00:00
else
DEFINES += -DHAVE_OPENGLES2
2014-09-14 01:44:54 +00:00
endif
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/glsym/glsym_es2.o
2014-09-14 01:44:54 +00:00
else
DEFINES += -DHAVE_GL_SYNC
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/glsym/glsym_gl.o
2016-02-09 16:36:59 +00:00
GL_LIBS := -lGL
2014-09-14 01:44:54 +00:00
ifeq ($(OSX), 1)
2015-06-02 08:07:07 +00:00
GL_LIBS := -framework OpenGL
2015-04-26 01:48:35 +00:00
OBJ += gfx/drivers_context/cgl_ctx.o
2014-09-14 01:44:54 +00:00
else ifneq ($(findstring Win32,$(OS)),)
2015-06-02 08:07:07 +00:00
GL_LIBS := -lopengl32 -lgdi32 -lcomdlg32 -lcomctl32
OBJ += gfx/drivers_context/wgl_ctx.o
2014-09-14 01:44:54 +00:00
endif
2016-02-09 16:36:59 +00:00
LIBS += $(GL_LIBS)
2014-09-14 01:44:54 +00:00
endif
OBJ += gfx/drivers_shader/shader_glsl.o
2014-09-14 01:44:54 +00:00
DEFINES += -DHAVE_GLSL
endif
2014-09-13 23:58:57 +00:00
2015-11-19 12:16:43 +00:00
ifeq ($(HAVE_EGL), 1)
2016-02-09 16:36:59 +00:00
OBJ += gfx/common/egl_common.o
2015-11-19 12:16:43 +00:00
endif
ifeq ($(HAVE_SDL2), 1)
HAVE_SDL=0
endif
2014-09-14 01:22:04 +00:00
ifeq ($(HAVE_SDL), 1)
2015-04-04 19:45:59 +00:00
OBJ += gfx/drivers/sdl_gfx.o \
2015-10-11 07:26:54 +00:00
input/drivers/sdl_input.o \
input/drivers_joypad/sdl_joypad.o \
audio/drivers/sdl_audio.o
2014-09-14 01:22:04 +00:00
2015-06-17 18:18:25 +00:00
ifeq ($(HAVE_GL_CONTEXT), 1)
2015-01-12 21:19:31 +00:00
OBJ += gfx/drivers_context/sdl_gl_ctx.o
2014-09-14 01:22:04 +00:00
endif
DEFINES += $(SDL_CFLAGS) $(BSD_LOCAL_INC)
LIBS += $(SDL_LIBS)
endif
ifeq ($(HAVE_SDL2), 1)
2015-04-04 19:45:59 +00:00
OBJ += gfx/drivers/sdl2_gfx.o \
2015-10-11 07:26:54 +00:00
input/drivers/sdl_input.o \
input/drivers_joypad/sdl_joypad.o \
audio/drivers/sdl_audio.o
2014-09-14 01:22:04 +00:00
2015-06-17 18:18:25 +00:00
ifeq ($(HAVE_GL_CONTEXT), 1)
2015-01-12 21:19:31 +00:00
OBJ += gfx/drivers_context/sdl_gl_ctx.o
2014-09-14 01:22:04 +00:00
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
2016-02-16 19:24:00 +00:00
ifeq ($(HAVE_VULKAN), 1)
2016-07-15 13:40:06 +00:00
ifneq ($(findstring Win32,$(OS)),)
GLSLANG_PLATFORM := Windows
else
GLSLANG_PLATFORM := Unix
endif
GLSLANG_SOURCES := \
2016-09-19 17:44:20 +00:00
$(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)
SPIRV_CROSS_SOURCES := $(DEPS_DIR)/SPIRV-Cross/spirv_cross.cpp
2016-07-15 13:40:06 +00:00
ifneq ($(findstring Win32,$(OS)),)
# Trivial temporary workaround for MinGW and glslang.
CXXFLAGS += -fpermissive
endif
DEFINES += \
2016-09-19 17:44:20 +00:00
-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 \
-I$(DEPS_DIR)/SPIRV-Cross
2016-07-15 13:40:06 +00:00
CXXFLAGS += -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -Wno-parentheses -Igfx/include
CFLAGS += -Igfx/include
GLSLANG_OBJ := $(GLSLANG_SOURCES:.cpp=.o)
SPIRV_CROSS_OBJ := $(SPIRV_CROSS_SOURCES:.cpp=.o)
OBJ += gfx/drivers/vulkan.o \
gfx/common/vulkan_common.o \
2016-09-19 17:44:20 +00:00
$(LIBRETRO_COMM_DIR)/vulkan/vulkan_symbol_wrapper.o \
2016-07-15 13:40:06 +00:00
gfx/drivers_font/vulkan_raster_font.o \
gfx/drivers_shader/shader_vulkan.o \
gfx/drivers_shader/glslang_util.o \
gfx/drivers_shader/slang_reflection.o \
$(GLSLANG_OBJ) \
$(SPIRV_CROSS_OBJ)
2016-08-27 23:48:13 +00:00
ifeq ($(HAVE_VULKAN_DISPLAY), 1)
2016-07-15 13:40:06 +00:00
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++
2016-02-16 19:24:00 +00:00
endif
2014-09-14 00:52:30 +00:00
ifeq ($(HAVE_OMAP), 1)
OBJ += gfx/drivers/omap_gfx.o
2014-09-14 00:52:30 +00:00
endif
ifeq ($(HAVE_EXYNOS), 1)
2015-04-04 19:45:59 +00:00
OBJ += gfx/drivers/exynos_gfx.o \
2015-10-11 07:26:54 +00:00
memory/neon/memcpy-neon.o
2014-09-14 00:52:30 +00:00
LIBS += $(DRM_LIBS) $(EXYNOS_LIBS)
DEFINES += $(DRM_CFLAGS) $(EXYNOS_CFLAGS)
2016-02-09 16:36:59 +00:00
HAVE_AND_WILL_USE_DRM = 1
endif
ifeq ($(HAVE_AND_WILL_USE_DRM), 1)
2016-02-09 16:36:59 +00:00
OBJ += gfx/common/drm_common.o
2014-09-14 00:52:30 +00:00
endif
ifeq ($(HAVE_DISPMANX), 1)
OBJ += gfx/drivers/dispmanx_gfx.o
2016-02-09 16:36:59 +00:00
HAVE_VIDEOCORE = 1
LIBS += $(DISPMANX_LIBS)
DEFINES += $(DISPMANX_CFLAGS)
endif
ifeq ($(HAVE_SUNXI), 1)
2015-04-04 19:45:59 +00:00
OBJ += gfx/drivers/sunxi_gfx.o \
2015-11-17 07:35:00 +00:00
gfx/include/pixman/pixman-arm-neon-asm.o
endif
2014-09-13 23:58:57 +00:00
ifeq ($(HAVE_VG), 1)
2015-11-08 22:31:07 +00:00
OBJ += gfx/drivers/vg.o
2014-09-13 23:58:57 +00:00
DEFINES += $(VG_CFLAGS)
LIBS += $(VG_LIBS)
endif
ifeq ($(HAVE_XVIDEO), 1)
OBJ += gfx/drivers/xvideo.o
LIBS += $(XVIDEO_LIBS)
2014-09-13 23:58:57 +00:00
DEFINES += $(XVIDEO_CFLAGS)
endif
2014-09-14 00:05:17 +00:00
ifeq ($(HAVE_CG), 1)
2016-02-09 16:36:59 +00:00
DEFINES += -DHAVE_CG
OBJ += gfx/drivers_shader/shader_gl_cg.o
2014-09-16 20:45:45 +00:00
LIBS += $(CG_LIBS)
2014-09-14 00:05:17 +00:00
endif
ifeq ($(HAVE_D3D9), 1)
2016-08-01 20:05:57 +00:00
OBJ += gfx/drivers/d3d.o \
gfx/drivers/d3d_renderchains/render_chain_null.o \
gfx/drivers/d3d_renderchains/render_chain_driver.o \
2015-11-18 12:00:13 +00:00
gfx/common/d3d_common.o \
2015-10-11 07:26:54 +00:00
gfx/drivers_font/d3d_w32_font.o \
gfx/drivers_context/d3d_ctx.o
HAVE_DIRECTX=1
DEFINES += -DHAVE_D3D -DHAVE_D3D9
2014-09-14 00:05:17 +00:00
LIBS += -ld3d9 -ld3dx9 -ldxguid
2014-09-16 20:45:45 +00:00
2015-11-09 01:14:59 +00:00
ifeq ($(HAVE_MENU_COMMON), 1)
2016-02-09 16:36:59 +00:00
OBJ += menu/drivers_display/menu_display_d3d.o
endif
2015-11-08 22:20:46 +00:00
2014-09-16 20:45:45 +00:00
ifeq ($(HAVE_CG), 1)
LIBS += -lcgD3D9
2016-08-01 20:05:57 +00:00
OBJ += gfx/drivers/d3d_renderchains/render_chain_cg.o
2014-09-16 20:45:45 +00:00
endif
2014-09-14 00:05:17 +00:00
endif
2014-09-14 00:15:41 +00:00
2014-12-15 20:34:22 +00:00
#ifeq ($(HAVE_LIBXML2), 1)
#LIBS += $(LIBXML2_LIBS)
#DEFINES += $(LIBXML2_CFLAGS)
#else
2016-09-19 17:44:20 +00:00
#OBJ += $(LIBRETRO_COMM_DIR)/formats/xml/rxml.o
2014-12-15 20:34:22 +00:00
#endif
2014-09-14 00:15:41 +00:00
# Compression/Archive
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file.o
2014-09-14 00:15:41 +00:00
ifeq ($(HAVE_7ZIP),1)
2016-09-19 17:44:20 +00:00
CFLAGS += -I$(DEPS_DIR)/7zip
HAVE_COMPRESSION = 1
2014-09-14 00:15:41 +00:00
DEFINES += -DHAVE_7ZIP
2016-09-19 17:44:20 +00:00
7ZOBJ = $(DEPS_DIR)/7zip/7zIn.o \
$(DEPS_DIR)/7zip/7zAlloc.o \
$(DEPS_DIR)/7zip/Bra86.o \
$(DEPS_DIR)/7zip/7zFile.o \
$(DEPS_DIR)/7zip/7zStream.o \
$(DEPS_DIR)/7zip/7zBuf2.o \
$(DEPS_DIR)/7zip/LzmaDec.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)
2014-09-14 00:15:41 +00:00
endif
2014-09-14 00:52:30 +00:00
2015-02-22 03:56:18 +00:00
2014-09-14 02:50:10 +00:00
ifeq ($(HAVE_ZLIB), 1)
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file_zlib.o
2014-09-14 02:50:10 +00:00
OBJ += $(ZLIB_OBJS)
DEFINES += -DHAVE_ZLIB
HAVE_COMPRESSION = 1
ifeq ($(HAVE_BUILTINZLIB), 1)
2015-03-14 04:24:57 +00:00
DEFINES += -DWANT_ZLIB
2014-09-14 02:50:10 +00:00
else
LIBS += -lz
endif
endif
2016-05-18 11:28:20 +00:00
ifeq ($(HAVE_RTGA), 1)
2016-07-15 13:40:06 +00:00
DEFINES += -DHAVE_RTGA
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/formats/tga/rtga.o
2016-05-18 11:28:20 +00:00
endif
2015-04-19 14:55:03 +00:00
ifeq ($(HAVE_RPNG), 1)
2016-07-15 13:40:06 +00:00
DEFINES += -DHAVE_RPNG
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/formats/png/rpng.o \
$(LIBRETRO_COMM_DIR)/formats/png/rpng_encode.o
2015-04-19 14:55:03 +00:00
endif
2016-05-11 19:27:17 +00:00
ifeq ($(HAVE_RJPEG), 1)
2016-07-15 13:40:06 +00:00
DEFINES += -DHAVE_RJPEG
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/formats/jpeg/rjpeg.o
2016-05-11 19:27:17 +00:00
endif
2016-05-18 11:28:20 +00:00
ifeq ($(HAVE_RBMP), 1)
2016-07-15 13:40:06 +00:00
DEFINES += -DHAVE_RBMP
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp.o
2016-05-18 11:28:20 +00:00
endif
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp_encode.o \
$(LIBRETRO_COMM_DIR)/formats/json/jsonsax.o \
$(LIBRETRO_COMM_DIR)/formats/image_transfer.o
2016-06-07 04:35:48 +00:00
2014-09-16 17:20:15 +00:00
ifdef HAVE_COMPRESSION
DEFINES += -DHAVE_COMPRESSION
endif
ifeq ($(HAVE_BUILTINZLIB),1)
2016-09-19 17:44:20 +00:00
OBJ += $(DEPS_DIR)/zlib/adler32.o \
$(DEPS_DIR)/zlib/compress.o \
$(DEPS_DIR)/zlib/crc32.o \
$(DEPS_DIR)/zlib/deflate.o \
$(DEPS_DIR)/zlib/gzclose.o \
$(DEPS_DIR)/zlib/gzlib.o \
$(DEPS_DIR)/zlib/gzread.o \
$(DEPS_DIR)/zlib/gzwrite.o \
$(DEPS_DIR)/zlib/inffast.o \
$(DEPS_DIR)/zlib/inflate.o \
$(DEPS_DIR)/zlib/inftrees.o \
$(DEPS_DIR)/zlib/trees.o \
$(DEPS_DIR)/zlib/uncompr.o \
$(DEPS_DIR)/zlib/zutil.o
2014-09-14 02:50:10 +00:00
else
ifeq ($(HAVE_ZLIB),1)
2014-09-14 02:50:10 +00:00
OBJ += $(ZLIB_OBJS)
endif
endif
2014-09-14 02:50:10 +00:00
2016-10-18 00:21:51 +00:00
# Video4Linux 2
2014-09-14 00:52:30 +00:00
ifeq ($(HAVE_V4L2),1)
2016-07-28 18:01:38 +00:00
OBJ += camera/drivers/video4linux2.o
ifeq ($(HAVE_VIDEO_PROCESSOR),1)
OBJ += cores/libretro-video-processor/video_processor_v4l2.o
endif
2014-09-14 00:52:30 +00:00
DEFINES += -DHAVE_V4L2
2016-07-28 17:10:18 +00:00
LIBS += $(V4L2_LIBS)
2014-09-14 00:52:30 +00:00
endif
2016-07-28 18:01:38 +00:00
# Things that depend on network availability
2014-09-14 01:38:36 +00:00
2015-01-27 23:49:43 +00:00
ifeq ($(HAVE_NETWORKING), 1)
DEFINES += -DHAVE_NETWORKING
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/net/net_compat.o \
$(LIBRETRO_COMM_DIR)/net/net_http.o \
$(LIBRETRO_COMM_DIR)/net/net_socket.o \
2016-06-07 04:35:48 +00:00
network/net_http_special.o \
tasks/task_http.o
ifneq ($(HAVE_SOCKET_LEGACY),1)
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/net/net_ifinfo.o
2016-07-15 13:40:06 +00:00
endif
2016-03-02 23:26:26 +00:00
ifeq ($(WANT_IFADDRS), 1)
2016-07-15 13:40:06 +00:00
DEFINES += -DWANT_IFADDRS
2016-09-19 17:44:20 +00:00
OBJ += $(LIBRETRO_COMM_DIR)/compat/compat_ifaddrs.o
2016-07-15 13:40:06 +00:00
endif
2014-09-14 01:38:36 +00:00
ifneq ($(findstring Win32,$(OS)),)
LIBS += -lws2_32 -liphlpapi
2014-09-14 01:38:36 +00:00
endif
# Netplay
2016-09-29 19:07:10 +00:00
DEFINES += -DHAVE_NETWORK_CMD
OBJ += network/netplay/netplay_net.o \
network/netplay/netplay_spectate.o \
network/netplay/netplay_common.o \
network/netplay/netplay.o
# Retro Achievements (also depends on threads)
ifeq ($(HAVE_CHEEVOS), 1)
ifeq ($(HAVE_THREADS), 1)
DEFINES += -DHAVE_CHEEVOS
2016-09-19 17:44:20 +00:00
OBJ += cheevos.o \
$(LIBRETRO_COMM_DIR)/utils/md5.o
endif
endif
ifeq ($(HAVE_NETWORKGAMEPAD), 1)
OBJ += input/input_remote.o \
2016-07-15 13:40:06 +00:00
cores/libretro-net-retropad/net_retropad_core.o
endif
2014-09-14 01:38:36 +00:00
endif
ifneq ($(findstring Win32,$(OS)),)
2014-09-14 20:50:29 +00:00
OBJ += media/rarch.o \
input/drivers_keyboard/keyboard_event_win32.o \
2015-10-11 07:26:54 +00:00
gfx/common/win32_common.o \
frontend/drivers/platform_win32.o
endif
2014-09-14 02:43:18 +00:00
ifeq ($(HAVE_AVFOUNDATION), 1)
ifeq ($(HAVE_COCOA), 1)
DEFINES += -DHAVE_AVFOUNDATION
LIBS += -framework AVFoundation
LIBS += -framework CoreVideo
LIBS += -framework CoreMedia
endif
endif
2014-09-14 02:43:18 +00:00
# Record
ifeq ($(HAVE_FFMPEG), 1)
2015-06-20 22:37:19 +00:00
OBJ += record/drivers/record_ffmpeg.o \
2015-10-19 14:55:08 +00:00
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)
2016-05-08 07:37:27 +00:00
DEFINES += -Wno-deprecated-declarations -DHAVE_FFMPEG -Iffmpeg
2014-09-14 02:43:18 +00:00
endif
2014-09-16 17:20:33 +00:00
ifeq ($(HAVE_COMPRESSION), 1)
DEFINES += -DHAVE_COMPRESSION
2016-09-18 17:05:17 +00:00
OBJ += tasks/task_decompress.o
endif
2014-09-16 17:20:33 +00:00
2016-03-04 04:01:49 +00:00
#ifeq ($(HAVE_DIRECTX), 1)
#$DEFINES += -I"$(DXSDK_DIR)/Include"
#endif
2015-04-19 22:38:55 +00:00
ifeq ($(HAVE_COCOA),1)
2016-02-09 16:36:59 +00:00
DEFINES += -DHAVE_MAIN
OBJ += input/drivers/cocoa_input.o \
2016-09-19 17:44:20 +00:00
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
2015-04-19 22:38:55 +00:00
endif