X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2FMakefile;h=05eccd9916ed18c56496318ab01a9216a5f4c6b0;hb=8f33ee4940b9c35bf4627b7ef1126d03748da646;hp=fe9f33e07d3c794fbf079245a806f53640143d43;hpb=07bd1f7e496e8914d56ec4422b33492b8f66b1d0;p=rocksndiamonds.git diff --git a/src/Makefile b/src/Makefile index fe9f33e0..05eccd99 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 +# ============================================================================= + +# ----------------------------------------------------------------------------- +# 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 @@ -64,6 +69,7 @@ TARGET = allegro endif ifeq ($(PLATFORM),cross-win32) +EXTRA_LDFLAGS = -lshfolder PROGNAME = ../$(PROGBASE).exe TARGET = sdl endif @@ -75,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 @@ -102,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 @@ -125,6 +135,8 @@ LDFLAGS = $(SYS_LDFLAGS) $(EXTRA_LDFLAGS) -lm SRCS = main.c \ conf_gfx.c \ conf_snd.c \ + conf_mus.c \ + conf_hlp.c \ init.c \ config.c \ events.c \ @@ -141,6 +153,8 @@ SRCS = main.c \ OBJS = main.o \ conf_gfx.o \ conf_snd.o \ + conf_mus.o \ + conf_hlp.o \ init.o \ config.o \ events.o \ @@ -156,6 +170,7 @@ OBJS = main.o \ CNFS = conf_gfx.h \ conf_snd.h \ + conf_mus.h \ conf_chr.c \ conf_chr.h \ conf_cus.c \ @@ -163,7 +178,9 @@ CNFS = conf_gfx.h \ conf_e2g.c \ conf_esg.c \ conf_e2s.c \ - conf_fnt.c + conf_fnt.c \ + conf_g2s.c \ + conf_g2m.c CNFS_CMD = ../Scripts/create_element_defs.pl @@ -179,6 +196,10 @@ ICON = $(ICONBASE).o endif +# ----------------------------------------------------------------------------- +# build targets +# ----------------------------------------------------------------------------- + all: libgame_dir $(PROGNAME) $(PROGNAME): $(LIBGAME) $(TIMESTAMP_FILE) $(OBJS) $(ICON) @@ -201,6 +222,9 @@ conf_gfx.h: conf_gfx.c conf_snd.h: conf_snd.c @$(MAKE) auto-conf +conf_mus.h: conf_mus.c + @$(MAKE) auto-conf + $(TIMESTAMP_FILE): $(SRCS) $(LIBGAME) @date '+"[%Y-%m-%d %H:%M]"' \ | sed -e 's/^/#define COMPILE_DATE_STRING /' \ @@ -229,9 +253,9 @@ clean-bin: clean: clean-obj clean-ico clean-bin -#-----------------------------------------------------------------------------# -# development only stuff # -#-----------------------------------------------------------------------------# +# ----------------------------------------------------------------------------- +# development only +# ----------------------------------------------------------------------------- dist-clean: clean-obj