2010-05-29 15:01:11 +00:00
|
|
|
include config.mk
|
2010-05-28 12:04:50 +00:00
|
|
|
|
2013-01-11 04:49:12 +00:00
|
|
|
TARGET = retroarch tools/retroarch-joyconfig tools/retrolaunch/retrolaunch
|
2010-05-26 19:27:37 +00:00
|
|
|
|
2014-02-02 14:29:07 +00:00
|
|
|
OBJDIR := obj-unix
|
|
|
|
|
2013-02-25 06:01:16 +00:00
|
|
|
OBJ = frontend/frontend.o \
|
2013-07-27 14:36:55 +00:00
|
|
|
frontend/frontend_context.o \
|
2014-05-09 04:12:53 +00:00
|
|
|
frontend/platform/platform_null.o \
|
2013-02-25 06:01:16 +00:00
|
|
|
retroarch.o \
|
2012-06-19 22:43:41 +00:00
|
|
|
file.o \
|
|
|
|
file_path.o \
|
|
|
|
hash.o \
|
|
|
|
driver.o \
|
|
|
|
settings.o \
|
2014-05-03 16:38:29 +00:00
|
|
|
settings_data.o \
|
2012-06-19 22:43:41 +00:00
|
|
|
dynamic.o \
|
2013-04-14 14:24:19 +00:00
|
|
|
dynamic_dummy.o \
|
2013-11-06 14:08:54 +00:00
|
|
|
message_queue.o \
|
2012-06-19 22:43:41 +00:00
|
|
|
rewind.o \
|
|
|
|
gfx/gfx_common.o \
|
2014-06-07 21:40:06 +00:00
|
|
|
gfx/fonts/bitmapfont.o \
|
2012-09-28 20:38:42 +00:00
|
|
|
input/input_common.o \
|
2013-12-10 18:39:09 +00:00
|
|
|
input/keyboard_line.o \
|
2012-12-20 11:24:49 +00:00
|
|
|
input/overlay.o \
|
2012-06-19 22:43:41 +00:00
|
|
|
patch.o \
|
2012-12-20 13:57:55 +00:00
|
|
|
fifo_buffer.o \
|
2013-04-04 11:58:30 +00:00
|
|
|
core_options.o \
|
2012-06-19 22:43:41 +00:00
|
|
|
compat/compat.o \
|
2013-01-02 14:05:55 +00:00
|
|
|
cheats.o \
|
2014-03-01 10:53:04 +00:00
|
|
|
frontend/info/core_info.o \
|
2012-12-23 12:55:59 +00:00
|
|
|
conf/config_file.o \
|
2012-10-19 23:12:02 +00:00
|
|
|
screenshot.o \
|
|
|
|
gfx/scaler/scaler.o \
|
2014-05-08 17:39:12 +00:00
|
|
|
gfx/shader_common.o \
|
2013-04-06 09:30:56 +00:00
|
|
|
gfx/shader_parse.o \
|
2012-10-19 23:12:02 +00:00
|
|
|
gfx/scaler/pixconv.o \
|
|
|
|
gfx/scaler/scaler_int.o \
|
2014-04-16 13:48:33 +00:00
|
|
|
gfx/scaler/scaler_filter.o \
|
2014-05-10 18:26:58 +00:00
|
|
|
gfx/image/image_rpng.o \
|
2012-12-14 19:25:40 +00:00
|
|
|
gfx/fonts/fonts.o \
|
2013-02-08 10:49:51 +00:00
|
|
|
audio/resampler.o \
|
2014-05-20 10:28:33 +00:00
|
|
|
audio/dsp_filter.o \
|
2013-04-07 08:33:46 +00:00
|
|
|
audio/sinc.o \
|
2014-04-20 02:17:18 +00:00
|
|
|
audio/cc_resampler.o \
|
2012-11-01 21:31:24 +00:00
|
|
|
performance.o
|
2012-06-19 22:43:41 +00:00
|
|
|
|
2014-06-07 19:18:58 +00:00
|
|
|
|
2012-09-29 19:57:03 +00:00
|
|
|
JOYCONFIG_OBJ = tools/retroarch-joyconfig.o \
|
2012-06-19 22:43:41 +00:00
|
|
|
conf/config_file.o \
|
2012-11-18 16:08:28 +00:00
|
|
|
file_path.o \
|
2012-09-29 19:57:03 +00:00
|
|
|
compat/compat.o \
|
2013-04-26 12:36:36 +00:00
|
|
|
tools/input_common_joyconfig.o
|
2012-06-19 22:43:41 +00:00
|
|
|
|
2013-01-11 10:30:06 +00:00
|
|
|
RETROLAUNCH_OBJ = tools/retrolaunch/main.o \
|
|
|
|
tools/retrolaunch/sha1.o \
|
|
|
|
tools/retrolaunch/parser.o \
|
2013-01-11 04:49:12 +00:00
|
|
|
tools/retrolaunch/cd_detect.o \
|
|
|
|
tools/retrolaunch/rl_fnmatch.o \
|
2013-04-26 12:36:36 +00:00
|
|
|
tools/input_common_launch.o \
|
2013-01-11 04:49:12 +00:00
|
|
|
file_path.o \
|
|
|
|
compat/compat.o \
|
|
|
|
conf/config_file.o \
|
2013-01-11 10:30:06 +00:00
|
|
|
settings.o
|
2013-01-11 04:49:12 +00:00
|
|
|
|
2014-01-11 18:08:24 +00:00
|
|
|
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
2010-11-19 20:26:31 +00:00
|
|
|
|
2012-12-22 22:52:05 +00:00
|
|
|
ifeq ($(findstring Haiku,$(OS)),)
|
2014-01-11 17:51:42 +00:00
|
|
|
LIBS = -lm
|
2012-12-22 16:23:02 +00:00
|
|
|
endif
|
2012-12-22 22:52:05 +00:00
|
|
|
|
2014-05-30 16:18:06 +00:00
|
|
|
DEFINES = -DHAVE_CONFIG_H -DHAVE_SCREENSHOTS -DRARCH_INTERNAL -DHAVE_CC_RESAMPLER -DHAVE_OVERLAY
|
2013-05-27 23:59:06 +00:00
|
|
|
|
2014-02-26 22:49:32 +00:00
|
|
|
|
2013-05-28 07:46:40 +00:00
|
|
|
ifeq ($(GLOBAL_CONFIG_DIR),)
|
2013-05-28 07:38:47 +00:00
|
|
|
GLOBAL_CONFIG_DIR = /etc
|
|
|
|
endif
|
|
|
|
DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'
|
2010-05-28 12:04:50 +00:00
|
|
|
|
2012-02-01 20:32:27 +00:00
|
|
|
ifeq ($(REENTRANT_TEST), 1)
|
2012-04-21 21:31:57 +00:00
|
|
|
DEFINES += -Dmain=retroarch_main
|
2012-02-01 20:32:27 +00:00
|
|
|
OBJ += console/test.o
|
|
|
|
endif
|
|
|
|
|
2011-06-25 15:22:47 +00:00
|
|
|
ifneq ($(findstring Darwin,$(OS)),)
|
2011-02-04 21:47:37 +00:00
|
|
|
OSX := 1
|
2011-02-04 22:53:33 +00:00
|
|
|
LIBS += -framework AppKit
|
2011-02-04 21:47:37 +00:00
|
|
|
else
|
|
|
|
OSX := 0
|
|
|
|
endif
|
|
|
|
|
2011-06-25 15:22:47 +00:00
|
|
|
ifneq ($(findstring BSD,$(OS)),)
|
2011-06-16 20:47:37 +00:00
|
|
|
BSD_LOCAL_INC = -I/usr/local/include
|
|
|
|
endif
|
|
|
|
|
2011-10-06 18:34:01 +00:00
|
|
|
ifneq ($(findstring Linux,$(OS)),)
|
|
|
|
LIBS += -lrt
|
2014-06-05 12:21:17 +00:00
|
|
|
JOYCONFIG_LIBS += -lrt
|
2012-11-01 21:31:24 +00:00
|
|
|
OBJ += input/linuxraw_input.o input/linuxraw_joypad.o
|
2013-04-25 22:43:14 +00:00
|
|
|
JOYCONFIG_OBJ += tools/linuxraw_joypad.o
|
2011-10-06 18:34:01 +00:00
|
|
|
endif
|
|
|
|
|
2013-03-16 08:55:08 +00:00
|
|
|
ifeq ($(HAVE_RGUI), 1)
|
2014-05-26 16:44:24 +00:00
|
|
|
OBJ += frontend/menu/disp/rgui.o
|
|
|
|
DEFINES += -DHAVE_MENU -DHAVE_RGUI
|
2014-04-26 09:04:34 +00:00
|
|
|
HAVE_MENU_COMMON = 1
|
2014-02-26 22:49:32 +00:00
|
|
|
ifeq ($(HAVE_LAKKA), 1)
|
2014-05-26 16:40:27 +00:00
|
|
|
OBJ += frontend/menu/backend/menu_lakka_backend.o frontend/menu/disp/lakka.o
|
2014-02-26 22:49:32 +00:00
|
|
|
DEFINES += -DHAVE_LAKKA
|
2014-05-07 18:12:51 +00:00
|
|
|
LIBS += -lpng
|
2014-02-26 22:49:32 +00:00
|
|
|
endif
|
2013-03-16 08:55:08 +00:00
|
|
|
endif
|
|
|
|
|
2014-04-25 23:53:40 +00:00
|
|
|
ifeq ($(HAVE_MENU_COMMON), 1)
|
2014-05-26 16:44:24 +00:00
|
|
|
OBJ += frontend/menu/backend/menu_common_backend.o frontend/menu/menu_input_line_cb.o frontend/menu/menu_common.o frontend/menu/menu_navigation.o frontend/menu/file_list.o frontend/menu/history.o
|
2014-04-25 23:53:40 +00:00
|
|
|
endif
|
2014-04-20 02:17:18 +00:00
|
|
|
|
2011-11-30 16:46:58 +00:00
|
|
|
ifeq ($(HAVE_THREADS), 1)
|
2013-12-31 21:10:58 +00:00
|
|
|
OBJ += autosave.o thread.o gfx/video_thread_wrapper.o audio/thread_wrapper.o
|
2012-12-22 22:52:05 +00:00
|
|
|
ifeq ($(findstring Haiku,$(OS)),)
|
|
|
|
LIBS += -lpthread
|
|
|
|
endif
|
2011-11-30 16:46:58 +00:00
|
|
|
endif
|
|
|
|
|
2012-03-25 22:04:12 +00:00
|
|
|
ifeq ($(HAVE_BSV_MOVIE), 1)
|
|
|
|
OBJ += movie.o
|
|
|
|
endif
|
|
|
|
|
2011-03-19 19:41:07 +00:00
|
|
|
ifeq ($(HAVE_NETPLAY), 1)
|
2012-07-24 00:47:28 +00:00
|
|
|
OBJ += netplay.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_COMMAND), 1)
|
|
|
|
OBJ += command.o
|
2011-03-19 19:41:07 +00:00
|
|
|
endif
|
|
|
|
|
2010-12-30 01:56:56 +00:00
|
|
|
ifeq ($(HAVE_OSS), 1)
|
2010-12-24 01:18:39 +00:00
|
|
|
OBJ += audio/oss.o
|
2010-05-28 12:33:18 +00:00
|
|
|
endif
|
2012-09-18 10:16:27 +00:00
|
|
|
|
2011-06-16 21:20:12 +00:00
|
|
|
ifeq ($(HAVE_OSS_BSD), 1)
|
|
|
|
OBJ += audio/oss.o
|
2011-06-16 21:50:33 +00:00
|
|
|
endif
|
2012-09-18 10:16:27 +00:00
|
|
|
|
2011-06-16 21:50:33 +00:00
|
|
|
ifeq ($(HAVE_OSS_LIB), 1)
|
2011-06-16 21:20:12 +00:00
|
|
|
LIBS += -lossaudio
|
|
|
|
endif
|
2011-06-16 21:50:33 +00:00
|
|
|
|
2014-03-02 10:45:41 +00:00
|
|
|
ifeq ($(HAVE_RSOUND), 1)
|
|
|
|
OBJ += audio/rsound.o
|
|
|
|
DEFINES += $(RSOUND_CFLAGS)
|
|
|
|
LIBS += $(RSOUND_LIBS)
|
|
|
|
endif
|
|
|
|
|
2010-12-30 01:56:56 +00:00
|
|
|
ifeq ($(HAVE_ALSA), 1)
|
2013-01-04 19:58:34 +00:00
|
|
|
OBJ += audio/alsa.o audio/alsathread.o
|
2011-06-25 15:15:58 +00:00
|
|
|
LIBS += $(ALSA_LIBS)
|
|
|
|
DEFINES += $(ALSA_CFLAGS)
|
2010-05-28 13:41:38 +00:00
|
|
|
endif
|
2012-09-18 10:16:27 +00:00
|
|
|
|
2010-12-30 01:56:56 +00:00
|
|
|
ifeq ($(HAVE_ROAR), 1)
|
2010-12-24 01:18:39 +00:00
|
|
|
OBJ += audio/roar.o
|
2011-06-25 15:15:58 +00:00
|
|
|
LIBS += $(ROAR_LIBS)
|
|
|
|
DEFINES += $(ROAR_CFLAGS)
|
2010-08-16 19:20:07 +00:00
|
|
|
endif
|
2012-09-18 10:16:27 +00:00
|
|
|
|
2013-07-13 01:48:02 +00:00
|
|
|
ifeq ($(HAVE_HARD_FLOAT), 1)
|
|
|
|
DEFINES += -mfloat-abi=hard
|
|
|
|
endif
|
|
|
|
|
2010-12-30 01:56:56 +00:00
|
|
|
ifeq ($(HAVE_AL), 1)
|
2010-12-24 01:18:39 +00:00
|
|
|
OBJ += audio/openal.o
|
2012-09-18 10:16:27 +00:00
|
|
|
ifeq ($(OSX),1)
|
|
|
|
LIBS += -framework OpenAL
|
|
|
|
else
|
|
|
|
LIBS += -lopenal
|
|
|
|
endif
|
2011-02-04 13:42:26 +00:00
|
|
|
endif
|
2012-09-18 10:16:27 +00:00
|
|
|
|
2013-11-10 02:15:10 +00:00
|
|
|
ifeq ($(HAVE_V4L2),1)
|
2014-01-11 17:51:42 +00:00
|
|
|
OBJ += camera/video4linux2.o
|
|
|
|
DEFINES += -DHAVE_CAMERA -DHAVE_V4L2
|
2013-11-10 02:15:10 +00:00
|
|
|
endif
|
|
|
|
|
2011-01-01 02:53:30 +00:00
|
|
|
ifeq ($(HAVE_JACK),1)
|
|
|
|
OBJ += audio/jack.o
|
2011-03-13 17:09:27 +00:00
|
|
|
LIBS += $(JACK_LIBS)
|
|
|
|
DEFINES += $(JACK_CFLAGS)
|
2011-01-01 02:53:30 +00:00
|
|
|
endif
|
2012-09-18 10:16:27 +00:00
|
|
|
|
2011-01-29 00:15:09 +00:00
|
|
|
ifeq ($(HAVE_PULSE), 1)
|
|
|
|
OBJ += audio/pulse.o
|
|
|
|
LIBS += $(PULSE_LIBS)
|
|
|
|
DEFINES += $(PULSE_CFLAGS)
|
|
|
|
endif
|
2010-05-28 12:04:50 +00:00
|
|
|
|
2011-08-08 15:27:52 +00:00
|
|
|
ifeq ($(HAVE_COREAUDIO), 1)
|
|
|
|
OBJ += audio/coreaudio.o
|
|
|
|
LIBS += -framework CoreServices -framework CoreAudio -framework AudioUnit
|
|
|
|
endif
|
|
|
|
|
2012-09-24 23:26:22 +00:00
|
|
|
ifeq ($(SCALER_NO_SIMD), 1)
|
|
|
|
DEFINES += -DSCALER_NO_SIMD
|
|
|
|
endif
|
|
|
|
|
2012-09-28 21:34:19 +00:00
|
|
|
ifeq ($(HAVE_SDL), 1)
|
|
|
|
OBJ += gfx/sdl_gfx.o input/sdl_input.o input/sdl_joypad.o audio/sdl_audio.o
|
2012-09-29 19:57:03 +00:00
|
|
|
JOYCONFIG_OBJ += input/sdl_joypad.o
|
2013-09-25 17:32:18 +00:00
|
|
|
JOYCONFIG_LIBS += $(SDL_LIBS)
|
2011-06-16 20:47:37 +00:00
|
|
|
DEFINES += $(SDL_CFLAGS) $(BSD_LOCAL_INC)
|
2011-02-04 12:46:51 +00:00
|
|
|
LIBS += $(SDL_LIBS)
|
2012-09-28 21:34:19 +00:00
|
|
|
endif
|
|
|
|
|
2014-01-24 21:15:55 +00:00
|
|
|
ifeq ($(HAVE_LIMA), 1)
|
|
|
|
OBJ += gfx/lima_gfx.o
|
|
|
|
LIBS += -llimare
|
|
|
|
endif
|
|
|
|
|
2013-07-28 16:37:31 +00:00
|
|
|
ifeq ($(HAVE_OMAP), 1)
|
2014-01-11 17:51:42 +00:00
|
|
|
OBJ += gfx/omap_gfx.o
|
2013-07-28 16:37:31 +00:00
|
|
|
endif
|
|
|
|
|
2012-09-28 21:34:19 +00:00
|
|
|
ifeq ($(HAVE_OPENGL), 1)
|
2012-12-23 19:10:16 +00:00
|
|
|
OBJ += gfx/gl.o \
|
|
|
|
gfx/gfx_context.o \
|
|
|
|
gfx/fonts/gl_font.o \
|
|
|
|
gfx/fonts/gl_raster_font.o \
|
|
|
|
gfx/math/matrix.o \
|
2013-07-05 16:15:42 +00:00
|
|
|
gfx/state_tracker.o \
|
|
|
|
gfx/glsym/rglgen.o
|
2012-09-28 21:34:19 +00:00
|
|
|
|
2012-11-13 09:27:00 +00:00
|
|
|
ifeq ($(HAVE_KMS), 1)
|
|
|
|
OBJ += gfx/context/drm_egl_ctx.o
|
|
|
|
DEFINES += $(GBM_CFLAGS) $(DRM_CFLAGS) $(EGL_CFLAGS)
|
|
|
|
LIBS += $(GBM_LIBS) $(DRM_LIBS) $(EGL_LIBS)
|
|
|
|
endif
|
2012-09-24 23:26:22 +00:00
|
|
|
|
2012-11-13 09:27:00 +00:00
|
|
|
ifeq ($(HAVE_VIDEOCORE), 1)
|
|
|
|
OBJ += gfx/context/vc_egl_ctx.o
|
2014-06-15 19:45:16 +00:00
|
|
|
DEFINES += $(EGL_CFLAGS)
|
|
|
|
LIBS += $(EGL_LIBS)
|
2012-09-18 10:16:27 +00:00
|
|
|
endif
|
2012-09-24 19:19:07 +00:00
|
|
|
|
2014-06-05 10:28:17 +00:00
|
|
|
ifeq ($(HAVE_MALI_FBDEV), 1)
|
|
|
|
OBJ += gfx/context/mali_fbdev_ctx.o
|
|
|
|
endif
|
|
|
|
|
2012-11-13 09:27:00 +00:00
|
|
|
ifeq ($(HAVE_X11), 1)
|
|
|
|
ifeq ($(HAVE_GLES), 0)
|
|
|
|
OBJ += gfx/context/glx_ctx.o
|
|
|
|
endif
|
|
|
|
ifeq ($(HAVE_EGL), 1)
|
|
|
|
OBJ += gfx/context/xegl_ctx.o
|
|
|
|
DEFINES += $(EGL_CFLAGS)
|
|
|
|
LIBS += $(EGL_LIBS)
|
|
|
|
endif
|
|
|
|
endif
|
2012-09-28 21:34:19 +00:00
|
|
|
|
|
|
|
ifeq ($(HAVE_GLES), 1)
|
2013-12-13 16:54:28 +00:00
|
|
|
LIBS += $(GLES_LIBS)
|
2013-12-13 20:37:22 +00:00
|
|
|
DEFINES += $(GLES_CFLAGS) -DHAVE_OPENGLES -DHAVE_OPENGLES2
|
|
|
|
ifeq ($(HAVE_GLES3), 1)
|
|
|
|
DEFINES += -DHAVE_OPENGLES3
|
|
|
|
endif
|
2013-07-05 16:15:42 +00:00
|
|
|
OBJ += gfx/glsym/glsym_es2.o
|
2012-09-28 21:34:19 +00:00
|
|
|
else
|
2013-08-03 13:27:17 +00:00
|
|
|
DEFINES += -DHAVE_GL_SYNC
|
2013-07-05 16:15:42 +00:00
|
|
|
OBJ += gfx/glsym/glsym_gl.o
|
2012-11-13 09:27:00 +00:00
|
|
|
ifeq ($(OSX), 1)
|
|
|
|
LIBS += -framework OpenGL
|
|
|
|
else
|
|
|
|
LIBS += -lGL
|
|
|
|
endif
|
2012-09-24 19:19:07 +00:00
|
|
|
endif
|
2012-12-23 12:44:31 +00:00
|
|
|
|
|
|
|
OBJ += gfx/shader_glsl.o
|
2014-05-30 16:18:06 +00:00
|
|
|
DEFINES += -DHAVE_GLSL
|
2012-09-16 19:39:40 +00:00
|
|
|
endif
|
|
|
|
|
2012-09-28 21:34:19 +00:00
|
|
|
ifeq ($(HAVE_VG), 1)
|
|
|
|
OBJ += gfx/vg.o gfx/math/matrix_3x3.o
|
|
|
|
DEFINES += $(VG_CFLAGS)
|
|
|
|
LIBS += $(VG_LIBS)
|
|
|
|
endif
|
|
|
|
|
2011-03-13 03:51:09 +00:00
|
|
|
ifeq ($(HAVE_XVIDEO), 1)
|
2012-09-25 11:58:43 +00:00
|
|
|
OBJ += gfx/xvideo.o
|
|
|
|
LIBS += $(XVIDEO_LIBS)
|
|
|
|
DEFINES += $(XVIDEO_CFLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_X11), 1)
|
2012-09-26 13:52:25 +00:00
|
|
|
OBJ += input/x11_input.o gfx/context/x11_common.o
|
2012-10-12 17:05:29 +00:00
|
|
|
LIBS += $(X11_LIBS) $(XEXT_LIBS) $(XF86VM_LIBS) $(XINERAMA_LIBS)
|
|
|
|
DEFINES += $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS)
|
2011-03-13 03:51:09 +00:00
|
|
|
endif
|
|
|
|
|
2010-12-30 01:56:56 +00:00
|
|
|
ifeq ($(HAVE_CG), 1)
|
2011-01-05 16:22:12 +00:00
|
|
|
OBJ += gfx/shader_cg.o
|
2012-10-15 09:01:15 +00:00
|
|
|
ifeq ($(OSX), 1)
|
|
|
|
LIBS += -framework Cg
|
|
|
|
else
|
|
|
|
LIBS += -lCg -lCgGL
|
|
|
|
endif
|
2010-11-12 22:09:43 +00:00
|
|
|
endif
|
|
|
|
|
2013-01-02 14:05:55 +00:00
|
|
|
ifeq ($(HAVE_LIBXML2), 1)
|
|
|
|
LIBS += $(LIBXML2_LIBS)
|
|
|
|
DEFINES += $(LIBXML2_CFLAGS)
|
|
|
|
else
|
|
|
|
OBJ += compat/rxml/rxml.o
|
2011-01-05 16:42:58 +00:00
|
|
|
endif
|
|
|
|
|
2011-05-11 15:52:16 +00:00
|
|
|
ifeq ($(HAVE_DYLIB), 1)
|
2011-06-16 20:47:37 +00:00
|
|
|
LIBS += $(DYLIB_LIB)
|
2014-04-14 20:56:15 +00:00
|
|
|
OBJ += gfx/filter.o
|
2010-05-29 14:59:57 +00:00
|
|
|
endif
|
2010-05-28 12:04:50 +00:00
|
|
|
|
2011-01-22 23:27:20 +00:00
|
|
|
ifeq ($(HAVE_FREETYPE), 1)
|
2012-12-14 19:25:40 +00:00
|
|
|
OBJ += gfx/fonts/freetype.o
|
2011-01-22 23:27:20 +00:00
|
|
|
LIBS += $(FREETYPE_LIBS)
|
|
|
|
DEFINES += $(FREETYPE_CFLAGS)
|
|
|
|
endif
|
|
|
|
|
2014-05-28 19:14:11 +00:00
|
|
|
|
2013-01-12 13:05:05 +00:00
|
|
|
ifeq ($(HAVE_ZLIB), 1)
|
2013-01-21 22:51:56 +00:00
|
|
|
OBJ += gfx/rpng/rpng.o file_extract.o
|
2013-01-12 13:05:05 +00:00
|
|
|
LIBS += $(ZLIB_LIBS)
|
2013-01-21 22:51:56 +00:00
|
|
|
DEFINES += $(ZLIB_CFLAGS) -DHAVE_ZLIB_DEFLATE
|
2011-05-18 18:22:27 +00:00
|
|
|
endif
|
|
|
|
|
2011-01-05 18:51:19 +00:00
|
|
|
ifeq ($(HAVE_FFMPEG), 1)
|
2014-05-04 09:47:55 +00:00
|
|
|
OBJ += record/ffemu.o record/ffmpeg.o
|
2012-11-23 21:46:21 +00:00
|
|
|
LIBS += $(AVCODEC_LIBS) $(AVFORMAT_LIBS) $(AVUTIL_LIBS) $(SWSCALE_LIBS)
|
2014-05-02 22:21:07 +00:00
|
|
|
DEFINES += $(AVCODEC_CFLAGS) $(AVFORMAT_CFLAGS) $(AVUTIL_CFLAGS) $(SWSCALE_CFLAGS) -DHAVE_RECORD
|
2011-01-05 18:51:19 +00:00
|
|
|
endif
|
|
|
|
|
2010-12-30 13:26:12 +00:00
|
|
|
ifeq ($(HAVE_DYNAMIC), 1)
|
2011-06-16 20:47:37 +00:00
|
|
|
LIBS += $(DYLIB_LIB)
|
2010-12-30 13:26:12 +00:00
|
|
|
else
|
2012-04-22 08:46:06 +00:00
|
|
|
LIBS += $(libretro)
|
2010-12-30 12:54:49 +00:00
|
|
|
endif
|
|
|
|
|
2011-06-06 15:44:05 +00:00
|
|
|
ifeq ($(HAVE_PYTHON), 1)
|
|
|
|
DEFINES += $(PYTHON_CFLAGS) -Wno-unused-parameter
|
|
|
|
LIBS += $(PYTHON_LIBS)
|
|
|
|
OBJ += gfx/py_state/py_state.o
|
|
|
|
endif
|
|
|
|
|
2013-09-25 17:32:18 +00:00
|
|
|
ifeq ($(HAVE_UDEV), 1)
|
|
|
|
DEFINES += $(UDEV_CFLAGS)
|
|
|
|
LIBS += $(UDEV_LIBS)
|
|
|
|
JOYCONFIG_LIBS += $(UDEV_LIBS)
|
2013-12-07 13:13:40 +00:00
|
|
|
OBJ += input/udev_input.o input/udev_joypad.o
|
2013-09-25 17:32:18 +00:00
|
|
|
JOYCONFIG_OBJ += tools/udev_joypad.o
|
|
|
|
endif
|
|
|
|
|
2013-12-07 23:56:24 +00:00
|
|
|
ifeq ($(HAVE_XKBCOMMON), 1)
|
|
|
|
DEFINES += $(XKBCOMMON_CFLAGS)
|
|
|
|
LIBS += $(XKBCOMMON_LIBS)
|
|
|
|
endif
|
|
|
|
|
2013-04-07 01:41:06 +00:00
|
|
|
ifeq ($(HAVE_NEON),1)
|
2013-09-25 17:32:18 +00:00
|
|
|
OBJ += audio/sinc_neon.o
|
2014-01-11 17:51:42 +00:00
|
|
|
# When compiled without this, tries to attempt to compile sinc lerp,
|
|
|
|
# which will error out
|
2013-09-25 17:32:18 +00:00
|
|
|
DEFINES += -DSINC_LOWER_QUALITY -DHAVE_NEON
|
2012-02-23 22:53:18 +00:00
|
|
|
endif
|
2013-04-07 01:41:06 +00:00
|
|
|
|
2012-10-13 18:22:45 +00:00
|
|
|
OBJ += audio/utils.o
|
2012-12-09 15:28:49 +00:00
|
|
|
ifeq ($(HAVE_NEON),1)
|
|
|
|
OBJ += audio/utils_neon.o
|
|
|
|
endif
|
2012-07-06 15:36:37 +00:00
|
|
|
|
2011-01-10 16:15:27 +00:00
|
|
|
ifneq ($(V),1)
|
|
|
|
Q := @
|
|
|
|
endif
|
|
|
|
|
2013-02-14 10:56:35 +00:00
|
|
|
OPTIMIZE_FLAG = -O3 -ffast-math
|
2011-10-07 15:43:39 +00:00
|
|
|
ifeq ($(DEBUG), 1)
|
|
|
|
OPTIMIZE_FLAG = -O0
|
|
|
|
endif
|
|
|
|
|
2013-08-14 12:00:21 +00:00
|
|
|
ifeq ($(GL_DEBUG), 1)
|
|
|
|
CFLAGS += -DGL_DEBUG
|
|
|
|
CXXFLAGS += -DGL_DEBUG
|
|
|
|
endif
|
|
|
|
|
2012-12-08 21:50:02 +00:00
|
|
|
CFLAGS += -Wall $(OPTIMIZE_FLAG) $(INCLUDE_DIRS) -g -I.
|
2011-12-24 12:46:12 +00:00
|
|
|
ifeq ($(CXX_BUILD), 1)
|
2014-06-15 19:45:25 +00:00
|
|
|
LINK = $(CXX)
|
2011-12-25 00:45:09 +00:00
|
|
|
CFLAGS += -std=c++0x -xc++ -D__STDC_CONSTANT_MACROS
|
2011-12-24 12:46:12 +00:00
|
|
|
else
|
2014-06-15 19:45:25 +00:00
|
|
|
LINK = $(CC)
|
2013-10-22 19:41:51 +00:00
|
|
|
ifneq ($(GNU90_BUILD), 1)
|
|
|
|
ifneq ($(findstring icc,$(CC)),)
|
|
|
|
CFLAGS += -std=c99 -D_GNU_SOURCE
|
|
|
|
else
|
2014-06-08 10:37:32 +00:00
|
|
|
CFLAGS += -std=gnu99 -D_GNU_SOURCE
|
2013-10-22 19:41:51 +00:00
|
|
|
endif
|
2012-09-18 10:16:27 +00:00
|
|
|
endif
|
2011-12-24 12:46:12 +00:00
|
|
|
endif
|
2010-05-26 19:27:37 +00:00
|
|
|
|
2012-05-01 21:00:37 +00:00
|
|
|
ifeq ($(NOUNUSED), yes)
|
|
|
|
CFLAGS += -Wno-unused-result
|
|
|
|
endif
|
2013-03-16 11:24:53 +00:00
|
|
|
ifeq ($(NOUNUSED_VARIABLE), yes)
|
|
|
|
CFLAGS += -Wno-unused-variable
|
|
|
|
endif
|
2012-05-01 21:00:37 +00:00
|
|
|
|
2014-01-11 18:05:26 +00:00
|
|
|
GIT_VERSION := $(shell git rev-parse --short HEAD 2>/dev/null)
|
2014-01-11 17:51:42 +00:00
|
|
|
ifneq ($(GIT_VERSION),)
|
|
|
|
DEFINES += -DHAVE_GIT_VERSION -DGIT_VERSION=\"$(GIT_VERSION)\"
|
|
|
|
OBJ += git_version.o
|
|
|
|
endif
|
|
|
|
|
2014-02-02 14:29:07 +00:00
|
|
|
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
|
|
|
RARCH_JOYCONFIG_OBJ := $(addprefix $(OBJDIR)/,$(JOYCONFIG_OBJ))
|
|
|
|
RARCH_RETROLAUNCH_OBJ := $(addprefix $(OBJDIR)/,$(RETROLAUNCH_OBJ))
|
2013-04-25 22:43:14 +00:00
|
|
|
|
2010-12-30 01:56:56 +00:00
|
|
|
all: $(TARGET) config.mk
|
|
|
|
|
2014-03-27 21:19:06 +00:00
|
|
|
-include $(RARCH_OBJ:.o=.d) $(RARCH_JOYCONFIG_OBJ:.o=.d) $(RARCH_RETROLAUNCH_OBJ:.o=.d)
|
|
|
|
|
2010-12-30 01:56:56 +00:00
|
|
|
config.mk: configure qb/*
|
|
|
|
@echo "config.mk is outdated or non-existing. Run ./configure again."
|
2010-12-30 02:23:12 +00:00
|
|
|
@exit 1
|
2010-05-28 12:04:50 +00:00
|
|
|
|
2014-02-02 14:29:07 +00:00
|
|
|
retroarch: $(RARCH_OBJ)
|
2011-01-10 16:15:27 +00:00
|
|
|
@$(if $(Q), $(shell echo echo LD $@),)
|
2014-06-15 19:45:25 +00:00
|
|
|
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
2010-06-27 13:46:23 +00:00
|
|
|
|
2014-02-02 14:29:07 +00:00
|
|
|
tools/retroarch-joyconfig: $(RARCH_JOYCONFIG_OBJ)
|
2013-01-04 20:56:15 +00:00
|
|
|
@$(if $(Q), $(shell echo echo LD $@),)
|
2011-12-24 12:46:12 +00:00
|
|
|
ifeq ($(CXX_BUILD), 1)
|
2014-02-02 14:29:07 +00:00
|
|
|
$(Q)$(CXX) -o $@ $(RARCH_JOYCONFIG_OBJ) $(JOYCONFIG_LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
2011-12-24 12:46:12 +00:00
|
|
|
else
|
2014-02-02 14:29:07 +00:00
|
|
|
$(Q)$(CC) -o $@ $(RARCH_JOYCONFIG_OBJ) $(JOYCONFIG_LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
2011-12-24 12:46:12 +00:00
|
|
|
endif
|
2011-01-09 14:58:49 +00:00
|
|
|
|
2014-02-02 14:29:07 +00:00
|
|
|
tools/retrolaunch/retrolaunch: $(RARCH_RETROLAUNCH_OBJ)
|
2013-01-11 04:49:12 +00:00
|
|
|
@$(if $(Q), $(shell echo echo LD $@),)
|
2014-06-15 19:45:25 +00:00
|
|
|
$(Q)$(LINK) -o $@ $(RARCH_RETROLAUNCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
2013-01-11 04:49:12 +00:00
|
|
|
|
2014-03-27 21:19:06 +00:00
|
|
|
$(OBJDIR)/%.o: %.c config.h config.mk
|
2014-02-02 14:29:07 +00:00
|
|
|
@mkdir -p $(dir $@)
|
2011-01-10 16:15:27 +00:00
|
|
|
@$(if $(Q), $(shell echo echo CC $<),)
|
2014-03-27 21:19:06 +00:00
|
|
|
$(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
2010-05-28 12:04:50 +00:00
|
|
|
|
2014-01-11 17:51:42 +00:00
|
|
|
.FORCE:
|
|
|
|
|
2014-02-02 14:29:07 +00:00
|
|
|
$(OBJDIR)/git_version.o: git_version.c .FORCE
|
|
|
|
@mkdir -p $(dir $@)
|
2014-01-11 17:51:42 +00:00
|
|
|
@$(if $(Q), $(shell echo echo CC $<),)
|
2014-03-27 21:19:06 +00:00
|
|
|
$(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
2014-01-11 17:51:42 +00:00
|
|
|
|
2014-03-27 21:19:06 +00:00
|
|
|
$(OBJDIR)/tools/linuxraw_joypad.o: input/linuxraw_joypad.c
|
2014-02-02 14:29:07 +00:00
|
|
|
@mkdir -p $(dir $@)
|
2013-04-25 22:43:14 +00:00
|
|
|
@$(if $(Q), $(shell echo echo CC $<),)
|
2014-03-27 21:19:06 +00:00
|
|
|
$(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -DIS_JOYCONFIG -c -o $@ $<
|
2013-04-26 09:44:54 +00:00
|
|
|
|
2014-03-27 21:19:06 +00:00
|
|
|
$(OBJDIR)/tools/udev_joypad.o: input/udev_joypad.c
|
2014-02-02 14:29:07 +00:00
|
|
|
@mkdir -p $(dir $@)
|
2013-09-25 17:32:18 +00:00
|
|
|
@$(if $(Q), $(shell echo echo CC $<),)
|
2014-03-27 21:19:06 +00:00
|
|
|
$(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -DIS_JOYCONFIG -c -o $@ $<
|
2013-09-25 17:32:18 +00:00
|
|
|
|
2014-03-27 21:19:06 +00:00
|
|
|
$(OBJDIR)/tools/input_common_launch.o: input/input_common.c
|
2014-02-02 14:29:07 +00:00
|
|
|
@mkdir -p $(dir $@)
|
2013-04-26 09:44:54 +00:00
|
|
|
@$(if $(Q), $(shell echo echo CC $<),)
|
2014-03-27 21:19:06 +00:00
|
|
|
$(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -DIS_RETROLAUNCH -c -o $@ $<
|
2013-04-25 22:43:14 +00:00
|
|
|
|
2014-03-27 21:19:06 +00:00
|
|
|
$(OBJDIR)/tools/input_common_joyconfig.o: input/input_common.c
|
2014-02-02 14:29:07 +00:00
|
|
|
@mkdir -p $(dir $@)
|
2013-04-26 12:36:36 +00:00
|
|
|
@$(if $(Q), $(shell echo echo CC $<),)
|
2014-03-27 21:19:06 +00:00
|
|
|
$(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -DIS_JOYCONFIG -c -o $@ $<
|
2013-04-26 12:36:36 +00:00
|
|
|
|
2014-02-02 14:29:07 +00:00
|
|
|
$(OBJDIR)/%.o: %.S config.h config.mk $(HEADERS)
|
|
|
|
@mkdir -p $(dir $@)
|
2012-12-09 17:37:09 +00:00
|
|
|
@$(if $(Q), $(shell echo echo AS $<),)
|
2013-01-04 20:56:15 +00:00
|
|
|
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
2012-12-09 15:28:49 +00:00
|
|
|
|
2010-05-28 12:04:50 +00:00
|
|
|
install: $(TARGET)
|
2014-02-02 14:29:07 +00:00
|
|
|
rm -f $(OBJDIR)/git_version.o
|
2011-05-19 13:40:39 +00:00
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin 2>/dev/null || /bin/true
|
2013-05-27 23:59:06 +00:00
|
|
|
mkdir -p $(DESTDIR)$(GLOBAL_CONFIG_DIR) 2>/dev/null || /bin/true
|
2011-05-19 13:40:39 +00:00
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 2>/dev/null || /bin/true
|
2013-01-26 16:50:22 +00:00
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps 2>/dev/null || /bin/true
|
2011-01-05 19:47:31 +00:00
|
|
|
install -m755 $(TARGET) $(DESTDIR)$(PREFIX)/bin
|
2013-10-07 20:09:05 +00:00
|
|
|
install -m755 tools/cg2glsl.py $(DESTDIR)$(PREFIX)/bin/retroarch-cg2glsl
|
2013-05-27 23:59:06 +00:00
|
|
|
install -m644 retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
2012-12-02 09:59:48 +00:00
|
|
|
install -m644 docs/retroarch.1 $(DESTDIR)$(MAN_DIR)
|
|
|
|
install -m644 docs/retroarch-joyconfig.1 $(DESTDIR)$(MAN_DIR)
|
2013-01-26 16:50:22 +00:00
|
|
|
install -m644 media/retroarch.png $(DESTDIR)$(PREFIX)/share/pixmaps
|
2010-05-28 12:04:50 +00:00
|
|
|
|
2011-01-09 14:58:49 +00:00
|
|
|
uninstall:
|
2012-04-21 21:31:57 +00:00
|
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/retroarch
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/retroarch-joyconfig
|
2013-10-07 20:09:05 +00:00
|
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/retroarch-cg2glsl
|
2013-01-11 10:57:19 +00:00
|
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/retrolaunch
|
2013-05-27 23:59:06 +00:00
|
|
|
rm -f $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
2012-04-21 21:31:57 +00:00
|
|
|
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/retroarch.1
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/retroarch-joyconfig.1
|
2013-01-26 16:50:22 +00:00
|
|
|
rm -f $(DESTDIR)$(PREFIX)/share/pixmaps/retroarch.png
|
2010-05-26 19:27:37 +00:00
|
|
|
|
|
|
|
clean:
|
2014-02-02 14:29:07 +00:00
|
|
|
rm -rf $(OBJDIR)
|
2010-08-19 18:29:32 +00:00
|
|
|
rm -f $(TARGET)
|
2014-02-02 14:29:07 +00:00
|
|
|
rm -f tools/retrolaunch/retrolaunch
|
|
|
|
rm -f tools/retroarch-joyconfig
|
2010-06-27 13:46:23 +00:00
|
|
|
|
|
|
|
.PHONY: all install uninstall clean
|