Don't set SDL variables if we don't build the client -> removes error messages when building on a server without SDL installed.

This commit is contained in:
Thilo Schulz 2009-10-08 19:21:42 +00:00
parent 8d8ed0b47a
commit 40c773d80e

View file

@ -181,9 +181,11 @@ SDLHDIR=$(MOUNT_DIR)/SDL12
LIBSDIR=$(MOUNT_DIR)/libs LIBSDIR=$(MOUNT_DIR)/libs
TEMPDIR=/tmp TEMPDIR=/tmp
# set PKG_CONFIG_PATH to influence this, e.g. # We won't need this if we want to build the client
# PKG_CONFIG_PATH=/opt/cross/i386-mingw32msvc/lib/pkgconfig ifneq ($(BUILD_CLIENT),0)
ifeq ($(shell which pkg-config > /dev/null; echo $$?),0) # set PKG_CONFIG_PATH to influence this, e.g.
# PKG_CONFIG_PATH=/opt/cross/i386-mingw32msvc/lib/pkgconfig
ifeq ($(shell which pkg-config > /dev/null; echo $$?),0)
CURL_CFLAGS=$(shell pkg-config --cflags libcurl) CURL_CFLAGS=$(shell pkg-config --cflags libcurl)
CURL_LIBS=$(shell pkg-config --libs libcurl) CURL_LIBS=$(shell pkg-config --libs libcurl)
OPENAL_CFLAGS=$(shell pkg-config --cflags openal) OPENAL_CFLAGS=$(shell pkg-config --cflags openal)
@ -191,13 +193,14 @@ ifeq ($(shell which pkg-config > /dev/null; echo $$?),0)
# FIXME: introduce CLIENT_CFLAGS # FIXME: introduce CLIENT_CFLAGS
SDL_CFLAGS=$(shell pkg-config --cflags sdl|sed 's/-Dmain=SDL_main//') SDL_CFLAGS=$(shell pkg-config --cflags sdl|sed 's/-Dmain=SDL_main//')
SDL_LIBS=$(shell pkg-config --libs sdl) SDL_LIBS=$(shell pkg-config --libs sdl)
endif endif
# Use sdl-config if all else fails # Use sdl-config if all else fails
ifeq ($(SDL_CFLAGS),) ifeq ($(SDL_CFLAGS),)
ifeq ($(shell which sdl-config > /dev/null; echo $$?),0) ifeq ($(shell which sdl-config > /dev/null; echo $$?),0)
SDL_CFLAGS=$(shell sdl-config --cflags) SDL_CFLAGS=$(shell sdl-config --cflags)
SDL_LIBS=$(shell sdl-config --libs) SDL_LIBS=$(shell sdl-config --libs)
endif endif
endif
endif endif
# version info # version info