From 38baaa2274a458f03f576dea5a6d3cd9e25f8063 Mon Sep 17 00:00:00 2001 From: tma Date: Sun, 13 Nov 2005 18:58:14 +0000 Subject: * OpenAL support, from BlackAura aka Stuart Dalton + An abstract codec system, simplifying support for new formats + Changes versus BlackAura's patch: o Consolidated the OpenAL parts into one file o Changed the function naming scheme to more closely resemble Q3 o Changed the interface to fall back on the "base" sound system if loading OpenAL fails + This is enabled on Linux and MinGW for now, but should work on the other *nixs with appropriate additions to the Makefile + NOT enabled on OS X or MSVC Windows builds + Probably breaks the Windows build again * Retabulated sdl_snd.c and made the messages less verbose since there do not seem to be many having problems with SDL sound now git-svn-id: svn://svn.icculus.org/quake3/trunk@343 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/unix/Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'code/unix/Makefile') diff --git a/code/unix/Makefile b/code/unix/Makefile index 43083d1..4d2ab9b 100644 --- a/code/unix/Makefile +++ b/code/unix/Makefile @@ -47,6 +47,10 @@ ifndef USE_SDL USE_SDL=1 endif +ifndef USE_OPENAL +USE_OPENAL=1 +endif + ifndef BUILD_CLIENT BUILD_CLIENT=1 endif @@ -115,6 +119,10 @@ ifeq ($(PLATFORM),linux) BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes + ifeq ($(USE_OPENAL),1) + BASE_CFLAGS += -DUSE_OPENAL=1 + endif + ifeq ($(USE_SDL),1) BASE_CFLAGS += -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 $(shell sdl-config --cflags) GL_CFLAGS = @@ -214,6 +222,10 @@ ifeq ($(PLATFORM),mingw32) BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes + ifeq ($(USE_OPENAL),1) + BASE_CFLAGS += -DUSE_OPENAL=1 + endif + DX_CFLAGS = -I$(DXSDK_DIR)/Include GL_CFLAGS = @@ -620,6 +632,13 @@ Q3OBJ = \ $(B)/client/snd_mix.o \ $(B)/client/snd_wavelet.o \ \ + $(B)/client/snd_main.o \ + $(B)/client/snd_codec.o \ + $(B)/client/snd_codec_wav.o \ + \ + $(B)/client/qal.o \ + $(B)/client/snd_openal.o \ + \ $(B)/client/sv_bot.o \ $(B)/client/sv_ccmds.o \ $(B)/client/sv_client.o \ @@ -891,6 +910,14 @@ $(B)/client/snd_dma.o : $(CDIR)/snd_dma.c; $(DO_CC) $(B)/client/snd_mem.o : $(CDIR)/snd_mem.c; $(DO_CC) $(B)/client/snd_mix.o : $(CDIR)/snd_mix.c; $(DO_CC) $(B)/client/snd_wavelet.o : $(CDIR)/snd_wavelet.c; $(DO_CC) + +$(B)/client/snd_main.o : $(CDIR)/snd_main.c; $(DO_CC) +$(B)/client/snd_codec.o : $(CDIR)/snd_codec.c; $(DO_CC) +$(B)/client/snd_codec_wav.o : $(CDIR)/snd_codec_wav.c; $(DO_CC) + +$(B)/client/qal.o : $(CDIR)/qal.c; $(DO_CC) +$(B)/client/snd_openal.o : $(CDIR)/snd_openal.c; $(DO_CC) + $(B)/client/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_CC) $(B)/client/sv_client.o : $(SDIR)/sv_client.c; $(DO_CC) $(B)/client/sv_ccmds.o : $(SDIR)/sv_ccmds.c; $(DO_CC) -- cgit v1.2.3