diff --git a/Makefile b/Makefile index 227af31797..278b250ea6 100644 --- a/Makefile +++ b/Makefile @@ -10,13 +10,14 @@ ifeq ($(GLOBAL_CONFIG_DIR),) endif OBJ := +JOYCONFIG_OBJ := LIBS := -DEFINES += -DHAVE_CONFIG_H -DRARCH_INTERNAL -DHAVE_CC_RESAMPLER -DHAVE_OVERLAY +DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -DHAVE_CC_RESAMPLER -DHAVE_OVERLAY DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"' include Makefile.common -JOYCONFIG_OBJ = tools/retroarch-joyconfig.o \ +JOYCONFIG_OBJ += tools/retroarch-joyconfig.o \ conf/config_file.o \ file_path.o \ compat/compat.o \ @@ -182,11 +183,6 @@ ifeq ($(HAVE_D3D9), 1) LIBS += -ld3d9 -ld3dx9 -ldxguid endif -ifeq ($(HAVE_WINXINPUT), 1) - OBJ += input/winxinput_joypad.o - JOYCONFIG_OBJ += input/winxinput_joypad.o -endif - ifeq ($(HAVE_DINPUT), 1) LIBS += -ldinput8 -ldxguid -lole32 OBJ += input/dinput.o @@ -292,24 +288,6 @@ ifeq ($(HAVE_WAYLAND), 1) LIBS += $(WAYLAND_LIBS) endif -ifeq ($(HAVE_VG), 1) - OBJ += gfx/vg.o gfx/math/matrix_3x3.o - DEFINES += $(VG_CFLAGS) - LIBS += $(VG_LIBS) -endif - -ifeq ($(HAVE_XVIDEO), 1) - OBJ += gfx/xvideo.o - LIBS += $(XVIDEO_LIBS) - DEFINES += $(XVIDEO_CFLAGS) -endif - -ifeq ($(HAVE_X11), 1) - OBJ += input/x11_input.o gfx/context/x11_common.o - LIBS += $(X11_LIBS) $(XEXT_LIBS) $(XF86VM_LIBS) $(XINERAMA_LIBS) - DEFINES += $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS) -endif - ifeq ($(HAVE_CG), 1) OBJ += gfx/shader_cg.o ifeq ($(OSX), 1) @@ -369,19 +347,6 @@ ifeq ($(HAVE_PYTHON), 1) OBJ += gfx/py_state/py_state.o endif -ifeq ($(HAVE_UDEV), 1) - DEFINES += $(UDEV_CFLAGS) - LIBS += $(UDEV_LIBS) - JOYCONFIG_LIBS += $(UDEV_LIBS) - OBJ += input/udev_input.o input/udev_joypad.o - JOYCONFIG_OBJ += tools/udev_joypad.o -endif - -ifeq ($(HAVE_XKBCOMMON), 1) - DEFINES += $(XKBCOMMON_CFLAGS) - LIBS += $(XKBCOMMON_LIBS) -endif - ifeq ($(HAVE_NEON),1) OBJ += audio/resamplers/sinc_neon.o # When compiled without this, tries to attempt to compile sinc lerp, diff --git a/Makefile.common b/Makefile.common index 1f63da6464..e0f577717d 100644 --- a/Makefile.common +++ b/Makefile.common @@ -83,3 +83,45 @@ ifeq ($(HAVE_THREADS), 1) LIBS += -lpthread endif endif + +#Input + +ifeq ($(HAVE_WINXINPUT), 1) + DEFINES += -DHAVE_WINXINPUT + OBJ += input/winxinput_joypad.o + JOYCONFIG_OBJ += input/winxinput_joypad.o +endif + +ifeq ($(HAVE_X11), 1) + OBJ += input/x11_input.o gfx/context/x11_common.o + LIBS += $(X11_LIBS) $(XEXT_LIBS) $(XF86VM_LIBS) $(XINERAMA_LIBS) + DEFINES += $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS) +endif + +ifeq ($(HAVE_XKBCOMMON), 1) + DEFINES += $(XKBCOMMON_CFLAGS) + LIBS += $(XKBCOMMON_LIBS) +endif + +ifeq ($(HAVE_UDEV), 1) + DEFINES += $(UDEV_CFLAGS) + LIBS += $(UDEV_LIBS) + JOYCONFIG_LIBS += $(UDEV_LIBS) + OBJ += input/udev_input.o input/udev_joypad.o + JOYCONFIG_OBJ += tools/udev_joypad.o +endif + +# Video + +ifeq ($(HAVE_VG), 1) + OBJ += gfx/vg.o gfx/math/matrix_3x3.o + DEFINES += $(VG_CFLAGS) + LIBS += $(VG_LIBS) +endif + +ifeq ($(HAVE_XVIDEO), 1) + OBJ += gfx/xvideo.o + LIBS += $(XVIDEO_LIBS) + DEFINES += $(XVIDEO_CFLAGS) +endif + diff --git a/Makefile.emscripten b/Makefile.emscripten index 2830ff75aa..2924512e42 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -96,7 +96,7 @@ $(TARGET): $(OBJ) clean: rm -f *.o - rm -f deps/miniz/*.o + rm -f deps/rzlib/*.o rm -f frontend/*.o rm -f frontend/menu/*.o rm -f frontend/menu/disp/*.o diff --git a/Makefile.win b/Makefile.win index 555e30442f..94bbec0e72 100644 --- a/Makefile.win +++ b/Makefile.win @@ -205,11 +205,6 @@ ifeq ($(HAVE_PYTHON), 1) OBJ += gfx/py_state/py_state.o endif -ifeq ($(HAVE_WINXINPUT), 1) - DEFINES += -DHAVE_WINXINPUT - OBJ += input/winxinput_joypad.o -endif - ifeq ($(HAVE_DINPUT), 1) LIBS += -ldinput8 -ldxguid -lole32 DEFINES += -DHAVE_DINPUT @@ -219,9 +214,9 @@ endif OBJ += record/ffemu.o ifeq ($(HAVE_FFMPEG), 1) + OBJ += record/ffmpeg.o LIBS += -lavformat -lavcodec -lavutil -lswscale -lws2_32 -lz DEFINES += -DHAVE_FFMPEG -Iffmpeg - OBJ += record/ffmpeg.o endif ifeq ($(HAVE_7ZIP),1)