diff --git a/src/sdl/Makefile.cfg b/src/sdl/Makefile.cfg index 57d594835..f78135396 100644 --- a/src/sdl/Makefile.cfg +++ b/src/sdl/Makefile.cfg @@ -80,7 +80,11 @@ ifdef NOMIXER else i_sound_o=$(OBJDIR)/mixer_sound.o OPTS+=-DHAVE_MIXER +ifdef MINGW SDL_LDFLAGS+=-lSDL2_mixer_ext +else + SDL_LDFLAGS+=-lSDL2_mixer +endif endif ifdef SDL_TTF diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 182e46b9c..f3be246a6 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -20,7 +20,11 @@ #pragma warning(default : 4214 4244) #endif -#include "SDL2/SDL_mixer_ext.h" +#ifdef _WIN32 +#include "SDL_mixer_ext.h" +#else +#include "SDL_mixer.h" +#endif /* This is the version number macro for the current SDL_mixer version: */ #ifndef SDL_MIXER_COMPILEDVERSION diff --git a/src/sdl/sdl_sound.c b/src/sdl/sdl_sound.c index 96f3b0ca6..8da0d2a85 100644 --- a/src/sdl/sdl_sound.c +++ b/src/sdl/sdl_sound.c @@ -32,7 +32,7 @@ #endif #ifdef HAVE_MIXER -#include +#include /* This is the version number macro for the current SDL_mixer version: */ #ifndef SDL_MIXER_COMPILEDVERSION #define SDL_MIXER_COMPILEDVERSION \ diff --git a/src/win32/Makefile.cfg b/src/win32/Makefile.cfg index d5d1b3577..05be6bd7f 100644 --- a/src/win32/Makefile.cfg +++ b/src/win32/Makefile.cfg @@ -15,7 +15,7 @@ else HAVE_LIBGME=1 LIBGME_CFLAGS=-I../libs/gme/include LIBGME_LDFLAGS=-L../libs/gme/win32 -lgme - SDL_CFLAGS?=-I../libs/SDL2/i686-w64-mingw32/include/SDL2 -I../libs/SDLMixerX/i686-w64-mingw32/include -Dmain=SDL_main + SDL_CFLAGS?=-I../libs/SDL2/i686-w64-mingw32/include/SDL2 -I../libs/SDLMixerX/i686-w64-mingw32/include/SDL2 -Dmain=SDL_main SDL_LDFLAGS?=-L../libs/SDL2/i686-w64-mingw32/lib -L../libs/SDLMixerX/i686-w64-mingw32/lib -lmingw32 -lSDL2main -lSDL2 -mwindows endif