removed unused array for SDL key state
[rocksndiamonds.git] / src / Makefile
index ec8cb5e9224ae2eb74b8124dd5da4d1a472f0dd5..7a128e75ed18b79b4e3f97cf34ff6abafe2d0479 100644 (file)
@@ -44,8 +44,6 @@ DEBUGGER = gdb -batch -ex "run" -ex "bt"
 PROGBASE = rocksndiamonds
 PROGNAME = ../$(PROGBASE)
 
-EDITION ?= default
-
 
 # -----------------------------------------------------------------------------
 # configuring platform
@@ -82,6 +80,11 @@ MACOSX_DEPLOYMENT_TARGET = $MAC_TARGET_VERSION_MIN
 endif
 endif
 
+ifeq ($(shell uname -s),OS/2)          # compiling on OS/2
+PROGNAME = ../$(PROGBASE).exe
+EXTRA_LDFLAGS = -Zomf -Zbin-files -Zmap -lcx -Zhigh-mem
+endif
+
 
 # -----------------------------------------------------------------------------
 # configuring target
@@ -134,6 +137,7 @@ DEBUG = -DDEBUG -g
 # OPTIONS = $(DEBUG) -O2 -Wall                 # only for debugging purposes
 # OPTIONS = $(DEBUG) -Wall                     # only for debugging purposes
 OPTIONS = $(DEBUG) -Wall -Wstrict-prototypes -Wmissing-prototypes
+# OPTIONS = $(DEBUG) -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes
 # OPTIONS = $(DEBUG) -Wall -ansi -pedantic     # only for debugging purposes
 # OPTIONS = -O2 -Wall -ansi -pedantic
 # OPTIONS = -O2 -Wall
@@ -231,6 +235,9 @@ SOURCE_HASH_STRING ?= $(shell test -d ../.git && test `git ls-files -m | wc -l`
 LIBGAME_DIR = libgame
 LIBGAME = $(LIBGAME_DIR)/libgame.a
 
+GAME_BD_DIR = game_bd
+GAME_BD = $(GAME_BD_DIR)/game_bd.a
+
 GAME_EM_DIR = game_em
 GAME_EM = $(GAME_EM_DIR)/game_em.a
 
@@ -240,14 +247,14 @@ GAME_SP = $(GAME_SP_DIR)/game_sp.a
 GAME_MM_DIR = game_mm
 GAME_MM = $(GAME_MM_DIR)/game_mm.a
 
-RNDLIBS = $(LIBGAME) $(GAME_EM) $(GAME_SP) $(GAME_MM)
+RNDLIBS = $(GAME_BD) $(GAME_EM) $(GAME_SP) $(GAME_MM) $(LIBGAME)
 AUTOCONF = conf_gfx.h conf_snd.h conf_mus.h
 
 ICONBASE = windows_icon
-ICON_BASEPATH = ../Special/Icons/windows_icons
+ICON_BASEPATH = ../build-projects/windows/icons
 
 ifeq ($(PLATFORM_BASE),cross-win)
-ICON_PATH = $(ICON_BASEPATH)/$(EDITION)
+ICON_PATH = $(ICON_BASEPATH)
 ICON = $(ICONBASE).o
 endif
 
@@ -258,7 +265,7 @@ GRAPHICS_DIR = ../graphics
 # build targets
 # -----------------------------------------------------------------------------
 
-all: $(AUTOCONF) libgame_dir game_em_dir game_sp_dir game_mm_dir $(PROGNAME) graphics_dir
+all: $(AUTOCONF) libgame_dir game_bd_dir game_em_dir game_sp_dir game_mm_dir $(PROGNAME) graphics_dir
 
 $(PROGNAME): $(RNDLIBS) $(TIMESTAMP_FILE) $(COMMIT_HASH_FILE) $(OBJS) $(ICON)
        $(CC) $(OBJS) $(ICON) $(RNDLIBS) $(LDFLAGS) -o $(PROGNAME)
@@ -274,6 +281,11 @@ libgame_dir:
 $(LIBGAME):
        @$(MAKE) -C $(LIBGAME_DIR)
 
+game_bd_dir:
+       @$(MAKE) -C $(GAME_BD_DIR)
+$(GAME_BD):
+       @$(MAKE) -C $(GAME_BD_DIR)
+
 game_em_dir:
        @$(MAKE) -C $(GAME_EM_DIR)
 $(GAME_EM):
@@ -327,7 +339,6 @@ $(COMMIT_HASH_FILE): $(SRCS) $(RNDLIBS)
        @$(MAKE) conf-hash
 
 $(ICON):
-#      $(CONVERT) $(ICON32X32) $(CONVERT_ICON_ARGS) $(ICONBASE).ico
        $(CONVERT) $(ICON_PATH)/*.png $(CONVERT_ICON_ARGS) $(ICONBASE).ico
        echo "$(ICONBASE) ICON $(ICONBASE).ico" | $(WINDRES) -o $(ICON)
 
@@ -339,6 +350,7 @@ graphics_dir:
 
 clean-obj:
        $(MAKE) -C $(LIBGAME_DIR) clean
+       $(MAKE) -C $(GAME_BD_DIR) clean
        $(MAKE) -C $(GAME_EM_DIR) clean
        $(MAKE) -C $(GAME_SP_DIR) clean
        $(MAKE) -C $(GAME_MM_DIR) clean
@@ -383,15 +395,24 @@ valgrind:
 # -----------------------------------------------------------------------------
 
 tags:
-       $(ETAGS) *.[ch] $(LIBGAME_DIR)/*.[ch] $(GAME_EM_DIR)/*.[ch] $(GAME_SP_DIR)/*.[ch] $(GAME_MM_DIR)/*.[ch]
+       $(ETAGS) *.[ch] $(LIBGAME_DIR)/*.[ch] $(GAME_BD_DIR)/*.[ch] $(GAME_EM_DIR)/*.[ch] $(GAME_SP_DIR)/*.[ch] $(GAME_MM_DIR)/*.[ch]
 
 depend:
        $(MAKE) -C $(LIBGAME_DIR) depend
+       $(MAKE) -C $(GAME_BD_DIR) depend
        $(MAKE) -C $(GAME_EM_DIR) depend
        $(MAKE) -C $(GAME_SP_DIR) depend
        $(MAKE) -C $(GAME_MM_DIR) depend
        for i in $(SRCS); do $(CPP) $(CFLAGS) -M $$i; done > .depend
 
+depend-clean:
+       $(MAKE) -C $(LIBGAME_DIR) depend-clean
+       $(MAKE) -C $(GAME_BD_DIR) depend-clean
+       $(MAKE) -C $(GAME_EM_DIR) depend-clean
+       $(MAKE) -C $(GAME_SP_DIR) depend-clean
+       $(MAKE) -C $(GAME_MM_DIR) depend-clean
+       $(RM) .depend
+
 ifeq (.depend,$(wildcard .depend))
 include .depend
 endif