rnd-20000724-1-src
authorHolger Schemel <info@artsoft.org>
Fri, 28 Jul 2000 21:28:08 +0000 (23:28 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:34:44 +0000 (10:34 +0200)
src/Makefile
src/sdl.h

index f1e51133067f2f98ecbab8fd95a57b97a94a9618..17615f9017d8ba7bc57e3dd235d7b6fc74b647e1 100644 (file)
@@ -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
index 69d2f20b299b589f90bb8b0d6ef770330e920e9a..7d7c1c114d971553b5904949c4a23c8063f6e701 100644 (file)
--- a/src/sdl.h
+++ b/src/sdl.h
 #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 */