# =============================================================================
# Rocks'n'Diamonds - McDuffin Strikes Back!
# -----------------------------------------------------------------------------
-# (c) 1995-2014 by Artsoft Entertainment
+# (c) 1995-2015 by Artsoft Entertainment
# Holger Schemel
# info@artsoft.org
# http://www.artsoft.org/
CONVERT_ICON_ARGS = -transparent black -background transparent
PROGBASE = rocksndiamonds
-
-ifdef SPECIAL_EDITION # create special edition
-PROGBASE = $(SPECIAL_EDITION)
-endif
-
PROGNAME = ../$(PROGBASE)
# configuring platform
# -----------------------------------------------------------------------------
-ifeq ($(PLATFORM),solaris) # compiling on Solaris
-EXTRA_LDFLAGS = -lnsl -lsocket -R$(XLIB_PATH)
-override PLATFORM = unix
-endif
-
ifeq ($(PLATFORM),macosx) # compiling on Mac OS X
EXTRA_LDFLAGS = -lstdc++
override PLATFORM = unix
endif
endif
-ifeq ($(STATIC),true) # check for static linking
-override TARGET := $(TARGET)-static
-endif
-
# $(info Using SDL version $(SDL_VERSION) [TARGET == $(TARGET)])
ifeq ($(TARGET),sdl) # compiling for SDL target
SYS_CFLAGS = -DTARGET_SDL $(shell sdl-config --cflags)
-SDL_LIBS = -lSDL_image -lSDL_mixer -lSDL_net -lsmpeg
+SDL_LIBS = -lSDL_image -lSDL_mixer -lSDL_net
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
+SDL_LIBS = -lSDL2_image -lSDL2_mixer -lSDL2_net
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)
-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
-
# -----------------------------------------------------------------------------
# configuring compile-time definitions
CONFIG_SCORE_ENTRIES = -D$(SCORE_ENTRIES)
endif
-ifdef SPECIAL_EDITION
-ifeq ($(SPECIAL_EDITION),rnd_jue) # create special edition
-CONFIG_SPECIAL = -DCREATE_SPECIAL_EDITION -DCREATE_SPECIAL_EDITION_RND_JUE
-endif
-endif
-
CONFIG_GAME_DIR = $(CONFIG_RO_GAME_DIR) $(CONFIG_RW_GAME_DIR)
-CONFIG_GAME = $(CONFIG_GAME_DIR) $(CONFIG_SCORE_ENTRIES) $(CONFIG_SPECIAL)
+CONFIG_GAME = $(CONFIG_GAME_DIR) $(CONFIG_SCORE_ENTRIES)
CONFIG = $(CONFIG_GAME) $(JOYSTICK)
DEBUG = -DDEBUG -g
# OPTIONS = -O3 -Wall -ansi -pedantic
# OPTIONS = -O3 -Wall
# OPTIONS = -O3
-# OPTIONS = -DSYSV -Ae # may be needed for HP-UX
ifdef BUILD_DIST # distribution build
+SYS_LDFLAGS := $(shell echo $(SYS_LDFLAGS) | \
+ sed -e "s%-rpath,[^ ]*%-rpath,'\$$ORIGIN/lib'%")
OPTIONS = -O3 -Wall
endif
editor.c \
files.c \
tape.c \
- cartoons.c \
+ anim.c \
network.c \
netserv.c
editor.o \
files.o \
tape.o \
- cartoons.o \
+ anim.o \
network.o \
netserv.o
ICONBASE = windows_icon
ICON_BASEPATH = ../Special/Icons/windows_icons
+
ifeq ($(PLATFORM),cross-win32)
-ifdef SPECIAL_EDITION
-# ICONSUFFIX = 32x32_$(SPECIAL_EDITION)
-ICON_PATH = $(ICON_BASEPATH)/$(SPECIAL_EDITION)
-else
-# ICONSUFFIX = 32x32
ICON_PATH = $(ICON_BASEPATH)/default
-endif
-# ICON32X32 = ../graphics/$(ICONBASE)_$(ICONSUFFIX).bmp
ICON = $(ICONBASE).o
endif
$(PROGNAME): $(RNDLIBS) $(TIMESTAMP_FILE) $(OBJS) $(ICON)
$(CC) $(PROFILING) $(OBJS) $(ICON) $(RNDLIBS) $(LDFLAGS) -o $(PROGNAME)
+ifdef BUILD_DIST
+ strip $(PROGNAME)
+endif
libgame_dir:
@$(MAKE) -C $(LIBGAME_DIR)
$(CC) $(PROFILING) $(CFLAGS) -c $*.c
graphics_dir:
- @$(MAKE) -C $(GRAPHICS_DIR)
+ @test -f $(GRAPHICS_DIR)/Makefile && $(MAKE) -C $(GRAPHICS_DIR) || true
clean-obj:
$(MAKE) -C $(LIBGAME_DIR) clean
$(MAKE) -C $(GAME_SP_DIR) clean
$(RM) $(OBJS)
$(RM) $(RNDLIBS)
-# $(RM) $(LIBGAME)
-# $(RM) $(GAME_EM)
-# $(RM) $(GAME_SP)
clean-ico:
$(RM) $(ICONBASE).ico
clean-git: clean auto-conf-clean
@$(MAKE) -C $(GRAPHICS_DIR) clean
+dist-clean: clean-obj clean-ico
+
# -----------------------------------------------------------------------------
# run and test targets
# development only
# -----------------------------------------------------------------------------
-dist-clean: clean-obj
-
tags:
$(ETAGS) *.[ch] $(LIBGAME_DIR)/*.[ch] $(GAME_EM_DIR)/*.[ch] $(GAME_SP_DIR)/*.[ch]