diff --git a/Makefile b/Makefile index 376a94f810..3db805924b 100644 --- a/Makefile +++ b/Makefile @@ -75,32 +75,6 @@ ifeq ($(HAVE_NETPLAY), 1) endif endif -ifeq ($(HAVE_SDL), 1) - OBJ += gfx/sdl_gfx.o input/sdl_input.o input/sdl_joypad.o audio/sdl_audio.o - - ifeq ($(HAVE_OPENGL), 1) - OBJ += gfx/context/sdl_gl_ctx.o - endif - - JOYCONFIG_OBJ += input/sdl_joypad.o - JOYCONFIG_LIBS += $(SDL_LIBS) - DEFINES += $(SDL_CFLAGS) $(BSD_LOCAL_INC) - LIBS += $(SDL_LIBS) -endif - -ifeq ($(HAVE_SDL2), 1) - OBJ += gfx/sdl2_gfx.o input/sdl_input.o input/sdl_joypad.o audio/sdl_audio.o - - ifeq ($(HAVE_OPENGL), 1) - OBJ += gfx/context/sdl_gl_ctx.o - endif - - JOYCONFIG_OBJ += input/sdl_joypad.o - JOYCONFIG_LIBS += $(SDL2_LIBS) - DEFINES += $(SDL2_CFLAGS) $(BSD_LOCAL_INC) - LIBS += $(SDL2_LIBS) -endif - ifeq ($(HAVE_OPENGL), 1) OBJ += gfx/gl.o \ gfx/gfx_context.o \ @@ -174,15 +148,8 @@ ifeq ($(HAVE_OPENGL), 1) DEFINES += -DHAVE_GLSL endif -ifeq ($(HAVE_WAYLAND), 1) - #OBJ += input/wayland.o - DEFINES += $(WAYLAND_CFLAGS) - LIBS += $(WAYLAND_LIBS) -endif - ifeq ($(HAVE_DYLIB), 1) LIBS += $(DYLIB_LIB) - OBJ += gfx/filter.o endif ifeq ($(HAVE_ZLIB), 1) @@ -251,12 +218,6 @@ ifeq ($(NOUNUSED_VARIABLE), yes) CFLAGS += -Wno-unused-variable endif -GIT_VERSION := $(shell git rev-parse --short HEAD 2>/dev/null) -ifneq ($(GIT_VERSION),) - DEFINES += -DHAVE_GIT_VERSION -DGIT_VERSION="\"$(GIT_VERSION)\"" - OBJ += git_version.o -endif - RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ)) RARCH_JOYCONFIG_OBJ := $(addprefix $(OBJDIR)/,$(JOYCONFIG_OBJ)) RARCH_RETROLAUNCH_OBJ := $(addprefix $(OBJDIR)/,$(RETROLAUNCH_OBJ)) diff --git a/Makefile.common b/Makefile.common index cd02635883..a5c57b3568 100644 --- a/Makefile.common +++ b/Makefile.common @@ -2,6 +2,10 @@ ifeq ($(HAVE_FBO), 1) DEFINES += -DHAVE_FBO endif +ifeq ($(HAVE_DYLIB), 1) + DEFINES += -DHAVE_DYLIB +endif + ifeq ($(SCALER_NO_SIMD), 1) DEFINES += -DSCALER_NO_SIMD endif @@ -23,6 +27,12 @@ ifeq ($(HAVE_HARD_FLOAT), 1) DEFINES += -mfloat-abi=hard endif +GIT_VERSION := $(shell git rev-parse --short HEAD 2>/dev/null) +ifneq ($(GIT_VERSION),) + DEFINES += -DHAVE_GIT_VERSION -DGIT_VERSION="\"$(GIT_VERSION)\"" + OBJ += git_version.o +endif + OBJ += frontend/frontend.o \ frontend/frontend_context.o \ frontend/platform/platform_null.o \ @@ -59,6 +69,7 @@ OBJ += frontend/frontend.o \ gfx/scaler/scaler_filter.o \ gfx/image/image_rpng.o \ gfx/fonts/fonts.o \ + gfx/filter.o \ audio/resamplers/resampler.o \ audio/dsp_filter.o \ audio/resamplers/sinc.o \ @@ -214,6 +225,12 @@ endif #Input +ifeq ($(HAVE_WAYLAND), 1) + #OBJ += input/wayland.o + DEFINES += $(WAYLAND_CFLAGS) + LIBS += $(WAYLAND_LIBS) +endif + ifeq ($(HAVE_DINPUT), 1) LIBS += -ldinput8 -ldxguid -lole32 DEFINES += -DHAVE_DINPUT @@ -250,6 +267,33 @@ endif # Video +ifeq ($(HAVE_SDL), 1) + OBJ += gfx/sdl_gfx.o input/sdl_input.o input/sdl_joypad.o audio/sdl_audio.o + + ifeq ($(HAVE_OPENGL), 1) + OBJ += gfx/context/sdl_gl_ctx.o + endif + + JOYCONFIG_OBJ += input/sdl_joypad.o + JOYCONFIG_LIBS += $(SDL_LIBS) + DEFINES += $(SDL_CFLAGS) $(BSD_LOCAL_INC) + LIBS += $(SDL_LIBS) +endif + +ifeq ($(HAVE_SDL2), 1) + OBJ += gfx/sdl2_gfx.o input/sdl_input.o input/sdl_joypad.o audio/sdl_audio.o + + ifeq ($(HAVE_OPENGL), 1) + OBJ += gfx/context/sdl_gl_ctx.o + endif + + JOYCONFIG_OBJ += input/sdl_joypad.o + JOYCONFIG_LIBS += $(SDL2_LIBS) + DEFINES += $(SDL2_CFLAGS) $(BSD_LOCAL_INC) + LIBS += $(SDL2_LIBS) + HAVE_SDL = 0 +endif + ifeq ($(HAVE_OMAP), 1) OBJ += gfx/omap_gfx.o endif diff --git a/Makefile.emscripten b/Makefile.emscripten index 603fb69d0a..d3ce064cde 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -4,6 +4,7 @@ OBJ := DEFINES := -DRARCH_INTERNAL -DHAVE_CC_RESAMPLER HAVE_OPENGL = 1 +HAVE_EMSCRIPTEN = 1 HAVE_RGUI = 1 HAVE_SDL = 0 HAVE_ZLIB = 1 @@ -30,12 +31,6 @@ OBJ += frontend/platform/platform_emscripten.o \ libretro = libretro_emscripten.bc -ifeq ($(HAVE_SDL), 1) - OBJ += input/sdl_input.o - LIBS += -lSDL - DEFINES += -ISDL -DHAVE_SDL -endif - ifeq ($(HAVE_OPENGL), 1) OBJ += gfx/gl.o gfx/math/matrix.o gfx/fonts/gl_font.o gfx/fonts/gl_raster_font.o gfx/gfx_context.o gfx/context/emscriptenegl_ctx.o gfx/shader_glsl.o gfx/glsym/rglgen.o gfx/glsym/glsym_es2.o DEFINES += -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_EGL -DHAVE_OVERLAY -DHAVE_GLSL diff --git a/Makefile.win b/Makefile.win index d3b6832a82..7155472ffa 100644 --- a/Makefile.win +++ b/Makefile.win @@ -31,19 +31,26 @@ ifeq ($(SLIM),) HAVE_FFMPEG = 1 endif -FREETYPE_CFLAGS := -DHAVE_FREETYPE -Ifreetype2 -FREETYPE_LIBS := -lfreetype +FREETYPE_CFLAGS := -DHAVE_FREETYPE -Ifreetype2 +FREETYPE_LIBS := -lfreetype -LIBXML2_CFLAGS := -Ilibxml2 -DHAVE_LIBXML2 -DHAVE_GLSL -LIBXML2_LIBS := -lxml2 -liconv +LIBXML2_CFLAGS := -Ilibxml2 -DHAVE_LIBXML2 -DHAVE_GLSL +LIBXML2_LIBS := -lxml2 -liconv -RSOUND_CFLAGS := -DHAVE_RSOUND -RSOUND_LIBS := -lrsound +SDL_LIBS := -lSDL +SDL_CFLAGS := -ISDL -DHAVE_SDL +BSD_LOCAL_INC := -PYTHON_LIBS := -lpython32 -PYTHON_CFLAGS := -DHAVE_PYTHON -Ipython +SDL2_LIBS := -lSDL2 +SDL2_CFLAGS := -ISDL2 -DHAVE_SDL2 -OBJDIR := obj-w32 +RSOUND_CFLAGS := -DHAVE_RSOUND +RSOUND_LIBS := -lrsound + +PYTHON_LIBS := -lpython32 +PYTHON_CFLAGS := -DHAVE_PYTHON -Ipython + +OBJDIR := obj-w32 OBJ := LIBS := -lm @@ -84,37 +91,6 @@ ifeq ($(TDM_GCC),) LDCXXFLAGS += -static-libstdc++ endif -ifeq ($(SCALER_NO_SIMD), 1) - DEFINES += -DSCALER_NO_SIMD -endif - -ifeq ($(HAVE_SDL2), 1) - OBJ += gfx/sdl2_gfx.o input/sdl_input.o input/sdl_joypad.o audio/sdl_audio.o - - ifeq ($(HAVE_OPENGL), 1) - OBJ += gfx/context/sdl_gl_ctx.o - endif - - JOYCONFIG_OBJ += input/sdl_joypad.o - LIBS += -lSDL2 - JOYCONFIG_LIBS += -lSDL2 - DEFINES += -ISDL2 -DHAVE_SDL2 - HAVE_SDL = 0 -endif - -ifeq ($(HAVE_SDL), 1) - OBJ += gfx/sdl_gfx.o input/sdl_input.o input/sdl_joypad.o audio/sdl_audio.o - - ifeq ($(HAVE_OPENGL), 1) - OBJ += gfx/context/sdl_gl_ctx.o - endif - - JOYCONFIG_OBJ += input/sdl_joypad.o - LIBS += -lSDL - JOYCONFIG_LIBS += -lSDL - DEFINES += -ISDL -DHAVE_SDL -endif - ifeq ($(HAVE_OPENGL), 1) OBJ += gfx/gl.o gfx/math/matrix.o gfx/fonts/gl_font.o gfx/fonts/gl_raster_font.o gfx/gfx_context.o gfx/context/wgl_ctx.o gfx/shader_glsl.o gfx/glsym/rglgen.o gfx/glsym/glsym_gl.o DEFINES += -DHAVE_OPENGL -DHAVE_GLSL -DHAVE_GL_SYNC @@ -141,11 +117,6 @@ ifeq ($(HAVE_ZLIB), 1) endif endif -ifeq ($(HAVE_DYLIB), 1) - DEFINES += -DHAVE_DYLIB - OBJ += gfx/filter.o -endif - ifeq ($(HAVE_STDIN_CMD), 1) DEFINES += -DHAVE_COMMAND -DHAVE_STDIN_CMD OBJ += command.o @@ -192,12 +163,6 @@ else endif endif -GIT_VERSION := $(shell git rev-parse --short HEAD 2>/dev/null) -ifneq ($(GIT_VERSION),) - DEFINES += -DHAVE_GIT_VERSION -DGIT_VERSION=\"$(GIT_VERSION)\" - OBJ += git_version.o -endif - RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ)) RARCH_JOYCONFIG_OBJ := $(addprefix $(OBJDIR)/,$(JOYCONFIG_OBJ))