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
1 changed files with 19 additions and 16 deletions

View File

@ -181,22 +181,25 @@ 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.
CURL_CFLAGS=$(shell pkg-config --cflags libcurl) # PKG_CONFIG_PATH=/opt/cross/i386-mingw32msvc/lib/pkgconfig
CURL_LIBS=$(shell pkg-config --libs libcurl) ifeq ($(shell which pkg-config > /dev/null; echo $$?),0)
OPENAL_CFLAGS=$(shell pkg-config --cflags openal) CURL_CFLAGS=$(shell pkg-config --cflags libcurl)
OPENAL_LIBS=$(shell pkg-config --libs openal) CURL_LIBS=$(shell pkg-config --libs libcurl)
# FIXME: introduce CLIENT_CFLAGS OPENAL_CFLAGS=$(shell pkg-config --cflags openal)
SDL_CFLAGS=$(shell pkg-config --cflags sdl|sed 's/-Dmain=SDL_main//') OPENAL_LIBS=$(shell pkg-config --libs openal)
SDL_LIBS=$(shell pkg-config --libs sdl) # FIXME: introduce CLIENT_CFLAGS
endif SDL_CFLAGS=$(shell pkg-config --cflags sdl|sed 's/-Dmain=SDL_main//')
# Use sdl-config if all else fails SDL_LIBS=$(shell pkg-config --libs sdl)
ifeq ($(SDL_CFLAGS),) endif
ifeq ($(shell which sdl-config > /dev/null; echo $$?),0) # Use sdl-config if all else fails
SDL_CFLAGS=$(shell sdl-config --cflags) ifeq ($(SDL_CFLAGS),)
SDL_LIBS=$(shell sdl-config --libs) ifeq ($(shell which sdl-config > /dev/null; echo $$?),0)
SDL_CFLAGS=$(shell sdl-config --cflags)
SDL_LIBS=$(shell sdl-config --libs)
endif
endif endif
endif endif