From 810141f297cc60ca46db37bc0e6552f163984200 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Wed, 5 Jan 2011 23:05:17 +0000 Subject: [PATCH] updated the darwin makefile after music streaming changes. it probably needs further updating, though... git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@380 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/Makefile.darwin | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/Quake/Makefile.darwin b/Quake/Makefile.darwin index d1e01afd..f4b03c9d 100644 --- a/Quake/Makefile.darwin +++ b/Quake/Makefile.darwin @@ -19,6 +19,11 @@ check_gcc = $(shell if echo | $(CC) $(1) -S -o /dev/null -xc - > /dev/null 2>&1; # ============================================================================ +# Enable/disable codecs for streaming music support: +USE_CODEC_WAVE=yes +USE_CODEC_MP3=yes +USE_CODEC_VORBIS=yes + DEBUG ?= 0 SDLNET ?= 0 @@ -116,10 +121,25 @@ else NET_LIBS := endif +# FIXME: The codec libs stuff are copied over from the unix makefile +# They might need adaptations for Darwin +CODECLIBS := +ifeq ($(USE_CODEC_WAVE),yes) +CFLAGS+= -DUSE_CODEC_WAVE +endif +ifeq ($(USE_CODEC_VORBIS),yes) +CFLAGS+= -DUSE_CODEC_VORBIS +CODECLIBS+= -lvorbis -lvorbisfile -logg +endif +ifeq ($(USE_CODEC_MP3),yes) +CFLAGS+= -DUSE_CODEC_MP3 +CODECLIBS+= -lmad +endif + COMMON_LIBS = -Wl,-framework,OpenGL #LIBS := $(patsubst %,-l%,$(COMMON_LIBS) $(NET_LIBS)) -LIBS = $(COMMON_LIBS) $(NET_LIBS) +LIBS = $(COMMON_LIBS) $(NET_LIBS) $(CODECLIBS) # --------------------------- # targets @@ -140,7 +160,12 @@ DEFAULT_TARGET := quakespasm # objects # ---------------------------------------------------------------------------- -COMOBJ_SND := snd_dma.o snd_mix.o snd_mem.o +MUSIC_OBJS:= bgmusic.o \ + snd_codec.o \ + snd_wave.o \ + snd_vorbis.o \ + snd_mp3.o +COMOBJ_SND := snd_dma.o snd_mix.o snd_mem.o $(MUSIC_OBJS) SYSOBJ_SND := snd_sdl.o SYSOBJ_CDA := cd_sdl.o SYSOBJ_INPUT := in_sdl.o