From: Holger Schemel Date: Fri, 28 Jul 2000 21:28:08 +0000 (+0200) Subject: rnd-20000724-1-src X-Git-Tag: 2.0.0^2~52 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=0e5a0f487acaed09a34c655b83ea637c83f4a0f0;p=rocksndiamonds.git rnd-20000724-1-src --- diff --git a/src/Makefile b/src/Makefile index f1e51133..17615f90 100644 --- a/src/Makefile +++ b/src/Makefile @@ -34,15 +34,22 @@ ifeq ($(PLATFORM),solaris) EXTRA_LIBS = -lnsl -lsocket -R$(XLIB_PATH) endif +USE_SDL = true +USE_SDL_OLD_LIBS = true + +ifeq ($(USE_SDL_OLD_LIBS),true) +SDL_EXTRA_LIBS = -lIMG +else +SDL_EXTRA_LIBS = -lSDL_image +endif + SDL_CFLAGS := -DUSE_SDL_LIBRARY $(shell sdl-config --cflags) -SDL_LDFLAGS := -lSDL_image $(shell sdl-config --libs) +SDL_LDFLAGS := $(SDL_EXTRA_LIBS) $(shell sdl-config --libs) X11_CFLAGS = $(X11_INCL) X11_LDFLAGS = $(X11_LIBS) -lX11 -USE_SDL = true - -ifdef USE_SDL +ifeq ($(USE_SDL),true) SYS_CFLAGS = $(SDL_CFLAGS) SYS_LDFLAGS = $(SDL_LDFLAGS) else diff --git a/src/sdl.h b/src/sdl.h index 69d2f20b..7d7c1c11 100644 --- a/src/sdl.h +++ b/src/sdl.h @@ -16,8 +16,12 @@ #define SDL_H #include "SDL.h" -#include "SDL_image.h" +#if SDL_MAJOR_VERSION >= 1 && SDL_MINOR_VERSION >= 1 +#include "SDL_image.h" +#else +#include "IMG.h" +#endif /* SDL type definitions */