rnd-20140430-1-src
[rocksndiamonds.git] / src / Makefile
index a67cd14c4be5ef0159e110b809cc2ccfb162c1a9..8efe88c658ff570af4f28a3feb8888295845d5ce 100644 (file)
@@ -75,7 +75,8 @@ endif
 ifeq ($(PLATFORM),cross-win32)         # cross-compiling to Windows
 PROGNAME = ../$(PROGBASE).exe
 EXTRA_LDFLAGS = -lshfolder -lwsock32
-TARGET = sdl
+# TARGET = sdl
+TARGET = sdl2
 endif
 
 ifeq ($(PLATFORM),cross-msdos)         # cross-compiling to MS-DOS
@@ -98,22 +99,34 @@ endif
 # -----------------------------------------------------------------------------
 
 ifeq ($(TARGET),x11)                   # compiling for X11 target
-SYS_CFLAGS  = -DTARGET_X11 $(X11_INCL)
+SYS_CFLAGS = -DTARGET_X11 $(X11_INCL)
 SYS_LDFLAGS = $(X11_LIBS)
 endif
 
 ifeq ($(TARGET),sdl)                   # compiling for SDL target
-SYS_CFLAGS  = -DTARGET_SDL $(shell sdl-config --cflags)
+SYS_CFLAGS = -DTARGET_SDL $(shell sdl-config --cflags)
 SDL_LIBS = -lSDL_image -lSDL_mixer -lSDL_net -lsmpeg
 SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl-config --libs)
 endif
 
+ifeq ($(TARGET),sdl2)                  # compiling for SDL2 target
+SYS_CFLAGS = -DTARGET_SDL2 $(shell sdl2-config --cflags)
+SDL_LIBS = -lSDL2_image -lSDL2_mixer -lSDL2_net -lsmpeg2
+SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl2-config --libs)
+endif
+
 ifeq ($(TARGET),sdl-static)            # compiling for SDL target (static)
-SYS_CFLAGS  = -DTARGET_SDL $(shell sdl-config --cflags)
+SYS_CFLAGS = -DTARGET_SDL $(shell sdl-config --cflags)
 SDL_LIBS = -lSDL_image -lSDL_mixer -lSDL_net -lsmpeg -lmikmod
 SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl-config --static-libs)
 endif
 
+ifeq ($(TARGET),sdl2-static)           # compiling for SDL2 target (static)
+SYS_CFLAGS = -DTARGET_SDL2 $(shell sdl2-config --cflags)
+SDL_LIBS = -lSDL2_image -lSDL2_mixer -lSDL2_net -lsmpeg2 -lmikmod
+SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl2-config --static-libs)
+endif
+
 ifeq ($(TARGET),allegro)               # compiling for Allegro target
 SYS_CFLAGS = -DTARGET_ALLEGRO -I$(CROSS_PATH_MSDOS)/include
 SYS_LDFLAGS = -lalleg
@@ -146,7 +159,7 @@ CONFIG_GAME_DIR = $(CONFIG_RO_GAME_DIR) $(CONFIG_RW_GAME_DIR)
 CONFIG_GAME = $(CONFIG_GAME_DIR) $(CONFIG_SCORE_ENTRIES) $(CONFIG_SPECIAL)
 
 CONFIG = $(CONFIG_GAME) $(JOYSTICK)
-DEBUG = -DDEBUG -g
+DEBUG = -DDEBUG -g
 # PROFILING = $(PROFILING_FLAGS)
 
 # OPTIONS = $(DEBUG) -Wall                     # only for debugging purposes