BUILD: Add SDL_BACKEND=1 to config.mk for all SDL based backends

This commit is contained in:
Max Horn 2011-05-31 00:25:40 +02:00
parent f7e94e90b6
commit 127a6f920a
4 changed files with 10 additions and 5 deletions

View file

@ -20,6 +20,8 @@
* *
*/ */
#include "common/scummsys.h"
#ifdef WIN32 #ifdef WIN32
#if defined(ARRAYSIZE) && !defined(_WINDOWS_) #if defined(ARRAYSIZE) && !defined(_WINDOWS_)
#undef ARRAYSIZE #undef ARRAYSIZE

View file

@ -20,6 +20,8 @@
* *
*/ */
#include "common/scummsys.h"
#if defined(SDL_BACKEND) #if defined(SDL_BACKEND)
#include "backends/mixer/sdl/sdl-mixer.h" #include "backends/mixer/sdl/sdl-mixer.h"

View file

@ -41,10 +41,7 @@ MODULE_OBJS := \
# SDL specific source files. # SDL specific source files.
# We cannot just check $BACKEND = sdl, as various other backends # We cannot just check $BACKEND = sdl, as various other backends
# derive from the SDL backend, and they all need the following files. # derive from the SDL backend, and they all need the following files.
# TODO: Add SDL_BACKEND to config.mk; this would match the fact that ifdef SDL_BACKEND
# we also add -DSDL_BACKEND to the DEFINES.
# However, the latter is only done for *most* SDL based stuff, not always
# so we really should unify the relevant code in configure.
MODULE_OBJS += \ MODULE_OBJS += \
audiocd/sdl/sdl-audiocd.o \ audiocd/sdl/sdl-audiocd.o \
events/sdl/sdl-events.o \ events/sdl/sdl-events.o \
@ -54,6 +51,7 @@ MODULE_OBJS += \
mutex/sdl/sdl-mutex.o \ mutex/sdl/sdl-mutex.o \
plugins/sdl/sdl-provider.o \ plugins/sdl/sdl-provider.o \
timer/sdl/sdl-timer.o timer/sdl/sdl-timer.o
endif
ifdef POSIX ifdef POSIX
MODULE_OBJS += \ MODULE_OBJS += \

5
configure vendored
View file

@ -2287,8 +2287,9 @@ case $_backend in
webos) webos)
# There is no sdl-config in the WebOS PDK so we don't use find_sdlconfig here. # There is no sdl-config in the WebOS PDK so we don't use find_sdlconfig here.
LIBS="$LIBS -lSDL" LIBS="$LIBS -lSDL"
DEFINES="$DEFINES -DSDL_BACKEND"
DEFINES="$DEFINES -DWEBOS" DEFINES="$DEFINES -DWEBOS"
DEFINES="$DEFINES -DSDL_BACKEND"
add_line_to_config_mk "SDL_BACKEND = 1"
MODULES="$MODULES backends/platform/sdl" MODULES="$MODULES backends/platform/sdl"
;; ;;
wii) wii)
@ -2309,6 +2310,7 @@ case $_backend in
INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/wince/CEkeys' INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/wince/CEkeys'
LIBS="$LIBS -static -lSDL" LIBS="$LIBS -static -lSDL"
DEFINES="$DEFINES -DSDL_BACKEND" DEFINES="$DEFINES -DSDL_BACKEND"
add_line_to_config_mk "SDL_BACKEND = 1"
;; ;;
sdl) sdl)
;; ;;
@ -2328,6 +2330,7 @@ case $_backend in
INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`"
LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`"
DEFINES="$DEFINES -DSDL_BACKEND" DEFINES="$DEFINES -DSDL_BACKEND"
add_line_to_config_mk "SDL_BACKEND = 1"
;; ;;
esac esac