rnd-20031019-4-src
[rocksndiamonds.git] / src / Makefile
index ff28877633b2b653aa14aa87f2e396da2af41c55..46a9ddd29df4b9bc7fbe225afb15fa1913ef2c5e 100644 (file)
@@ -1,11 +1,16 @@
-#=============================================================================#
-# Makefile for Rocks'n'Diamonds                                               #
-# (c) 1995-2002 Holger Schemel, info@artsoft.org                              #
-#=============================================================================#
+# =============================================================================
+# Rocks'n'Diamonds Makefile (src)
+# -----------------------------------------------------------------------------
+# (c) 1995-2003 Holger Schemel <info@artsoft.org>
+# =============================================================================
+
+# -----------------------------------------------------------------------------
+# configuration
+# -----------------------------------------------------------------------------
 
 .EXPORT_ALL_VARIABLES:
 
-ifndef PLATFORM                        # platform not specified -- try auto detection
+ifndef PLATFORM                        # no platform specified -- try auto detection
 ifdef COMSPEC
 PLATFORM = msdos
 else
@@ -76,8 +81,12 @@ endif
 
 ifeq ($(TARGET),sdl)
 SYS_CFLAGS  = -DTARGET_SDL $(shell sdl-config --cflags)
+ifeq ($(PLATFORM),macosx)
+SYS_LDFLAGS = -lSDL_image -lSDL_mixer -lsmpeg $(shell sdl-config --libs)
+else
 SYS_LDFLAGS = -lSDL_image -lSDL_mixer $(shell sdl-config --libs)
 endif
+endif
 
 ifeq ($(TARGET),allegro)
 SYS_CFLAGS = -DTARGET_ALLEGRO -I$(CROSS_PATH_MSDOS)/include
@@ -103,7 +112,7 @@ CONFIG_GAME_DIR = $(CONFIG_RO_GAME_DIR) $(CONFIG_RW_GAME_DIR)
 
 
 CONFIG = $(CONFIG_GAME_DIR) $(CONFIG_SCORE_ENTRIES) $(JOYSTICK)
-DEBUG = -DDEBUG -g
+DEBUG = -DDEBUG -g
 # PROFILING = $(PROFILING_FLAGS)
 
 # OPTIONS = $(DEBUG) -Wall                     # only for debugging purposes
@@ -180,6 +189,10 @@ ICON = $(ICONBASE).o
 endif
 
 
+# -----------------------------------------------------------------------------
+# build targets
+# -----------------------------------------------------------------------------
+
 all: libgame_dir $(PROGNAME)
 
 $(PROGNAME): $(LIBGAME) $(TIMESTAMP_FILE) $(OBJS) $(ICON)
@@ -230,9 +243,9 @@ clean-bin:
 clean: clean-obj clean-ico clean-bin
 
 
-#-----------------------------------------------------------------------------#
-# development only stuff                                                      #
-#-----------------------------------------------------------------------------#
+# -----------------------------------------------------------------------------
+# development only
+# -----------------------------------------------------------------------------
 
 dist-clean: clean-obj